diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp --- a/clang/lib/Sema/SemaCodeComplete.cpp +++ b/clang/lib/Sema/SemaCodeComplete.cpp @@ -1918,9 +1918,7 @@ Results.AddResult(Result(Builder.TakeString())); // Using directives - Builder.AddTypedTextChunk("using"); - Builder.AddChunk(CodeCompletionString::CK_HorizontalSpace); - Builder.AddTextChunk("namespace"); + Builder.AddTypedTextChunk("using namespace"); Builder.AddChunk(CodeCompletionString::CK_HorizontalSpace); Builder.AddPlaceholderChunk("identifier"); Builder.AddChunk(CodeCompletionString::CK_SemiColon); @@ -1963,9 +1961,7 @@ // using typename qualifier::name (only in a dependent context) if (SemaRef.CurContext->isDependentContext()) { - Builder.AddTypedTextChunk("using"); - Builder.AddChunk(CodeCompletionString::CK_HorizontalSpace); - Builder.AddTextChunk("typename"); + Builder.AddTypedTextChunk("using typename"); Builder.AddChunk(CodeCompletionString::CK_HorizontalSpace); Builder.AddPlaceholderChunk("qualifier"); Builder.AddTextChunk("::"); @@ -2219,9 +2215,7 @@ Results.AddResult(Result(Builder.TakeString())); // Using directives - Builder.AddTypedTextChunk("using"); - Builder.AddChunk(CodeCompletionString::CK_HorizontalSpace); - Builder.AddTextChunk("namespace"); + Builder.AddTypedTextChunk("using namespace"); Builder.AddChunk(CodeCompletionString::CK_HorizontalSpace); Builder.AddPlaceholderChunk("identifier"); Builder.AddChunk(CodeCompletionString::CK_SemiColon); @@ -5184,9 +5178,7 @@ Results.AddResult(Builder.TakeString()); // "else if" block - Builder.AddTypedTextChunk("else"); - Builder.AddChunk(CodeCompletionString::CK_HorizontalSpace); - Builder.AddTextChunk("if"); + Builder.AddTypedTextChunk("else if"); Builder.AddChunk(CodeCompletionString::CK_HorizontalSpace); Builder.AddChunk(CodeCompletionString::CK_LeftParen); if (getLangOpts().CPlusPlus)