[PATCH][REVIEW REQUEST] Fix for libclang completion of already declared template friends.

Francisco Lopes francisco.mailing.lists at oblita.com
Mon Apr 14 13:15:47 PDT 2014


Hi Richard, as can be checked in the bug history, there's a side effect if
I don't call getCanonicalDecl. Also, this patch fixes an issue that's
specially related to template friends and lookup. Please take a look at the
history, since it looks like following your advices, I would end up with
regressions.


2014-04-11 17:10 GMT-03:00 Richard Smith <richard at metafoo.co.uk>:

> On Fri, Mar 14, 2014 at 6:59 AM, Francisco Lopes <
> francisco.mailing.lists at oblita.com> wrote:
>
>> hi, thanks for the comment but, for example, as I want to add the call to
>> getCanonicalDecl
>> for this situation of friends solely, don't I need to check whether it's
>> in friend name space too?
>>
>> I'm not sure whether you meant to replace the two first checks, or just
>> the second.
>>
>
> I meant to replace all the checks. I don't see why you would want to call
> getCanonicalDecl here, or why you'd care whether the name has ever been
> declared as a friend. All you should check is, is the name visible now?
>
> Regards.
>>
>>
>>
>> 2014-03-13 20:59 GMT-03:00 Richard Smith <richard at metafoo.co.uk>:
>>
>> Your visibility check seems more complex than necessary. I think this
>>> should do what you want:
>>>
>>>  if
>>> (ND->getMostRecentDecl()->isInIdentifierNamespace(Decl::IDNS_Ordinary |
>>> Decl::IDNS_Tag))
>>>   // visible
>>>
>>>
>>> On Wed, Mar 12, 2014 at 2:12 PM, Francisco Lopes <
>>> francisco.mailing.lists at oblita.com> wrote:
>>>
>>>> Ping
>>>>
>>>>
>>>> 2014-03-07 14:47 GMT-03:00 Francisco Lopes <
>>>> francisco.mailing.lists at oblita.com>:
>>>>
>>>>> Hi,
>>>>>
>>>>> attached is a patch that tries to fix libclang bug 13699<http://llvm.org/bugs/show_bug.cgi?id=13699>
>>>>> .
>>>>> Please review.
>>>>>
>>>>> --
>>>>> Francisco Lopes
>>>>>
>>>>> PS:
>>>>> I have requested commit access in late 2012 but never made a test
>>>>> commit or anything.
>>>>>
>>>>> At the time I have received from Chris Lattner:
>>>>> "I'm sorry for the delay, I've been fighting mailing list issues.
>>>>> Commit after approval access is granted.  Please try a test commit!"
>>>>>
>>>>> I'm not sure whether it's still valid.
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> cfe-commits mailing list
>>>> cfe-commits at cs.uiuc.edu
>>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140414/24405388/attachment.html>


More information about the cfe-commits mailing list