<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Sorry, did not respond to the list as well<br>
</p>
<div class="moz-forward-container"><br>
<br>
-------- Weitergeleitete Nachricht --------
<table class="moz-email-headers-table" border="0" cellspacing="0"
cellpadding="0">
<tbody>
<tr>
<th valign="BASELINE" align="RIGHT" nowrap="nowrap">Betreff:
</th>
<td>Re: [cfe-dev] Tool to remove class export macro</td>
</tr>
<tr>
<th valign="BASELINE" align="RIGHT" nowrap="nowrap">Datum: </th>
<td>Thu, 23 Aug 2018 10:02:12 +0200</td>
</tr>
<tr>
<th valign="BASELINE" align="RIGHT" nowrap="nowrap">Von: </th>
<td>Jonas Toth <a class="moz-txt-link-rfc2396E" href="mailto:development@jonas-toth.eu"><development@jonas-toth.eu></a></td>
</tr>
<tr>
<th valign="BASELINE" align="RIGHT" nowrap="nowrap">An: </th>
<td>spsaxena <a class="moz-txt-link-rfc2396E" href="mailto:mail2spsaxena@gmail.com"><mail2spsaxena@gmail.com></a></td>
</tr>
</tbody>
</table>
<br>
<br>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<p>Hi,</p>
<p>take a look at <br>
</p>
<p><a class="moz-txt-link-freetext"
href="https://clang.llvm.org/doxygen/classclang_1_1PPCallbacks.html"
moz-do-not-send="true">https://clang.llvm.org/doxygen/classclang_1_1PPCallbacks.html</a>
<br>
</p>
<p>and <br>
</p>
<p>llvm/tools/clang/tools/extra/clang-tidy/bugprone/MacroParenthesesCheck.cpp</p>
<p>to see how to hook the preprocessor. You can ofc check other
code places that use `PPCallbacks` too.</p>
<p><br>
</p>
<p>This document</p>
<p><a class="moz-txt-link-freetext"
href="https://clang.llvm.org/docs/RAVFrontendAction.html"
moz-do-not-send="true">https://clang.llvm.org/docs/RAVFrontendAction.html</a></p>
<p>might give you some hints too, as the ASTRecursiveVisitor is
somewhat similar to PPCallbacks.</p>
<p><br>
</p>
<p>Best Jonas<br>
</p>
<br>
<div class="moz-cite-prefix">Am 23.08.2018 um 01:11 schrieb
spsaxena via cfe-dev:<br>
</div>
<blockquote type="cite"
cite="mid:CAA96LpMbD72WqQE7GpgEqPaQkokwu27+vB-X3f0ZSjmxPFM8dA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html;
charset=utf-8">
<div dir="ltr">
<div class="gmail_default"
style="font-family:georgia,serif;color:rgb(53,28,117)">Hi</div>
<div class="gmail_default"
style="font-family:georgia,serif;color:rgb(53,28,117)">I am
new to clang tools. I am trying to create a tool that can
help to remove export macros from my exported c++ classes
and apply them to its member functions.</div>
<div class="gmail_default"
style="font-family:georgia,serif;color:rgb(53,28,117)"> </div>
<div class="gmail_default"
style="font-family:georgia,serif;color:rgb(53,28,117)">For
applying to member functions I hooked into VisitFunctionDecl
and updated the functions with DLLExportAttr, however I am
not able to find right place where to hook so that I can
remove export macros from my clasess, so that I can achieve
the following</div>
<div class="gmail_default"
style="font-family:georgia,serif;color:rgb(53,28,117)"><br>
</div>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div class="gmail_default"
style="font-family:georgia,serif;color:rgb(53,28,117)">class
<b>EXPORT</b> classname {</div>
<div class="gmail_default"
style="font-family:georgia,serif;color:rgb(53,28,117)">public:</div>
<div class="gmail_default"
style="font-family:georgia,serif;color:rgb(53,28,117)">void
memFn() {}</div>
<div class="gmail_default"
style="font-family:georgia,serif;color:rgb(53,28,117)">}</div>
</blockquote>
<div class="gmail_default"
style="font-family:georgia,serif;color:rgb(53,28,117)">changed
to</div>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div class="gmail_default"
style="font-family:georgia,serif;color:rgb(53,28,117)">class
classname {</div>
<div class="gmail_default"
style="font-family:georgia,serif;color:rgb(53,28,117)">public:</div>
<div class="gmail_default"
style="font-family:georgia,serif;color:rgb(53,28,117)"><b>EXPORT</b>
void memFn() {}</div>
<div class="gmail_default"
style="font-family:georgia,serif;color:rgb(53,28,117)">}</div>
</blockquote>
<div class="gmail_default"
style="font-family:georgia,serif;color:rgb(53,28,117)"><br>
</div>
<div class="gmail_default"
style="font-family:georgia,serif;color:rgb(53,28,117)">Thanks</div>
<div>
<div class="gmail_default"
style="font-family:georgia,serif;color:rgb(53,28,117)">-sp</div>
<br>
</div>
<div><br>
</div>
<br class="gmail-Apple-interchange-newline">
<div class="gmail_default"
style="font-family:georgia,serif;color:rgb(53,28,117)"> </div>
</div>
<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" moz-do-not-send="true">cfe-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" moz-do-not-send="true">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a>
</pre>
</blockquote>
<br>
</div>
</body>
</html>