From dd6907bd7757eaed3cf127399b78601bf2ca8d5d Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Wed, 27 Oct 2010 20:44:00 +0000 Subject: Decay array/function types of a statement-expression. // rdar: // 8600553. llvm-svn: 117484 --- clang/lib/Sema/SemaExpr.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 1f50b4e5c56..17a3aff0302 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -7071,9 +7071,8 @@ Sema::ActOnStmtExpr(SourceLocation LPLoc, Stmt *SubStmt, LastStmt = Label->getSubStmt(); } if (Expr *LastExpr = dyn_cast(LastStmt)) { + DefaultFunctionArrayLvalueConversion(LastExpr); Ty = LastExpr->getType(); - if (Ty->isArrayType()) - Ty = Context.getArrayDecayedType(Ty); if (!Ty->isDependentType() && !LastExpr->isTypeDependent()) { ExprResult Res = PerformCopyInitialization( InitializedEntity::InitializeResult(LPLoc, -- cgit v1.2.3