[PATCH] D122983: [C11/C2x] Change the behavior of the implicit function declaration warning

Hubert Tong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 4 08:54:08 PDT 2022


hubert.reinterpretcast added a comment.

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

> Yeah, those tests seem to be overly-constraining. There's no reason to be validating whether there's an implicit function declaration warning in a *codegen* test. I will change all of those AAarch64 tests to require -std=c99 explicitly whenever possible, remove the `-verify` flag because there's no reason for a codegen test to verify diagnostic behavior that isn't generated by the CodeGen library, and remove the `// expected-warning` comments. I plan to do that as an NFC change that I'll land outside of this patch, unless any of the AArch64 folks speak up pretty quickly.

Maybe a smaller hammer can be used here, e.g., `-Wno-error=implicit-function-declaration`? The use of the `-verify` flag in a CodeGen test to validate that the test is written as "cleanly" as intended is something that I am sympathetic to.


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

https://reviews.llvm.org/D122983



More information about the cfe-commits mailing list