[clang] [clang] Handle templated operators with reversed arguments (PR #69595)

Ilya Biryukov via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 20 01:59:43 PDT 2023


================
@@ -10085,10 +10085,14 @@ getImplicitObjectParamType(ASTContext &Context, const FunctionDecl *F) {
   return M->getFunctionObjectParameterReferenceType();
 }
 
-static bool haveSameParameterTypes(ASTContext &Context, const FunctionDecl *F1,
+static bool allowAmbiguityWithSelf(ASTContext &Context, const FunctionDecl *F1,
----------------
ilya-biryukov wrote:

Could you elaborate why `declaresSameEntity` is not enough and we need extra checks for parameter types?
I am asking because if it's not enough for regular functions, maybe there is a similar case for function templates.
And the name is a bit misleading as `F1` and `F2` can clearly be two different functions, so it is unclear what `self`  refers to.

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


More information about the cfe-commits mailing list