diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-02-22 09:15:49 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-02-22 09:15:49 +0000 |
commit | 672edb0a04a5273e3a501f3b196844c125290780 (patch) | |
tree | d0a9753ee5f1653cf02709b2d767b72f54ee70e1 /test/Parser/cxx-decl.cpp | |
parent | 4e1125f630e75a52209b928e9d43b638abf39987 (diff) | |
download | clang-672edb0a04a5273e3a501f3b196844c125290780.tar.gz |
Don't accidentally and silently accept C++11 attributes in decl-specifier-seqs
in C++98.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175879 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser/cxx-decl.cpp')
-rw-r--r-- | test/Parser/cxx-decl.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/Parser/cxx-decl.cpp b/test/Parser/cxx-decl.cpp index 24ba127515..41d305b176 100644 --- a/test/Parser/cxx-decl.cpp +++ b/test/Parser/cxx-decl.cpp @@ -184,6 +184,9 @@ namespace PR15017 { template<typename T = struct X { int i; }> struct S {}; // expected-error {{'PR15017::X' can not be defined in a type specifier}} } +// Ensure we produce at least some diagnostic for attributes in C++98. +[[]] struct S; // expected-error 2{{}} + // PR8380 extern "" // expected-error {{unknown linkage language}} test6a { ;// expected-error {{C++ requires a type specifier for all declarations}} \ |