[clang] [Clang] fix overload resolution for object parameters with top-level cv-qualifiers in member functions (PR #110435)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 6 02:08:00 PDT 2024
================
@@ -1511,8 +1511,11 @@ static bool IsOverloadOrOverrideImpl(Sema &SemaRef, FunctionDecl *New,
auto NewObjectType = New->getFunctionObjectParameterReferenceType();
auto OldObjectType = Old->getFunctionObjectParameterReferenceType();
- if (NewObjectType.isConstQualified() != OldObjectType.isConstQualified())
- return false;
+ if (Old->isExplicitObjectMemberFunction() &&
+ OldObjectType.getQualifiers() != NewObjectType.getQualifiers())
----------------
cor3ntin wrote:
do we care about `__restrict` @AaronBallman ?
https://github.com/llvm/llvm-project/pull/110435
More information about the cfe-commits
mailing list