We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e1017d0 commit 1226531Copy full SHA for 1226531
clang/test/CXX/drs/cwg28xx.cpp
@@ -64,7 +64,9 @@ namespace cwg2819 { // cwg2819: 19 c++26
64
namespace cwg2823 { // cwg2823: no
65
#if __cplusplus >= 201103L
66
constexpr int *p = 0;
67
- constexpr int *q1 = &*p; // expected-error {{constant expression}} expected-note {{dereferencing a null pointer}}
+ constexpr int *q1 = &*p;
68
+ // expected-error@-1 {{constexpr variable 'q1' must be initialized by a constant expression}}
69
+ // expected-note@-2 {{dereferencing a null pointer is not allowed in a constant expression}}
70
// FIXME: invalid: dereferencing a null pointer.
71
constexpr int *q2 = &p[0];
72
0 commit comments