diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2010-07-13 21:05:02 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-07-13 21:05:02 +0000 |
| commit | 714447b2ed8217cb546efafca0c4b06f3feb9df0 (patch) | |
| tree | 12546a94487385dd3d26646788d5417119b3318f /clang/lib | |
| parent | f0b175328f5d0051755c4162226e196120625649 (diff) | |
| download | bcm5719-llvm-714447b2ed8217cb546efafca0c4b06f3feb9df0.tar.gz bcm5719-llvm-714447b2ed8217cb546efafca0c4b06f3feb9df0.zip | |
Set DeclContext of ParamVarDecl only. No need
to set that of VarDecl for block variables
(they are already set). Per Doug's comment.
llvm-svn: 108273
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Sema/SemaTemplateInstantiate.cpp | 3 | ||||
| -rw-r--r-- | clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 3 |
2 files changed, 1 insertions, 5 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; } diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp index b80e824bfd6..2fd35285324 100644 --- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -400,9 +400,6 @@ Decl *TemplateDeclInstantiator::VisitVarDecl(VarDecl *D) { SemaRef.CurrentInstantiationScope->InstantiatedLocal(D, Var); } InstantiateAttrs(D, Var); - // Set DeclContext if inside a Block. - if (BlockScopeInfo *CurBlock = SemaRef.getCurBlock()) - D->setDeclContext(CurBlock->TheDecl); // Link instantiations of static data members back to the template from // which they were instantiated. |

