================
@@ -1428,10 +1428,18 @@ void ResultBuilder::AddResult(Result R, DeclContext 
*CurContext,
 
   AdjustResultPriorityForDecl(R);
 
+  // Account for explicit object parameter
+  const auto getQualifiers = [&](const CXXMethodDecl *MethodDecl) {
+    if (MethodDecl->isExplicitObjectMemberFunction())
+      return MethodDecl->getFunctionObjectParameterType().getQualifiers();
+    else
+      return MethodDecl->getMethodQualifiers();
+  };
----------------
MythreyaK wrote:

Using a lambda for now, but we can probably reuse this in other functions as 
well. Not 100% sure if `getFunctionObjectParameterType().getQualifiers()` is 
the right way to check 🤔.


https://github.com/llvm/llvm-project/pull/154041
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to