[cfe-dev] how to get AST content from CXCursor?

Jacob Carlborg via cfe-dev cfe-dev at lists.llvm.org
Tue Oct 30 13:21:04 PDT 2018


On 2018-10-30 05:15, Lou Wynn via cfe-dev wrote:
> That's what I guessed. But my purpose is doing source-to-source 
> translation. I'm not sure if I should use libclang and your previously 
> suggested method to do it, or use libTooling to directly get AST nodes. 
> To me, the second method seems easier to get the content of a node.
> 
> Any suggestions? Which way do you prefer if you were translating the 
> source to another language?

I would also like to add that if you feel there's something missing in 
libclang, you can always contribute to add the missing functionality.

-- 
/Jacob Carlborg




More information about the cfe-dev mailing list