[PATCH] D123456: [C89/C2x] Diagnose calls to a function without a prototype but passes arguments
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 9 08:31:59 PDT 2022
aaron.ballman added inline comments.
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
I reworded to mention the warning group specifically; that hopefully clears up the confusion.
Comment at: clang/lib/Sema/SemaExpr.cpp:7065
+ Diag(LParenLoc, diag::warn_strict_uses_without_prototype)
+ << (bool)FDecl << FDecl;
> `!= nullptr` may be cleaner
CHANGES SINCE LAST ACTION
More information about the cfe-commits