clang/test/AST/Interp/cxx26.cpp
raw| 1 | // RUN: %clang_cc1 -std=c++26 -fsyntax-only -fcxx-exceptions -verify=ref,both %s |
| 2 | // RUN: %clang_cc1 -std=c++26 -fsyntax-only -fcxx-exceptions -verify=expected,both %s -fexperimental-new-constant-interpreter |
| 3 | |
| 4 | // both-no-diagnostics |
| 5 | |
| 6 | namespace VoidCast { |
| 7 | constexpr void* p = nullptr; |
| 8 | constexpr int* q = static_cast<int*>(p); |
| 9 | static_assert(q == nullptr); |
| 10 | } |