Lines Matching full:rewrite
19 #include "clang/Rewrite/Core/Rewriter.h"
50 bool Replacement::apply(Rewriter &Rewrite) const {
51 SourceManager &SM = Rewrite.getSourceMgr();
69 bool RewriteSucceeded = !Rewrite.ReplaceText(
126 bool applyAllReplacements(const Replacements &Replaces, Rewriter &Rewrite) {
132 Result = I->apply(Rewrite) && Result;
148 Rewriter Rewrite(SourceMgr, LangOptions());
159 if (!Replace.apply(Rewrite))
164 Rewrite.getEditBuffer(ID).write(OS);
200 Rewriter Rewrite(Sources, DefaultLangOptions);
202 if (!applyAllReplacements(Rewrite)) {
206 return saveRewrittenFiles(Rewrite);
209 bool RefactoringTool::applyAllReplacements(Rewriter &Rewrite) {
210 return tooling::applyAllReplacements(Replace, Rewrite);
213 int RefactoringTool::saveRewrittenFiles(Rewriter &Rewrite) {
214 for (Rewriter::buffer_iterator I = Rewrite.buffer_begin(),
215 E = Rewrite.buffer_end();
221 Rewrite.getSourceMgr().getFileEntryForID(I->first);