[PATCH] D64883: Add new warning -Walloca for use of builtin alloca function
George Burgess IV via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 17 14:24:46 PDT 2019
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<DiagGroup<"alloca">>, DefaultIgnore;
nit: I'd just say "use of function '%0'" here; "builtin" doesn't really add much.
I also wonder if we should be saying anything more than "we found a use of this function." Looks like GCC doesn't (https://godbolt.org/z/sYs_8G), but since this warning is sort of opinionated in itself, might it be better to expand this to "use of '%0' is discouraged"?
CHANGES SINCE LAST ACTION
More information about the cfe-commits