[clang-tools-extra] r268371 - [include-fixer] Abstract includeFixerMain function.
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Tue May 3 01:38:35 PDT 2016
Author: hokein
Date: Tue May 3 03:38:35 2016
New Revision: 268371
URL: http://llvm.org/viewvc/llvm-project?rev=268371&view=rev
Log:
[include-fixer] Abstract includeFixerMain function.
Modified:
clang-tools-extra/trunk/include-fixer/tool/ClangIncludeFixer.cpp
Modified: clang-tools-extra/trunk/include-fixer/tool/ClangIncludeFixer.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/include-fixer/tool/ClangIncludeFixer.cpp?rev=268371&r1=268370&r2=268371&view=diff
==============================================================================
--- clang-tools-extra/trunk/include-fixer/tool/ClangIncludeFixer.cpp (original)
+++ clang-tools-extra/trunk/include-fixer/tool/ClangIncludeFixer.cpp Tue May 3 03:38:35 2016
@@ -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);
+}
More information about the cfe-commits
mailing list