It looks like the answer is no, paths to clang and clang++ executables are used
to initialize CLANG and CLANG_CXX environment variables.
Can't we just use the --driver-mode flag instead of trying to mangle the
executable name?
Peter
On Thu, Aug 20, 2015 at 09:52:39PM -0000, Anton Yartsev via cfe-commits wrote:
Author: ayartsev
Date: Thu Aug 20 16:52:39 2015
New Revision: 245621
URL: http://llvm.org/viewvc/llvm-project?rev=245621&view=rev
Log:
[analyzer] Fix for PR24112 (scan-build doesn't work with --use-analyzer="path to
clang++.exe").
Don't derive the path_to_clang++ from the path_to_clang if the path_to_clang is
really the path_to_clang++.
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=245621&r1=245620&r2=245621&view=diff
==============================================================================
--- cfe/trunk/tools/scan-build/scan-build (original)
+++ cfe/trunk/tools/scan-build/scan-build Thu Aug 20 16:52:39 2015
@@ -1646,14 +1646,20 @@ if ($ForceDisplayHelp || $RequestDisplay
}
$ClangCXX = $Clang;
-# Determine operating system under which this copy of Perl was built.
-my $IsWinBuild = ($^O =~/msys|cygwin|MSWin32/);
-if($IsWinBuild) {
- $ClangCXX =~ s/.exe$/++.exe/;
-}
-else {
- $ClangCXX =~ s/\-\d+\.\d+$//;
- $ClangCXX .= "++";
+if ($Clang !~ /\+\+(\.exe)?$/) {
+ # If $Clang holds the name of the clang++ executable then we leave
+ # $ClangCXX and $Clang equal, otherwise construct the name of the clang++
+ # executable from the clang executable name.
+
+ # Determine operating system under which this copy of Perl was built.
+ my $IsWinBuild = ($^O =~/msys|cygwin|MSWin32/);
+ if($IsWinBuild) {
+ $ClangCXX =~ s/.exe$/++.exe/;
+ }
+ else {
+ $ClangCXX =~ s/\-\d+\.\d+$//;
+ $ClangCXX .= "++";
+ }
}
# Make sure to use "" to handle paths with spaces.
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
--
Anton
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits