[cfe-dev] Recover TypeDecl* from QualType

Victor Vicente de Carvalho victor.v.carvalho at gmail.com
Sun Jul 7 10:14:25 PDT 2013


Thanks Eli, so It's just a matter of dyn_cast the Type* to RecordType*?

Another question, what's the best way to detect is a Type has atemplate
parameters?


Victor


2013/7/6 Eli Friedman <eli.friedman at gmail.com>

> On Sat, Jul 6, 2013 at 2:26 PM, Victor Vicente de Carvalho
> <victor.v.carvalho at gmail.com> wrote:
> > It's possible to recover the TypeDecl* from a QualType (or it's
> underlying
> > Type*)?
> >
>
> There isn't a generic method, but you can do it for specific types,
> e.g. RecordType has a getDecl() method.
>
> -Eli
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130707/b61f2988/attachment.html>


More information about the cfe-dev mailing list