]> granicus.if.org Git - clang/commitdiff
Add some spacing in the code-completion results for a return statement
authorDouglas Gregor <dgregor@apple.com>
Thu, 18 Feb 2010 04:06:48 +0000 (04:06 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 18 Feb 2010 04:06:48 +0000 (04:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96567 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaCodeComplete.cpp

index a86294971861dff2666541b157a873aab9b2322c..b8715c0cbc1ad77853eb756e2f484e3ce5f34a48 100644 (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));