diff options
author | Ivan Donchevskii <ivan.donchevskii@qt.io> | 2019-03-12 14:29:15 +0100 |
---|---|---|
committer | Ivan Donchevskii <ivan.donchevskii@qt.io> | 2019-03-12 14:20:36 +0000 |
commit | 82d6d20acb04ec970ee609e46e4f7d9543b416f4 (patch) | |
tree | 7060d0367cb0ee173108ab0ce488fba351eaaa1a /src/libs/cplusplus | |
parent | 1b0cba38dd6d5e72104354bb77ce4ba8f1f9d681 (diff) |
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>
Diffstat (limited to 'src/libs/cplusplus')
-rw-r--r-- | src/libs/cplusplus/ExpressionUnderCursor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs/cplusplus/ExpressionUnderCursor.cpp b/src/libs/cplusplus/ExpressionUnderCursor.cpp index e176cbde355..6df396d8cfc 100644 --- a/src/libs/cplusplus/ExpressionUnderCursor.cpp +++ b/src/libs/cplusplus/ExpressionUnderCursor.cpp @@ -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 |