r236533 - [analyzer] This eliminates regression caused by r236423.
Anton Yartsev
anton.yartsev at gmail.com
Tue May 5 12:43:37 PDT 2015
Author: ayartsev
Date: Tue May 5 14:43:37 2015
New Revision: 236533
URL: http://llvm.org/viewvc/llvm-project?rev=236533&view=rev
Log:
[analyzer] This eliminates regression caused by r236423.
Wrap an argument with quotes only if it has spaces.
Modified:
cfe/trunk/tools/scan-build/ccc-analyzer
Modified: cfe/trunk/tools/scan-build/ccc-analyzer
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/scan-build/ccc-analyzer?rev=236533&r1=236532&r2=236533&view=diff
==============================================================================
--- cfe/trunk/tools/scan-build/ccc-analyzer (original)
+++ cfe/trunk/tools/scan-build/ccc-analyzer Tue May 5 14:43:37 2015
@@ -179,7 +179,11 @@ sub GetCCArgs {
die "could not find clang line\n" if (!defined $line);
# Strip leading and trailing whitespace characters.
$line =~ s/^\s+|\s+$//g;
- my @items = quotewords('\s+', 1, $line);
+ my @items = quotewords('\s+', 0, $line);
+ # Wrap arguments that have spaces with quotes.
+ foreach (@items) {
+ $_ = qq/"$_"/ if (/\s+/);
+ }
my $cmd = shift @items;
die "cannot find 'clang' in 'clang' command\n" if (!($cmd =~ /clang/));
return \@items;
More information about the cfe-commits
mailing list