[cfe-dev] Disable type checking on identifiers for parse?

andrewh andrewaah at gmail.com
Tue Jun 12 21:57:40 PDT 2012


In my program I'm placing a macro function body into a normal function body
so that the macro will be expanded and if there are no syntax errors,
generate an ast of it.
e.g:
#define macronum 5
#define macrofunc(x,y) x+y*macronum
void func(char *x, char *y) {macrofunc(x,y);}

expanding into:
void func(char *x, char *y) {x+y*5;}
to get an ast like: (+ x (* y 5))

I won't know the param types, so I was hoping to skip the type checking.

Is this possible? e.g. by doing something with the 'Sema' or 'Parser'
classes?

Thanks.


--
View this message in context: http://clang-developers.42468.n3.nabble.com/Disable-type-checking-on-identifiers-for-parse-tp4024483.html
Sent from the Clang Developers mailing list archive at Nabble.com.



More information about the cfe-dev mailing list