aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-10-27 20:44:00 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-10-27 20:44:00 +0000
commit4bdc446fd46c66068a3697ff552607bd2ef0f948 (patch)
tree4d1ae230222e12a7332d8d306312bf5cb469283b
parent69aecc6252bf4a5ee59f9b51c3728ea07b6342bf (diff)
Decay array/function types of a statement-expression.
// rdar: // 8600553. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117484 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Sema/SemaExpr.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 1f50b4e5c5..17a3aff030 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -7071,9 +7071,8 @@ Sema::ActOnStmtExpr(SourceLocation LPLoc, Stmt *SubStmt,
LastStmt = Label->getSubStmt();
}
if (Expr *LastExpr = dyn_cast<Expr>(LastStmt)) {
+ DefaultFunctionArrayLvalueConversion(LastExpr);
Ty = LastExpr->getType();
- if (Ty->isArrayType())
- Ty = Context.getArrayDecayedType(Ty);
if (!Ty->isDependentType() && !LastExpr->isTypeDependent()) {
ExprResult Res = PerformCopyInitialization(
InitializedEntity::InitializeResult(LPLoc,