Ignore certain macros during AST generation

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Ignore certain macros during AST generation

Xin Wang via cfe-dev
Hi, 

I using the RecursiveASTVisitor class to parse C programs.

The programs contain certain compiler specific macros like using, eg, asm, interrupt, __a0 and so on.
Is there a compiler option in clang to ignore this Marocs? 
Or this there a way to do the same using libtooling interface?



Note: QAC/ QAC++ offers option to redefine the macro with values like _ignore to remove it's effect during parsing

References Link:

 Section-6.2

Thank you in advance.

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Ignore certain macros during AST generation

Xin Wang via cfe-dev
Hi, 

I using the RecursiveASTVisitor class to parse C programs.

The programs contain certain compiler specific macros like using, eg, asm, interrupt, __a0 and so on.
Is there a compiler option in clang to ignore this Marocs? 
Or this there a way to do the same using libtooling interface?



Note: QAC/ QAC++ offers option to redefine the macro with values like _ignore to remove it's effect during parsing

References Link:

 Section-6.2

Thank you in advance.


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Loading...