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

2023-10-25 Thread Shafik Yaghmour via cfe-commits
@@ -7688,7 +7688,7 @@ bool Sema::CheckNonDependentConversions( QualType ParamType = ParamTypes[I + Offset]; if (!ParamType->isDependentType()) { unsigned ConvIdx = PO == OverloadCandidateParamOrder::Reversed - ? 0 +

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

2023-10-20 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 closed https://github.com/llvm/llvm-project/pull/69595 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-10-20 Thread Ilya Biryukov via cfe-commits
@@ -10085,10 +10085,14 @@ getImplicitObjectParamType(ASTContext , const FunctionDecl *F) { return M->getFunctionObjectParameterReferenceType(); } -static bool haveSameParameterTypes(ASTContext , const FunctionDecl *F1, +static bool allowAmbiguityWithSelf(ASTContext , const

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

2023-10-20 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov approved this pull request. The change looks good, I believe the comments about potentially redundant checks and naming of the function could be addressed in a follow-up. https://github.com/llvm/llvm-project/pull/69595

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

2023-10-20 Thread Ilya Biryukov via cfe-commits
@@ -7688,7 +7688,7 @@ bool Sema::CheckNonDependentConversions( QualType ParamType = ParamTypes[I + Offset]; if (!ParamType->isDependentType()) { unsigned ConvIdx = PO == OverloadCandidateParamOrder::Reversed - ? 0 +

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

2023-10-20 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/69595 >From 4460b02508d21d98cf05103bece99fc5bd474ab0 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Thu, 19 Oct 2023 12:33:45 +0200 Subject: [PATCH 1/6] Reapply "Correctly compute conversion seq for args to fn with

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

2023-10-20 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/69595 >From 4460b02508d21d98cf05103bece99fc5bd474ab0 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Thu, 19 Oct 2023 12:33:45 +0200 Subject: [PATCH 1/5] Reapply "Correctly compute conversion seq for args to fn with

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

2023-10-20 Thread Utkarsh Saxena via cfe-commits
@@ -10085,10 +10085,14 @@ getImplicitObjectParamType(ASTContext , const FunctionDecl *F) { return M->getFunctionObjectParameterReferenceType(); } -static bool haveSameParameterTypes(ASTContext , const FunctionDecl *F1, +static bool allowAmbiguityWithSelf(ASTContext , const

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

2023-10-20 Thread Utkarsh Saxena via cfe-commits
@@ -7688,7 +7688,7 @@ bool Sema::CheckNonDependentConversions( QualType ParamType = ParamTypes[I + Offset]; if (!ParamType->isDependentType()) { unsigned ConvIdx = PO == OverloadCandidateParamOrder::Reversed - ? 0 +

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

2023-10-20 Thread Ilya Biryukov via cfe-commits
@@ -7688,7 +7688,7 @@ bool Sema::CheckNonDependentConversions( QualType ParamType = ParamTypes[I + Offset]; if (!ParamType->isDependentType()) { unsigned ConvIdx = PO == OverloadCandidateParamOrder::Reversed - ? 0 +

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

2023-10-20 Thread Ilya Biryukov via cfe-commits
@@ -37,6 +37,25 @@ These changes are ones which we think may surprise users when upgrading to Clang |release| because of the opportunity they pose for disruption to existing code bases. +- Fix a bug in reversed argument for templated operators. + This breaks code in C++20

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

2023-10-20 Thread Ilya Biryukov via cfe-commits
@@ -10085,10 +10085,14 @@ getImplicitObjectParamType(ASTContext , const FunctionDecl *F) { return M->getFunctionObjectParameterReferenceType(); } -static bool haveSameParameterTypes(ASTContext , const FunctionDecl *F1, +static bool allowAmbiguityWithSelf(ASTContext , const

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

2023-10-20 Thread Ilya Biryukov via cfe-commits
@@ -37,6 +37,25 @@ These changes are ones which we think may surprise users when upgrading to Clang |release| because of the opportunity they pose for disruption to existing code bases. +- Fix a bug in reversed argument for templated operators. + This breaks code in C++20

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

2023-10-19 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/69595 >From 4460b02508d21d98cf05103bece99fc5bd474ab0 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Thu, 19 Oct 2023 12:33:45 +0200 Subject: [PATCH 1/4] Reapply "Correctly compute conversion seq for args to fn with

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

2023-10-19 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/69595 >From 4460b02508d21d98cf05103bece99fc5bd474ab0 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Thu, 19 Oct 2023 12:33:45 +0200 Subject: [PATCH 1/3] Reapply "Correctly compute conversion seq for args to fn with

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

2023-10-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Utkarsh Saxena (usx95) Changes https://github.com/llvm/llvm-project/pull/68999 correctly computed conversion sequence for reversed args to a template operators. This was a breaking change as code, previously accepted in C++17, starts to

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

2023-10-19 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/69595 https://github.com/llvm/llvm-project/pull/68999 correctly computed conversion sequence for reversed args to a template operators. This was a breaking change as code, previously accepted in C++17, starts to break