summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ExprClassification.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-09-15 01:37:48 +0000
committerDouglas Gregor <dgregor@apple.com>2010-09-15 01:37:48 +0000
commite572b068abc1990a2b77357453d97b76ab5a0987 (patch)
tree97102ea5672de348f7377df3d6231883a3813cb9 /clang/lib/AST/ExprClassification.cpp
parent3a0b9cdf47c72900de3ff192b48dd0c18fa7509f (diff)
downloadbcm5719-llvm-e572b068abc1990a2b77357453d97b76ab5a0987.tar.gz
bcm5719-llvm-e572b068abc1990a2b77357453d97b76ab5a0987.zip
Fix classification of statement expressions.
llvm-svn: 113917
Diffstat (limited to 'clang/lib/AST/ExprClassification.cpp')
-rw-r--r--clang/lib/AST/ExprClassification.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/ExprClassification.cpp b/clang/lib/AST/ExprClassification.cpp
index b62a00f98e7..c9069f87074 100644
--- a/clang/lib/AST/ExprClassification.cpp
+++ b/clang/lib/AST/ExprClassification.cpp
@@ -264,7 +264,7 @@ static Cl::Kinds ClassifyInternal(ASTContext &Ctx, const Expr *E) {
case Expr::StmtExprClass: {
const CompoundStmt *S = cast<StmtExpr>(E)->getSubStmt();
if (const Expr *LastExpr = dyn_cast_or_null<Expr>(S->body_back()))
- return ClassifyInternal(Ctx, LastExpr);
+ return ClassifyUnnamed(Ctx, LastExpr->getType());
return Cl::CL_PRValue;
}
OpenPOWER on IntegriCloud