summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppcodeformatter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cpptools/cppcodeformatter.cpp')
-rw-r--r--src/plugins/cpptools/cppcodeformatter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/cpptools/cppcodeformatter.cpp b/src/plugins/cpptools/cppcodeformatter.cpp
index 170bf4c61c..4d4cf6e795 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;
}
@@ -1521,6 +1521,7 @@ void QtStyleCodeFormatter::adjustIndent(const Tokens &tokens, int lexerState, in
&& topState.type != block_open
&& topState.type != substatement_open
&& topState.type != brace_list_open
+ && topState.type != arglist_open
&& !topWasMaybeElse) {
*indentDepth = topState.savedIndentDepth;
*paddingDepth = 0;