[cfe-dev] [Patch] AST support, and unqualified name lookup for using-directives

Douglas Gregor dgregor at apple.com
Mon Feb 2 20:13:57 PST 2009


On Feb 2, 2009, at 6:23 PM, Piotr Rak wrote:
> 2009/2/3 Douglas Gregor <dgregor at apple.com>:
>>
>> On Feb 2, 2009, at 4:06 PM, Piotr Rak wrote:
>>
>>> 2009/2/3 Piotr Rak <piotr.rak at gmail.com>:
>>>>
>>>> Hi Doug,
>>>>
>>>> Thanks for review, and great comments!
>>>>
>>>> I have addressed most of issues in attached version.
>>>> It also partially fixes other thing I have noticed, similar  
>>>> failure to
>>>> one from first version of patch with namespaces, now with tags.
>>>> Fix is not complete though, but behaviour is right. One commented  
>>>> out
>>>> in test is incorrectly diagnosed. I'll try send fix ASAP.
>>>>
>>>
>>> Just noticed changes in trunk, that break this patch, I will  
>>> adjust and
>>> resend.
>>
>> Eh, sorry. I was trying to make it easier for us by removing  
>> boilerplate
>> code :)
>>
>>       - Doug
>>
>
> Ha! Live goes on, even when you drink beer with friends! :)
>
> Attached is updated to trunk, also makes use of new
> Sema::LookupResult::iterator. Works great, thanks!

Thanks for the quick turnaround. I'll check it out.

>
> Another thing I have noticed just now is:
> Why do we return Decl* from Lookup*Name?
> Wouldn't be easier to return NamedDecl*, we cast it in 99% of cases
> anyway just few lines later? If that change is welcome, I'll try to
> send patch, changing it in near future.


Yes, that change is welcome. We currently return Decl* because most of  
the behavior of Lookup*Name predates the widespread use of NamedDecl.

	- Doug



More information about the cfe-dev mailing list