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

Utkarsh Saxena via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 20 02:36:43 PDT 2023


================
@@ -7688,7 +7688,7 @@ bool Sema::CheckNonDependentConversions(
     QualType ParamType = ParamTypes[I + Offset];
     if (!ParamType->isDependentType()) {
       unsigned ConvIdx = PO == OverloadCandidateParamOrder::Reversed
-                             ? 0
+                             ? Args.size() - 1 - (ThisConversions + I)
----------------
usx95 wrote:

All the tests mentioned in this PR are fixed by this change. These were previously not flagged by Clang.
With the rest of the change, the error produced by this is reduced to a warning.

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


More information about the cfe-commits mailing list