[cfe-dev] Identify macros that end with while(0)
Himanshu via cfe-dev
cfe-dev at lists.llvm.org
Mon Aug 1 13:23:58 PDT 2016
Hi all,
I want to use rewrite.InsertTextAfter (...) to inject certain function
calls at the end of statements. However, the presence of macros of the
form:
#define macro do { \
.. \
} \
while(0) \
causes problems because I can't use the function call insertion as: ",
addedFunction()".
Is there a way I can identify that a source location is end of such a macro
that ends with while(0)?
Thanks!
--
Himanshu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160801/6d32601c/attachment.html>
More information about the cfe-dev
mailing list