We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 346072c commit 465ec58Copy full SHA for 465ec58
clang/lib/AST/ASTContext.cpp
@@ -13558,9 +13558,14 @@ bool ASTContext::containsCapabilities(const RecordDecl *RD) const {
13558
const QualType Ty = i->getType();
13559
if (Ty->isCHERICapabilityType(*this))
13560
return true;
13561
- if (const RecordType *RT = Ty->getAs<RecordType>())
+ if (const RecordType *RT = Ty->getAs<RecordType>()) {
13562
+ if (RT->isIncompleteType())
13563
+ // This can only occur when an error has occurred earlier, so it
13564
+ // isn't too important what we return.
13565
+ return false;
13566
if (containsCapabilities(RT->getDecl()))
13567
13568
+ }
13569
if (Ty->isArrayType() && containsCapabilities(Ty))
13570
13571
}
0 commit comments