diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2009-10-15 07:44:25 +0000 |
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2009-10-15 07:44:25 +0000 |
| commit | 98781354c33bdc945ab6ea8c410d36c664ce1f5e (patch) | |
| tree | badd8f913c2a7db8d5fbe7d83c862e35e403fd41 /lib/Sema/SemaTemplateInstantiate.cpp | |
| parent | 4c8b24812ddcd1dedaca343a6d4e76f91f398981 (diff) | |
Notes
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiate.cpp')
| -rw-r--r-- | lib/Sema/SemaTemplateInstantiate.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Sema/SemaTemplateInstantiate.cpp b/lib/Sema/SemaTemplateInstantiate.cpp index 65260c8e1e63..24b83704eba9 100644 --- a/lib/Sema/SemaTemplateInstantiate.cpp +++ b/lib/Sema/SemaTemplateInstantiate.cpp @@ -808,9 +808,12 @@ Sema::InstantiateClass(SourceLocation PointOfInstantiation, ActOnFields(0, Instantiation->getLocation(), DeclPtrTy::make(Instantiation), Fields.data(), Fields.size(), SourceLocation(), SourceLocation(), 0); - + if (Instantiation->isInvalidDecl()) + Invalid = true; + // Add any implicitly-declared members that we might need. - AddImplicitlyDeclaredMembersToClass(Instantiation); + if (!Invalid) + AddImplicitlyDeclaredMembersToClass(Instantiation); // Exit the scope of this instantiation. CurContext = PreviousContext; |
