Skip to content

Commit 1226531

Browse files
zygoloidEndilll
andauthored
Apply suggestion from @Endilll
Co-authored-by: Vlad Serebrennikov <[email protected]>
1 parent e1017d0 commit 1226531

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

clang/test/CXX/drs/cwg28xx.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ namespace cwg2819 { // cwg2819: 19 c++26
6464
namespace cwg2823 { // cwg2823: no
6565
#if __cplusplus >= 201103L
6666
constexpr int *p = 0;
67-
constexpr int *q1 = &*p; // expected-error {{constant expression}} expected-note {{dereferencing a null pointer}}
67+
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}}
6870
// FIXME: invalid: dereferencing a null pointer.
6971
constexpr int *q2 = &p[0];
7072

0 commit comments

Comments
 (0)