[PATCH] D123182: [Concepts] Fix overload resolution bug with constrained candidates

Roy Jacobson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 15 08:59:49 PDT 2022


royjacobson marked 2 inline comments as done.
royjacobson added inline comments.


================
Comment at: clang/lib/Sema/SemaOverload.cpp:9829
+  bool CanCompareConstraints = false;
+  if (Cand1.Function && Cand2.Function && Cand1.Function->hasPrototype() &&
+      Cand2.Function->hasPrototype()) {
----------------
erichkeane wrote:
> royjacobson wrote:
> > erichkeane wrote:
> > > Since the point of this is to just calculate the CanCompareConstraints, I think it should be a separate function called below where it is used.  
> > Do you mean as in a separate `Sema` function? Or a local lambda?
> Just a static function is fine, basically its a whole lot of work happening in this function for a single result, so I'm suggesting splitting off the calculation for `CanCompareConstraints` into its own function, so you get:
> 
> `bool CanCompareConstrants = new_function(...);`
Done


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123182/new/

https://reviews.llvm.org/D123182



More information about the cfe-commits mailing list