Hi Abramo,

How about adding a method to get the specializations in a vector, like the 
already existing:

  /// \brief Retrieve the partial specializations as an ordered list.
  void getPartialSpecializations(
          llvm::SmallVectorImpl<ClassTemplatePartialSpecializationDecl *> &PS);


Users of the template decls interface would not need to depend on how the 
specializations are stored.
For example, before I changed getSpecializations() to 'protected', the set 
contained the latest redeclarations but now the set contains just the canonical 
decls and we return the latest when the client makes a query about the 
specializations.

-Argiris


On Jul 27, 2010, at 12:41 PM, Abramo Bagnara wrote:

> The following patch restores the "public" access specifier for method
> getSpecializations() of FunctionTemplateDecl as well as methods
> getSpecializations() and getPartialSpecializations() of ClassTemplateDecl.
> 
> They were recently downgraded to "protected", but it seems that clients
> such as our application have no other way to query the set of all
> specializations of a given template.
> 
> <public-specializations.patch>_______________________________________________
> 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