[PATCH] D59402: Fix-it hints for -Wmissing-{prototypes,variable-declarations}

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 24 11:39:07 PDT 2019


rsmith added a comment.

In D59402#1516479 <https://reviews.llvm.org/D59402#1516479>, @aaronpuchert wrote:

> 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.


That is incorrect, because `-Werror` can be used to promote warnings to errors. Please see https://clang.llvm.org/docs/InternalsManual.html#fix-it-hints for the rule and rationale; if it's insufficiently clear on this, we should fix it.


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