[clang] [clang-tools-extra] [clang-tidy] Add SARIF output to clang-tidy (PR #219182)

Zeyi Xu via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 31 02:19:44 PDT 2026


================
@@ -634,6 +643,13 @@ int clangTidyMain(int argc, const char **argv) {
     return 1;
   }
 
+  if (!SarifExport.empty() && SarifExport == ExportFixes) {
----------------
zeyi2 wrote:

Nit: Maybe we could also check llvm::sys::fs::equivalent() when both paths are files?

A rare but valid corner case I can think of is something like:

```
-sarif-export=/tmp/out.txt -export-fixes=/tmp/./out.txt
```

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


More information about the cfe-commits mailing list