summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseExpr.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard@metafoo.co.uk>2020-03-03 15:19:13 -0800
committerHans Wennborg <hans@chromium.org>2020-03-04 09:20:30 +0100
commit3a843031a5ad83a00d2603f623881cb2b2bf719d (patch)
treee41bf3bd9709fcde6adac546c900fa1752755d61 /clang/lib/Parse/ParseExpr.cpp
parentbca373f73fc82728a8335e7d6cd164e8747139ec (diff)
downloadbcm5719-llvm-3a843031a5ad83a00d2603f623881cb2b2bf719d.tar.gz
bcm5719-llvm-3a843031a5ad83a00d2603f623881cb2b2bf719d.zip
PR45083: Mark statement expressions as being dependent if they appear in
dependent contexts. We previously assumed they were neither value- nor instantiation-dependent under any circumstances, which would lead to crashes and other misbehavior. (cherry picked from commit bdad0a1b79273733df9acc1be4e992fa5d70ec56)
Diffstat (limited to 'clang/lib/Parse/ParseExpr.cpp')
-rw-r--r--clang/lib/Parse/ParseExpr.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp
index 1eb3ad6afd1..ad9627a2425 100644
--- a/clang/lib/Parse/ParseExpr.cpp
+++ b/clang/lib/Parse/ParseExpr.cpp
@@ -2655,7 +2655,8 @@ Parser::ParseParenExpression(ParenParseOption &ExprType, bool stopIfCastExpr,
// If the substmt parsed correctly, build the AST node.
if (!Stmt.isInvalid()) {
- Result = Actions.ActOnStmtExpr(OpenLoc, Stmt.get(), Tok.getLocation());
+ Result = Actions.ActOnStmtExpr(getCurScope(), OpenLoc, Stmt.get(),
+ Tok.getLocation());
} else {
Actions.ActOnStmtExprError();
}
OpenPOWER on IntegriCloud