diff options
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
-rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index 359923f02f8..80780185c0e 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -602,7 +602,8 @@ private: !Current.Children.empty() && (Current.Children[0].is(tok::equal) || Current.Children[0].is(tok::semi) || Current.Children[0].is(tok::l_brace)); - if (ParensNotExpr && !ParensCouldEndDecl) + if (ParensNotExpr && !ParensCouldEndDecl && + Contexts.back().IsExpression) // FIXME: We need to get smarter and understand more cases of casts. Current.Type = TT_CastRParen; } else if (Current.is(tok::at) && Current.Children.size()) { |