================ @@ -64,38 +64,53 @@ static bool hasOptionalClassName(const CXXRecordDecl &RD) { return false; } +static const CXXRecordDecl *getOptionalBaseClass(const CXXRecordDecl *RD) { + if (RD == nullptr) + return nullptr; + if (hasOptionalClassName(*RD)) + return RD; + + if (!RD->hasDefinition()) + return nullptr; + + for (const CXXBaseSpecifier &Base : RD->bases()) + if (Base.getAccessSpecifier() == AS_public) ---------------- Xazax-hun wrote:
I wonder if we can still get in trouble with private or protected inheritance. E.g., if I had `class Foo : std::optional`, I could still call the methods of `std::optional ` in `Foo`'s methods. Could we get in trouble while analyzing those methods? https://github.com/llvm/llvm-project/pull/84138 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits