sammccall added a comment.

Thanks, this looks great, just want to check if there are more callsites we can 
hit while here.



================
Comment at: clang/lib/Sema/SemaOverload.cpp:6460
   // list (8.3.5).
   if (TooManyArguments(NumParams, Args.size(), PartialOverloading) &&
       !Proto->isVariadic()) {
----------------
Hmm, there are something like 6 callers of TooManyArguments.
They all check isVariadic, and probably should all be adjusted in this way 
(except in once case where PartialOverloading is constant `false`).
This includes one almost-identical caller in this file, for 
AddMethodCandidate...

It's tempting to say that we should just pass some more args into 
TooManyArguments and have it do this logic internally. Maybe pass the 
FunctionType and the FunctionDecl* in, with the latter nullable?
At least this would keep this nice comment in one place.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111318

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D111318: [clang]... Adam Czachorowski via Phabricator via cfe-commits
    • [PATCH] D111318: [c... Sam McCall via Phabricator via cfe-commits

Reply via email to