[PATCH] D129886: [clang] Add -fdiagnostics-format=sarif option for future SARIF output
Christopher Di Bella via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 18 11:31:32 PDT 2022
cjdb added inline comments.
================
Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:684
+ "diagnostic formatting in SARIF mode is currently unstable">,
+ InGroup<DiagGroup<"sarif-format-unstable">>;
}
----------------
abrahamcd wrote:
> Please let me know if there's a better warning group you think this should be in.
Nope! This is the right way to do it :)
================
Comment at: clang/include/clang/Basic/DiagnosticGroups.td:1383
+
+def SarifFormatUnstable : DiagGroup<"sarif-format-unstable">;
----------------
Please make sure that there's a newline at the end of each file.
================
Comment at: clang/test/Driver/fdiagnostics-format-sarif.cpp:1
+// RUN: %clang -fsyntax-only -fdiagnostics-format=sarif %s
----------------
This test should check not only that we're able to use the flag, but also that it emits the warning.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129886/new/
https://reviews.llvm.org/D129886
More information about the cfe-commits
mailing list