r236533 should fix an issue. This is the first variant of the patch that wraps 
an argument with quotes only if an argument has spaces, otherwise an argument 
is left unmodified.

Anton,

This has caused regressions on our internal ASan builedbot while analyzing 
openssl. (Please, revert until the issue is solved.)

/Users/buildslave/jenkins/workspace/Static_Analyzer_master/scan-build/ccc-analyzer
 -I. -I.. -I../include  -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN 
-DHAVE_DLFCN_H -arch i386 -O3 -fomit-frame-pointer -DL_ENDIAN 
-DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT 
-DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM 
-DWHIRLPOOL_ASM   -c -o cryptlib.o cryptlib.c
clang: error: no such file or directory: '"-cc1"'
clang: error: no such file or directory: '"-triple"'
clang: error: no such file or directory: '"i386-apple-macosx10.10.0"'
clang: error: no such file or directory: '"-analyze"'
clang: error: no such file or directory: '"-disable-free"'
clang: error: no such file or directory: '"-disable-llvm-verifier"'
clang: error: no such file or directory: '"-main-file-name"'
clang: error: no such file or directory: '"cryptlib.c"'
clang: error: no such file or directory: '"-analyzer-store=region"'
clang: error: no such file or directory: '"-analyzer-opt-analyze-nested-blocks"'
clang: error: no such file or directory: '"-analyzer-eagerly-assume"'
clang: error: no such file or directory: '"-analyzer-checker=c
....
On May 4, 2015, at 6:37 AM, Anton Yartsev <[email protected]> wrote:

Author: ayartsev
Date: Mon May  4 08:37:36 2015
New Revision: 236423

URL: http://llvm.org/viewvc/llvm-project?rev=236423&view=rev
Log:
[analyzer] scan-build: support spaces in compiler path and arguments.

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)

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=236423&r1=236422&r2=236423&view=diff
==============================================================================
--- cfe/trunk/tools/scan-build/ccc-analyzer (original)
+++ cfe/trunk/tools/scan-build/ccc-analyzer Mon May  4 08:37:36 2015
@@ -145,7 +145,7 @@ sub ProcessClangFailure {
   print OUT "@$Args\n";
   close OUT;
   `uname -a >> $PPFile.info.txt 2>&1`;
-  `$Compiler -v >> $PPFile.info.txt 2>&1`;
+  `"$Compiler" -v >> $PPFile.info.txt 2>&1`;
   rename($ofile, "$PPFile.stderr.txt");
   return (basename $PPFile);
}
@@ -179,7 +179,7 @@ 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+', 0, $line);
+  my @items = quotewords('\s+', 1, $line);
   my $cmd = shift @items;
   die "cannot find 'clang' in 'clang' command\n" if (!($cmd =~ /clang/));
   return \@items;


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

--
Anton

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to