================
@@ -10648,7 +10648,9 @@ static void AddMostOverridenMethods(const CXXMethodDecl
*MD,
void Sema::FindHiddenVirtualMethods(CXXMethodDecl *MD,
SmallVectorImpl<CXXMethodDecl*> &OverloadedMethods) {
- if (!MD->getDeclName().isIdentifier())
+ CXXRecordDecl *DC = MD->getParent();
+ if (DC->getNumBases() == 0 || !DC->isPolymorphic() ||
+ !MD->getDeclName().isIdentifier())
----------------
joker-eph wrote:
Right, `!MD->getDeclName().isIdentifier()` is cheap, but are you asking why the
new checks are there? Or just asking about the ordering?
I think the point here is that `isIdentifier()` it didn't catch it all, and
it'll let some methods that match `isIdentifier()` through, going through the
slow lookup path, while we filter them early here.
https://github.com/llvm/llvm-project/pull/223045
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits