diff options
Diffstat (limited to 'clang/lib/Sema/ScopeInfo.cpp')
-rw-r--r-- | clang/lib/Sema/ScopeInfo.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/Sema/ScopeInfo.cpp b/clang/lib/Sema/ScopeInfo.cpp index cc7de16de2fd..e313052b3ab3 100644 --- a/clang/lib/Sema/ScopeInfo.cpp +++ b/clang/lib/Sema/ScopeInfo.cpp @@ -56,6 +56,7 @@ void FunctionScopeInfo::Clear() { ModifiedNonNullParams.clear(); Blocks.clear(); ByrefBlockVars.clear(); + AddrLabels.clear(); } static const NamedDecl *getBestPropertyDecl(const ObjCPropertyRefExpr *PropE) { @@ -231,14 +232,14 @@ bool CapturingScopeInfo::isVLATypeCaptured(const VariableArrayType *VAT) const { } void LambdaScopeInfo::visitPotentialCaptures( - llvm::function_ref<void(VarDecl *, Expr *)> Callback) const { + llvm::function_ref<void(ValueDecl *, Expr *)> Callback) const { for (Expr *E : PotentiallyCapturingExprs) { if (auto *DRE = dyn_cast<DeclRefExpr>(E)) { - Callback(cast<VarDecl>(DRE->getFoundDecl()), E); + Callback(cast<ValueDecl>(DRE->getFoundDecl()), E); } else if (auto *ME = dyn_cast<MemberExpr>(E)) { - Callback(cast<VarDecl>(ME->getMemberDecl()), E); + Callback(cast<ValueDecl>(ME->getMemberDecl()), E); } else if (auto *FP = dyn_cast<FunctionParmPackExpr>(E)) { - for (VarDecl *VD : *FP) + for (ValueDecl *VD : *FP) Callback(VD, E); } else { llvm_unreachable("unexpected expression in potential captures list"); |