diff options
author | John McCall <rjmccall@apple.com> | 2010-03-17 19:25:57 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-03-17 19:25:57 +0000 |
commit | a8cab015e5f2750cb6f15e71016569739c2ad1e3 (patch) | |
tree | 329fd2376a98f3f2cf5b7f683f0b34e3659c3746 /lib/Sema/SemaDecl.cpp | |
parent | f4e689b8528770001f4792f1f4ebdfb09d859e3d (diff) |
ActOnTagDefinitionError is supposed to 'unwind' ActOnTagStartDefinition, not
ActOnStartCXXMemberDeclaration. We haven't started the field collector on this
class yet, so don't stop it. Fixes a crash in the VS buildbot and a memory error
on all the others.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98760 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index d562a52694..19885ba9cf 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -5113,11 +5113,11 @@ void Sema::ActOnTagFinishDefinition(Scope *S, DeclPtrTy TagD, void Sema::ActOnTagDefinitionError(Scope *S, DeclPtrTy TagD) { AdjustDeclIfTemplate(TagD); TagDecl *Tag = cast<TagDecl>(TagD.getAs<Decl>()); - Tag->setInvalidDecl(); - if (isa<CXXRecordDecl>(Tag)) - FieldCollector->FinishClass(); + // We're undoing ActOnTagStartDefinition here, not + // ActOnStartCXXMemberDeclarations, so we don't have to mess with + // the FieldCollector. PopDeclContext(); } |