aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cpptools
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2020-05-22 12:59:08 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2020-05-25 08:54:47 +0000
commitd4c31cef742487fae4f03a4b871872c5e4e08ab1 (patch)
treee0a456e14052d2eaeac42acd69631aca620ea381 /src/plugins/cpptools
parente7b319fbc100079e6af3d5ea147e001c0951fff1 (diff)
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>
Diffstat (limited to 'src/plugins/cpptools')
-rw-r--r--src/plugins/cpptools/cppcodeformatter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/cpptools/cppcodeformatter.cpp b/src/plugins/cpptools/cppcodeformatter.cpp
index 170bf4c61c..ac7416a694 100644
--- a/src/plugins/cpptools/cppcodeformatter.cpp
+++ b/src/plugins/cpptools/cppcodeformatter.cpp
@@ -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;
}