[cfe-dev] libclang: inspecting function parameters with default arguments

jacobwpeng 2191195 at qq.com
Fri Jul 18 00:56:05 PDT 2014


Hi, I just got the same problem as you did, and I'm using libclang python
binding.
Finally I solve it out by inspecting all children of the function cursor,
and they're all PARM_DECL kind.
Then get the tokens of each child, for each token , get it's spelling, if
the spelling equals to '=', then this parameter has a default value.

Hope this helps.



--
View this message in context: http://clang-developers.42468.n3.nabble.com/libclang-inspecting-function-parameters-with-default-arguments-tp4037675p4040639.html
Sent from the Clang Developers mailing list archive at Nabble.com.



More information about the cfe-dev mailing list