This revision was automatically updated to reflect the committed changes.
Closed by commit rL367067: [Sema] add -Walloca to flag uses of `alloca`
(authored by gbiv, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.ll
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM, thank you for the patch!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64883/new/
https://reviews.llvm.org/D64883
__
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-
aaron.ballman marked an inline comment as done.
aaron.ballman added inline comments.
Comment at: clang/lib/Sema/SemaChecking.cpp:1172
return ExprError();
+LLVM_FALLTHROUGH;
+ case Builtin::BI__builtin_alloca:
ziyig wrote:
> aaron.ballman wrote:
> > Do
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
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
george.burgess.iv added inline comments.
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:2776
+def warn_alloca : Warning<
+ "use of builtin function %0">,
+ InGroup>, DefaultIgnore;
aaron.ballman wrote:
> george.burgess.iv wrote:
> > aaron.ballman
aaron.ballman added inline comments.
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:2776
+def warn_alloca : Warning<
+ "use of builtin function %0">,
+ InGroup>, DefaultIgnore;
george.burgess.iv wrote:
> aaron.ballman wrote:
> > george.burgess.iv
george.burgess.iv added inline comments.
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:2776
+def warn_alloca : Warning<
+ "use of builtin function %0">,
+ InGroup>, DefaultIgnore;
aaron.ballman wrote:
> george.burgess.iv wrote:
> > aaron.ballman
aaron.ballman added inline comments.
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:2776
+def warn_alloca : Warning<
+ "use of builtin function %0">,
+ InGroup>, DefaultIgnore;
george.burgess.iv wrote:
> aaron.ballman wrote:
> > george.burgess.iv
george.burgess.iv added inline comments.
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:2776
+def warn_alloca : Warning<
+ "use of builtin function %0">,
+ InGroup>, DefaultIgnore;
aaron.ballman wrote:
> george.burgess.iv wrote:
> > nit: I'd just
aaron.ballman added inline comments.
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:2776
+def warn_alloca : Warning<
+ "use of builtin function %0">,
+ InGroup>, DefaultIgnore;
george.burgess.iv wrote:
> nit: I'd just say "use of function '%0'" he
george.burgess.iv added a comment.
Thanks for this!
Mostly just nitpicking the warning's wording. :)
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:2776
+def warn_alloca : Warning<
+ "use of builtin function %0">,
+ InGroup>, DefaultIgnore;
nit
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_
14 matches
Mail list logo