[cfe-commits] [PATCH] "missing argument" diagnostic should include argument name

Richard Smith richard at metafoo.co.uk
Thu May 10 15:45:51 PDT 2012


On Thu, May 10, 2012 at 12:56 PM, Terry Long <macmantrl at me.com> wrote:

> I'm new to working with the clang source and wanted to contribute, so I
> tried to pick a bug that seemed fairly straightforward.
> This patch adds the enhancement requested in
> http://llvm.org/bugs/show_bug.cgi?id=11857
>
> Let me know if I've done something unforgivable in my patch, or any
> tips/suggestions.
> Since I'm still new to the codebase, I would be open to suggestions for
> easy bugs that would increase my familiarity.
>

The patch generally looks good, thanks! Presumably this only applies to the
case where there are no arguments, because otherwise we couldn't know
/which/ argument was missing?

Please add test coverage for the
err_typecheck_call_too_few_args_at_least_one diagnostic. Also,
NamedDecl::getNameAsString is deprecated; please just use "<<
FDecl->getParamDecl(0)", and use getParamDecl(0)->getDeclName()'s operator
bool() in the test, rather than empty().

It would also be great to extend this to the 'candidate function not
viable' diagnostics in C++.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120510/14e625e9/attachment.html>


More information about the cfe-commits mailing list