summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/Parser.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-03-30 22:58:21 +0000
committerDouglas Gregor <dgregor@apple.com>2009-03-30 22:58:21 +0000
commitdc572a326610eaf0972ece1790f61e5b6404727e (patch)
tree0f0b61400e94133bf93faefaff187749159c3a6c /clang/lib/Parse/Parser.cpp
parentadccd30533683045338fa4af186245638da0e17a (diff)
downloadbcm5719-llvm-dc572a326610eaf0972ece1790f61e5b6404727e.tar.gz
bcm5719-llvm-dc572a326610eaf0972ece1790f61e5b6404727e.zip
Improve the representation of template names in the AST. This
representation handles the various ways in which one can name a template, including unqualified references ("vector"), qualified references ("std::vector"), and dependent template names ("MetaFun::template apply"). One immediate effect of this change is that the representation of nested-name-specifiers in type names for class template specializations (e.g., std::vector<int>) is more accurate. Rather than representing std::vector<int> as std::(vector<int>) we represent it as (std::vector)<int> which more closely follows the C++ grammar. Additionally, templates are no longer represented as declarations (DeclPtrTy) in Parse-Sema interactions. Instead, I've introduced a new OpaquePtr type (TemplateTy) that holds the representation of a TemplateName. This will simplify the handling of dependent template-names, once we get there. llvm-svn: 68074
Diffstat (limited to 'clang/lib/Parse/Parser.cpp')
-rw-r--r--clang/lib/Parse/Parser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp
index b34c241fd1b..a101aaa7326 100644
--- a/clang/lib/Parse/Parser.cpp
+++ b/clang/lib/Parse/Parser.cpp
@@ -885,7 +885,7 @@ bool Parser::TryAnnotateTypeOrScopeToken() {
// If this is a template-id, annotate with a template-id or type token.
if (NextToken().is(tok::less)) {
- DeclPtrTy Template;
+ TemplateTy Template;
if (TemplateNameKind TNK
= Actions.isTemplateName(*Tok.getIdentifierInfo(),
CurScope, Template, &SS))
OpenPOWER on IntegriCloud