[cfe-dev] How to get typedef name?
Miklos Vajna via cfe-dev
cfe-dev at lists.llvm.org
Sun Nov 3 12:53:39 PST 2019
On Thu, Oct 31, 2019 at 03:41:22PM +0000, Kenth Eriksson via cfe-dev <cfe-dev at lists.llvm.org> wrote:
> How can I get the underlying typedef name for the parameters of
> a FunctionDecl?
> The following gives the resolved typedef name, but I want the typedef
Care to share a short, self-contained example?
I just tried this on a function that takes an std::string (which is
typically a typedef) and I got std::string by default.
If you want to get the "desugared" type, then you would need to dyn_cast
to clang::TypedefType, then desugar().getAsString().
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 195 bytes
Desc: Digital signature
More information about the cfe-dev