Skip to content

Commit

Permalink
[analyzer] Fix for PR24112 (scan-build doesn't work with --use-analyz…
Browse files Browse the repository at this point in the history
…er="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++.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@245621 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
ayartsev7 committed Aug 20, 2015
1 parent 8ef8ec7 commit a8a5653
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions tools/scan-build/scan-build
Original file line number Diff line number Diff line change
Expand Up @@ -1646,14 +1646,20 @@ if ($ForceDisplayHelp || $RequestDisplayHelp) {
}
$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.
Expand Down

0 comments on commit a8a5653

Please sign in to comment.