mirror of
https://git.proxmox.com/git/llvm-toolchain
synced 2025-06-13 17:57:35 +00:00
* Fix clang-modernize detection of clang-apply-replacements (Closes: #791607)
This commit is contained in:
parent
ab8deecd86
commit
d42e83a03f
35
debian/patches/clang-apply-replacements.diff
vendored
Normal file
35
debian/patches/clang-apply-replacements.diff
vendored
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
Index: llvm-toolchain-3.7-3.7/clang-tools-extra/clang-modernize/Core/ReplacementHandling.cpp
|
||||||
|
===================================================================
|
||||||
|
--- llvm-toolchain-3.7-3.7.orig/clang-tools-extra/clang-modernize/Core/ReplacementHandling.cpp
|
||||||
|
+++ llvm-toolchain-3.7-3.7/clang-tools-extra/clang-modernize/Core/ReplacementHandling.cpp
|
||||||
|
@@ -26,7 +26,7 @@ using namespace clang::tooling;
|
||||||
|
|
||||||
|
bool ReplacementHandling::findClangApplyReplacements(const char *Argv0) {
|
||||||
|
ErrorOr<std::string> CARPathOrErr =
|
||||||
|
- findProgramByName("clang-apply-replacements");
|
||||||
|
+ findProgramByName("clang-apply-replacements-3.7");
|
||||||
|
if (!CARPathOrErr)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
@@ -34,7 +34,7 @@ bool ReplacementHandling::findClangApply
|
||||||
|
static int StaticSymbol;
|
||||||
|
std::string ClangModernizePath = fs::getMainExecutable(Argv0, &StaticSymbol);
|
||||||
|
SmallString<128> TestPath = path::parent_path(ClangModernizePath);
|
||||||
|
- path::append(TestPath, "clang-apply-replacements");
|
||||||
|
+ path::append(TestPath, "clang-apply-replacements-3.7");
|
||||||
|
if (fs::can_execute(Twine(TestPath)))
|
||||||
|
CARPath = TestPath.str();
|
||||||
|
|
||||||
|
Index: llvm-toolchain-3.7-3.7/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
|
||||||
|
===================================================================
|
||||||
|
--- llvm-toolchain-3.7-3.7.orig/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
|
||||||
|
+++ llvm-toolchain-3.7-3.7/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
|
||||||
|
@@ -111,7 +111,7 @@ def main():
|
||||||
|
default='clang-tidy',
|
||||||
|
help='path to clang-tidy binary')
|
||||||
|
parser.add_argument('-clang-apply-replacements-binary', metavar='PATH',
|
||||||
|
- default='clang-apply-replacements',
|
||||||
|
+ default='clang-apply-replacements-3.7',
|
||||||
|
help='path to clang-apply-replacements binary')
|
||||||
|
parser.add_argument('-checks', default=None,
|
||||||
|
help='checks filter, when not specified, use clang-tidy '
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@ -44,3 +44,4 @@ bug783205.patch
|
|||||||
fix-cmake-config-prefix.diff
|
fix-cmake-config-prefix.diff
|
||||||
kfreebsd-build-fix.patch
|
kfreebsd-build-fix.patch
|
||||||
ubuntu-precise-compiler-rt.diff
|
ubuntu-precise-compiler-rt.diff
|
||||||
|
clang-apply-replacements.diff
|
||||||
|
Loading…
Reference in New Issue
Block a user