george.burgess.iv added inline comments. ================ Comment at: lib/Sema/SemaInit.cpp:4978-4990 @@ -4977,1 +4977,15 @@ + // As an extension, C can have overloaded functions. We need to add the + // address resolution step. + if (Initializer->getType() == Context.OverloadTy) { + bool MultipleCandidates; + DeclAccessPair DAP; + if (FunctionDecl *FD = S.ResolveAddressOfOverloadedFunction( + Initializer, DestType, false, DAP, &MultipleCandidates)) { + AddAddressOverloadResolutionStep(FD, DAP, MultipleCandidates); + } else { + SetFailed(InitializationSequence::FK_AddressOfOverloadFailed); + return; + } + } + ---------------- rsmith wrote: > It would seem better to handle this in the assignment rules rather than > duplicating it between here and the binary operator case. I tried that initially, and it failed. Turns out the error in my initial attempt was just me being dumb. :)
Thanks for catching that. http://reviews.llvm.org/D13607 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits