summaryrefslogtreecommitdiffstats
path: root/clang/tools/scan-build-py/libscanbuild
Commit message (Collapse)AuthorAgeFilesLines
* [scan-build-py] Set of small fixesGabor Horvath2019-12-052-8/+26
| | | | | | | * Unhandled exceptions * Typos Differential Revision: https://reviews.llvm.org/D70693
* [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-198-32/+24
| | | | | | | | | | | | | | | | | 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
* [analyzer][CrossTU][NFC] Generalize to external definitions instead of ↵Rafael Stahl2019-01-104-76/+78
| | | | | | | | | | | | | | | | external functions Summary: This is just changing naming and documentation to be general about external definitions that can be imported for cross translation unit analysis. There is at least a plan to add VarDecls: D46421 Reviewers: NoQ, xazax.hun, martong, a.sidorin, george.karpenkov, serge-sans-paille Reviewed By: xazax.hun, martong Subscribers: mgorny, whisperity, baloghadamsoftware, szepet, rnkovacs, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, cfe-commits Differential Revision: https://reviews.llvm.org/D56441 llvm-svn: 350852
* Portable Python script across Python versionSerge Guelton2018-12-181-1/+1
| | | | | | | | Make scripts more future-proof by importing most __future__ stuff. Differential Revision: https://reviews.llvm.org/D55208 llvm-svn: 349504
* Portable Python script across Python versionSerge Guelton2018-12-181-0/+1
| | | | | | | | Using from __future__ import print_function it is possible to have a compatible behavior of `print(...)` across Python version. Differential Revision: https://reviews.llvm.org/D55213 llvm-svn: 349454
* [analyzer] Remove traces of ubigraph visualizationGeorge Karpenkov2018-09-061-2/+0
| | | | | | | | | | Ubigraph project has been dead since about 2008, and to the best of my knowledge, no one was using it. Previously, I wasn't able to launch the existing binary at all. Differential Revision: https://reviews.llvm.org/D51655 llvm-svn: 341601
* Fix typos in clangAlexander Kornienko2018-04-062-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Resubmit [analyzer] Support for naive cross translation unit analysisIlya Biryukov2018-03-015-32/+375
| | | | | | | | | | | Originally submitted as r326323 and r326324. Reverted in r326432. Reverting the commit was a mistake. The breakage was due to invalid build files in our internal buildsystem, CMakeLists did not have any cyclic dependencies. llvm-svn: 326439
* Revert "[analyzer] Support for naive cross translation unit analysis"Ilya Biryukov2018-03-015-375/+32
| | | | | | | | | | Also revert "[analyzer] Fix a compiler warning" This reverts commits r326323 and r326324. Reason: the commits introduced a cyclic dependency in the build graph. This happens to work with cmake, but breaks out internal integrate. llvm-svn: 326432
* [analyzer] Support for naive cross translation unit analysisGabor Horvath2018-02-285-32/+375
| | | | | | | | | | | | | | | | | | The aim of this patch is to be minimal to enable incremental development of the feature on the top of the tree. This patch should be an NFC when the feature is turned off. It is turned off by default and still considered as experimental. Technical details are available in the EuroLLVM Talk: http://llvm.org/devmtg/2017-03//2017/02/20/accepted-sessions.html#7 Note that the initial prototype was done by A. Sidorin et al.: http://lists.llvm.org/pipermail/cfe-dev/2015-October/045730.html Contributions to the measurements and the new version of the code: Peter Szecsi, Zoltan Gera, Daniel Krupp, Kareem Khazem. Differential Revision: https://reviews.llvm.org/D30691 llvm-svn: 326323
* Fix typos of occurred and occurrenceMalcolm Parsons2018-01-241-1/+1
| | | | llvm-svn: 323316
* [scan-build-py] Patch to fix "-analyzer-config" optionPetr Hosek2017-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | I noticed that when I use "-analyze-config" option in scan-build-py, it behaves differently from original perl based scan-build. For example, command: $ scan-build -analyzer-config ipa=basic-inlining make Will work without any issues on perl version of scan-build. But on scan-build-py it will throw an error message "error reading 'ipa=basic-inlining'". After debugging, it turns out that the scan-build-py does not put "-analyzer-config" flag in front of the analyzer config flags (in this case is the "ipa=basic-inlining") in the final clang command line. This patch fixes this issue. Patch by Haowei Wu Differential Revision: https://reviews.llvm.org/D34489 llvm-svn: 308401
* [scan-build-py] merge runner module to analyzerLaszlo Nagy2017-04-072-301/+286
| | | | | | Differential Revision: https://reviews.llvm.org/D31237 llvm-svn: 299759
* [scan-build-py] reuse command line output parameter for report directoryLaszlo Nagy2017-03-212-28/+33
| | | | | | Differential Revision: https://reviews.llvm.org/D30861 llvm-svn: 298355
* [scan-build-py] use python tempfile for tempdirLaszlo Nagy2017-03-203-10/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D30862 llvm-svn: 298238
* [scan-build-py] move argument parsing into separate moduleLaszlo Nagy2017-03-081-0/+430
| | | | | | Forgot to add the new module. llvm-svn: 297308
* [scan-build-py] move argument parsing into separate moduleLaszlo Nagy2017-03-082-400/+49
| | | | | | Differential Revision: https://reviews.llvm.org/D30601 llvm-svn: 297307
* [scan-build-py] fix some line separator issuesLaszlo Nagy2017-03-081-4/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D30600 llvm-svn: 297266
* [scan-build-py] create decorator for compiler wrapper methodsLaszlo Nagy2017-03-043-106/+200
| | | | | | Differential Revision: https://reviews.llvm.org/D29260 llvm-svn: 296937
* [scan-build-py] move function report_directory from report module to analyze ↵Laszlo Nagy2017-02-142-41/+38
| | | | | | | | module Differential Revision: https://reviews.llvm.org/D29255 llvm-svn: 295045
* [scan-build-py] use subprocess wrapper to execute buildLaszlo Nagy2017-02-143-8/+18
| | | | llvm-svn: 295043
* [scan-build-py] remove not used flagLaszlo Nagy2017-01-291-12/+2
| | | | llvm-svn: 293418
* [scan-build-py] use subprocess wrapperLaszlo Nagy2017-01-284-81/+87
| | | | llvm-svn: 293396
* [analyzer][scan-build-py] subprocess output handling reviewed in clang moduleLaszlo Nagy2016-09-242-95/+99
| | | | llvm-svn: 282317
* [analyzer] scan-build-py: Remove relative path hack for SATestsBuild.pyDevin Coughlin2016-09-141-12/+1
| | | | | | | | | | | | | | | | | Remove the relative path hack in scan-build-py that converts a fully qualified directory name and a fully qualified file path to a relative path before running the analyzer on a file. This hack is not needed: the bad interaction with SATestsBuild.py it was intended to address is actually the same underlying problem that r280768 fixed. Further, because the hack would always relativize paths, it caused SATestBuild.py to be unable to properly line up issues when the build system changed directory and then built a source file in a child directory but used a fully-qualified path for the source file. Differential Revision: https://reviews.llvm.org/D24470 llvm-svn: 281516
* [scan-build-py] Increase precision of timestamp in report directory nameDevin Coughlin2016-09-061-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit improves compatibility with the perl version of scan-build. The perl version of scan-build produces output report directories with increasing lexicographic ordering. This ordering is relied on by the CmpRuns.py tool in utils/analyzer when comparing results for build commands with multiple steps. That tool tries to line up the output directory for each step between different runs of the analyzer based on the increasing directory name. The python version of scan-build uses file.mkdtemp() with a time stamp prefix to create report directories. The timestamp has a 1-second precision. This means that when analysis of a single build step takes less than a second the ordering property that CmpRuns.py expects will sometimes not hold, depending on the timing and the random suffix generated by mkdtemp(). Ultimately this causes CmpRuns to incorrectly correlate results from build steps and report spurious differences between runs. This commit increases the precision of the timestamp used in scan-build-py to the microsecond level. This approach still has the same underlying issue -- but in practice analysis of any build step is unlikely to take less than a millisecond. Differential Revision: https://reviews.llvm.org/D24163 llvm-svn: 280768
* D17487: [analyzer][scan-build-py] flag filter modification for compilation ↵Laszlo Nagy2016-04-195-282/+319
| | | | | | database creation llvm-svn: 266726
* [analyzer][scan-build] Non-existing directory for scan-build output.Anton Yartsev2016-02-211-1/+6
| | | | | | | Makes scan-build successfully accept non-existing output directories provided via "-o" option. The directory is created in this case. This behavior is conforming to the old perl scan-build implementation. (http://reviews.llvm.org/D17091) llvm-svn: 261480
* [analyzer] Add --force-analyze-debug-code option to scan-buildYury Gribov2016-02-182-4/+23
| | | | | | | | | | | | | | 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
* D9600: Add scan-build python implementationLaszlo Nagy2016-01-1211-0/+2685
llvm-svn: 257533
OpenPOWER on IntegriCloud