rsmith added inline comments.
================ Comment at: clang/lib/Sema/SemaOverload.cpp:15191 OverloadCandidateSet::iterator Best; switch (CandidateSet.BestViableFunction(*this, OpLoc, Best)) { case OR_Success: ---------------- shafik wrote: > @rsmith if `R.isAmbiguous()` should we even check the overload candidates? > > Right now in `clang/test/SemaCXX/arrow-operator.cpp` we are getting both an > ambiguous name lookup and overload diagnostic. Hm, I think perhaps the ideal thing to do is: if `BestViableFunction` returns `OR_Ambiguous`, the lookup was ambiguous, and we found viable functions in multiple different base classes, then don't produce any further diagnostics. That way, we still get good error recovery in the case where the overloading is unambiguous despite the lookup being ambiguous, or when the overloading is ambiguous for some reason unrelated to the ambiguous lookup. (We'd want to do this in all the overloaded operator lookups in this file, not just for `operator->`.) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155387/new/ https://reviews.llvm.org/D155387 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits