[cfe-dev] Custom Pragmas Clang Tools

Marcos Horro Varela via cfe-dev cfe-dev at lists.llvm.org
Sat Dec 28 15:32:21 PST 2019


Hello,

I have been reading some articles [1, 2] regarding how to implement handlers for custom pragmas. Nonetheless, in those posts Clang source code has to be modified. I am developing an Clang tool out-of-tree, so I do not want to make a custom version of Clang. I was just wondering if it is possible to build a custom handler for pragmas out-of-tree or if I have to tackle another approach maybe using annotations (?) or any other workaround? Basically I want to use pragmas for indicating loops of interest for the tool in C/C++ code.
Thanks!

Regards,

[1] https://blog.quarkslab.com/implementing-a-custom-directive-handler-in-clang.html<https://link.getmailspring.com/link/AAB82B1F-FE00-441D-AB6D-20AADFCB8B2D@getmailspring.com/0?redirect=https%3A%2F%2Fblog.quarkslab.com%2Fimplementing-a-custom-directive-handler-in-clang.html&recipient=Y2ZlLWRldkBsaXN0cy5sbHZtLm9yZw%3D%3D>
[2] https://git.scc.kit.edu/CES/clang-custom-pragma<https://link.getmailspring.com/link/AAB82B1F-FE00-441D-AB6D-20AADFCB8B2D@getmailspring.com/1?redirect=https%3A%2F%2Fgit.scc.kit.edu%2FCES%2Fclang-custom-pragma&recipient=Y2ZlLWRldkBsaXN0cy5sbHZtLm9yZw%3D%3D>

H.
http://gac.udc.es/~horro<https://link.getmailspring.com/link/AAB82B1F-FE00-441D-AB6D-20AADFCB8B2D@getmailspring.com/2?redirect=http%3A%2F%2Fgac.udc.es%2F~horro&recipient=Y2ZlLWRldkBsaXN0cy5sbHZtLm9yZw%3D%3D>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20191228/1f326608/attachment-0006.html>


More information about the cfe-dev mailing list