diff options
Diffstat (limited to 'clang/test/AST/ByteCode/cxx11.cpp')
-rw-r--r-- | clang/test/AST/ByteCode/cxx11.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/test/AST/ByteCode/cxx11.cpp b/clang/test/AST/ByteCode/cxx11.cpp index 5555422..378702f 100644 --- a/clang/test/AST/ByteCode/cxx11.cpp +++ b/clang/test/AST/ByteCode/cxx11.cpp @@ -39,9 +39,8 @@ struct S { constexpr S s = { 5 }; constexpr const int *p = &s.m + 1; -constexpr const int *np2 = &(*(int(*)[4])nullptr)[0]; -// ref-error@-1 {{constexpr variable 'np2' must be initialized by a constant expression}} \ -// ref-note@-1 {{dereferencing a null pointer is not allowed in a constant expression}} +constexpr const int *np2 = &(*(int(*)[4])nullptr)[0]; // both-error {{constexpr variable 'np2' must be initialized by a constant expression}} \ + // both-note {{dereferencing a null pointer is not allowed in a constant expression}} constexpr int preDec(int x) { // both-error {{never produces a constant expression}} return --x; // both-note {{subexpression}} |