================
@@ -1070,14 +1070,13 @@ namespace BaseCompare {
}
-namespace NegativeArraySize {
+namespace NegativeArraySize {
-constexpr void f() {
+constexpr void f() { // both-error {{constexpr function never produces a
constant expression}}
int x = -1;
- int *p = new int[x]; // expected-note {{cannot allocate array with negative
size in a constant expression}}
+ int *p = new int[x]; // expected-note {{cannot allocate array with negative
size in a constant expression}} \
+ // ref-note {{cannot allocate array; evaluated array
bound -1 is negative}}
----------------
snarang181 wrote:
I changed the Bytecode interpreter to reuse the same diagnostic now; I had
created a new one earlier. There's coherent output between both the
interpreters now.
https://github.com/llvm/llvm-project/pull/155737
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits