@@ -411,10 +411,10 @@ enum class TemplateSubstitutionKind : char {
411411 // / lookup will search our outer scope.
412412 bool CombineWithOuterScope;
413413
414- // / Whether this scope is being used to instantiate a lambda expression,
415- // / in which case it should be reused for instantiating the lambda's
416- // / FunctionProtoType.
417- bool InstantiatingLambda = false ;
414+ // / Whether this scope is being used to instantiate a lambda or block
415+ // / expression, in which case it should be reused for instantiating the
416+ // / lambda's FunctionProtoType.
417+ bool InstantiatingLambdaOrBlock = false ;
418418
419419 // / If non-NULL, the template parameter pack that has been
420420 // / partially substituted per C++0x [temp.arg.explicit]p9.
@@ -431,10 +431,10 @@ enum class TemplateSubstitutionKind : char {
431431
432432 public:
433433 LocalInstantiationScope (Sema &SemaRef, bool CombineWithOuterScope = false ,
434- bool InstantiatingLambda = false )
434+ bool InstantiatingLambdaOrBlock = false )
435435 : SemaRef(SemaRef), Outer(SemaRef.CurrentInstantiationScope),
436436 CombineWithOuterScope (CombineWithOuterScope),
437- InstantiatingLambda(InstantiatingLambda ) {
437+ InstantiatingLambdaOrBlock(InstantiatingLambdaOrBlock ) {
438438 SemaRef.CurrentInstantiationScope = this ;
439439 }
440440
@@ -561,8 +561,8 @@ enum class TemplateSubstitutionKind : char {
561561 // / Determine whether D is a pack expansion created in this scope.
562562 bool isLocalPackExpansion (const Decl *D);
563563
564- // / Determine whether this scope is for instantiating a lambda.
565- bool isLambda () const { return InstantiatingLambda ; }
564+ // / Determine whether this scope is for instantiating a lambda or block .
565+ bool isLambdaOrBlock () const { return InstantiatingLambdaOrBlock ; }
566566 };
567567
568568 class TemplateDeclInstantiator
0 commit comments