Package: llvm-toolchain-5.0 / 1:5.0.1-2~bpo9+1

clang-analyzer-force-version.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Force the version of clang in the analyzer
# This was causing the static analyzer to fail silently if the clang & clang++ are
# not installed
Index: llvm-toolchain-snapshot_5.0~svn255.06/clang/tools/scan-build/libexec/ccc-analyzer
===================================================================
--- llvm-toolchain-snapshot_5.0~svn255.06.orig/clang/tools/scan-build/libexec/ccc-analyzer
+++ llvm-toolchain-snapshot_5.0~svn255.06/clang/tools/scan-build/libexec/ccc-analyzer
@@ -91,7 +91,7 @@ if ($FindBin::Script =~ /c\+\+-analyzer/
   if (!defined $Compiler || (! -x $Compiler && ! SearchInPath($Compiler))) { $Compiler = $DefaultCXXCompiler; }
 
   $Clang = $ENV{'CLANG_CXX'};
-  if (!defined $Clang || ! -x $Clang) { $Clang = 'clang++'; }
+  if (!defined $Clang || ! -x $Clang) { $Clang = 'clang++-5.0'; }
 
   $IsCXX = 1
 }
@@ -100,7 +100,7 @@ else {
   if (!defined $Compiler || (! -x $Compiler && ! SearchInPath($Compiler))) { $Compiler = $DefaultCCompiler; }
 
   $Clang = $ENV{'CLANG'};
-  if (!defined $Clang || ! -x $Clang) { $Clang = 'clang'; }
+  if (!defined $Clang || ! -x $Clang) { $Clang = 'clang-5.0'; }
 
   $IsCXX = 0
 }