[clang] [Clang] fix overload resolution for object parameters with top-level cv-qualifiers in member functions (PR #110435)

Oleksandr T. via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 11 10:51:42 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) {
----------------
a-tarasyuk wrote:

@cor3ntin Thanks for the feedback. I've added the requested changes.

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


More information about the cfe-commits mailing list