Index: tools/scan-build/ccc-analyzer =================================================================== --- tools/scan-build/ccc-analyzer +++ tools/scan-build/ccc-analyzer @@ -145,7 +145,7 @@ 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); } @@ -180,6 +180,9 @@ # Strip leading and trailing whitespace characters. $line =~ s/^\s+|\s+$//g; my @items = quotewords('\s+', 0, $line); + foreach (@items) { + $_ = qq/"$_"/ if (/^[^"'].*?\s+/os); + } my $cmd = shift @items; die "cannot find 'clang' in 'clang' command\n" if (!($cmd =~ /clang/)); return \@items;