diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-11-03 23:16:33 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-11-03 23:16:33 +0000 |
commit | 014e88d94ff83e3aad4e33b16413a2d1817ec208 (patch) | |
tree | 30e9a9f52bb5682b9a948d82b65c95e6d309410a /lib/Parse/Parser.cpp | |
parent | f758dc0812e7d0a846d2e07047a9c675e2ecb191 (diff) |
Parsing and semantic analysis for template-ids that name overloaded
operators, e.g.,
operator+<int>
which now works in declarators, id-expressions, and member access
expressions. This commit only implements the non-dependent case, where
we can resolve the template-id to an actual declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85966 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/Parser.cpp')
-rw-r--r-- | lib/Parse/Parser.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp index cc4aec6297..d1baa91b65 100644 --- a/lib/Parse/Parser.cpp +++ b/lib/Parse/Parser.cpp @@ -935,9 +935,10 @@ bool Parser::TryAnnotateTypeOrScopeToken(bool EnteringContext) { // If this is a template-id, annotate with a template-id or type token. if (NextToken().is(tok::less)) { TemplateTy Template; + UnqualifiedId TemplateName; + TemplateName.setIdentifier(Tok.getIdentifierInfo(), Tok.getLocation()); if (TemplateNameKind TNK - = Actions.isTemplateName(CurScope, *Tok.getIdentifierInfo(), - Tok.getLocation(), &SS, + = Actions.isTemplateName(CurScope, SS, TemplateName, /*ObjectType=*/0, EnteringContext, Template)) if (AnnotateTemplateIdToken(Template, TNK, &SS)) { |