summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/diagnostics/Inputs
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] Fix SARIF column locationsJoe Ranieri2020-01-142-6/+76
| | | | Differential revision: https://reviews.llvm.org/D70689
* Update the SARIF exporter to SARIF 2.1Joe Ranieri2019-08-272-108/+98
| | | | | | | | | | This updates the SARIF exporter to produce SARIF 2.1 output. The bulk of the diffs come from two changes to SARIF: * https://github.com/oasis-tcs/sarif-spec/issues/309 * https://github.com/oasis-tcs/sarif-spec/issues/179 Differential Revision: https://reviews.llvm.org/D65211 llvm-svn: 370068
* Fix a SARIF exporter crash with macro expansionsJoe Ranieri2019-08-271-20/+135
| | | | | | Differential Revision: https://reviews.llvm.org/D65209 llvm-svn: 370061
* Fix text range end columns in SARIF to be exclusiveJoe Ranieri2019-08-272-14/+11
| | | | | | | | According to the SARIF specification, "a text region does not include the character specified by endColumn". Differential Revision: https://reviews.llvm.org/D65206 llvm-svn: 370060
* [analyzer] SARIF: Add EOF newline; replace diff_sarifHubert Tong2019-06-192-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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][tests] Pre-normalize expected-sarif filesHubert Tong2019-06-192-20/+0
| | | | | | | | As discussed in the review for D62952, this patch pre-normalizes the reference expected output sarif files by removing lines containing fields for which we expect differences that should be ignored. llvm-svn: 363788
* [analyzer][NFC][tests] Pre-normalize expected-plistsHubert Tong2019-06-087-17/+0
| | | | | | | | As suggested in the review for D62949, this patch pre-normalizes the reference expected output plist files by removing lines containing fields for which we expect differences that should be ignored. llvm-svn: 362877
* [analyzer] ConditionBRVisitor: MemberExpr supportCsaba Dabis2019-05-291-4/+4
| | | | | | | | | | | | | | | | | Summary: - Reviewers: NoQ, george.karpenkov Reviewed By: NoQ Subscribers: cfe-commits, xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp Tags: #clang Differential Revision: https://reviews.llvm.org/D58206 llvm-svn: 362026
* [analyzer] NFC: Prevent multi-file plist test from spamming up the build folder.Artem Dergachev2019-05-241-4/+0
| | | | | | | It was producing an HTML report with a random name on every tests run and never cleaned those up. llvm-svn: 361592
* Remove irrelevant references to legacy git repositories fromJames Y Knight2019-01-151-1/+1
| | | | | | | | | compiler identification lines in test-cases. (Doing so only because it's then easier to search for references which are actually important and need fixing.) llvm-svn: 351200
* [analyzer] [NFC] Reverse the argument order for "diff" in testsGeorge Karpenkov2019-01-102-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Correct the spelling of helpURI to helpUri.Aaron Ballman2019-01-101-2/+2
| | | | | | JSON is case sensitive and the SARIF spec uses the corrected spelling. llvm-svn: 350817
* Allow direct navigation to static analysis checker documentation through ↵Aaron Ballman2018-12-201-0/+2
| | | | | | | | SARIF exports. This adds anchors to all of the documented checks so that you can directly link to a check by a stable name. This is useful because the SARIF file format has a field for specifying a URI to documentation for a rule and some viewers, like CodeSonar, make use of this information. These links are then exposed through the SARIF exporter. llvm-svn: 349812
* Update our SARIF support from 10-10 to 11-28.Aaron Ballman2018-12-142-29/+51
| | | | | | | | | | | | | Functional changes include: * The run.files property is now an array instead of a mapping. * fileLocation objects now have a fileIndex property specifying the array index into run.files. * The resource.rules property is now an array instead of a mapping. * The result object was given a ruleIndex property that is an index into the resource.rules array. * rule objects now have their "id" field filled out in addition to the name field. * Updated the schema and spec version numbers to 11-28. llvm-svn: 349188
* Output "rule" information in SARIF exports.Aaron Ballman2018-11-012-1/+314
| | | | | | 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-7/+5
| | | | | | 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/+99
| | | | | | 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
* Revert "Revert "Revert "Revert "[analyzer] Add coverage information to plist ↵George Karpenkov2018-09-077-0/+2352
| | | | | | | | | | output, update tests"""" This reverts commit 2f5d71d9fa135be86bb299e7d773036e50bf1df6. Hopefully fixing tests on Windows. llvm-svn: 341719
* Revert "Revert "Revert "[analyzer] Add coverage information to plist output, ↵Simon Pilgrim2018-09-077-2352/+0
| | | | | | | | update tests""" Reverts analyzer tests from rL341627 again as they still broke windows buildbots llvm-svn: 341648
* Revert "Revert "[analyzer] Add coverage information to plist output, update ↵George Karpenkov2018-09-077-0/+2352
| | | | | | | | | | tests"" This reverts commit a39bcab414dd7ace7e490363ecdf01ecce7743fc. Reverting the revert, fixing tests. llvm-svn: 341627
* Revert "[analyzer] Add coverage information to plist output, update tests"George Karpenkov2018-09-077-2322/+20
| | | | | | | | This reverts commit 03d183b6b94eda27ce66a4f9b87a00b0a148cf9e. Temporary revert until the tests are fixed. llvm-svn: 341626
* [analyzer] Add coverage information to plist output, update testsGeorge Karpenkov2018-09-077-20/+2322
| | | | | | | | Split tests which were still using FileCheck to compare plists. Differential Revision: https://reviews.llvm.org/D51515 llvm-svn: 341621
* Move test inputs into Inputs directory.Richard Smith2018-08-144-0/+3012
| | | | | | | We don't need a new ExpectedOutputs/ convention. Expected outputs are just another form of test input. llvm-svn: 339634
* [analyzer] Add more FileIDs to PlistDiagnostic map to avoid assertionAleksei Sidorin2016-09-012-0/+10
| | | | | | | | | | | | | Some FileIDs that may be used by PlistDiagnostics were not added while building a list of pieces. This caused assertion violation in GetFID() function. This patch adds some missing FileIDs to avoid the assertion. It also contains small refactoring of PlistDiagnostics::FlushDiagnosticsImpl(). Patch by Aleksei Sidorin, Ilya Palachev. Differential Revision: https://reviews.llvm.org/D22090 llvm-svn: 280360
* [analyzer] Do not assert on reports ending in calls within macros.Anna Zaks2013-05-221-1/+25
| | | | | | | | | The crash is triggered by the newly added option (-analyzer-config report-in-main-source-file=true) introduced in r182058. Note, ideally, we’d like to report the issue within the main source file here as well. For now, just do not crash. llvm-svn: 182445
* [analyzer] Add an option to use the last location in the main source file as ↵Anna Zaks2013-05-161-0/+19
| | | | | | | | | | | | | the report location. Previously, we’ve used the last location of the analyzer issue path as the location of the report. This might not provide the best user experience, when one analyzer a source file and the issue appears in the header. Introduce an option to use the last location of the path that is in the main source file as the report location. New option can be enabled with -analyzer-config report-in-main-source-file=true. llvm-svn: 182058
* [analyzer] Do not check if sys/queue.h file is a system header.Anna Zaks2013-05-101-1/+0
| | | | | | | In most cases it is, by just looking at the name. Also, this check prevents the heuristic from working in strange user settings. radar://13839692 llvm-svn: 181615
* Move an input header file under an Inputs directory to be consistentChandler Carruth2013-01-191-0/+5
with other auxilliary test inputs and simplify the identification of inputs to tests. llvm-svn: 172890
OpenPOWER on IntegriCloud