[CodeCompletion] Don't add inner results on non-declarations

We were getting some ridiculous completions that were just two
independentdcompletions concatenated together.

rdar://problem/22945376
This commit is contained in:
Ben Langmuir
2015-11-06 19:01:10 -08:00
parent 877b51dfbd
commit ef8338fe86
2 changed files with 10 additions and 1 deletions

View File

@@ -875,7 +875,8 @@ static void transformAndForwardResults(
organizer.groupAndSort(options);
if ((options.addInnerResults || options.addInnerOperators) && exactMatch) {
if ((options.addInnerResults || options.addInnerOperators) &&
exactMatch && exactMatch->getKind() == Completion::Declaration) {
std::vector<Completion *> innerResults;
bool hasDot = false;
bool hasQDot = false;