diff options
author | Roberto Raggi <qtc-committer@nokia.com> | 2009-01-05 10:29:12 +0100 |
---|---|---|
committer | Roberto Raggi <qtc-committer@nokia.com> | 2009-01-05 10:29:12 +0100 |
commit | 4fcadbdd49879c43c77d25faab833422bb82dd3a (patch) | |
tree | a3150bb3a25135f9d20e89fc7eb1fa783fa6c37d /shared/cplusplus | |
parent | 77c16d13172cad7a801a30ab53953dee04418f01 (diff) | |
download | qt-creator-4fcadbdd49879c43c77d25faab833422bb82dd3a.tar.gz |
Implemented LinkageBodyAST::lastToken().
Diffstat (limited to 'shared/cplusplus')
-rw-r--r-- | shared/cplusplus/AST.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/shared/cplusplus/AST.cpp b/shared/cplusplus/AST.cpp index f75fcf12a4..90cd140ef8 100644 --- a/shared/cplusplus/AST.cpp +++ b/shared/cplusplus/AST.cpp @@ -1606,8 +1606,15 @@ unsigned LinkageBodyAST::firstToken() const unsigned LinkageBodyAST::lastToken() const { - assert(0 && "review me"); - return rbrace_token + 1; + if (rbrace_token) + return rbrace_token + 1; + + for (DeclarationAST *it = declarations; it; it = it->next) { + if (! it->next) + return it->lastToken(); + } + + return lbrace_token + 1; } void LinkageSpecificationAST::accept0(ASTVisitor *visitor) |