[cfe-dev] AST::Type::getAs<sugar>()?

Nikola Smiljanic popizdeh at gmail.com
Tue May 5 21:12:21 PDT 2015

+Richard should know that answer to that :)

On Fri, Apr 17, 2015 at 4:51 PM, Stephan Bergmann <sbergman at redhat.com>

> I naively assumed AST::Type::getAs<T>() would work regardless whether T
> represents sugar or not, and looking closer it is indeed specialized for
> TypedefType, TemplateSpecializationType, and AttributeType to make those
> work, but not for other sugar like SubstTemplateTypeParmType.
> For example, t->getAs<SubstTemplateTypeParmType>() does not work if t is a
> wrapping TypedefType (but happens to work if t itself already is a
> SubsTemplateTypeParmType).  Is that intended?
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150506/2da08e17/attachment.html>

More information about the cfe-dev mailing list