diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp --- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -5850,8 +5850,7 @@ isa(D) || isa(D) || (ParentDependsOnArgs && (ParentDC->isFunctionOrMethod() || isa(ParentDC) || - isa(ParentDC))) || - (isa(D) && cast(D)->isLambda())) { + isa(ParentDC)))) { // D is a local of some kind. Look into the map of local // declarations to their instantiations. if (CurrentInstantiationScope) {