================ @@ -170,13 +170,21 @@ bool CXXBasePaths::lookupInBases(ASTContext &Context, QualType BaseType = Context.getCanonicalType(BaseSpec.getType()).getUnqualifiedType(); + bool isCurrentInstantiation = isa<InjectedClassNameType>(BaseType); + if (!isCurrentInstantiation) { + if (auto *BaseRecord = cast_or_null<CXXRecordDecl>( ---------------- cor3ntin wrote:
```suggestion if (auto *BaseRecord = cast_if_present<CXXRecordDecl>( ``` Can this actually be null? https://github.com/llvm/llvm-project/pull/114978 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits