Codesbyusman marked 4 inline comments as done.
Codesbyusman added inline comments.


================
Comment at: clang/test/Sema/cast.c:1-5
+// RUN: %clang_cc1 -fsyntax-only -triple x86_64-unknown-unknown %s -verify 
-Wvla
+
+int array[(long)(char *)0]; // expected-warning {{variable length array used}} 
\
+                            // expected-warning {{variable length array folded 
to constant array as an extension}} \
+                            // expected-note {{this conversion is not allowed 
in a constant expression}}
----------------
aaron.ballman wrote:
> I realized that we don't need to pass `-Wvla` at all, the other warning and 
> note are on by default.
> I realized that we don't need to pass `-Wvla` at all, the other warning and 
> note are on by default.

But the note is not enabled without it, without it i got this error:
that I am expecting but there is no diagnostic for it

> error: 'note' diagnostics expected but not seen: 
>   File /home/kali/llvm-project/clang/test/Sema/cast.c Line 3: this conversion 
> is not allowed in a constant expression
> 1 error generated.





Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133194/new/

https://reviews.llvm.org/D133194

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to