diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-10-14 20:14:33 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-10-14 20:14:33 +0000 |
commit | 3c74d41d27114459ae38edb7b19a9eb6f19285cf (patch) | |
tree | 2917a4278853d07377d9d7799704cb2366fc06c6 /clang/lib/Sema/SemaTemplateInstantiate.cpp | |
parent | a39f12115583f61ff04469a507d268685a2d679a (diff) | |
download | bcm5719-llvm-3c74d41d27114459ae38edb7b19a9eb6f19285cf.tar.gz bcm5719-llvm-3c74d41d27114459ae38edb7b19a9eb6f19285cf.zip |
Testing and some minor fixes for explicit template instantiation.
llvm-svn: 84129
Diffstat (limited to 'clang/lib/Sema/SemaTemplateInstantiate.cpp')
-rw-r--r-- | clang/lib/Sema/SemaTemplateInstantiate.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiate.cpp b/clang/lib/Sema/SemaTemplateInstantiate.cpp index 65260c8e1e6..24b83704eba 100644 --- a/clang/lib/Sema/SemaTemplateInstantiate.cpp +++ b/clang/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; |