[cfe-commits] [Request for approval] Allow clang library applications to get specializations

Argyrios Kyrtzidis kyrtzidis at apple.com
Fri Jul 30 09:37:25 PDT 2010


On Jul 30, 2010, at 6:55 PM, Peter Collingbourne wrote:

> On Tue, Jul 27, 2010 at 10:29:14PM +0300, Argyrios Kyrtzidis wrote:
>> On Jul 27, 2010, at 10:17 PM, Peter Collingbourne wrote:
>>> On Tue, Jul 27, 2010 at 10:00:24PM +0300, Argyrios Kyrtzidis wrote:
>>>> On Jul 27, 2010, at 9:55 PM, Peter Collingbourne wrote:
>>>>> Another possibility would be to expose an iterator
>>>>> specs_begin()..specs_end() over the set of specialisations.  This way
>>>>> we don't need to copy the vector and the client still doesn't need
>>>>> to care how the specialisation list is stored.
>>>> 
>>>> Sounds good. I'd suggest that the iterator is a class wrapping the FoldingSet's iterator and making sure to return the latest redeclaration, what do you think ?
>>> 
>>> Agreed.  For consistency we can also have the FunctionTemplateDecl's
>>> specialisation iterator produce FunctionDecls instead of
>>> FunctionTemplateSpecializationInfos.
>> 
>> Yes, that'd be great.
> 
> Done, please see the attached patches.  I also decided to include
> some refactoring for the find*Specialization member functions.
> OK to commit?

Looks great, thanks for working on this! Please go ahead and commit.

-Argiris



More information about the cfe-commits mailing list