summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaTemplateInstantiate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaTemplateInstantiate.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplateInstantiate.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiate.cpp b/clang/lib/Sema/SemaTemplateInstantiate.cpp
index 539b4c409fd..0cdc8a12ab7 100644
--- a/clang/lib/Sema/SemaTemplateInstantiate.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiate.cpp
@@ -1068,8 +1068,7 @@ ParmVarDecl *Sema::SubstParmVarDecl(ParmVarDecl *OldParm,
CurrentInstantiationScope->InstantiatedLocal(OldParm, NewParm);
// Set DeclContext if inside a Block.
- if (BlockScopeInfo *CurBlock = getCurBlock())
- NewParm->setDeclContext(CurBlock->TheDecl);
+ NewParm->setDeclContext(CurContext);
return NewParm;
}
OpenPOWER on IntegriCloud