[PATCH] D64883: Add new warning -Walloca for use of builtin alloca function

2019-07-25 Thread Elaina Guan via Phabricator via cfe-commits
ziyig updated this revision to Diff 211816. ziyig marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64883/new/ https://reviews.llvm.org/D64883 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/SemaChecking.cpp clang/test/Sema/warn-

[PATCH] D64883: Add new warning -Walloca for use of builtin alloca function

2019-07-25 Thread Elaina Guan via Phabricator via cfe-commits
ziyig added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:1172 return ExprError(); +LLVM_FALLTHROUGH; + case Builtin::BI__builtin_alloca: aaron.ballman wrote: > Do we want to warn on all uses of alloca(), or just the ones that get past

[PATCH] D64883: Add new warning -Walloca for use of builtin alloca function

2019-07-25 Thread Elaina Guan via Phabricator via cfe-commits
ziyig updated this revision to Diff 211785. ziyig marked 9 inline comments as done. ziyig added a comment. Updated the warning message and the test cases. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64883/new/ https://reviews.llvm.org/D64883 Files: clang/include/clang/Basic/Diagnos

[PATCH] D64883: Add new warning -Walloca for use of builtin alloca function

2019-07-17 Thread Elaina Guan via Phabricator via cfe-commits
ziyig created this revision. ziyig added reviewers: gbiv, aaron.ballman. Herald added a reviewer: george.burgess.iv. Herald added subscribers: cfe-commits, kristina. Herald added a project: clang. Add new warning -Walloca for use of builtin alloca function. Also warns the use of __builtin_alloca_