[PATCH] D133194: rewording note note_constexpr_invalid_cast
Muhammad Usman Shahid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 9 12:35:27 PDT 2022
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
More information about the cfe-commits
mailing list