forked from qt-creator/qt-creator
C++: fix code completion: casting inside parentheses
Included unit tests. Task-number: QTCREATORBUG-8368 Change-Id: I1b04124bc2c9eac050cfb2e6d3a5c1aca5311f4b Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
committed by
Erik Verbruggen
parent
d9571f2ecd
commit
31ce303ee7
@@ -157,6 +157,8 @@ int ExpressionUnderCursor::startOfExpression_helper(BackwardsScanner &tk, int in
|
||||
return index - 1;
|
||||
} else if (tk[index - 1].is(T_RPAREN)) {
|
||||
int matchingBraceIndex = tk.startOfMatchingBrace(index);
|
||||
if (! matchingBraceIndex)
|
||||
return matchingBraceIndex;
|
||||
if (matchingBraceIndex != index) {
|
||||
if (tk[matchingBraceIndex - 1].is(T_GREATER)) {
|
||||
int lessIndex = tk.startOfMatchingBrace(matchingBraceIndex);
|
||||
|
||||
Reference in New Issue
Block a user