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

Argyrios Kyrtzidis kyrtzidis at apple.com
Tue Jul 27 10:25:26 PDT 2010


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
> 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/20100727/4cd4d4b0/attachment.html>


More information about the cfe-commits mailing list