diff options
Diffstat (limited to 'src/plugins/cpptools/cppcodeformatter.cpp')
-rw-r--r-- | src/plugins/cpptools/cppcodeformatter.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/cpptools/cppcodeformatter.cpp b/src/plugins/cpptools/cppcodeformatter.cpp index d98b0022ec..2f71be2f65 100644 --- a/src/plugins/cpptools/cppcodeformatter.cpp +++ b/src/plugins/cpptools/cppcodeformatter.cpp @@ -200,10 +200,11 @@ void CodeFormatter::recalculateStateAfter(const QTextBlock &block) } break; case T_ARROW: // Trailing return type? - if (m_currentState.at(m_currentState.size() - 2).type == declaration_start) { + if (m_currentState.at(m_currentState.size() - 2).type == declaration_start) leave(); - break; - } + else + tryExpression(); + break; default: tryExpression(); break; } break; |