[clang] [clang] Make SARIF better handle diagnostic about unknown argument (PR #233241)

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 18 09:28:53 PDT 2026


================
@@ -65,6 +65,13 @@
 
 // IGNORED: warning: unknown warning option '-Wunknown-to-clang-option'
 
+// RUN %clang -fdiagnostics-format=sarif -Wunknown-to-clang-option
----------------
kazutakahirata wrote:

Do you mean to say `RUN:` with a colon and pass `-S %s -o %t.s` here so that you can verify that `%clang` at least accepts the option without crashing even though we cannot check the diagnostic output yet?
```suggestion
// RUN: %clang -S %s -o %t.s -fdiagnostics-format=sarif -Wunknown-to-clang-option
```


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


More information about the cfe-commits mailing list