[clang] 3f333e0 - [analyzer] Get scan-view executable from environment.
Artem Dergachev via cfe-commits
cfe-commits at lists.llvm.org
Wed May 20 04:56:11 PDT 2020
Author: Artem Dergachev
Date: 2020-05-20T14:55:56+03:00
New Revision: 3f333e0af7a872a0152b4db972a37947e47e690d
URL: https://github.com/llvm/llvm-project/commit/3f333e0af7a872a0152b4db972a37947e47e690d
DIFF: https://github.com/llvm/llvm-project/commit/3f333e0af7a872a0152b4db972a37947e47e690d.diff
LOG: [analyzer] Get scan-view executable from environment.
Fixes "Use of uninitialized value $ScanView in exec" error on systems
with scan-view executable not located in the expected place.
Patch by Oliver Tušla!
Differential Revision: https://reviews.llvm.org/D77880
Added:
Modified:
clang/tools/scan-build/bin/scan-build
Removed:
################################################################################
diff --git a/clang/tools/scan-build/bin/scan-build b/clang/tools/scan-build/bin/scan-build
index 4b76333fb715..11334a0b9626 100755
--- a/clang/tools/scan-build/bin/scan-build
+++ b/clang/tools/scan-build/bin/scan-build
@@ -971,6 +971,7 @@ sub Finalize {
my $ScanView = Cwd::realpath("$RealBin/scan-view");
if (! -x $ScanView) { $ScanView = "scan-view"; }
if (! -x $ScanView) { $ScanView = Cwd::realpath("$RealBin/../../scan-view/bin/scan-view"); }
+ if (! -x $ScanView) { $ScanView = `which scan-view`; chomp $ScanView; }
exec $ScanView, "$Options{OutputDir}";
}
More information about the cfe-commits
mailing list