[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
Fri Oct 11 10:30:40 PDT 2024


================
@@ -1422,8 +1422,14 @@ static bool IsOverloadOrOverrideImpl(Sema &SemaRef, FunctionDecl *New,
   // the implicit object parameter are of the same type.
 
   auto NormalizeQualifiers = [&](const CXXMethodDecl *M, Qualifiers Q) {
-    if (M->isExplicitObjectMemberFunction())
+    if (M->isExplicitObjectMemberFunction()) {
+      if (M->getNumParams() > 0) {
----------------
cor3ntin wrote:

This is always true

https://github.com/llvm/llvm-project/pull/110435


More information about the cfe-commits mailing list