[cfe-commits] r154585 - /cfe/trunk/lib/Frontend/CompilerInstance.cpp
Erik Verbruggen
erikjv at me.com
Thu Apr 12 03:31:13 PDT 2012
Author: erikjv
Date: Thu Apr 12 05:31:12 2012
New Revision: 154585
URL: http://llvm.org/viewvc/llvm-project?rev=154585&view=rev
Log:
Changed all direct calls to CompletionConsumer.reset(..) to go call
CompilerInstance::setCodeCompletionConsumer instead, in order to change
the SkipFunctionBodies flag accordingly. Also fixed
setCodeCompletionConsumer to take a reset() to null into account.
Modified:
cfe/trunk/lib/Frontend/CompilerInstance.cpp
Modified: cfe/trunk/lib/Frontend/CompilerInstance.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInstance.cpp?rev=154585&r1=154584&r2=154585&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInstance.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInstance.cpp Thu Apr 12 05:31:12 2012
@@ -88,7 +88,7 @@
void CompilerInstance::setCodeCompletionConsumer(CodeCompleteConsumer *Value) {
CompletionConsumer.reset(Value);
- getFrontendOpts().SkipFunctionBodies = true;
+ getFrontendOpts().SkipFunctionBodies = Value != 0;
}
// Diagnostics
@@ -384,7 +384,7 @@
void CompilerInstance::createCodeCompletionConsumer() {
const ParsedSourceLocation &Loc = getFrontendOpts().CodeCompletionAt;
if (!CompletionConsumer) {
- CompletionConsumer.reset(
+ setCodeCompletionConsumer(
createCodeCompletionConsumer(getPreprocessor(),
Loc.FileName, Loc.Line, Loc.Column,
getFrontendOpts().ShowMacrosInCodeCompletion,
@@ -395,14 +395,14 @@
return;
} else if (EnableCodeCompletion(getPreprocessor(), Loc.FileName,
Loc.Line, Loc.Column)) {
- CompletionConsumer.reset();
+ setCodeCompletionConsumer(0);
return;
}
if (CompletionConsumer->isOutputBinary() &&
llvm::sys::Program::ChangeStdoutToBinary()) {
getPreprocessor().getDiagnostics().Report(diag::err_fe_stdout_binary);
- CompletionConsumer.reset();
+ setCodeCompletionConsumer(0);
}
}
More information about the cfe-commits
mailing list