[cfe-dev] getting all definitions of a macro identifer?

Lou Wynn via cfe-dev cfe-dev at lists.llvm.org
Fri Oct 19 01:30:28 PDT 2018


I have a question about getting macro definitions when using Clang's 
libraries. In analyzing code statically, we'd like to get all 
definitions of a macro identifier regardless of its actual value passed 
in. For instance, for the following macro:

#ifdef X

#define F1 zzz


#define F1 yyy


We'd like to get F1's all substitutions (zzz and yyy) no matter what 
value of X is provided. What's the best method to do it? I'm afraid that 
using the Preprocessor library is or isn't enough.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20181019/975e473e/attachment.html>

More information about the cfe-dev mailing list