summaryrefslogtreecommitdiffstats
path: root/clang/tools/scan-build
Commit message (Collapse)AuthorAgeFilesLines
* [scan-build] Patch to scan-build tool to support "--target=<value>" flagPetr Hosek2017-05-261-1/+2
| | | | | | | | | | | | | | | | | The scan-build script provided by clang can be used to detect defects in code in the compile time. However, we discovered that the "--target=<value>" flag in clang is not properly handled by this script, which results in failures when analyzing projects that have used this flag in their makefile. This single line of change allows scan-build script to properly handle the "--target=<value>" flag. Patch by Haowei Wu Differential Revision: https://reviews.llvm.org/D33263 llvm-svn: 304025
* Actually install scan-build / ccc-analyzer / c++-analyzer on windowsJonathan Roelofs2017-03-221-0/+3
| | | | | | Before, we were only installing the wrappers... oops. llvm-svn: 298549
* 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-182-3/+25
| | | | | | | | | | | | | | 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
* Remove autoconf supportChris Bieneman2016-01-261-53/+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 llvm-svn: 258862
* Honor system specific paths of MAN pagesChris Bieneman2015-11-201-6/+7
| | | | | | | | | | | | | | Summary: Caught on NetBSD. Patch by: Kamil Rytarowski (krytarowski) Reviewers: beanz, jroelofs Subscribers: cfe-commits, joerg Differential Revision: http://reviews.llvm.org/D14800 llvm-svn: 253693
* Fix build... againJonathan Roelofs2015-11-131-1/+1
| | | | llvm-svn: 253081
* [scan-build] Make scan-build work whether it's installed or notJonathan Roelofs2015-11-1312-16/+17
| | | | llvm-svn: 253074
* [scan-build] Move non user-facing utilities to shareJonathan Roelofs2015-11-132-7/+7
| | | | llvm-svn: 253068
* scan-build: Fix install.NAKAMURA Takumi2015-11-131-1/+1
| | | | llvm-svn: 253016
* [scan-build] Create share directory similar to scan-view'sJonathan Roelofs2015-11-134-10/+10
| | | | llvm-svn: 252981
* [analyzer] Fix scan-build to handle missing output directories.Devin Coughlin2015-11-111-1/+3
| | | | | | | | | | | | | Cwd::abs_path has a somewhat tricky semantics: if it's operand directory does not exist, it'll return undefined (see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=257568). This may cause scan-build to silently ignore output directory (specified with -o) and use /tmp instead of trying to create directory. This tiny patch fixes the problem. A patch by Yury Gribov! Differential Revision: http://reviews.llvm.org/D14535 llvm-svn: 252797
* Hiding the scan-build and scan-view projects under the Misc folder in IDEs ↵Aaron Ballman2015-11-111-0/+1
| | | | | | instead of having them at the root view. llvm-svn: 252771
* Implement post-commit review feedback on r252662Jonathan Roelofs2015-11-101-7/+6
| | | | llvm-svn: 252664
* Implement the fix that r252641 should have beenJonathan Roelofs2015-11-101-6/+12
| | | | llvm-svn: 252662
* Fix missing CMake dependency introduced in r252474Jonathan Roelofs2015-11-101-4/+8
| | | | llvm-svn: 252641
* Fix the cmake build after r252474 broke itJonathan Roelofs2015-11-091-1/+1
| | | | llvm-svn: 252489
* Create install targets for scan-build and scan-viewJonathan Roelofs2015-11-093-2/+126
| | | | | | http://reviews.llvm.org/D14403 llvm-svn: 252474
* [analyzer] Preserve the order checkers were enabled/disabled.Anton Yartsev2015-10-281-4/+19
| | | | | | | In addition to r251524: preserve the order the checkers were enabled/disabled to be deterministic. Additionally return the number of arguments read by 'ProcessArgs' - for debug purpose. llvm-svn: 251552
* [analyzer] Make inclusion/exclusion of checkers less ambiguous.Anton Yartsev2015-10-281-6/+10
| | | | | | | | A checker may be enabled/disabled multiple times via -enable-checker and -disable-checker scan-build arguments. Currently the conflicting and repetitive arguments are passed to the analyzer as is. With this patch only the last enable/disable of a particular checker is accepted and passed to the analyzer. This change is mostly done for the upcoming 'config for scan-build' patch when multiple inclusions/exclusions of a checker are expected to be more common. llvm-svn: 251524
* [analyzer] ccc-analyzer: Fix -isystem value passing.Devin Coughlin2015-10-261-1/+1
| | | | | | | | | | | | | | | The regex for -isystem matching is broken. -[D,I,Usystem] matches "-D", "-,", "-I", "-U", "-s" "-y", etc. Besides that, "-isystem /foo" gets interpreted as "-i" with a non-empty value "system" and thus the next "/foo" argument is not read. This patch corrects the regex. This fixes PR13237 <https://llvm.org/bugs/show_bug.cgi?id=13237>. A patch by Peter Wu! Differential Revision: http://reviews.llvm.org/D13800 llvm-svn: 251312
* [analyzer] scan-build: Teach ccc-analyzer about -Xclang.Devin Coughlin2015-10-251-0/+9
| | | | | | | | | Update ccc-analyzer to forward both -Xclang and its following argument to the the compiler driver. Previously we were dropping -Xclang and forwarding the argument on its own if it matched other forwarding criteria. This caused the argument to be interpreted as a driver rather than a frontend option. llvm-svn: 251218
* [analyzer] Improved behavior if Clang was not found, part IIAnton Yartsev2015-09-161-34/+50
| | | | | | | - scan-build help: display 'Could not query Clang for the list of available checkers.' + the reason why it happened so if clang was not found. - display requested/forced help in case of --use-analyzer=Xcode. llvm-svn: 247828
* Use -f instead of -d flag for testing existing of clang executable ↵Ted Kremenek2015-09-121-2/+2
| | | | | | (http://reviews.llvm.org/D12827). llvm-svn: 247510
* [analyzer] Improve behavior if Clang not found.Anton Yartsev2015-09-111-31/+33
| | | | | | | - Eliminate 'No such file or directory at scan-build line ...' error if '$RealBin/bin/clang' or '$RealBin/clang' directory does not exist. - Eliminate 'Use of uninitialized value $Clang in concatenation (.) or string at scan-build line ...' error if help is displayed while $Clang was not found. llvm-svn: 247466
* [analyzer] Apply whitespace cleanups by Honggyu Kim.Ted Kremenek2015-09-082-2/+2
| | | | llvm-svn: 246978
* [analyzer] Refactoring: bring together scan-build options and environment ↵Anton Yartsev2015-09-021-269/+301
| | | | | | | | | | | variables. Full list of changes: - all scan-build command-line arguments are now kept in %Options hash. - most of environment variables scan-build operates with are stored in %EnvVars hash. - moved processing of command-line arguments to the ProcessArgs subroutine. llvm-svn: 246710
* [analyzer] Fix for PR24112 (scan-build doesn't work with ↵Anton Yartsev2015-08-201-8/+14
| | | | | | | | --use-analyzer="path to clang++.exe"). Don't derive the path_to_clang++ from the path_to_clang if the path_to_clang is really the path_to_clang++. llvm-svn: 245621
* [analyzer] Incorrect env variable replaced.Anton Yartsev2015-08-111-1/+1
| | | | llvm-svn: 244673
* [Static Analyzer] Add --analyzer-target option to scan-build.Ted Kremenek2015-08-082-1/+37
| | | | | | | | | | | | | | When interposing on a compiler doing cross-compilation, scan-build does not infer the target triple needed to pass to clang for doing static analysis. The --analyzer-target option allows one to manually specify the target triple used during static analysis (and only static analysis) for such cases. Patch by Honggyu Kim! Reviewed in http://reviews.llvm.org/D10356. llvm-svn: 244400
* [analyzer] Prevent ccc/c++-analyzer from hanging on Windows.Anton Yartsev2015-07-012-62/+48
| | | | | | 'fork'+'exec' combination made scan-build and ccc-analyzer hang under Windows. The patch replaces 'fork'+'exec' with more reliable 'system' (ccc-analyzer) and piped 'open' (scan-build). See http://reviews.llvm.org/D8774 and http://reviews.llvm.org/D9357 for more details. llvm-svn: 241201
* [analyzer] Cleanup: $Status is always 0 here.Anton Yartsev2015-06-171-2/+0
| | | | llvm-svn: 239971
* [analyzer] Close file handle before output to file from external command.Anton Yartsev2015-06-171-1/+1
| | | | | | An old code caused problems under Windows - additional temporary file was created for clang preprocessor output while the right output file remained empty. llvm-svn: 239970
* scan-build: Remove useless whitespace in File pathSylvestre Ledru2015-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Patch by Honggyu Kim Summary: This patch removes useless whitespace in File path in index.html Previously, a File directory path is copied and pasted as below: arch /arm /kernel /stacktrace.c It just removes the whitespace between directories and makes the copied string as below: arch/arm/kernel/stacktrace.c The output looks same in html format, but the copied directory path can be pasted as it looks. Reviewers: krememek, zaks.anna, sylvestre.ledru Reviewed By: sylvestre.ledru Subscribers: aemerson, cfe-commits Differential Revision: http://reviews.llvm.org/D10354 llvm-svn: 239609
* Revert "[analyzer] scan-build: support spaces in compiler path and arguments."Ahmed Bougacha2015-05-061-5/+1
| | | | | | | | This reverts commit r236423 and its followup r236533, as indiscriminate quoting makes for too much quoting (and clang doesn't like both '"-c"' and -D"FOO=bar"). llvm-svn: 236562
* [analyzer] This eliminates regression caused by r236423.Anton Yartsev2015-05-051-1/+5
| | | | | | Wrap an argument with quotes only if it has spaces. llvm-svn: 236533
* [analyzer] scan-build: support spaces in compiler path and arguments.Anton Yartsev2015-05-041-2/+2
| | | | | | This fixes errors that occur if a path to the default compiler has spaces or if an argument with spaces is given to compiler (e.g. via -I). (http://reviews.llvm.org/D9357) llvm-svn: 236423
* [scan-build] Be friendly to "" in the argument list.Anna Zaks2015-03-281-0/+5
| | | | | | Do not fail when "" is one of the compilation arguments. llvm-svn: 233465
* [analyzer] Change ccc-analyzer to accept both -isystem <path> and -isystem<path>Ted Kremenek2015-02-031-2/+1
| | | | | | Patch by Thomas Hauth! llvm-svn: 227946
* [analyzer] Include a couple more comments on using xcrun to query the SDK.Ted Kremenek2014-12-311-0/+4
| | | | llvm-svn: 225039
* [analyzer] Change ccc-analyzer to mimick behavior on OSX Mavericks/Yosemite ↵Ted Kremenek2014-12-311-0/+20
| | | | | | to automatically infer the SDK location. llvm-svn: 225038
* [analyzer] Eliminated endless loop.Anton Yartsev2014-12-051-0/+1
| | | | llvm-svn: 223426
* [analyzer] Indented code within the DisplayHelp sub.Anton Yartsev2014-11-261-84/+84
| | | | llvm-svn: 222851
* [analyzer] Perl scripts are run differently from makefiles. Sometimes ↵Anton Yartsev2014-10-152-0/+2
| | | | | | additional utilities are involved, e.g. 'env' utility that present in MSYS but is missing in MinGW. The patch unifies launch of "c++-analyzer" and "ccc-analyzer". llvm-svn: 219812
* [analyzer] Handle 'mingw32-make' in the same way as 'make' and 'gmake'.Anton Yartsev2014-10-151-1/+1
| | | | llvm-svn: 219794
* Fix a bug when scan-build is used in a cross-compilation environment withSylvestre Ledru2014-08-081-2/+13
| | | | | | | | | | | | | the --use-cc option. Instead, we will search in the PATH For example: scan-build --use-cc=arm-none-eabi-gcc -o out make -e Initially reported as a Debian Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=748777 llvm-svn: 215229
* Consistency on the tab/spaceSylvestre Ledru2014-07-171-18/+18
| | | | llvm-svn: 213236
* Fix Bug 14061 - scan-build crashes during postprocessing if BUGFILE no ↵Sylvestre Ledru2014-07-171-0/+4
| | | | | | | | | | longer exists Experienced with Thunderbird build Patch by Matti Niemenmaa llvm-svn: 213235
* Fix typosAlp Toker2014-07-141-1/+1
| | | | | | Also consolidate 'backward compatibility' llvm-svn: 212974
* actually, just check if it is a file (including directory or symlink)Sylvestre Ledru2014-06-161-1/+1
| | | | llvm-svn: 211053
OpenPOWER on IntegriCloud