================
@@ -10960,6 +10960,10 @@ OverloadCandidateSet::BestViableFunction(Sema &S, 
SourceLocation Loc,
     S.diagnoseEquivalentInternalLinkageDeclarations(Loc, Best->Function,
                                                     EquivalentCands);
 
+  // [over.match.best]/4 is checked for in Sema::ConvertArgumentsForCall,
+  // because not every function call goes through our overload resolution
+  // machinery, even if the Standard says it supposed to.
+
----------------
Endilll wrote:

We have `f(0)` test in DR tests, but I don't understand how `void f(int) {} // 
best candidate` would bring additional coverage. I also don't understand why 
we'd return `OR_Ambiguous`.

I think it's worth pointing out that when there is a redeclaration chain, only 
one declaration out of it is considered a candidate function for overload 
resolution. At least as far as I saw in the debugger while working on this.

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

Reply via email to