[clang] [clang][bytecode] Reject invalid CXXNewExprs (PR #179629)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 5 22:05:01 PST 2026
================
@@ -522,3 +522,5 @@ constexpr int intDestArray() {
static_assert(intDestArray() == 0); // both-error {{not an integral constant expression}} \
// both-note {{in call to}}
+constexpr void invalidDest() { new (undefinedfunction()) int; } // both-error {{use of undeclared identifier 'undefinedfunction'}}
----------------
tbaederr wrote:
https://gcc.godbolt.org/z/G73649ne7 It's the same with the current interpreter, so yes.
https://github.com/llvm/llvm-project/pull/179629
More information about the cfe-commits
mailing list