[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:36:46 PDT 2019


aaronpuchert added a comment.

In D59402#1516432 <https://reviews.llvm.org/D59402#1516432>, @aaron.ballman wrote:

> Also, we're not attempting to recover from the error, which is a good point that @thakis raised. aka, if you apply the fix-it, you should also treat the declaration as though it were declared `static`.


I think the recovery rule only applies to errors, there is no need to recover from a warning. If we attempted recovery from a warning, we might generate different object code depending on the warning level.

But I think your original comment nails it: we can't be really sure that this is the right fix, and my empirical data doesn't (necessarily) translate well to writing new code with the warning on.


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