[include-fixer] Abstract includeFixerMain function.
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@268371 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
a01ae3ea2b
Коммит
d69aa22331
|
@ -42,9 +42,8 @@ cl::opt<bool>
|
|||
MinimizeIncludePaths("minimize-paths",
|
||||
cl::desc("Whether to minimize added include paths"),
|
||||
cl::init(true), cl::cat(IncludeFixerCategory));
|
||||
} // namespace
|
||||
|
||||
int main(int argc, const char **argv) {
|
||||
int includeFixerMain(int argc, const char **argv) {
|
||||
tooling::CommonOptionsParser options(argc, argv, IncludeFixerCategory);
|
||||
tooling::ClangTool tool(options.getCompilations(),
|
||||
options.getSourcePathList());
|
||||
|
@ -97,3 +96,9 @@ int main(int argc, const char **argv) {
|
|||
tooling::applyAllReplacements(Replacements, Rewrites);
|
||||
return Rewrites.overwriteChangedFiles();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
int main(int argc, const char **argv) {
|
||||
return includeFixerMain(argc, argv);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче