[PATCH] D89481: [scan-build] Fix clang++ pathname again

Stephan Bergmann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 15 09:23:46 PDT 2020


sberg created this revision.
sberg added reviewers: aadg, dcoughlin.
Herald added a subscriber: Charusso.
Herald added a project: clang.
sberg requested review of this revision.

e00629f777d9d62875730f40d266727df300dbb2 "[scan-build] Fix clang++ pathname" had
removed the -MAJOR.MINOR suffix, but since presumably LLVM 7 the suffix is only
-MAJOR, so ClangCXX (i.e., the CLANG_CXX environment variable passed to
clang/tools/scan-build/libexec/ccc-analyzer) now contained a non-existing
/path/to/clang-12++ (which apparently went largely unnoticed as
clang/tools/scan-build/libexec/ccc-analyzer falls back to just 'clang++' if the
executable denoted by CLANG_CXX does not exist).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D89481

Files:
  clang/tools/scan-build/bin/scan-build


Index: clang/tools/scan-build/bin/scan-build
===================================================================
--- clang/tools/scan-build/bin/scan-build
+++ clang/tools/scan-build/bin/scan-build
@@ -1925,7 +1925,7 @@
     $ClangCXX =~ s/.exe$/++.exe/;
   }
   else {
-    $ClangCXX =~ s/\-\d+\.\d+$//;
+    $ClangCXX =~ s/\-\d+(\.\d+)?$//;
     $ClangCXX .= "++";
   }
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89481.298402.patch
Type: text/x-patch
Size: 374 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201015/be5392ff/attachment-0001.bin>


More information about the cfe-commits mailing list