diff options
Diffstat (limited to 'src/shared/cplusplus/Symbol.cpp')
-rw-r--r-- | src/shared/cplusplus/Symbol.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/shared/cplusplus/Symbol.cpp b/src/shared/cplusplus/Symbol.cpp index 29865c9922..6c506c1700 100644 --- a/src/shared/cplusplus/Symbol.cpp +++ b/src/shared/cplusplus/Symbol.cpp @@ -242,6 +242,8 @@ void Symbol::setSourceLocation(unsigned sourceLocation) unsigned Symbol::line() const { + assert(_sourceOffset != 0); + unsigned line = 0, column = 0; const StringLiteral *fileId = 0; translationUnit()->getPosition(_sourceOffset, &line, &column, &fileId); @@ -250,6 +252,8 @@ unsigned Symbol::line() const unsigned Symbol::column() const { + assert(_sourceOffset != 0); + unsigned line = 0, column = 0; const StringLiteral *fileId = 0; translationUnit()->getPosition(_sourceOffset, &line, &column, &fileId); @@ -258,6 +262,8 @@ unsigned Symbol::column() const const StringLiteral *Symbol::fileId() const { + assert(_sourceOffset != 0); + unsigned line = 0, column = 0; const StringLiteral *fileId = 0; translationUnit()->getPosition(_sourceOffset, &line, &column, &fileId); |