diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-08-28 00:31:35 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-08-28 00:31:35 +0000 |
commit | 8b633447dae1c4f3eca785c71eaffcc071e0c608 (patch) | |
tree | d4a4edeffcd76640eff8a843089980124ee9fddb | |
parent | 6b8e3c02ca44fb6c3738bb0c75859c11a03e30ed (diff) | |
download | bcm5719-llvm-8b633447dae1c4f3eca785c71eaffcc071e0c608.tar.gz bcm5719-llvm-8b633447dae1c4f3eca785c71eaffcc071e0c608.zip |
Add test for -Wc++17-compat warning for P0683R1.
llvm-svn: 311868
-rw-r--r-- | clang/test/SemaCXX/cxx17-compat.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/cxx17-compat.cpp b/clang/test/SemaCXX/cxx17-compat.cpp index 79c8507c9c6..3b814340c6d 100644 --- a/clang/test/SemaCXX/cxx17-compat.cpp +++ b/clang/test/SemaCXX/cxx17-compat.cpp @@ -19,4 +19,11 @@ struct B { // expected-warning@-4 {{explicit capture of 'this' with a capture default of '=' is incompatible with C++ standards before C++2a}} #endif } + + int n : 5 = 0; +#if __cplusplus <= 201703L + // expected-warning@-2 {{default member initializer for bit-field is a C++2a extension}} +#else + // expected-warning@-4 {{default member initializer for bit-field is incompatible with C++ standards before C++2a}} +#endif }; |