[cfe-users] Convert DefaultArg to string

Wang Qi wqking at gmail.com
Tue Jun 11 03:58:51 PDT 2013


Hi all,

I want to get a function's default parameter value as string. That's to
say, if a function "void func(int a = 5);", I want to get the string "5".
I checked ParmVarDecl, but found it only returns an Expr as the default arg.

So my question is, how to get a default parameter value as string, or how
to convert an Expr to string?

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20130611/7409856f/attachment.html>


More information about the cfe-users mailing list