diff options
author | Abramo Bagnara <abramo.bagnara@gmail.com> | 2012-01-27 09:46:47 +0000 |
---|---|---|
committer | Abramo Bagnara <abramo.bagnara@gmail.com> | 2012-01-27 09:46:47 +0000 |
commit | 7945c981b974f58c021762e77f13cd4859ac447b (patch) | |
tree | bde36b37a54a925cd44c1683bd35e4ea3d3adb47 /clang/lib/Parse/Parser.cpp | |
parent | fc0da1a8e095a52fba5e7d9a0a537725716ce508 (diff) | |
download | bcm5719-llvm-7945c981b974f58c021762e77f13cd4859ac447b.tar.gz bcm5719-llvm-7945c981b974f58c021762e77f13cd4859ac447b.zip |
Added source location for the template keyword in AST template-id expressions.
llvm-svn: 149127
Diffstat (limited to 'clang/lib/Parse/Parser.cpp')
-rw-r--r-- | clang/lib/Parse/Parser.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp index da1424c6b1b..5afb0fdf3ce 100644 --- a/clang/lib/Parse/Parser.cpp +++ b/clang/lib/Parse/Parser.cpp @@ -1320,7 +1320,8 @@ bool Parser::TryAnnotateTypeOrScopeToken(bool EnteringContext, bool NeedType) { Template, MemberOfUnknownSpecialization)) { // Consume the identifier. ConsumeToken(); - if (AnnotateTemplateIdToken(Template, TNK, SS, TemplateName)) { + if (AnnotateTemplateIdToken(Template, TNK, SS, SourceLocation(), + TemplateName)) { // If an unrecoverable error occurred, we need to return true here, // because the token stream is in a damaged state. We may not return // a valid identifier. @@ -1514,9 +1515,10 @@ bool Parser::ParseMicrosoftIfExistsCondition(IfExistsCondition& Result) { return true; } - // Parse the unqualified-id. - if (ParseUnqualifiedId(Result.SS, false, true, true, ParsedType(), - Result.Name)) { + // Parse the unqualified-id. + SourceLocation TemplateKWLoc; // FIXME: parsed, but unused. + if (ParseUnqualifiedId(Result.SS, false, true, true, ParsedType(), + TemplateKWLoc, Result.Name)) { T.skipToEnd(); return true; } |