summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/Parser.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-03-02 00:47:37 +0000
committerDouglas Gregor <dgregor@apple.com>2011-03-02 00:47:37 +0000
commite7c20653799c486ff92b735b574af9827371c602 (patch)
tree8c52f2d7584b56f2dede06eb37d35e0bf2027906 /clang/lib/Parse/Parser.cpp
parentd3e57ee4fc581b9a736b8326b7de7f9aa2f63922 (diff)
downloadbcm5719-llvm-e7c20653799c486ff92b735b574af9827371c602.tar.gz
bcm5719-llvm-e7c20653799c486ff92b735b574af9827371c602.zip
Push nested-name-specifier source-location information into dependent
template specialization types. This also required some parser tweaks, since we were losing track of the nested-name-specifier's source location information in several places in the parser. Other notable changes this required: - Sema::ActOnTagTemplateIdType now type-checks and forms the appropriate type nodes (+ source-location information) for an elaborated-type-specifier ending in a template-id. Previously, we used a combination of ActOnTemplateIdType and ActOnTagTemplateIdType that resulted in an ElaboratedType wrapped around a DependentTemplateSpecializationType, which duplicated the keyword ("class", "struct", etc.) and nested-name-specifier storage. - Sema::ActOnTemplateIdType now gets a nested-name-specifier, which it places into the returned type-source location information. - Sema::ActOnDependentTag now creates types with source-location information. llvm-svn: 126808
Diffstat (limited to 'clang/lib/Parse/Parser.cpp')
-rw-r--r--clang/lib/Parse/Parser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp
index ba3c03cdfb5..eb78db059e5 100644
--- a/clang/lib/Parse/Parser.cpp
+++ b/clang/lib/Parse/Parser.cpp
@@ -1129,7 +1129,7 @@ bool Parser::TryAnnotateTypeOrScopeToken(bool EnteringContext) {
Template, MemberOfUnknownSpecialization)) {
// Consume the identifier.
ConsumeToken();
- if (AnnotateTemplateIdToken(Template, TNK, &SS, TemplateName)) {
+ if (AnnotateTemplateIdToken(Template, TNK, SS, 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.
@@ -1152,7 +1152,7 @@ bool Parser::TryAnnotateTypeOrScopeToken(bool EnteringContext) {
// template-id annotation in a context where we weren't allowed
// to produce a type annotation token. Update the template-id
// annotation token to a type annotation token now.
- AnnotateTemplateIdTokenAsType(&SS);
+ AnnotateTemplateIdTokenAsType();
return false;
}
}
OpenPOWER on IntegriCloud