]> granicus.if.org Git - clang/commitdiff
Fix classification of statement expressions.
authorDouglas Gregor <dgregor@apple.com>
Wed, 15 Sep 2010 01:37:48 +0000 (01:37 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 15 Sep 2010 01:37:48 +0000 (01:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113917 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/ExprClassification.cpp

index b62a00f98e763f8fd3773c5fe4bba79767997f7e..c9069f8707434037ba98c2763b3fc2c98bf4703a 100644 (file)
@@ -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;
   }