[PATCH] Location and Range unittests for FriendDecl

Richard Smith richard at metafoo.co.uk
Fri Jun 6 09:52:22 PDT 2014


On Thu, Jun 5, 2014 at 9:50 PM, Nikola Smiljanić <popizdeh at gmail.com> wrote:

> Committed these tests in r210306 but I'll leave this review request open
> in case the following code produces something in the next week or so :)
>
>   richard_smith_engine e(beer()); // not sure if this is a proper way to
> seed the engine
>

Sorry, that's a function declaration... =)


>   obscure_frienddecl_distribution d(e);
>   d();


Should friendDecl also match friend template declarations? You don't have
tests for that case. Also, there's no test coverage here for the case where
the 'friend' keyword is not the first token (nor for the case of a friend
function defined inline in the class):

    int inline friend f() { return 0; }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140606/1682ea99/attachment.html>


More information about the cfe-commits mailing list