summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r--clang/lib/Sema/SemaChecking.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index 9c56bec7771..550474107c0 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -4972,7 +4972,7 @@ static Expr *EvalAddr(Expr *E, SmallVectorImpl<DeclRefExpr *> &refVars,
DeclRefExpr *DR = cast<DeclRefExpr>(E);
// If we leave the immediate function, the lifetime isn't about to end.
- if (DR->refersToEnclosingLocal())
+ if (DR->refersToCapturedVariable())
return nullptr;
if (VarDecl *V = dyn_cast<VarDecl>(DR->getDecl()))
@@ -5139,7 +5139,7 @@ do {
DeclRefExpr *DR = cast<DeclRefExpr>(E);
// If we leave the immediate function, the lifetime isn't about to end.
- if (DR->refersToEnclosingLocal())
+ if (DR->refersToCapturedVariable())
return nullptr;
if (VarDecl *V = dyn_cast<VarDecl>(DR->getDecl())) {
OpenPOWER on IntegriCloud