summaryrefslogtreecommitdiffstats
path: root/clang/tools/scan-build/bin
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] Analysis: Fix checker silencingCsaba Dabis2019-08-241-5/+8
| | | | llvm-svn: 369845
* [analyzer] Analysis: Silence checkersCsaba Dabis2019-08-161-3/+15
| | | | | | | | | | | | | | | | | | | | | | | Summary: This patch introduces a new `analyzer-config` configuration: `-analyzer-config silence-checkers` which could be used to silence the given checkers. It accepts a semicolon separated list, packed into quotation marks, e.g: `-analyzer-config silence-checkers="core.DivideZero;core.NullDereference"` It could be used to "disable" core checkers, so they model the analysis as before, just if some of them are too noisy it prevents to emit reports. This patch also adds support for that new option to the scan-build. Passing the option `-disable-checker core.DivideZero` to the scan-build will be transferred to `-analyzer-config silence-checkers=core.DivideZero`. Reviewed By: NoQ, Szelethus Differential Revision: https://reviews.llvm.org/D66042 llvm-svn: 369078
* [analyzer] Teach scan-build to find clang when installed in /usr/local/bin/Devin Coughlin2019-03-161-2/+21
| | | | | | | | | | | | | Change scan-build to support the scenario where scan-build is installed in $TOOLCHAIN/usr/local/bin/ but clang itself is installed in $TOOLCHAIN/usr/bin/. This is restricted to when 'xcrun' is present; that is, on the Mac. rdar://problem/48914634 Differential Revision: https://reviews.llvm.org/D59406 llvm-svn: 356308
* [tools] Fix python DeprecationWarning: invalid escape sequenceSerge Guelton2019-02-111-1/+1
| | | | | | | | | | | | | | | | | | | The python documentation says "it’s highly recommended that you use raw strings for all but the simplest expressions." (https://docs.python.org/3/library/re.html) So do that with the attached patch generated by sed -i -e "s/re.search('/re.search(r'/g" $(git grep -l 're.search(') The warning can be seen in e.g. python3.7: $ python3.7 -Wd >>> import re; re.search('\s', '') <stdin>:1: DeprecationWarning: invalid escape sequence \s Commited on behalf of Marco Falke. Differential Revision: https://reviews.llvm.org/D57528 llvm-svn: 353707
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Update the scan-build to generate SARIF.Aaron Ballman2018-12-131-2/+16
| | | | | | This updates the scan-build perl script to allow outputting to sarif in a more natural fashion by specifying -sarif as a command line argument, similar to how -plist is already supported. llvm-svn: 349082
* [analyzer] scan-build: if --status-bugs is passed, don't forget about the ↵Roman Lebedev2018-09-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | exit status of the actual build Summary: This has been bothering me for a while, but only now i have actually looked into this. I'm using one CI job for static analysis - clang static analyzers as compilers + clang-tidy via cmake. And i'd like for the build to fail if at least one of those finds issues. If clang-tidy finds issues, it will fail the build since the warnings-as-errors is set. If static analyzer finds anything, since --status-bugs is set, it will fail the build. But if clang-tidy find anything, but static analyzer does not, the build succeeds :/ Reviewers: sylvestre.ledru, alexfh, jroelofs, ygribov, george.karpenkov, krememek Reviewed By: jroelofs Subscribers: xazax.hun, szepet, a.sidorin, mikhail.ramalho, Szelethus, cfe-commits Differential Revision: https://reviews.llvm.org/D52530 llvm-svn: 343105
* scan-build: Add support of the option --exclude like in scan-build-pySylvestre Ledru2018-09-171-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: To exclude thirdparty code. To test: With /tmp/foo.c ``` void test() { int x; x = 1; // warn } ``` ``` $ scan-build --exclude non-existing/ --exclude /tmp/ -v gcc -c foo.c scan-build: Using '/usr/lib/llvm-7/bin/clang' for static analysis scan-build: Emitting reports for this run to '/tmp/scan-build-2018-09-16-214531-8410-1'. foo.c:3:3: warning: Value stored to 'x' is never read x = 1; // warn ^ ~ 1 warning generated. scan-build: File '/tmp/foo.c' deleted: part of an ignored directory. scan-build: 0 bugs found. ``` Reviewers: jroelofs Reviewed By: jroelofs Subscribers: whisperity, cfe-commits Differential Revision: https://reviews.llvm.org/D52153 llvm-svn: 342359
* scan-build: remove trailing whitespacesSylvestre Ledru2018-09-161-4/+4
| | | | llvm-svn: 342351
* Also manages clang-X as tool for scan-buildSylvestre Ledru2018-09-161-1/+1
| | | | | | | | | | | | | | Summary: This will make scan-build-7 clang-7 -c foo.c &> /dev/null Reviewers: jroelofs Subscribers: kristina, cfe-commits Differential Revision: https://reviews.llvm.org/D52151 llvm-svn: 342350
* Fix typos in clangAlexander Kornienko2018-04-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found via codespell -q 3 -I ../clang-whitelist.txt Where whitelist consists of: archtype cas classs checkk compres definit frome iff inteval ith lod methode nd optin ot pres statics te thru Patch by luzpaz! (This is a subset of D44188 that applies cleanly with a few files that have dubious fixes reverted.) Differential revision: https://reviews.llvm.org/D44188 llvm-svn: 329399
* [scan-build] Add an option to skip overriding CC and CXX make varsJonathan Roelofs2018-01-291-4/+20
| | | | | | | | | | | | | | Autoconf and some other systems tend to add essential compilation options to CC (e.g. -std=gnu99). When running such an auto-generated makefile, scan-build does not need to change CC and CXX as they are already set to use ccc-analyzer by a configure script. Implement a new option --keep-cc as was proposed in this discussion: http://lists.llvm.org/pipermail/cfe-dev/2013-September/031832.html Patch by Paul Fertser! llvm-svn: 323665
* scan-build: Add an option to show the description in the list of defectSylvestre Ledru2016-08-011-4/+28
| | | | | | | | | | | | | | | | Summary: This patch adds an option //--show-description// to add the defect description to the list of defect. This helps to get a better understanding of the defect without opening the page. For example, this is used for Firefox: https://people.mozilla.org/~sledru/reports/fx-scan-build/ Reviewers: rizsotto.mailinglist, zaks.anna Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D22810 llvm-svn: 277328
* [analyzer] Add --force-analyze-debug-code option to scan-buildYury Gribov2016-02-181-3/+17
| | | | | | | | | | | | | | to force debug build and hopefully enable more precise warnings. Static Analyzer is much more efficient when built in debug mode (-UNDEBUG) so we advice users to enable it manually. This may be inconvenient in case of large complex projects (think about Linux distros e.g. Android or Tizen). This patch adds a flag to scan-build which inserts -UNDEBUG automatically. Differential Revision: http://reviews.llvm.org/D16200 llvm-svn: 261204
* [scan-build] Make scan-build work whether it's installed or notJonathan Roelofs2015-11-133-0/+1947
llvm-svn: 253074
OpenPOWER on IntegriCloud