aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplateInstantiate.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-10-14 20:14:33 +0000
committerDouglas Gregor <dgregor@apple.com>2009-10-14 20:14:33 +0000
commit663b5a0be7261c29bc4c526a71cffcfa02d4153e (patch)
tree06582f834e2df99344af84881c6e6703502d84e2 /lib/Sema/SemaTemplateInstantiate.cpp
parent54150d9b1d308334d40864c8d8d8d6d1a9da363e (diff)
Testing and some minor fixes for explicit template instantiation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84129 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiate.cpp')
-rw-r--r--lib/Sema/SemaTemplateInstantiate.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Sema/SemaTemplateInstantiate.cpp b/lib/Sema/SemaTemplateInstantiate.cpp
index 65260c8e1e..24b83704eb 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;