diff options
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r-- | lib/Sema/SemaChecking.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index 24eb8b1d5e..a63e044272 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/lib/Sema/SemaChecking.cpp @@ -1254,9 +1254,7 @@ Sema::CheckReturnStackAddr(Expr *RetValExp, QualType lhsType, << DR->getDecl()->getDeclName() << RetValExp->getSourceRange(); // Skip over implicit cast expressions when checking for block expressions. - if (ImplicitCastExpr *IcExpr = - dyn_cast_or_null<ImplicitCastExpr>(RetValExp)) - RetValExp = IcExpr->getSubExpr(); + RetValExp = RetValExp->IgnoreParenCasts(); if (BlockExpr *C = dyn_cast_or_null<BlockExpr>(RetValExp)) if (C->hasBlockDeclRefExprs()) |