From 9329800d6f4c4ea8778aabd64cde1b712b290b00 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Thu, 18 Feb 2010 04:06:48 +0000 Subject: [PATCH] Add some spacing in the code-completion results for a return statement git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96567 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaCodeComplete.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp index a862949718..b8715c0cbc 100644 --- a/lib/Sema/SemaCodeComplete.cpp +++ b/lib/Sema/SemaCodeComplete.cpp @@ -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)); -- 2.40.0