[PATCH] D116635: Add warning to detect when calls passing arguments are made to functions without prototypes.

FĂ©lix Cloutier via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 5 08:35:19 PST 2022


fcloutier accepted this revision.
fcloutier added a comment.
This revision is now accepted and ready to land.

I think that this is a good warning and I'll defer to the experts for what has to happen when prototypes merge with K&R definitions :)



================
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:5530
+  "calling function %0 with arguments when function has no prototype">, InGroup<
+  DiagGroup<"strict-calls-without-prototype">>, DefaultIgnore;
 def warn_missing_variable_declarations : Warning<
----------------
sp: I think this should be called "strict-call-without-prototype" (singular call) as most warning flag names seem to prefer singulars.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116635/new/

https://reviews.llvm.org/D116635



More information about the cfe-commits mailing list