aaron.ballman added inline comments.
================ Comment at: clang/test/SemaCXX/static-assert-cxx26.cpp:240 + +static_assert(false, MessageOverload{}); // expected-error {{static assertion failed: A}} ---------------- Another test case to consider adding: ``` consteval const char *oops() { const char *ptr; // Garbage return ptr; } static_assert(false, oops()); // This should get the static assertion failure and the invalid message failure ``` (I think this holds because "M.data(), implicitly converted to the type ”pointer to const char”, shall be a core constant expression and let D denote the converted expression," and http://eel.is/c++draft/expr.const#5.8 means this wouldn't qualify as a core constant expression, I believe. At least, that's how non-static assert code behaves: https://godbolt.org/z/aKrfhr9Pj) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154290/new/ https://reviews.llvm.org/D154290 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits