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:
Christian Kandeler
2020-05-22 12:59:08 +02:00
parent e7b319fbc1
commit d4c31cef74

View File

@@ -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;
}