summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/diagnostics/sarif-diagnostics-taint-test.c
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] SARIF: Add EOF newline; replace diff_sarifHubert Tong2019-06-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch applies a change similar to rC363069, but for SARIF files. The `%diff_sarif` lit substitution invokes `diff` with a non-portable `-I` option. The intended effect can be achieved by normalizing the inputs to `diff` beforehand. Such normalization can be done with `grep -Ev`, which is also used by other tests. Additionally, this patch updates the SARIF output to have a newline at the end of the file. This makes it so that the SARIF file qualifies as a POSIX text file, which increases the consumability of the generated file in relation to various tools. Reviewers: NoQ, sfertile, xingxue, jasonliu, daltenty, aaron.ballman Reviewed By: aaron.ballman Subscribers: xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, Charusso, jsji, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62952 llvm-svn: 363822
* [analyzer] [NFC] Reverse the argument order for "diff" in testsGeorge Karpenkov2019-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The current argument order has "expected" and "actual" the wrong way around, so that the diff shows the change from expected to actual, not from actual to expected. Namely, if the expected diagnostics contains the string "foo", but the analyzer emits "bar", we really want to see: ``` - foo + bar ``` not ``` - bar + foo ``` since adapting to most changes would require applying that diff to the expected output. Differential Revision: https://reviews.llvm.org/D56340 llvm-svn: 350866
* Output "rule" information in SARIF exports.Aaron Ballman2018-11-011-1/+1
| | | | | | SARIF allows you to export descriptions about rules that are present in the SARIF log. Expose the help text table generated into Checkers.inc as the rule's "full description" and export all of the rules present in the analysis output. This information is useful for analysis result viewers like CodeSonar. llvm-svn: 345874
* Update to the 10-10 SARIF spec.Aaron Ballman2018-11-011-1/+1
| | | | | | This removes the Step property (which can be calculated by consumers trivially), and updates the schema and version numbers accordingly. llvm-svn: 345823
* [analyzer] SARIF: Suppress version testing in a more downstream-friendly manner.Artem Dergachev2018-11-011-1/+1
| | | | | | No functional change intended. llvm-svn: 345807
* Changing the command line parameters sent to diff for this test.Aaron Ballman2018-10-301-1/+1
| | | | | | On some systems, -U 1 was being interpreted as -U -1. Trying -U1 to see if that's the universally accepted approach instead. llvm-svn: 345649
* Speculatively attempt to fix a failing testbot.Aaron Ballman2018-10-301-1/+1
| | | | | | A testbot ( http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/54690/) was failing with a complaint about an obsolete option that wasn't present in the command line in the first place. This replaces my guess at the "obsolete option" with a different spelling that will hopefully be more acceptable to this bot without breaking other bots. llvm-svn: 345635
* Add the ability to output static analysis results to SARIF.Aaron Ballman2018-10-301-0/+15
This allows users to specify SARIF (https://github.com/oasis-tcs/sarif-spec) as the output from the clang static analyzer so that the results can be read in by other tools, such as extensions to Visual Studio and VSCode, as well as static analyzers like CodeSonar. llvm-svn: 345628
OpenPOWER on IntegriCloud