summaryrefslogtreecommitdiffstats
path: root/clang/tools/scan-build/ccc-analyzer
Commit message (Collapse)AuthorAgeFilesLines
* [scan-build] Make scan-build work whether it's installed or notJonathan Roelofs2015-11-131-777/+0
| | | | llvm-svn: 253074
* [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] Apply whitespace cleanups by Honggyu Kim.Ted Kremenek2015-09-081-1/+1
| | | | llvm-svn: 246978
* [Static Analyzer] Add --analyzer-target option to scan-build.Ted Kremenek2015-08-081-0/+7
| | | | | | | | | | | | | | 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-011-36/+39
| | | | | | '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
* 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
* 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
* Replace system() by native perl callsSylvestre Ledru2014-05-231-3/+3
| | | | llvm-svn: 209524
* [scan-build] Pass --sysroot through for both compilation and linking.Jordan Rose2014-05-121-0/+1
| | | | | | PR19704 llvm-svn: 208595
* [analyzer] scan-build: allow quotes around "-cc1" when looking at -### output.Jordan Rose2014-03-201-1/+1
| | | | | | Third time's the charm. Patch by Brennan Shacklett! llvm-svn: 204362
* [analyzer] scan-build: match whitespace instead of word boundaries around flags.Jordan Rose2014-03-201-1/+1
| | | | | | | | | Because neither ' ' nor '-' is alphanumeric, \b won't match between them! Since in this case we know our output is coming from a -### invocation, we should always have spaces on both sides of the flag we're trying to match, "-cc1". llvm-svn: 204356
* [analyzer] scan-build: when matching flags, make sure the - is the first letter.Jordan Rose2014-03-191-3/+3
| | | | | | PR19191 llvm-svn: 204253
* Add preprocessed output to ccc-analyzer's accepted language map.Ted Kremenek2014-02-251-1/+4
| | | | llvm-svn: 202182
* In some cases (for example, the Firefox build system), the CLANG_CXX ↵Sylvestre Ledru2014-02-181-4/+4
| | | | | | | | | variable is defined but empty. Extend the test (like it is done in scan-build) to check also if the variable is empty or not. llvm-svn: 201586
* Remove trailing spaces (no other change). Bikeshed #2Sylvestre Ledru2014-02-181-36/+35
| | | | llvm-svn: 201584
* [analyzer] Strip trailing whitespace characters from input.Anton Yartsev2014-01-231-3/+2
| | | | | | More universal way of removing trailing whitespace characters then 'chomp' does. Chomp "removes any trailing string that corresponds to the current value of $/" (quote from perldoc). In my case an input ended with '\r\r\n', chomp left '\r' at the end of input and the script ended up with an error "Use of uninitialized value in concatenation (.) or string" llvm-svn: 199892
* [analyzer] Files with .c extensions are still C++ files if the compiler is CXX.Jordan Rose2014-01-071-4/+10
| | | | | | PR18339 llvm-svn: 198711
* [analyzer] Add -analyzer-config to scan-build.Jordan Rose2013-12-131-0/+6
| | | | | | | | | -analyzer-config options are now passed from scan-build through to ccc-analyzer and then to clang. Patch by Daniel Connelly! llvm-svn: 197246
* Fix a tranche of comment, test and doc typosAlp Toker2013-12-051-1/+1
| | | | llvm-svn: 196510
* [analyzer] scan-build: Handle -m* option wildcard after compiler/linker flags.Jordan Rose2013-10-221-4/+5
| | | | | | | | | | Some of the shared compiler/linker flags start with -m, so they've been getting passed to the compiler only since r180073. Now, the -m* wildcard is processed after the shared flags and the ignored flags. Found by Laszlo Nagy! llvm-svn: 193184
* scan-build: pass -target through to analyzerJordan Rose2013-08-081-0/+1
| | | | llvm-svn: 187989
* [scan-build] Add missing comma to ccc-analyzer.Jordan Rose2013-07-121-1/+1
| | | | | | Thanks, Dmitry! llvm-svn: 186167
* [scan-build] Pass through all -f and -O flags, along with -Wwrite-strings.Jordan Rose2013-07-111-16/+11
| | | | | | | | | | | | | These flags control language options and user-visible macros, so it's important to preserve them when analyzing. Rather than try to keep up with all the -f flags, we'll pass them all through and then ban the ones we don't want (like -fsyntax-only). -Wwrite-strings is really an f-flag in disguise: it implies -fconst-strings. Patch by Keaton Mowry, modified by me. llvm-svn: 186138
* [scan-build] Log compiler invocation to stderr, not stdout.Jordan Rose2013-07-031-4/+4
| | | | | | | | | | This is important for preprocessing steps, which may output to stdout. Also, change ENV accesses using barewords to use string keys instead. PR16414 llvm-svn: 185555
* [scan-build] Whitelist all -mXXXX options.Ted Kremenek2013-04-231-1/+1
| | | | llvm-svn: 180073
* Teach ccc-analyze to pass on -iquote with no spaces between it an the argument.Ted Kremenek2013-02-141-0/+5
| | | | llvm-svn: 175115
* ccc-analyzer: Forward -msse* options to the compiler.Ted Kremenek2013-01-101-0/+4
| | | | llvm-svn: 172094
* [analyzer] scan-build: Don't forget to close our temp file for Clang's output.Jordan Rose2012-11-281-7/+8
| | | | | | | | Also, minor whitespace/indentation fixes. Patch by Peeter Joot! llvm-svn: 168805
* [analyzer] scan-build: Treat '.C' files as C++.Jordan Rose2012-11-281-0/+1
| | | | | | Part of PR14443. llvm-svn: 168804
* ccc-analyzer: pass -stdlib=libc++ through to the analyzer.Benjamin Kramer2012-09-191-0/+1
| | | | | | Otherwise clang can't analyze code that relies on features provided by libc++. llvm-svn: 164262
* [scan-build] Accept -fno-objc-arc as well as -fobjc-arc.Jordan Rose2012-08-231-0/+1
| | | | | | | | | This is how Xcode lets individual files be marked as non-ARC when the rest of the project is ARC-enabled, so this is necessary for scan-build xcodebuild. Patch by Paul Eipper! llvm-svn: 162497
* Teach ccc-analyze about -fobjc-legacy-dispatch and -mios-simulator-version-minTed Kremenek2012-08-071-0/+2
| | | | llvm-svn: 161443
* [analyzer]scan-build: report the total number of steps analyzer performsAnna Zaks2012-06-221-0/+7
| | | | | | This would be useful to investigate performance issues. llvm-svn: 159038
* Sink definition of IBOutlet, IBOutletCollection, and IBAction intoTed Kremenek2012-06-191-5/+0
| | | | | | | the compiler predefines buffer. These are essentially part of the Objective-C language. llvm-svn: 158690
* [analyzer] Loading external plugins with scan-buildAnna Zaks2012-05-251-0/+7
| | | | | | | | | | | | | Load custom plugins when running scan-build. This is useful when additional static analysis Checkers must be provided via clang's plugin interface. Loading additional plugins can now be done via the scan-build call: scan-build -load-plugin <plugin.so> A patch by Thomas Hauth. llvm-svn: 157452
* [analyzer] Add .cxx and .txx as known file extensions to ccc-analyzer.Anna Zaks2012-04-141-0/+2
| | | | | | A patch by Sean McBride. llvm-svn: 154751
* Add static analyzer support for new NSArray/NSDictionary/NSNumber literals.Ted Kremenek2012-03-061-1/+2
| | | | llvm-svn: 152139
* Teach ccc-analyzer about -fobjc-abi-version.Ted Kremenek2012-01-261-1/+2
| | | | llvm-svn: 149094
* [analyzer] scan-build: If we are on MacOS, use clang as the defaultAnna Zaks2012-01-061-2/+12
| | | | | | compiler. llvm-svn: 147644
* [analyzer] Skip --serialize-diagnostic when running scan-build.Anna Zaks2012-01-061-1/+2
| | | | | | | Otherwise, the analyzer will try to analyze the serialized diagnostic file as if it were a source file. llvm-svn: 147643
* Teach ccc-analyzer about -fobjc-arc.Ted Kremenek2011-11-161-0/+1
| | | | llvm-svn: 144778
OpenPOWER on IntegriCloud