llvm-capstone/clang/test/Driver/fdiagnostics-format-sarif.cpp
Abraham Corea Diaz 119d22310b [clang] Add -fdiagnostics-format=sarif option for future SARIF output
Adds `sarif` option to the existing `-fdiagnostics-format` flag
for intended future work with SARIF diagnostics. Currently issues a warning
against the use of diagnostics in SARIF mode, then defaults to clang style for
diagnostics.

Reviewed By: cjdb, denik, aaron.ballman

Differential Revision: https://reviews.llvm.org/D129886
2022-07-21 16:51:15 +00:00

6 lines
415 B
C++

// RUN: %clang -fsyntax-only -fdiagnostics-format=sarif %s -### 2>&1 | FileCheck %s --check-prefix=WARN
// WARN: warning: diagnostic formatting in SARIF mode is currently unstable [-Wsarif-format-unstable]
// RUN: %clang -fsyntax-only -fdiagnostics-format=SARIF %s -### 2>&1 | FileCheck %s --check-prefix=WARN2
// WARN2: warning: diagnostic formatting in SARIF mode is currently unstable [-Wsarif-format-unstable]