aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplateInstantiate.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-12-07 00:22:08 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-12-07 00:22:08 +0000
commit721e77db41cd9a07d2e1c9fdf08a4bd2eee1bc98 (patch)
treed334eab83c69f0725406b75d6dfd61dab106e1af /lib/Sema/SemaTemplateInstantiate.cpp
parent19a9edb5dd7ab2c63249b28f45f16781a5577874 (diff)
Move RequireCompleteType requirement for fields early into ActOnField so that
subsequent code which depends on a complete type does the right thing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90727 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiate.cpp')
-rw-r--r--lib/Sema/SemaTemplateInstantiate.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaTemplateInstantiate.cpp b/lib/Sema/SemaTemplateInstantiate.cpp
index 6a4ac3c562..b1a58038a9 100644
--- a/lib/Sema/SemaTemplateInstantiate.cpp
+++ b/lib/Sema/SemaTemplateInstantiate.cpp
@@ -1060,10 +1060,10 @@ Sema::InstantiateClass(SourceLocation PointOfInstantiation,
Member != MemberEnd; ++Member) {
Decl *NewMember = SubstDecl(*Member, Instantiation, TemplateArgs);
if (NewMember) {
- if (NewMember->isInvalidDecl()) {
- Invalid = true;
- } else if (FieldDecl *Field = dyn_cast<FieldDecl>(NewMember))
+ if (FieldDecl *Field = dyn_cast<FieldDecl>(NewMember))
Fields.push_back(DeclPtrTy::make(Field));
+ else if (NewMember->isInvalidDecl())
+ Invalid = true;
} else {
// FIXME: Eventually, a NULL return will mean that one of the
// instantiations was a semantic disaster, and we'll want to set Invalid =