dim created this revision. In https://reviews.llvm.org/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.
https://reviews.llvm.org/D33959 Files: clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp Index: clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp =================================================================== --- clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp +++ clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp @@ -82,8 +82,8 @@ }; } // 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 @@ 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());
Index: clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp =================================================================== --- clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp +++ clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp @@ -82,8 +82,8 @@ }; } // 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 @@ 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());
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits