summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/cxx-decl.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2018-04-27 02:00:13 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2018-04-27 02:00:13 +0000
commitc08b693e309baa80f0a3dd7794af130c3393c777 (patch)
tree30986154bf0d7997794a5746ca6270df4d53f40c /clang/test/Parser/cxx-decl.cpp
parent93979f67f8cc49f596ae34c45699371bd3cda785 (diff)
downloadbcm5719-llvm-c08b693e309baa80f0a3dd7794af130c3393c777.tar.gz
bcm5719-llvm-c08b693e309baa80f0a3dd7794af130c3393c777.zip
Parse A::template B as an identifier rather than as a template-id with no
template arguments. This fixes some cases where we'd incorrectly accept "A::template B" when B is a kind of template that requires template arguments (in particular, a variable template or a concept). llvm-svn: 331013
Diffstat (limited to 'clang/test/Parser/cxx-decl.cpp')
-rw-r--r--clang/test/Parser/cxx-decl.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/test/Parser/cxx-decl.cpp b/clang/test/Parser/cxx-decl.cpp
index e1b36ecfa93..c60e42f28ee 100644
--- a/clang/test/Parser/cxx-decl.cpp
+++ b/clang/test/Parser/cxx-decl.cpp
@@ -237,10 +237,11 @@ namespace PR5066 {
namespace PR17255 {
void foo() {
typename A::template B<>; // expected-error {{use of undeclared identifier 'A'}}
+ // expected-error@-1 {{'template' keyword not permitted here}}
#if __cplusplus <= 199711L
- // expected-error@-2 {{'template' keyword outside of a template}}
+ // expected-error@-3 {{'template' keyword outside of a template}}
#endif
- // expected-error@-4 {{expected a qualified name after 'typename'}}
+ // expected-error@-5 {{expected a qualified name after 'typename'}}
}
}
OpenPOWER on IntegriCloud