llvm-project
48f00e81 - [analyzer] Prevent triplicate warnings for `sarif-html` (#158112)

Commit
52 days ago
[analyzer] Prevent triplicate warnings for `sarif-html` (#158112) When `-analyzer-output=sarif-html` is specified, the analyzer was reporting each warning to the console three times. This is because the code to create the diagnostic consumers for `sarif-html` was calling the code for `sarif` and `html` separately, each of which also creates its own console text consumer. Then the `sarif-html` code itself created a third. The fix is to factor out the creation of the SARIF and HTML consumers from the text consumers, so `sarif-html` just calls the code to create the SARIF and HTML consumers without the text consumers. The same fix applies for `plist-html`. I've updated one of the SARIF tests to specify `sarif-html`. This test would fail in the regular `-verify` validation due to the triplicated warnings, but now passes with my fix. Fixes #158103 rdar://160383710
Author
Parents
Loading