Add some spacing in the code-completion results for a return statement

llvm-svn: 96567
This commit is contained in:
Douglas Gregor 2010-02-18 04:06:48 +00:00
parent 4db30233a8
commit 44272ca356
1 changed files with 3 additions and 1 deletions

View File

@ -1141,8 +1141,10 @@ static void AddOrdinaryNameResults(Action::CodeCompletionContext CCC,
isVoid = SemaRef.CurBlock->ReturnType->isVoidType();
Pattern = new CodeCompletionString;
Pattern->AddTypedTextChunk("return");
if (!isVoid)
if (!isVoid) {
Pattern->AddChunk(CodeCompletionString::CK_HorizontalSpace);
Pattern->AddPlaceholderChunk("expression");
}
Pattern->AddChunk(CodeCompletionString::CK_SemiColon);
Results.AddResult(Result(Pattern));