diff options
Diffstat (limited to 'test/SemaCXX/cxx0x-compat.cpp')
-rw-r--r-- | test/SemaCXX/cxx0x-compat.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/SemaCXX/cxx0x-compat.cpp b/test/SemaCXX/cxx0x-compat.cpp index 123008a..ffbd20f 100644 --- a/test/SemaCXX/cxx0x-compat.cpp +++ b/test/SemaCXX/cxx0x-compat.cpp @@ -1,4 +1,7 @@ // RUN: %clang_cc1 -fsyntax-only -std=c++98 -Wc++11-compat -verify %s +// RUN: %clang_cc1 -fsyntax-only -std=c++1y -Wc++11-compat -verify %s + +#if __cplusplus < 201103L namespace N { template<typename T> void f(T) {} // expected-note 2{{here}} @@ -37,3 +40,9 @@ void h(size_t foo, size_t bar) { #define _x + 1 char c = 'x'_x; // expected-warning {{will be treated as a user-defined literal suffix}} + +#else + +auto init_capture = [a(0)] {}; // expected-warning {{initialized lambda captures are incompatible with C++ standards before C++1y}} + +#endif |