[cfe-users] Finding of functions and inserting code

2015-12-02 Thread Radim Sojka via cfe-users
Hello, I'd like to ask you if it is possible to find the lines of my code where the specific functions is called and insert some code around function's block. Example of code: 10: some code 11: foo() 12: some code/ / Example of output: 10: some code 11: inserted code 12: foo() 13: inserted

[cfe-users] libclang get AST tree of macro extension

2015-12-02 Thread Laurent Carlier via cfe-users
Hello, I'm currently busy with using libclang library. My goal is to parse code that contains macro with parameters and to get the type of the macro parameters in order to make syntax coloration. If we consider the following piece of code #define MACRO(X) X typedef struct{ int a;} aType; aTy