[PATCH] D133194: rewording note note_constexpr_invalid_cast

2022-09-12 Thread Aaron Ballman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGea26ed1f9c37: Rewording note note_constexpr_invalid_cast (authored by Codesbyusman, committed by aaron.ballman). Changed prior to commit: https://reviews.llvm.org/D133194?vs=459296&id=459422#toc Reposi

[PATCH] D133194: rewording note note_constexpr_invalid_cast

2022-09-10 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman updated this revision to Diff 459296. Codesbyusman added a comment. updating with the suggested changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133194/new/ https://reviews.llvm.org/D133194 Files: clang/include/clang/Basic/Dia

[PATCH] D133194: rewording note note_constexpr_invalid_cast

2022-09-10 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman added a comment. In D133194#3782198 , @aaron.ballman wrote: > In D133194#3781271 , @Codesbyusman > wrote: > >> updated, I am not getting why this is happening but in the .cpp test file >> without W

[PATCH] D133194: rewording note note_constexpr_invalid_cast

2022-09-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. In D133194#3781271 , @Codesbyusman wrote: > updated, I am not getting why this is happening but in the .cpp test file > without Wvla al

[PATCH] D133194: rewording note note_constexpr_invalid_cast

2022-09-09 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman updated this revision to Diff 459175. Codesbyusman added a comment. updated, I am not getting why this is happening but in the .cpp test file without Wvla all is working and is detecting by default as you are saying but when I use vla-warning/note it gives me error that "warning see

[PATCH] D133194: rewording note note_constexpr_invalid_cast

2022-09-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/SemaCXX/constant-expression-cxx11.cpp:3 // RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify=expected,cxx11_20,cxx20_2b -triple x86_64-linux -Wno-string-plus-int -Wno-pointer-arith -Wno-zero-length-array -Wno-c99-desig

[PATCH] D133194: rewording note note_constexpr_invalid_cast

2022-09-09 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman marked an inline comment as done. Codesbyusman added inline comments. Comment at: clang/test/SemaCXX/constant-expression-cxx11.cpp:3 // RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify=expected,cxx11_20,cxx20_2b -triple x86_64-linux -Wno-string-plus-int -Wno-pointe

[PATCH] D133194: rewording note note_constexpr_invalid_cast

2022-09-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman 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}} \ +// expe

[PATCH] D133194: rewording note note_constexpr_invalid_cast

2022-09-09 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
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

[PATCH] D133194: rewording note note_constexpr_invalid_cast

2022-09-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:7476-7483 +CCEDiag(E, diag::note_constexpr_invalid_cast) +<< 0 << Info.Ctx.getLangOpts().CPlusPlus; return static_cast(this)->VisitCastExpr(E); } bool VisitCXXDynamicCastExpr(co

[PATCH] D133194: rewording note note_constexpr_invalid_cast

2022-09-09 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman updated this revision to Diff 459134. Codesbyusman added a comment. updating test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133194/new/ https://reviews.llvm.org/D133194 Files: clang/include/clang/Basic/DiagnosticASTKinds.td cl

[PATCH] D133194: rewording note note_constexpr_invalid_cast

2022-09-09 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman added inline comments. Comment at: clang/test/Sema/cast.c:2 // RUN: %clang_cc1 -fsyntax-only -triple x86_64-unknown-unknown %s -verify +// RUN: %clang_cc1 -std=c99 -fsyntax-only -DConstantCast -Wvla -verify %s + aaron.ballman wrote: > Instead of ad

[PATCH] D133194: rewording note note_constexpr_invalid_cast

2022-09-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/Sema/cast.c:2 // RUN: %clang_cc1 -fsyntax-only -triple x86_64-unknown-unknown %s -verify +// RUN: %clang_cc1 -std=c99 -fsyntax-only -DConstantCast -Wvla -verify %s + Instead of adding this RUN line, I

[PATCH] D133194: rewording note note_constexpr_invalid_cast

2022-09-09 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman updated this revision to Diff 459121. Codesbyusman added a comment. updating one time again, to again run test as no failed test on my system. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133194/new/ https://reviews.llvm.org/D133194

[PATCH] D133194: rewording note note_constexpr_invalid_cast

2022-09-09 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman added a comment. Hi, I am not getting why **Sema/cast.c** is failing here. While all test are running fine on my system? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133194/new/ https://reviews.llvm.org/D133194

[PATCH] D133194: rewording note note_constexpr_invalid_cast

2022-09-09 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman updated this revision to Diff 459064. Codesbyusman edited the summary of this revision. Codesbyusman added a comment. updated the test work for the patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133194/new/ https://reviews.llvm.or

[PATCH] D133194: rewording note note_constexpr_invalid_cast

2022-09-02 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. I can't find any C tests that exercise this diagnostic. We should add a C test as well to confirm that we obtain the diagnostic we expect in a C context. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133194/new/ https://rev

[PATCH] D133194: rewording note note_constexpr_invalid_cast

2022-09-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman requested changes to this revision. aaron.ballman added a comment. This revision now requires changes to proceed. Thanks for the cleanup here! Precommit CI pointed out places where test coverage found issues, and you're missing new test coverage for the change. If you run the faili

[PATCH] D133194: rewording note note_constexpr_invalid_cast

2022-09-02 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman created this revision. Codesbyusman added reviewers: aaron.ballman, erichkeane, xgupta. Herald added a project: All. Codesbyusman requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The diagnostics here are correct, but the note is