diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-04-06 17:38:58 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-04-06 17:38:58 +0000 |
commit | 882593f8f0e3382878a4a0a19272c88d9353ce74 (patch) | |
tree | e516ecf475cc32ea6aceac1f56141ba3b8e4bf0e /clang/test/CXX | |
parent | 4f03c0b80668483a0c045a2b31866bca4762fe0c (diff) | |
download | bcm5719-llvm-882593f8f0e3382878a4a0a19272c88d9353ce74.tar.gz bcm5719-llvm-882593f8f0e3382878a4a0a19272c88d9353ce74.zip |
Diagnose template alias declarations in local classes.
Patch by Erik Pilkington!
llvm-svn: 265571
Diffstat (limited to 'clang/test/CXX')
-rw-r--r-- | clang/test/CXX/temp/temp.decls/temp.mem/p2.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/test/CXX/temp/temp.decls/temp.mem/p2.cpp b/clang/test/CXX/temp/temp.decls/temp.mem/p2.cpp index c24d5a9b50d..feeb362e34b 100644 --- a/clang/test/CXX/temp/temp.decls/temp.mem/p2.cpp +++ b/clang/test/CXX/temp/temp.decls/temp.mem/p2.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -std=c++14 -fsyntax-only -verify %s template <typename> void quux(); @@ -8,5 +8,7 @@ void fun() { template <typename> struct bar {}; // expected-error{{templates cannot be declared inside of a local class}} template <typename> void baz() {} // expected-error{{templates cannot be declared inside of a local class}} template <typename> void qux(); // expected-error{{templates cannot be declared inside of a local class}} + template <typename> using corge = int; // expected-error{{templates cannot be declared inside of a local class}} + template <typename T> static T grault; // expected-error{{static data member}} expected-error{{templates cannot be declared inside of a local class}} }; } |