aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/cxx98-compat-pedantic.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/cxx98-compat-pedantic.cpp')
-rw-r--r--test/SemaCXX/cxx98-compat-pedantic.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/SemaCXX/cxx98-compat-pedantic.cpp b/test/SemaCXX/cxx98-compat-pedantic.cpp
index 18fd1520ec4e..208ea4ce9238 100644
--- a/test/SemaCXX/cxx98-compat-pedantic.cpp
+++ b/test/SemaCXX/cxx98-compat-pedantic.cpp
@@ -1,3 +1,5 @@
+// RUN: %clang_cc1 -fsyntax-only -std=c++1y -DCXX1Y -Wc++98-compat-pedantic -verify %s
+// RUN: %clang_cc1 -fsyntax-only -std=c++1y -DCXX1Y -Wc++98-compat -Werror %s
// RUN: %clang_cc1 -fsyntax-only -std=c++11 -Wc++98-compat-pedantic -verify %s
// RUN: %clang_cc1 -fsyntax-only -std=c++11 -Wc++98-compat -Werror %s
// RUN: %clang_cc1 -fsyntax-only -std=c++98 -Werror %s
@@ -38,3 +40,12 @@ long long ll1 = // expected-warning {{'long long' is incompatible with C++98}}
unsigned long long ull1 = // expected-warning {{'long long' is incompatible with C++98}}
42ULL; // expected-warning {{'long long' is incompatible with C++98}}
+int k = 0b1001;
+#ifdef CXX1Y
+// expected-warning@-2 {{binary integer literals are incompatible with C++ standards before C++1y}}
+#endif
+
+void f(int n) { int a[n]; }
+#ifdef CXX1Y
+// expected-warning@-2 {{arrays of runtime bound are incompatible with C++ standards before C++1y}}
+#endif