aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaLookup.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-03-09 20:10:30 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-03-09 20:10:30 +0000
commit216f78b7333dbc89f58fa69066396ae3237da6da (patch)
treec5582df83664ec9d2d9c37f028dc8121124229ad /lib/Sema/SemaLookup.cpp
parentf9ff5876289d5228c299b57416a62c8c3b848287 (diff)
Improve our semantic error recovery.
When an error made a record member invalid, the record would stay as "isBeingDefined" and not "completeDefinition". Even easily recoverable errors ended up propagating records in such "beingDefined" state, for example: struct A { ~A() const; // expected-error {{'const' qualifier is not allowed on a destructor}} }; struct B : A {}; // A & B would stay as "not complete definition" and "being defined". This weird state was impending lookups in the records and hitting assertion in the ASTWriter. Part of rdar://11007039 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152432 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaLookup.cpp')
-rw-r--r--lib/Sema/SemaLookup.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp
index 8e950ac207..ea92b9dcd5 100644
--- a/lib/Sema/SemaLookup.cpp
+++ b/lib/Sema/SemaLookup.cpp
@@ -527,10 +527,6 @@ static bool LookupBuiltin(Sema &S, LookupResult &R) {
/// the class at this point.
static bool CanDeclareSpecialMemberFunction(ASTContext &Context,
const CXXRecordDecl *Class) {
- // Don't do it if the class is invalid.
- if (Class->isInvalidDecl())
- return false;
-
// We need to have a definition for the class.
if (!Class->getDefinition() || Class->isDependentContext())
return false;