Clang: Do not show completions after comma in initializer list

Appends 0852f889d1.

Do not automatically show global completion when initializer list
does not have a type, e.g. auto foo = {{},<cursor>};

Change-Id: I233fef71c60bb79211000df70bf5b04fa2d9df37
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
Ivan Donchevskii
2019-03-12 14:29:15 +01:00
parent 1b0cba38dd
commit 82d6d20acb
2 changed files with 7 additions and 2 deletions

View File

@@ -264,7 +264,7 @@ int ExpressionUnderCursor::startOfFunctionCall(const QTextCursor &cursor) const
break;
} else if (tk.is(T_LPAREN) || tk.is(T_LBRACE)) {
return scanner.startPosition() + tk.utf16charsBegin();
} else if (tk.is(T_RPAREN)) {
} else if (tk.is(T_RPAREN) || tk.is(T_RBRACE)) {
int matchingBrace = scanner.startOfMatchingBrace(index);
if (matchingBrace == index) // If no matching brace found