diff options
author | Larisse Voufo <lvoufo@google.com> | 2013-08-06 01:03:05 +0000 |
---|---|---|
committer | Larisse Voufo <lvoufo@google.com> | 2013-08-06 01:03:05 +0000 |
commit | 39a1e507ff0bef4bd6b2fdbab4e38583d2679617 (patch) | |
tree | 93b6d63dcb7906152a4879eeaf765de5852aacd4 /clang/lib/Parse/Parser.cpp | |
parent | 6f7213cb93a3a6fe4e3dbbee0c1f0d2b34821523 (diff) | |
download | bcm5719-llvm-39a1e507ff0bef4bd6b2fdbab4e38583d2679617.tar.gz bcm5719-llvm-39a1e507ff0bef4bd6b2fdbab4e38583d2679617.zip |
Started implementing variable templates. Top level declarations should be fully supported, up to some limitations documented as FIXMEs or TODO. Static data member templates work very partially. Static data member templates of class templates need particular attention...
llvm-svn: 187762
Diffstat (limited to 'clang/lib/Parse/Parser.cpp')
-rw-r--r-- | clang/lib/Parse/Parser.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp index 036278f72ed..8f894818bb4 100644 --- a/clang/lib/Parse/Parser.cpp +++ b/clang/lib/Parse/Parser.cpp @@ -1437,8 +1437,9 @@ Parser::TryAnnotateName(bool IsAddressOfOperand, return ANK_TemplateName; } // Fall through. + case Sema::NC_VarTemplate: case Sema::NC_FunctionTemplate: { - // We have a type or function template followed by '<'. + // We have a type, variable or function template followed by '<'. ConsumeToken(); UnqualifiedId Id; Id.setIdentifier(Name, NameLoc); @@ -1653,7 +1654,8 @@ bool Parser::TryAnnotateTypeOrScopeTokenAfterScopeSpec(bool EnteringContext, // annotation token to a type annotation token now. AnnotateTemplateIdTokenAsType(); return false; - } + } else if (TemplateId->Kind == TNK_Var_template) + return false; } if (SS.isEmpty()) |