summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/cxx0x-compat.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2017-10-14 00:56:24 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2017-10-14 00:56:24 +0000
commit40e202f7d996f1ee0be33f8ddc20d2d207dfa939 (patch)
tree28050f064cc098eba8a7901cdfa95fff9a2f76b7 /clang/test/SemaCXX/cxx0x-compat.cpp
parentab3a464482dd14f734974ac63becea7b35a55364 (diff)
downloadbcm5719-llvm-40e202f7d996f1ee0be33f8ddc20d2d207dfa939.tar.gz
bcm5719-llvm-40e202f7d996f1ee0be33f8ddc20d2d207dfa939.zip
Fix backwards warning for use of C++17 attributes-on-namespaces-and-enumerators feature.
llvm-svn: 315784
Diffstat (limited to 'clang/test/SemaCXX/cxx0x-compat.cpp')
-rw-r--r--clang/test/SemaCXX/cxx0x-compat.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/test/SemaCXX/cxx0x-compat.cpp b/clang/test/SemaCXX/cxx0x-compat.cpp
index 8f7aaab6a43..b9ccadd85c2 100644
--- a/clang/test/SemaCXX/cxx0x-compat.cpp
+++ b/clang/test/SemaCXX/cxx0x-compat.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only -std=c++98 -Wc++11-compat -verify %s
-// RUN: %clang_cc1 -fsyntax-only -std=c++17 -Wc++11-compat -verify %s
+// RUN: %clang_cc1 -fsyntax-only -std=c++98 -Wc++11-compat-pedantic -verify %s
+// RUN: %clang_cc1 -fsyntax-only -std=c++17 -Wc++11-compat-pedantic -verify %s
#if __cplusplus < 201103L
@@ -52,4 +52,7 @@ static_assert(true); // expected-warning {{incompatible with C++ standards befor
template<int ...N> int f() { return (N + ...); } // expected-warning {{incompatible with C++ standards before C++17}}
+namespace [[]] NS_with_attr {} // expected-warning {{incompatible with C++ standards before C++17}}
+enum { e [[]] }; // expected-warning {{incompatible with C++ standards before C++17}}
+
#endif
OpenPOWER on IntegriCloud