[clang-tools-extra] r304837 - Adjust SetVersionPrinter call for D33899

Dimitry Andric via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 6 14:54:45 PDT 2017


Author: dim
Date: Tue Jun  6 16:54:45 2017
New Revision: 304837

URL: http://llvm.org/viewvc/llvm-project?rev=304837&view=rev
Log:
Adjust SetVersionPrinter call for D33899

Summary:
In D33899, I'm adding a `raw_ostream &` parameter to the function
objects passed to `cl::SetVersionPrinter`.  Adjust the call in
clang-apply-replacements for this.

Reviewers: klimek, alexfh

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D33959

Modified:
    clang-tools-extra/trunk/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp

Modified: clang-tools-extra/trunk/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp?rev=304837&r1=304836&r2=304837&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp (original)
+++ clang-tools-extra/trunk/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp Tue Jun  6 16:54:45 2017
@@ -82,8 +82,8 @@ private:
 };
 } // namespace
 
-static void printVersion() {
-  outs() << "clang-apply-replacements version " CLANG_VERSION_STRING << "\n";
+static void printVersion(raw_ostream &OS) {
+  OS << "clang-apply-replacements version " CLANG_VERSION_STRING << "\n";
 }
 
 /// \brief Convenience function to get rewritten content for \c Filename from
@@ -199,7 +199,7 @@ applyFormatting(const std::vector<toolin
 int main(int argc, char **argv) {
   cl::HideUnrelatedOptions(makeArrayRef(VisibleCategories));
 
-  cl::SetVersionPrinter(&printVersion);
+  cl::SetVersionPrinter(printVersion);
   cl::ParseCommandLineOptions(argc, argv);
 
   IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts(new DiagnosticOptions());




More information about the cfe-commits mailing list