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

via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 10 08:58:43 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
+// RUN: cat %t | FileCheck %s
+// RUN: %clang_cc1 -std=c99 -pedantic -Wno-deprecated-non-prototype -verify=c99 -x c %s
----------------
Sirraide wrote:

```suggestion
//
// RUN: %clang_cc1 -std=c99 -pedantic -Wno-deprecated-non-prototype -verify=c99 -x c %s
```
nit: I feel like adding an empty line makes it a bit easier to figure out that we’re running the same commands once for C90 and once for C99

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


More information about the cfe-commits mailing list