diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-01-19 21:00:13 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-01-19 21:00:13 +0000 |
commit | 74f02347ca163e6d7bbd737ec8c3511f4185f7ea (patch) | |
tree | bd95e32e2a83a992ae0acf3ddb3dee853d03af3f /clang/test/Index/annotate-nested-name-specifier.cpp | |
parent | 9bce1e7553b4cd368306a2e1d0631fe7c99ad101 (diff) | |
download | bcm5719-llvm-74f02347ca163e6d7bbd737ec8c3511f4185f7ea.tar.gz bcm5719-llvm-74f02347ca163e6d7bbd737ec8c3511f4185f7ea.zip |
PR13403 (+duplicates): implement C++ DR1310 (http://wg21.link/cwg1310).
Under this defect resolution, the injected-class-name of a class or class
template cannot be used except in very limited circumstances (when declaring a
constructor, in a nested-name-specifier, in a base-specifier, or in an
elaborated-type-specifier). This is apparently done to make parsing easier, but
it's a pain for us since we don't know whether a template-id using the
injected-class-name is valid at the point when we annotate it (we don't yet
know whether the template-id will become part of an elaborated-type-specifier).
As a tentative resolution to a perceived language defect, mem-initializer-ids
are added to the list of exceptions here (they generally follow the same rules
as base-specifiers).
When the reference to the injected-class-name uses the 'typename' or 'template'
keywords, we permit it to be used to name a type or template as an extension;
other compilers also accept some cases in this area. There are also a couple of
corner cases with dependent template names that we do not yet diagnose, but
which will also get this treatment.
llvm-svn: 292518
Diffstat (limited to 'clang/test/Index/annotate-nested-name-specifier.cpp')
-rw-r--r-- | clang/test/Index/annotate-nested-name-specifier.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/Index/annotate-nested-name-specifier.cpp b/clang/test/Index/annotate-nested-name-specifier.cpp index eddd215a677..7f2b6a2aa70 100644 --- a/clang/test/Index/annotate-nested-name-specifier.cpp +++ b/clang/test/Index/annotate-nested-name-specifier.cpp @@ -266,7 +266,7 @@ struct X9 : X8 { // CHECK: Identifier: "vector" [57:51 - 57:57] TemplateRef=vector:4:12 // CHECK: Punctuation: "<" [57:57 - 57:58] MemberRefExpr= // CHECK: Identifier: "T" [57:58 - 57:59] TypeRef=T:54:19 -// CHECK: Punctuation: ">" [57:59 - 57:60] CallExpr= +// CHECK: Punctuation: ">" [57:59 - 57:60] MemberRefExpr= // CHECK: Punctuation: "(" [57:60 - 57:61] CallExpr= // CHECK: Punctuation: ")" [57:61 - 57:62] CallExpr= |