From 9666488fbe46cdf3a9b834cfaa3a21d28b42aad2 Mon Sep 17 00:00:00 2001 From: Roberto Raggi <qtc-committer@nokia.com> Date: Tue, 6 Jan 2009 11:52:58 +0100 Subject: [PATCH] TemplateArgumentListAST::lastToken(). --- shared/cplusplus/AST.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/shared/cplusplus/AST.cpp b/shared/cplusplus/AST.cpp index 6663cbba5d5..ad0c65c6c25 100644 --- a/shared/cplusplus/AST.cpp +++ b/shared/cplusplus/AST.cpp @@ -2375,9 +2375,8 @@ unsigned TemplateArgumentListAST::firstToken() const unsigned TemplateArgumentListAST::lastToken() const { - assert(0 && "review me"); - for (const TemplateArgumentListAST *it = this; it; it = it->next) { - if (! it->next) + for (TemplateArgumentListAST *it = this; it; it = it->next) { + if (! it->next && it->template_argument) return it->template_argument->lastToken(); } return 0; -- GitLab