From ecffd83c85ea9d2ef7cb041712988a350daf82cf Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Wed, 8 Aug 2012 04:39:56 +0000 Subject: Get rid of an early return in Sema::ActOnFields which doesn't make sense anymore. Fixes a crash (), and generally seems to improve recovery in other cases. llvm-svn: 161474 --- clang/lib/Sema/SemaDecl.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'clang/lib/Sema/SemaDecl.cpp') diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index ffe45fad039..869fedb00c2 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -9751,11 +9751,6 @@ void Sema::ActOnFields(Scope* S, AttributeList *Attr) { assert(EnclosingDecl && "missing record or interface decl"); - // If the decl this is being inserted into is invalid, then it may be a - // redeclaration or some other bogus case. Don't try to add fields to it. - if (EnclosingDecl->isInvalidDecl()) - return; - // If this is an Objective-C @implementation or category and we have // new fields here we should reset the layout of the interface since // it will now change. -- cgit v1.2.3