Index: clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp =================================================================== --- clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp +++ clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp @@ -16,13 +16,27 @@ #include "clang-apply-replacements/Tooling/ApplyReplacements.h" #include "clang/Basic/Diagnostic.h" #include "clang/Basic/DiagnosticOptions.h" +#include "clang/Basic/FileManager.h" +#include "clang/Basic/FileSystemOptions.h" +#include "clang/Basic/LangOptions.h" +#include "clang/Basic/SourceLocation.h" #include "clang/Basic/SourceManager.h" -#include "clang/Basic/Version.h" #include "clang/Format/Format.h" +#include "clang/Rewrite/Core/RewriteBuffer.h" #include "clang/Rewrite/Core/Rewriter.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/StringSet.h" +#include "llvm/ADT/ArrayRef.h" // for make... +#include "llvm/ADT/IntrusiveRefCntPtr.h" +#include "llvm/ADT/StringRef.h" #include "llvm/Support/CommandLine.h" +#include "llvm/Support/MemoryBuffer.h" +#include "llvm/Support/raw_ostream.h" +#include +#include +#include +#include +#include +#include +#include using namespace llvm; using namespace clang; @@ -43,7 +57,6 @@ "merging/replacing."), cl::init(false), cl::cat(ReplacementCategory)); - static cl::opt DoFormat( "format", cl::desc("Enable formatting of code changed by applying replacements.\n" @@ -85,10 +98,6 @@ }; } // namespace -static void printVersion() { - outs() << "clang-apply-replacements version " CLANG_VERSION_STRING << "\n"; -} - /// \brief Convenience function to get rewritten content for \c Filename from /// \c Rewrites. /// @@ -200,8 +209,6 @@ int main(int argc, char **argv) { cl::HideUnrelatedOptions(makeArrayRef(VisibleCategories)); - - cl::SetVersionPrinter(&printVersion); cl::ParseCommandLineOptions(argc, argv); IntrusiveRefCntPtr DiagOpts(new DiagnosticOptions());