[clang] [Clang] Fix FixIt for implicit-int diagnostics. (PR #179356)

via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 10 08:58:42 PST 2026


================
@@ -0,0 +1,57 @@
+// RUN: %clang_cc1 -std=c90 -pedantic -Wno-comment -Wno-deprecated-non-prototype -Wimplicit-int -verify=c90 -x c %s
+// RUN: cp %s %t
+// RUN: %clang_cc1 -std=c90 -pedantic -Wno-comment -Wno-deprecated-non-prototype -Wimplicit-int -fixit %t
+// RUN: %clang_cc1 -std=c90 -pedantic -Wno-comment -Wno-deprecated-non-prototype -Wimplicit-int -Werror -x c %t
----------------
Sirraide wrote:

For the cc1 invocations that check whether the temporary file compiles w/o errors after applying the fixits, add `-fsyntax-only -verify` (note: `-verify` is equivalent to `-verify=expected`) and then `// expected-no-diagnostics` after all the `RUN` directives.

https://github.com/llvm/llvm-project/pull/179356


More information about the cfe-commits mailing list