[clang-tools-extra] a7acba2 - Use InitLLVM in clang-tidy
Rui Ueyama via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 27 20:56:21 PST 2019
Author: Rui Ueyama
Date: 2019-11-28T13:50:35+09:00
New Revision: a7acba29c19ac67c77ed282ec9432602ae21268d
URL: https://github.com/llvm/llvm-project/commit/a7acba29c19ac67c77ed282ec9432602ae21268d
DIFF: https://github.com/llvm/llvm-project/commit/a7acba29c19ac67c77ed282ec9432602ae21268d.diff
LOG: Use InitLLVM in clang-tidy
Update clang-tidy to use InitLLVM, like several other llvm tools that
were previously updated. On Windows, this allows clang-tidy to operate
on arguments containing characters which cannot be represented in the
system's ANSI code page such as filenames with Unicode characters.
Fixes bugzilla bug 43751.
Patch by Tristan Labelle.
Differential Revision: https://reviews.llvm.org/D70694
Added:
Modified:
clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp b/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp
index df83de856238..ad6182def20d 100644
--- a/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp
+++ b/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp
@@ -18,6 +18,7 @@
#include "../ClangTidyForceLinker.h"
#include "../GlobList.h"
#include "clang/Tooling/CommonOptionsParser.h"
+#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/Signals.h"
#include "llvm/Support/TargetSelect.h"
@@ -327,7 +328,7 @@ getVfsFromFile(const std::string &OverlayFile,
}
static int clangTidyMain(int argc, const char **argv) {
- llvm::sys::PrintStackTraceOnErrorSignal(argv[0]);
+ llvm::InitLLVM X(argc, argv);
CommonOptionsParser OptionsParser(argc, argv, ClangTidyCategory,
cl::ZeroOrMore);
llvm::IntrusiveRefCntPtr<vfs::OverlayFileSystem> BaseFS(
More information about the cfe-commits
mailing list