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

Terry Long macmantrl at me.com
Thu May 10 19:31:25 PDT 2012


I've added more test coverage, removed deprecated methods, and extended the enhancement to the 'candidate function not viable' diagnostic for C++.

Patch version 2 attached.

-Terry Long



Am 10.05.2012 um 19:17 schrieb Richard Smith:

> On Thu, May 10, 2012 at 4:00 PM, Terry Long <macmantrl at me.com> wrote:
> > The patch generally looks good, thanks!
> 
> Great, thanks for the feedback.
> 
> > Presumably this only applies to the case where there are no arguments, because otherwise we couldn't know /which/ argument was missing?
> 
> Yes, only for the case where there are no arguments to a function that takes 1 argument. Almost impossible to determine the missing argument(s) otherwise.
> 
> > 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().
> 
> OK, I'll update this. I was using the online doxygen docs and didn't see any deprecation warnings. Anywhere where I can find that information?
> 
> It's in include/clang/AST/Decl.h:138-141, though for some reason those comments aren't exposed to doxygen...
>  
> > It would also be great to extend this to the 'candidate function not viable' diagnostics in C++.
> 
> I can take a look at this too.
> 
> Awesome, thanks. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120510/c4f84d54/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PR11857v2.patch
Type: application/octet-stream
Size: 11100 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120510/c4f84d54/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120510/c4f84d54/attachment-0001.html>


More information about the cfe-commits mailing list