aboutsummaryrefslogtreecommitdiff
path: root/lib/Format/Format.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Format/Format.cpp')
-rw-r--r--lib/Format/Format.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp
index c75b8ef834..d95deb5704 100644
--- a/lib/Format/Format.cpp
+++ b/lib/Format/Format.cpp
@@ -1262,7 +1262,8 @@ private:
}
}
if (Current.is(tok::kw_return) || Current.is(tok::kw_throw) ||
- (Current.is(tok::l_paren) && !Line.MustBeDeclaration))
+ (Current.is(tok::l_paren) && !Line.MustBeDeclaration &&
+ (Current.Parent == NULL || Current.Parent->isNot(tok::kw_for))))
IsExpression = true;
if (Current.Type == TT_Unknown) {