forked from qt-creator/qt-creator
C++: Fix wrong formatting
... when using a shift operator inside an initializer list. Fixes: QTCREATORBUG-16977 Change-Id: I8992162c05345b713c665e3601ae593af5007211 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -783,7 +783,7 @@ bool CodeFormatter::tryExpression(bool alsoExpression)
|
||||
newState = stream_op;
|
||||
for (int i = m_currentState.size() - 1; i >= 0; --i) {
|
||||
const int type = m_currentState.at(i).type;
|
||||
if (type == arglist_open) { // likely a left-shift instead
|
||||
if (type == arglist_open || type == braceinit_open) { // likely a left-shift instead
|
||||
newState = -1;
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user