================
@@ -30,6 +30,13 @@ int f3(void) {
   return OBJECT_SIZE_BUILTIN(&a, 4); // expected-error {{argument value 4 is 
outside the valid range [0, 3]}}
 }
 
+// expected-error@+2 {{static assertion expression is not an integral constant 
expression}}
+// expected-note@+1 {{argument value -1 is outside the valid range [0, 3]}}
+_Static_assert(OBJECT_SIZE_BUILTIN((void *)0, -1), "");
+
+// expected-error@+2 {{static assertion expression is not an integral constant 
expression}}
+// expected-note@+1 {{argument value 4 is outside the valid range [0, 3]}}
+_Static_assert(OBJECT_SIZE_BUILTIN((void *)0, 4), "");
----------------
tbaederr wrote:

The expected output should be in the same line as the `_Static_assert`, same as 
the others in this file.

https://github.com/llvm/llvm-project/pull/230979
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to