[clang] [clang] Fix cast for injected types in case name lookup for dependent bases (PR #119024)
Vladislav Belov via cfe-commits
cfe-commits at lists.llvm.org
Sun Dec 8 02:16:24 PST 2024
================
@@ -368,8 +368,8 @@ bool CXXRecordDecl::FindBaseClass(const CXXBaseSpecifier *Specifier,
const CXXRecordDecl *BaseRecord) {
assert(BaseRecord->getCanonicalDecl() == BaseRecord &&
"User data for FindBaseClass is not canonical!");
- return Specifier->getType()->castAs<RecordType>()->getDecl()
- ->getCanonicalDecl() == BaseRecord;
+ return (cast<CXXRecordDecl>(Specifier->getType()->getAsRecordDecl())
+ ->getCanonicalDecl()) == BaseRecord;
----------------
vbe-sc wrote:
Fixed.
https://github.com/llvm/llvm-project/pull/119024
More information about the cfe-commits
mailing list