[PATCH] D59402: Fix-it hints for -Wmissing-{prototypes,variable-declarations}
Aaron Puchert via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 24 11:12:20 PDT 2019
aaronpuchert planned changes to this revision.
aaronpuchert added a comment.
I guess you're referring to "[fix-it hints] should only be used when it’s very likely they match the user’s intent".
When turning on the warning on an existing code base, I think that `static` is almost always right. But when writing new code with the warning active, it might indeed not be the right thing. It could be that the declaration has been forgotten, or it has a typo. We wouldn't want users to apply `static` blindly, so a note explaining when it is appropriate does actually make a lot of sense. Perhaps I can also detect if this is in a header and not emit the note then. (Or emit a note suggesting `inline`.)
@aaron.ballman Would moving the fix-it to a note alleviate your concerns?
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59402/new/
https://reviews.llvm.org/D59402
More information about the cfe-commits
mailing list