<div dir="ltr">Hi all,<div>I'm building a standalone C/C++ source-to-source transformation Clang tool. I'm following Eli Bendersky's blog and examples:</div><div><a href="http://eli.thegreenplace.net/2014/07/29/ast-matchers-and-clang-refactoring-tools">http://eli.thegreenplace.net/2014/07/29/ast-matchers-and-clang-refactoring-tools</a><br></div><div><a href="https://github.com/eliben/llvm-clang-samples/blob/master/src_clang/matchers_replacements.cpp">https://github.com/eliben/llvm-clang-samples/blob/master/src_clang/matchers_replacements.cpp</a><br></div><div><br></div><div>How would the example change had it actually written out the changes with RefactoringTool::applyAllReplacements(). Specifically, that method takes in a Rewriter reference. How do we create a new one? Is it correct to go through the steps to make a new SourceManager and Rewriter? Can two different SourceManager objects which were constructed using the same parameters correctly interpret the same SourceLocation object?</div><div><br></div><div>Thanks,</div><div>Justin</div></div>