[PATCH] D62750: Show note for -Wmissing-prototypes for functions with parameters

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 17 10:42:21 PDT 2019


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

LGTM!



================
Comment at: lib/Sema/SemaDecl.cpp:13335
+                        ? FixItHint::CreateInsertion(FTL.getRParenLoc(), "void")
+                        : FixItHint{});
         }
----------------
In this case, we could probably generate the parameter declarations for the user still, couldn't we? e.g.,
```
int f(); // We could insert "int i, int j" here as the fixit
int g(); // Just like we try to suggest "void" here already

int f(int i, int j) { return i + j; }
int g(void) { return 12; }
```
That could be done in a follow-up patch though.


Repository:
  rC Clang

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

https://reviews.llvm.org/D62750





More information about the cfe-commits mailing list