diff options
author | Roberto Raggi <qtc-committer@nokia.com> | 2009-01-06 12:02:54 +0100 |
---|---|---|
committer | Roberto Raggi <qtc-committer@nokia.com> | 2009-01-06 12:15:51 +0100 |
commit | c1a2afceb5ef543138382817702feeca74e9cefb (patch) | |
tree | 2f6dd81bbe0b7c76bba3f63949f4d7369e848a30 /shared/cplusplus/AST.cpp | |
parent | 2fb5e63097dfb8b37896e71e0718d63844f64fc3 (diff) | |
download | qt-creator-c1a2afceb5ef543138382817702feeca74e9cefb.tar.gz |
TypeIdAST::lastToken().
Diffstat (limited to 'shared/cplusplus/AST.cpp')
-rw-r--r-- | shared/cplusplus/AST.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/shared/cplusplus/AST.cpp b/shared/cplusplus/AST.cpp index 8cb625b4ad..67813b9e7d 100644 --- a/shared/cplusplus/AST.cpp +++ b/shared/cplusplus/AST.cpp @@ -2624,10 +2624,15 @@ unsigned TypeIdAST::firstToken() const unsigned TypeIdAST::lastToken() const { - assert(0 && "review me"); if (declarator) return declarator->lastToken(); - return type_specifier->lastToken(); + + for (SpecifierAST *it = type_specifier; it; it = it->next) { + if (! it->next) + return it->lastToken(); + } + + return 0; } void TypeidExpressionAST::accept0(ASTVisitor *visitor) |