diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-05-29 14:25:00 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-05-29 14:25:00 +0000 |
commit | 8157b07caf5fcf953096dfd8bfa5a97152c764c5 (patch) | |
tree | f0b801960f4ac5185d53ff4885ce05f37e180a3e /clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | |
parent | 6a94624a1b8608a57d2f8e50df71949f2984c44f (diff) | |
download | bcm5719-llvm-8157b07caf5fcf953096dfd8bfa5a97152c764c5.tar.gz bcm5719-llvm-8157b07caf5fcf953096dfd8bfa5a97152c764c5.zip |
Now that we have declared/defined tag types within DeclGroups,
instantiation of tags local to member functions of class templates
(and, eventually, function templates) works when the tag is defined as
part of the decl-specifier-seq, e.g.,
struct S { T x, y; } s1;
Also, make sure that we don't try to default-initialize a dependent
type.
llvm-svn: 72568
Diffstat (limited to 'clang/lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp index 39e455a6ec7..ef351f09543 100644 --- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -97,8 +97,6 @@ Decl *TemplateDeclInstantiator::VisitTypedefDecl(TypedefDecl *D) { Typedef->setInvalidDecl(); Owner->addDecl(SemaRef.Context, Typedef); - if (Owner->isFunctionOrMethod()) - SemaRef.CurrentInstantiationScope->InstantiatedLocal(D, Typedef); return Typedef; } @@ -214,8 +212,6 @@ Decl *TemplateDeclInstantiator::VisitEnumDecl(EnumDecl *D) { Enum->setInstantiationOfMemberEnum(D); Enum->setAccess(D->getAccess()); Owner->addDecl(SemaRef.Context, Enum); - if (Owner->isFunctionOrMethod()) - SemaRef.CurrentInstantiationScope->InstantiatedLocal(D, Enum); Enum->startDefinition(); llvm::SmallVector<Sema::DeclPtrTy, 16> Enumerators; @@ -281,8 +277,6 @@ Decl *TemplateDeclInstantiator::VisitCXXRecordDecl(CXXRecordDecl *D) { Record->setInstantiationOfMemberClass(D); Owner->addDecl(SemaRef.Context, Record); - if (Owner->isFunctionOrMethod()) - SemaRef.CurrentInstantiationScope->InstantiatedLocal(D, Record); return Record; } |