[PATCH] D137343: [clang] add -Wvla-stack-allocation

2022-12-19 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Aaron's suggested design makes the most sense to me, of all the designs I've seen here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137343/new/ https://reviews.llvm.org/D137343 _

[PATCH] D137343: [clang] add -Wvla-stack-allocation

2022-12-17 Thread Tao Liang via Phabricator via cfe-commits
Origami404 added a subscriber: mizvekov. Origami404 added a comment. Hello, I am back now and will be available anytime next week, so if anyone has any idea on this topic, please at me! I haven't found a way that "feels right" to achieve consensus yet. But I do have something to share currently

[PATCH] D137343: [clang] add -Wvla-stack-allocation

2022-12-17 Thread Tao Liang via Phabricator via cfe-commits
Origami404 updated this revision to Diff 483796. Origami404 added a comment. [clang] add -Wvla-stack-allocation and divide different VLA warning New behaviors: -Wvla-stack-allocation warns on use of a VLA that involves a stack allocation -Wvla-portability warns on any use of a VM type, ev

[PATCH] D137343: [clang] add -Wvla-stack-allocation

2022-12-11 Thread Martin Uecker via Phabricator via cfe-commits
uecker added a comment. I would still suggest to change the behavior of -Wvla to warn only about VLAs which are allocated on the stack as the most useful warning. Portability warnings should be turned on for -Wc++-compat. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[PATCH] D137343: [clang] add -Wvla-stack-allocation

2022-12-10 Thread Tao Liang via Phabricator via cfe-commits
Origami404 added a comment. > int foo(void); > > void bar(int a, int b[*]); // variable length array used, correct > void bar(int a, int b[a]) { variable length array used, correct > int x[foo()]; // variable length array that may require stack allocation > used, correct > > (

[PATCH] D137343: [clang] add -Wvla-stack-allocation

2022-12-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: clang-language-wg, rjmccall. aaron.ballman added a comment. In D137343#3978313 , @inclyc wrote: > ping :) Thank you for your patience until I could get to this! I've added a few more reviewers for additional opinions on th

[PATCH] D137343: [clang] add -Wvla-stack-allocation

2022-12-07 Thread Yingchi Long via Phabricator via cfe-commits
inclyc added a comment. ping :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137343/new/ https://reviews.llvm.org/D137343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[PATCH] D137343: [clang] add -Wvla-stack-allocation

2022-11-23 Thread Tao Liang via Phabricator via cfe-commits
Origami404 updated this revision to Diff 477482. Origami404 added a comment. Update release notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137343/new/ https://reviews.llvm.org/D137343 Files: clang/docs/ReleaseNotes.rst clang/include/clan

[PATCH] D137343: [clang] add -Wvla-stack-allocation

2022-11-22 Thread Yingchi Long via Phabricator via cfe-commits
inclyc added a comment. We may need a release note here so users know about the new changes to -Wvla. See `clang/docs/ReleaseNotes.rst`! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137343/new/ https://reviews.llvm.org/D137343 __

[PATCH] D137343: [clang] add -Wvla-stack-allocation

2022-11-17 Thread Tao Liang via Phabricator via cfe-commits
Origami404 added a comment. ping :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137343/new/ https://reviews.llvm.org/D137343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D137343: [clang] add -Wvla-stack-allocation

2022-11-03 Thread Tao Liang via Phabricator via cfe-commits
Origami404 created this revision. Herald added a project: All. Origami404 edited the summary of this revision. Origami404 edited the summary of this revision. Origami404 added reviewers: aaron.ballman, efriedma. Origami404 added a subscriber: inclyc. Origami404 published this revision for review. H