r175790 - [scan-build] Add quotes around clang executable name to handle path withs spaces. Fixes <rdar://problem/13254727>

Ted Kremenek kremenek at apple.com
Thu Feb 21 12:29:00 PST 2013


Author: kremenek
Date: Thu Feb 21 14:28:59 2013
New Revision: 175790

URL: http://llvm.org/viewvc/llvm-project?rev=175790&view=rev
Log:
[scan-build] Add quotes around clang executable name to handle path withs spaces.  Fixes <rdar://problem/13254727>

Modified:
    cfe/trunk/tools/scan-build/scan-build

Modified: cfe/trunk/tools/scan-build/scan-build
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/scan-build/scan-build?rev=175790&r1=175789&r2=175790&view=diff
==============================================================================
--- cfe/trunk/tools/scan-build/scan-build (original)
+++ cfe/trunk/tools/scan-build/scan-build Thu Feb 21 14:28:59 2013
@@ -1553,7 +1553,8 @@ if ($displayHelp) {
 $ClangCXX = $Clang;
 $ClangCXX =~ s/\-\d+\.\d+$//;
 $ClangCXX .= "++";
-$ClangVersion = HtmlEscape(`$Clang --version`);
+# Make sure to use "" to handle paths with spaces.
+$ClangVersion = HtmlEscape(`"$Clang" --version`);
 
 # Determine where results go.
 $CmdArgs = HtmlEscape(join(' ', map(ShellEscape($_), @ARGV)));





More information about the cfe-commits mailing list