I have an existing and working source-to-source code modification tool using libtooling (written in C++). Now I want to integrate this tool into clang, so users can compile the modified source code without actually saving it somewhere. The modification part isn't problematic, Matchers + Rewriters work the same way with clang, my problem is how to tell the compiler to reparse the source code after my changes.
Asked
Active
Viewed 58 times
0
-
As already suggested in a [comment](https://stackoverflow.com/questions/73619739/clang-how-to-compile-modified-source#comment130004377_73619739) to your previous (now deleted) [question](https://stackoverflow.com/questions/73619739/clang-how-to-compile-modified-source), why can't you simply pipe the new source to the standard input of a clang process? – G.M. Sep 08 '22 at 08:16
-
@G.M. as written in previous question, I wish to do it using clang API (not the clang binary) . Thanks for the offer though. – D_D Sep 08 '22 at 11:38