Don't put method bodies into code completions unless code patterns are

turned on.

llvm-svn: 104909
This commit is contained in:
Douglas Gregor
2010-05-28 00:57:46 +00:00
parent 70febae768
commit d37c59dae7
2 changed files with 6 additions and 6 deletions

View File

@@ -3872,7 +3872,7 @@ void Sema::CodeCompleteObjCMethodDecl(Scope *S,
Pattern->AddTextChunk("...");
}
if (IsInImplementation) {
if (IsInImplementation && Results.includeCodePatterns()) {
// We will be defining the method here, so add a compound statement.
Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
Pattern->AddChunk(CodeCompletionString::CK_LeftBrace);