[PATCH] D123456: [C89/C2x] Diagnose calls to a function without a prototype but passes arguments

Corentin Jabot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 9 08:18:03 PDT 2022


cor3ntin accepted this revision as: cor3ntin.
cor3ntin added a comment.
This revision is now accepted and ready to land.

LGTM except a couple of nitpicks



================
Comment at: clang/lib/Sema/SemaExpr.cpp:7052
+    // the call, diagnose this as calling a function without a prototype.
+    // However, if we found a function declaration, check to see if the strict
+    // uses without a prototype warning was disabled where the function was
----------------
I have a hard time parsing this sentence. I suspect words or punctuation are missing 


================
Comment at: clang/lib/Sema/SemaExpr.cpp:7065
+      Diag(LParenLoc, diag::warn_strict_uses_without_prototype)
+          << (bool)FDecl << FDecl;
+
----------------
`!= nullptr` may be cleaner 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123456



More information about the cfe-commits mailing list