summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/plist-macros.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Reapply r362994 & co "[analyzer][tests] Add normalize_plist to replace ↵Hubert Tong2019-06-111-1/+1
| | | | | | | | | | | diff_plist" Following r363007, which reverted r362998, r362996, and r362994, reapply with adjustments for the CRLF differences encountered with Windows. Namely, the `-b` option of `diff` is employed, and the `grep` patterns have `$` replaced with `[[:space:]]*$`. llvm-svn: 363069
* Revert r362994 & co "[analyzer][tests] Add normalize_plist to replace ↵Reid Kleckner2019-06-101-1/+1
| | | | | | | | | | | diff_plist" Reverts r362998, r362996, and r362994 because the tests do not pass on Windows due to CRLF changes. Adding back `-w` to diff is not enough, the new grep substitution doesn't work on Windows, and fixing it is non-trivial. llvm-svn: 363007
* [analyzer][tests] Use normalize_plist in place of diff_plist (`cat` cases)Hubert Tong2019-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The `%diff_plist` 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. This patch applies the change (adjusted for review comments) described in http://lists.llvm.org/pipermail/cfe-dev/2019-April/061904.html mechanically to the cases where the output file is piped to `%diff_plist` via `cat`. The changes were applied via a script, except that `clang/test/Analysis/NewDelete-path-notes.cpp` and `clang/test/Analysis/plist-macros-with-expansion.cpp` were each adjusted for the line-continuation on the relevant `RUN` step. Reviewers: NoQ, sfertile, xingxue, jasonliu, daltenty 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/D62950 llvm-svn: 362996
* [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
* [Analyzer] Define and use diff_plist in tests, NFCMikhail Maltsev2018-09-171-1/+1
| | | | | | | | | This patch defines a new substitution and uses it to reduce duplication in the Clang Analyzer test cases. Differential Revision: https://reviews.llvm.org/D52036 llvm-svn: 342365
* [analyzer] [NFC] Change the tests by making the version check more resilientGeorge Karpenkov2018-09-111-1/+1
| | | | llvm-svn: 341978
* Revert "Revert "Revert "Revert "[analyzer] Add coverage information to plist ↵George Karpenkov2018-09-071-1/+1
| | | | | | | | | | 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-071-1/+1
| | | | | | | | 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-071-1/+1
| | | | | | | | | | tests"" This reverts commit a39bcab414dd7ace7e490363ecdf01ecce7743fc. Reverting the revert, fixing tests. llvm-svn: 341627
* [analyzer] Move analyzer-eagerly-assume to AnalyzerOptions, enable by defaultGeorge Karpenkov2018-08-291-2/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D51251 llvm-svn: 340963
* Move test inputs into Inputs directory.Richard Smith2018-08-141-1/+1
| | | | | | | We don't need a new ExpectedOutputs/ convention. Expected outputs are just another form of test input. llvm-svn: 339634
* [analyzer] [NFC] [tests] Move plist-based diagnostics tests to separate ↵George Karpenkov2018-08-101-1666/+1
| | | | | | | | | | files, use diff instead of a FileCheck - II Some files were missed by https://reviews.llvm.org/D50545 Differential Revision: https://reviews.llvm.org/D50590 llvm-svn: 339488
* [Analyzer] Quick Fix for exponential execution time when simpilifying ↵Adam Balogh2018-07-231-0/+63
| | | | | | | | | | | | | | | | | | complex additive expressions Patch https://reviews.llvm.org/rC329780 not only rearranges comparisons but also binary expressions. This latter behavior is not protected by the analyzer option. Hower, since no complexity threshold is enforced to the symbols this may result in exponential execution time if the expressions are too complex: https://bugs.llvm.org/show_bug.cgi?id=38208. For a quick fix we extended the analyzer option to also cover the additive cases. This is only a temporary fix, the final solution should be enforcing the complexity threshold to the symbols. Differential Revision: https://reviews.llvm.org/D49536 llvm-svn: 337678
* [analyzer] [NFC] Remove unused Extensive diagnostic setting,George Karpenkov2018-06-121-1/+1
| | | | | | | | | | | | | | Rename AlternateExtensive to Extensive. In 2013, five years ago, we have switched to AlternateExtensive diagnostics by default, and Extensive was available under unused, undocumented flag. This change remove the flag, renames the Alternate diagnostic to Extensive (as it's no longer Alternate), and ports the test. Differential Revision: https://reviews.llvm.org/D47670 llvm-svn: 334524
* [analyzer] Extend SuppressInlineDefensiveChecksVisitor to all macros, ↵George Karpenkov2018-01-301-43/+112
| | | | | | | | | | | | including non-function-like ones No reason to treat function-like macros differently here. Tracked in rdar://29907377 Differential Revision: https://reviews.llvm.org/D42444 llvm-svn: 323827
* Revert "[analyzer] Support generating and reasoning over more symbolic ↵Dominic Chen2017-07-121-69/+5
| | | | | | | | | | constraint types" Assertion `Loc::isLocType(SSE->getLHS()->getType())' failed in Analysis/PR3991.m This reverts commit e469ff2759275e67f9072b3d67fac90f647c0fe6. llvm-svn: 307853
* [analyzer] Support generating and reasoning over more symbolic constraint typesDominic Chen2017-07-121-5/+69
| | | | | | | | | | | | Summary: Generate more IntSymExpr constraints, perform SVal simplification for IntSymExpr and SymbolCast constraints, and create fully symbolic SymExprs Reviewers: zaks.anna, dcoughlin, NoQ, xazax.hun Subscribers: mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D28953 llvm-svn: 307833
* [analyzer] Fix memory error bug category capitalization.Artem Dergachev2017-05-031-2/+2
| | | | | | | | | | | | It was written as "Memory Error" in most places and as "Memory error" in a few other places, however it is the latter that is more consistent with other categories (such as "Logic error"). rdar://problem/31718115 Differential Revision: https://reviews.llvm.org/D32702 llvm-svn: 302016
* Reland 4: [analyzer] NFC: Update test infrastructure to support multiple ↵Dominic Chen2017-03-031-2/+2
| | | | | | | | | | | | | | constraint managers Summary: Replace calls to %clang/%clang_cc1 with %clang_analyze_cc1 when invoking static analyzer, and perform runtime substitution to select the appropriate constraint manager, per D28952. Reviewers: xazax.hun, NoQ, zaks.anna, dcoughlin Subscribers: mgorny, rgov, mikhail.ramalho, a.sidorin, cfe-commits Differential Revision: https://reviews.llvm.org/D30373 llvm-svn: 296895
* Revert "Reland 3: [analyzer] NFC: Update test infrastructure to support ↵Dominic Chen2017-03-021-2/+2
| | | | | | | | multiple constraint managers" This reverts commit ea36f1406e1f36bf456c3f3929839b024128e468. llvm-svn: 296841
* Reland 3: [analyzer] NFC: Update test infrastructure to support multiple ↵Dominic Chen2017-03-021-2/+2
| | | | | | | | | | | | | | constraint managers Summary: Replace calls to %clang/%clang_cc1 with %clang_analyze_cc1 when invoking static analyzer, and perform runtime substitution to select the appropriate constraint manager, per D28952. Reviewers: xazax.hun, NoQ, zaks.anna, dcoughlin Subscribers: mgorny, rgov, mikhail.ramalho, a.sidorin, cfe-commits Differential Revision: https://reviews.llvm.org/D30373 llvm-svn: 296837
* Revert "Reland 2: [analyzer] NFC: Update test infrastructure to support ↵Dominic Chen2017-03-021-2/+2
| | | | | | | | multiple constraint managers" This reverts commit f93343c099fff646a2314cc7f4925833708298b1. llvm-svn: 296836
* Reland 2: [analyzer] NFC: Update test infrastructure to support multiple ↵Dominic Chen2017-03-021-2/+2
| | | | | | | | | | | | | | constraint managers Summary: Replace calls to %clang/%clang_cc1 with %clang_analyze_cc1 when invoking static analyzer, and perform runtime substitution to select the appropriate constraint manager, per D28952. Reviewers: xazax.hun, NoQ, zaks.anna, dcoughlin Subscribers: mgorny, rgov, mikhail.ramalho, a.sidorin, cfe-commits Differential Revision: https://reviews.llvm.org/D30373 llvm-svn: 296835
* Revert "Reland: [analyzer] NFC: Update test infrastructure to support ↵Dominic Chen2017-02-281-2/+2
| | | | | | | | multiple constraint managers" This reverts commit 1b28d0b10e1c8feccb971abb6ef7a18bee589830. llvm-svn: 296422
* Reland: [analyzer] NFC: Update test infrastructure to support multiple ↵Dominic Chen2017-02-281-2/+2
| | | | | | | | | | | | | | constraint managers Summary: Replace calls to %clang/%clang_cc1 with %clang_analyze_cc1 when invoking static analyzer, and perform runtime substitution to select the appropriate constraint manager, per D28952. Reviewers: xazax.hun, NoQ, zaks.anna, dcoughlin Subscribers: mgorny, rgov, mikhail.ramalho, a.sidorin, cfe-commits Differential Revision: https://reviews.llvm.org/D30373 llvm-svn: 296414
* Revert "[analyzer] NFC: Update test infrastructure to support multiple ↵Dominic Chen2017-02-271-2/+2
| | | | | | | | constraint managers" This reverts commit 8e7780b9e59ddaad1800baf533058d2c064d4787. llvm-svn: 296317
* [analyzer] NFC: Update test infrastructure to support multiple constraint ↵Dominic Chen2017-02-271-2/+2
| | | | | | | | | | | | | | managers Summary: Replace calls to %clang/%clang_cc1 with %clang_analyze_cc1 when invoking static analyzer, and perform runtime substitution to select the appropriate constraint manager, per D28952. Reviewers: xazax.hun, NoQ, zaks.anna, dcoughlin Subscribers: mgorny, rgov, mikhail.ramalho, a.sidorin, cfe-commits Differential Revision: https://reviews.llvm.org/D30373 llvm-svn: 296312
* [analyzer] Bug identificationGabor Horvath2015-10-221-8/+24
| | | | | | | | | | | | | | | | This patch adds hashes to the plist and html output to be able to identfy bugs for suppressing false positives or diff results against a baseline. This hash aims to be resilient for code evolution and is usable to identify bugs in two different snapshots of the same software. One missing piece however is a permanent unique identifier of the checker that produces the warning. Once that issue is resolved, the hashes generated are going to change. Until that point this feature is marked experimental, but it is suitable for early adoption. Differential Revision: http://reviews.llvm.org/D10305 Original patch by: Bence Babati! llvm-svn: 251011
* [Static Analyzer] The name of the checker that reports a bug is addedGabor Horvath2015-02-091-0/+8
| | | | | | | | | | | to the plist output. This check_name field does not guaranteed to be the same as the name of the checker in the future. Reviewer: Anna Zaks Differential Revision: http://reviews.llvm.org/D6841 llvm-svn: 228624
* Fix layering violation: include/clang/Basic/PlistSupport.h should not includeRichard Smith2015-01-281-3/+3
| | | | | | files from include/clang/Lex. Clean up module map. llvm-svn: 227361
* [analyzer; alternate edges] Fix the edge locations in presence of macros.Anna Zaks2013-06-081-0/+1597
We drew the diagnostic edges to wrong statements in cases the note was on a macro. The fix is simple, but seems to work just fine for a whole bunch of test cases (plist-macros.cpp). Also, removes an unnecessary edge in edges-new.mm, when function signature starts with a macro. llvm-svn: 183599
OpenPOWER on IntegriCloud