================ @@ -20,4 +20,7 @@ void vla(int n, ...) __builtin_va_list ap; void *p; p = __builtin_va_arg(ap, typeof (int (*)[++n])); // CHECK: add nsw i32 {{.*}}, 1 + // Don't crash on some undefined behaviors. + p = __builtin_va_arg(ap, typeof (int [++n])); // expected-warning{{second argument to 'va_arg' is of variable length array type 'typeof(int[++n])'}} ---------------- efriedma-quic wrote:
Maybe put the warning checks into some test in clang/test/Sema. https://github.com/llvm/llvm-project/pull/119563 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits