Add test for -Wc++17-compat warning for P0683R1.

llvm-svn: 311868
This commit is contained in:
Richard Smith 2017-08-28 00:31:35 +00:00
parent 6b8e3c02ca
commit 8b633447da
1 changed files with 7 additions and 0 deletions

View File

@ -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
};