[clang] [Clang] Implement CWG2918 'Consideration of constraints for address of overloaded function' (PR #127773)

Younan Zhang via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 19 21:06:37 PST 2025


================
@@ -13443,9 +13499,9 @@ Sema::resolveAddressOfSingleOverloadCandidate(Expr *E, DeclAccessPair &Pair) {
     return nullptr;
 
   if (Result) {
-    SmallVector<const Expr *, 1> ResultAC;
     // We skipped over some ambiguous declarations which might be ambiguous with
     // the selected result.
+    // FIXME: This for-loop is dead code. Remove it?
----------------
zyn0217 wrote:

The only way `AmbiguousDecls` comes with elements is on line 13433, where we also set `IsResultAmbiguous` to true. However, we bail out of the function on line 13442 when IsResultAmbiguous

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


More information about the cfe-commits mailing list