Index: clang-tools-extra/clangd/CodeComplete.cpp =================================================================== --- clang-tools-extra/clangd/CodeComplete.cpp +++ clang-tools-extra/clangd/CodeComplete.cpp @@ -701,8 +701,7 @@ struct CompletionRecorder : public CodeCompleteConsumer { CompletionRecorder(const CodeCompleteOptions &Opts, llvm::unique_function ResultsCallback) - : CodeCompleteConsumer(Opts.getClangCompleteOpts(), - /*OutputIsBinary=*/false), + : CodeCompleteConsumer(Opts.getClangCompleteOpts()), CCContext(CodeCompletionContext::CCC_Other), Opts(Opts), CCAllocator(std::make_shared()), CCTUInfo(CCAllocator), ResultsCallback(std::move(ResultsCallback)) { @@ -823,8 +822,7 @@ public: SignatureHelpCollector(const clang::CodeCompleteOptions &CodeCompleteOpts, const SymbolIndex *Index, SignatureHelp &SigHelp) - : CodeCompleteConsumer(CodeCompleteOpts, - /*OutputIsBinary=*/false), + : CodeCompleteConsumer(CodeCompleteOpts), SigHelp(SigHelp), Allocator(std::make_shared()), CCTUInfo(Allocator), Index(Index) {} Index: clang/include/clang/Sema/CodeCompleteConsumer.h =================================================================== --- clang/include/clang/Sema/CodeCompleteConsumer.h +++ clang/include/clang/Sema/CodeCompleteConsumer.h @@ -992,10 +992,6 @@ protected: const CodeCompleteOptions CodeCompleteOpts; - /// Whether the output format for the code-completion consumer is - /// binary. - bool OutputIsBinary; - public: class OverloadCandidate { public: @@ -1066,9 +1062,8 @@ bool IncludeBriefComments) const; }; - CodeCompleteConsumer(const CodeCompleteOptions &CodeCompleteOpts, - bool OutputIsBinary) - : CodeCompleteOpts(CodeCompleteOpts), OutputIsBinary(OutputIsBinary) {} + CodeCompleteConsumer(const CodeCompleteOptions &CodeCompleteOpts) + : CodeCompleteOpts(CodeCompleteOpts) {} /// Whether the code-completion consumer wants to see macros. bool includeMacros() const { Index: clang/lib/Frontend/ASTUnit.cpp =================================================================== --- clang/lib/Frontend/ASTUnit.cpp +++ clang/lib/Frontend/ASTUnit.cpp @@ -1877,8 +1877,7 @@ public: AugmentedCodeCompleteConsumer(ASTUnit &AST, CodeCompleteConsumer &Next, const CodeCompleteOptions &CodeCompleteOpts) - : CodeCompleteConsumer(CodeCompleteOpts, Next.isOutputBinary()), - AST(AST), Next(Next) { + : CodeCompleteConsumer(CodeCompleteOpts), AST(AST), Next(Next) { // Compute the set of contexts in which we will look when we don't have // any information about the specific context. NormalContexts Index: clang/lib/Frontend/CompilerInstance.cpp =================================================================== --- clang/lib/Frontend/CompilerInstance.cpp +++ clang/lib/Frontend/CompilerInstance.cpp @@ -585,12 +585,6 @@ setCodeCompletionConsumer(nullptr); return; } - - if (CompletionConsumer->isOutputBinary() && - llvm::sys::ChangeStdoutToBinary()) { - getPreprocessor().getDiagnostics().Report(diag::err_fe_stdout_binary); - setCodeCompletionConsumer(nullptr); - } } void CompilerInstance::createFrontendTimer() { Index: clang/tools/libclang/CIndexCodeCompletion.cpp =================================================================== --- clang/tools/libclang/CIndexCodeCompletion.cpp +++ clang/tools/libclang/CIndexCodeCompletion.cpp @@ -568,9 +568,8 @@ CaptureCompletionResults(const CodeCompleteOptions &Opts, AllocatedCXCodeCompleteResults &Results, CXTranslationUnit *TranslationUnit) - : CodeCompleteConsumer(Opts, false), - AllocatedResults(Results), CCTUInfo(Results.CodeCompletionAllocator), - TU(TranslationUnit) { } + : CodeCompleteConsumer(Opts), AllocatedResults(Results), + CCTUInfo(Results.CodeCompletionAllocator), TU(TranslationUnit) {} ~CaptureCompletionResults() override { Finish(); } void ProcessCodeCompleteResults(Sema &S, Index: clang/unittests/Sema/CodeCompleteTest.cpp =================================================================== --- clang/unittests/Sema/CodeCompleteTest.cpp +++ clang/unittests/Sema/CodeCompleteTest.cpp @@ -38,9 +38,7 @@ class VisitedContextFinder : public CodeCompleteConsumer { public: VisitedContextFinder(CompletionContext &ResultCtx) - : CodeCompleteConsumer(/*CodeCompleteOpts=*/{}, - /*CodeCompleteConsumer*/ false), - ResultCtx(ResultCtx), + : CodeCompleteConsumer(/*CodeCompleteOpts=*/{}), ResultCtx(ResultCtx), CCTUInfo(std::make_shared()) {} void ProcessCodeCompleteResults(Sema &S, CodeCompletionContext Context, Index: lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp =================================================================== --- lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp +++ lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp @@ -703,7 +703,7 @@ /// CodeComplete(CompletionRequest &request, clang::LangOptions ops, std::string expr, unsigned position) - : CodeCompleteConsumer(CodeCompleteOptions(), false), + : CodeCompleteConsumer(CodeCompleteOptions()), m_info(std::make_shared()), m_expr(expr), m_position(position), m_request(request), m_desc_policy(ops) {