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.
2 parents 4221d9f + 9f9fdd9 commit 4a1662dCopy full SHA for 4a1662d
lib/AST/Decl.cpp
@@ -6438,7 +6438,14 @@ bool ClassDecl::walkSuperclasses(
6438
}
6439
6440
bool ClassDecl::isForeignReferenceType() const {
6441
- return getClangDecl() && isa<clang::RecordDecl>(getClangDecl());
+ auto clangRecordDecl = dyn_cast_or_null<clang::RecordDecl>(getClangDecl());
6442
+ if (!clangRecordDecl)
6443
+ return false;
6444
+
6445
+ CxxRecordSemanticsKind kind = evaluateOrDefault(
6446
+ getASTContext().evaluator,
6447
+ CxxRecordSemantics({clangRecordDecl, getASTContext()}), {});
6448
+ return kind == CxxRecordSemanticsKind::Reference;
6449
6450
6451
bool ClassDecl::hasRefCountingAnnotations() const {
0 commit comments