Hmm, I've looked into this a bit more, and it's unclear to me why we have
an IDNS check here at all. If LookupVisibleDecls is working properly, it
should only return declarations that are actually visible anyway.

On Mon, Apr 14, 2014 at 1:15 PM, Francisco Lopes <
[email protected]> wrote:

> 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 <[email protected]>:
>
> On Fri, Mar 14, 2014 at 6:59 AM, Francisco Lopes <
>> [email protected]> 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 <[email protected]>:
>>>
>>> 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 <
>>>> [email protected]> wrote:
>>>>
>>>>> Ping
>>>>>
>>>>>
>>>>> 2014-03-07 14:47 GMT-03:00 Francisco Lopes <
>>>>> [email protected]>:
>>>>>
>>>>>> 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
>>>>> [email protected]
>>>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>>>>
>>>>>
>>>>
>>>
>>
>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to