<div dir="ltr">I'd look at how things like the Sanitizers are implemented - as modifications during Clang's IR Generation step.<br><br>I'm not sure there are plugin extensibility points (or whether there could ever reasonably enough such extensibility points to make that worthwhile) - but when it comes to outright modifying the Clang source code, the Sanitizers should give you some sense of where/how one might do that.<br><br>- Dave</div><br><div class="gmail_quote"><div dir="ltr">On Tue, Nov 14, 2017 at 7:59 PM Phil Bouchard via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Greetings,<br>
<br>
Clang is pretty impressive but I was wondering what is the best way to<br>
inject code in an existing source file?<br>
<br>
I would like to add parameters to all function declarations, function<br>
calls, base classes and each compound statement.<br>
<br>
<br>
Regards,<br>
-Phil<br>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div>