summaryrefslogtreecommitdiffstats
path: root/tools/scan-build-py
Commit message (Collapse)AuthorAgeFilesLines
* [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308401 91177308-0d34-0410-b5e6-96231b3b80d8
* [scan-build-py] merge runner module to analyzerLaszlo Nagy2017-04-076-625/+600
| | | | | | | Differential Revision: https://reviews.llvm.org/D31237 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299759 91177308-0d34-0410-b5e6-96231b3b80d8
* [scan-build-py] reuse command line output parameter for report directoryLaszlo Nagy2017-03-212-28/+33
| | | | | | | Differential Revision: https://reviews.llvm.org/D30861 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298355 91177308-0d34-0410-b5e6-96231b3b80d8
* [scan-build-py] use python tempfile for tempdirLaszlo Nagy2017-03-203-10/+5
| | | | | | | Differential Revision: https://reviews.llvm.org/D30862 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298238 91177308-0d34-0410-b5e6-96231b3b80d8
* [scan-build-py] move argument parsing into separate moduleLaszlo Nagy2017-03-081-0/+430
| | | | | | | Forgot to add the new module. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297308 91177308-0d34-0410-b5e6-96231b3b80d8
* [scan-build-py] move argument parsing into separate moduleLaszlo Nagy2017-03-085-406/+55
| | | | | | | Differential Revision: https://reviews.llvm.org/D30601 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297307 91177308-0d34-0410-b5e6-96231b3b80d8
* [scan-build-py] fix some line separator issuesLaszlo Nagy2017-03-082-6/+7
| | | | | | | Differential Revision: https://reviews.llvm.org/D30600 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297266 91177308-0d34-0410-b5e6-96231b3b80d8
* [scan-build-py] create decorator for compiler wrapper methodsLaszlo Nagy2017-03-047-114/+208
| | | | | | | Differential Revision: https://reviews.llvm.org/D29260 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296937 91177308-0d34-0410-b5e6-96231b3b80d8
* [scan-build-py] move function report_directory from report module to analyze ↵Laszlo Nagy2017-02-144-54/+53
| | | | | | | | | module Differential Revision: https://reviews.llvm.org/D29255 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295045 91177308-0d34-0410-b5e6-96231b3b80d8
* [scan-build-py] use subprocess wrapper to execute buildLaszlo Nagy2017-02-143-8/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295043 91177308-0d34-0410-b5e6-96231b3b80d8
* [scan-build-py] remove not used flagLaszlo Nagy2017-01-291-12/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293418 91177308-0d34-0410-b5e6-96231b3b80d8
* [scan-build-py] remove batch filesLaszlo Nagy2017-01-287-7/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293397 91177308-0d34-0410-b5e6-96231b3b80d8
* [scan-build-py] use subprocess wrapperLaszlo Nagy2017-01-286-92/+89
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293396 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer][scan-build-py] subprocess output handling reviewed in clang moduleLaszlo Nagy2016-09-243-100/+156
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282317 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] scan-build-py: Remove relative path hack for SATestsBuild.pyDevin Coughlin2016-09-142-26/+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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281516 91177308-0d34-0410-b5e6-96231b3b80d8
* [scan-build-py] Increase precision of timestamp in report directory nameDevin Coughlin2016-09-062-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@280768 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Fix execution permissions for the scan-build-py scripts.Artem Dergachev2016-08-017-0/+0
| | | | | | | Differential Revision: https://reviews.llvm.org/D22969 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@277338 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Update to requiring CMake 3.4.3Chris Bieneman2016-05-311-1/+1
| | | | | | | | | | | | | | Summary: This is as per the discussions on developer lists: http://lists.llvm.org/pipermail/llvm-dev/2016-April/098780.html http://lists.llvm.org/pipermail/llvm-dev/2016-May/100058.html Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20823 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271326 91177308-0d34-0410-b5e6-96231b3b80d8
* D17487: [analyzer][scan-build-py] flag filter modification for compilation ↵Laszlo Nagy2016-04-1920-735/+823
| | | | | | database creation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266726 91177308-0d34-0410-b5e6-96231b3b80d8
* [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) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261480 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Add --force-analyze-debug-code option to scan-buildYury Gribov2016-02-183-4/+34
| | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261204 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Windows: launch scan-build from an arbitrary location.Anton Yartsev2016-02-107-0/+7
| | | | | | The following batch files allow to launch scan-build from an arbitrary location if path to clang\tools\scan-build-py\bin is added to %PATH%. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260420 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove autoconf supportChris Bieneman2016-01-261-42/+0
| | | | | | | | | | | | | | | | | Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "This is the way [autoconf] ends Not with a bang but a whimper." -T.S. Eliot Reviewers: chandlerc, grosbach, bob.wilson, echristo Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D16472 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258862 91177308-0d34-0410-b5e6-96231b3b80d8
* D9600: Add scan-build python implementationLaszlo Nagy2016-01-1253-0/+5832
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@257533 91177308-0d34-0410-b5e6-96231b3b80d8