[cfe-dev] Fwd: Re: Tool to remove class export macro
Jonas Toth via cfe-dev
cfe-dev at lists.llvm.org
Thu Aug 23 01:02:44 PDT 2018
Sorry, did not respond to the list as well
-------- Weitergeleitete Nachricht --------
Betreff: Re: [cfe-dev] Tool to remove class export macro
Datum: Thu, 23 Aug 2018 10:02:12 +0200
Von: Jonas Toth <development at jonas-toth.eu>
An: spsaxena <mail2spsaxena at gmail.com>
Hi,
take a look at
https://clang.llvm.org/doxygen/classclang_1_1PPCallbacks.html
and
llvm/tools/clang/tools/extra/clang-tidy/bugprone/MacroParenthesesCheck.cpp
to see how to hook the preprocessor. You can ofc check other code places
that use `PPCallbacks` too.
This document
https://clang.llvm.org/docs/RAVFrontendAction.html
might give you some hints too, as the ASTRecursiveVisitor is somewhat
similar to PPCallbacks.
Best Jonas
Am 23.08.2018 um 01:11 schrieb spsaxena via cfe-dev:
> Hi
> 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.
>
> 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
>
> class *EXPORT* classname {
> public:
> void memFn() {}
> }
>
> changed to
>
> class classname {
> public:
> *EXPORT* void memFn() {}
> }
>
>
> Thanks
> -sp
>
>
>
>
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180823/3d4c5327/attachment.html>
More information about the cfe-dev
mailing list