<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi,</p>
<p>you can hook the PPCallbacks and do manual processing on the
macros that are defined. If you want to find *ALL* definitions of
the macro in your whole project you need to process all files and
(probably) store the results between multiple calls.</p>
<p>See <a class="moz-txt-link-freetext" href="https://clang.llvm.org/doxygen/classclang_1_1PPCallbacks.html">https://clang.llvm.org/doxygen/classclang_1_1PPCallbacks.html</a></p>
<p>Best Jonas<br>
</p>
<br>
<div class="moz-cite-prefix">Am 19.10.2018 um 10:30 schrieb Lou Wynn
via cfe-dev:<br>
</div>
<blockquote type="cite"
cite="mid:a0428ac4-df74-7a46-de78-f8e7306d79f6@gmail.com">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<p><font size="+1">Hi,</font></p>
<p><font size="+1">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:<br>
</font></p>
<p><tt><font size="+1">#ifdef X</font></tt></p>
<p><tt><font size="+1">#define F1 zzz</font></tt></p>
<p><tt><font size="+1">#else</font></tt></p>
<p><tt><font size="+1">#define F1 yyy</font></tt></p>
<p><tt><font size="+1">#endif</font></tt></p>
<p><tt><font size="+1">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.<br>
</font></tt></p>
<p><tt><font size="+1">Thanks.</font></tt><br>
</p>
<pre class="moz-signature" cols="72">--
Love,
Lou
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
cfe-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>