[cfe-dev] Default arguments considered harmful?
Reid Kleckner
rnk at google.com
Fri May 2 11:30:17 PDT 2014
On Thu, May 1, 2014 at 9:26 PM, Richard Smith <richard at metafoo.co.uk> wrote:
> Yikes! But ASTRecordLayout's constructor beats this function's puny 17
> parameters -- it has 20. And DeclaratorChunk::getFunction is the winner in
> Clang, with 21 parameters (and only one miserable, lonely default
> argument). In total, LLVM and Clang (and LLDB and whatever else is in my
> source tree...) has nearly 100 functions in header files with 10 or more
> parameters.
>
Well, record layout is complicated. :) Would you rather build a fresh
record layout and set the fields individually, potentially letting callers
ignore some fields?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140502/228f878b/attachment.html>
More information about the cfe-commits
mailing list