summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2010-05-10 09:44:18 +0200
committerRoberto Raggi <roberto.raggi@nokia.com>2010-05-10 09:57:56 +0200
commitaab9c520309a75c8f7637b130033704651c69701 (patch)
tree5103cf8793e88c98093e15b4d9cf68ed76e09c62 /src/shared/cplusplus
parent05984e71fc1d93dc65bc5aab42b5edea8f66601e (diff)
downloadqt-creator-aab9c520309a75c8f7637b130033704651c69701.tar.gz
More work on template instantiation.
Diffstat (limited to 'src/shared/cplusplus')
-rw-r--r--src/shared/cplusplus/Symbol.cpp6
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);