how to clang Replacements

Hi *,
I am working on a tool allowing to modify C++ source code (refactoring). I read in [1] that RefactoringTools is not the best choice in terms of performance, my codebase is quite huge. So I ended up with an implementation leveraging on clang Replacements, w/o RefactoringTools.
I have read code in [2] to figure out how to use such Replacements in ClangTool but I didn’t get so much.
Could anyone point me out an example of how to use Replacements to rewrite/insert code (i.e., adding an include line at the beginning) without leveraging on RefactoringTool? I posted my demo code here [3]

thank you and happy hacking!