Skip to content

Commit bb2fe0d

Browse files
committed
[AST Verifier] Hack: don't look for destructors of Clang nodes.
The AST verifier is causing late deserialization of generic environments, which in turn is causing the Clang importer to import more classes, which don't end up getting proper destructors... causing an AST verification error. For now, disable this AST verifier check, because it's causing lots of brokenness rdar://problem/29741827. A proper fix will take a bit more work.
1 parent ee34650 commit bb2fe0d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/AST/ASTVerifier.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2331,7 +2331,7 @@ struct ASTNodeBase {};
23312331
void verifyChecked(ClassDecl *CD) {
23322332
PrettyStackTraceDecl debugStack("verifying ClassDecl", CD);
23332333

2334-
if (!CD->hasLazyMembers()) {
2334+
if (!CD->hasLazyMembers() && !CD->hasClangNode()) {
23352335
unsigned NumDestructors = 0;
23362336
for (auto Member : CD->getMembers()) {
23372337
if (isa<DestructorDecl>(Member)) {
@@ -2343,11 +2343,11 @@ struct ASTNodeBase {};
23432343
"explicitly provided or created by the type checker";
23442344
abort();
23452345
}
2346-
}
2347-
2348-
if (!CD->hasDestructor()) {
2349-
Out << "every class's 'has destructor' bit must be set";
2350-
abort();
2346+
2347+
if (!CD->hasDestructor()) {
2348+
Out << "every class's 'has destructor' bit must be set";
2349+
abort();
2350+
}
23512351
}
23522352

23532353
verifyCheckedBase(CD);

0 commit comments

Comments
 (0)