[clang-tools-extra] [clang-tidy] Header check support for check_clang_tidy.py (PR #175735)

via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 20 07:14:34 PST 2026


================
@@ -250,39 +291,61 @@ def check_no_diagnosis(self, clang_tidy_output: str) -> None:
         if clang_tidy_output != "":
             sys.exit("No diagnostics were expected, but found the ones above")
 
-    def check_fixes(self) -> None:
-        if self.has_check_fixes:
-            try_run(
-                [
-                    "FileCheck",
-                    "--input-file=" + self.temp_file_name,
-                    self.input_file_name,
-                    "--check-prefixes=" + ",".join(self.fixes.prefixes),
-                    (
-                        "--match-full-lines"
-                        if not self.match_partial_fixes
-                        else "--strict-whitespace"  # Keeping past behavior.
-                    ),
-                ]
-            )
+    def check_fixes(self, input_file: str = "", check_file: str = "") -> None:
+        if not check_file and not self.has_check_fixes:
----------------
EugeneZelenko wrote:

```suggestion
        if not (check_file or self.has_check_fixes):
```

De-Morgan.

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


More information about the cfe-commits mailing list