[cfe-dev] Typedef type as template argument

Gabor Kozar kozargabor at gmail.com
Tue Nov 4 05:44:15 PST 2014

I have a FunctionDecl that is an instantiated FunctionTemplateDecl. I
want to figure out if the template argument is a typedef type -
unfortunately, the TemplateArgument only contains the desugared type.
This makes sense, given the way templates work, but it's inconvenient.

Is there any way for me to get the actual type that the user
instantiated the template with? I tried
getTemplateSpecializationArgsAsWritten[1]() but it seems to always
return NULL.

Best regards,

Gábor 'ShdNx' Kozár http://gaborkozar.me


  1. http://clang.llvm.org/doxygen/classclang_1_1FunctionDecl.html#a8a5ee203ad0c4a166d12656b2a7cccbb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20141104/4a95a344/attachment.html>

More information about the cfe-dev mailing list