[clang] [Clang]fix dependent qualified base member lookup crash (PR #199403)
Matheus Izvekov via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 22 14:02:03 PDT 2026
================
@@ -126,6 +126,11 @@ bool CXXRecordDecl::forallBases(ForallBasesCallback BaseMatches) const {
SmallVector<const CXXRecordDecl*, 8> Queue;
const CXXRecordDecl *Record = this;
+
+ if (const CXXRecordDecl *Def = getDefinition())
+ Record = Def;
+ else if (!dataPtr())
+ return false;
----------------
mizvekov wrote:
I don't get why this is still here, if we discussed this and you agreed the check is unnecessary.
Moreover, `bases()` is one of the CXXRecordDecl properties which is managed through the `data` pointer, so retrieving the definition is unnecessary.
https://github.com/llvm/llvm-project/pull/199403
More information about the cfe-commits
mailing list