Lines Matching +full:node +full:- +full:version
1 //===--- RefactoringCallbacks.cpp - Structural query framework ------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
10 //===----------------------------------------------------------------------===//
44 // The ASTMatchRefactorer is re-used between translation units. in HandleTranslationUnit()
47 Callback->getReplacements().clear(); in HandleTranslationUnit()
51 for (const auto &Replacement : Callback->getReplacements()) { in HandleTranslationUnit()
93 CharSourceRange::getTokenRange(FromMatch->getSourceRange()), ToText)); in run()
95 // release version. in run()
114 // release version. in run()
128 if (const IfStmt *Node = Result.Nodes.getNodeAs<IfStmt>(Id)) { in run() local
129 const Stmt *Body = PickTrueBranch ? Node->getThen() : Node->getElse(); in run()
132 Replace.add(replaceStmtWithStmt(*Result.SourceManager, *Node, *Body)); in run()
134 // release version. in run()
140 // If we want to use the 'else'-branch, but it doesn't exist, delete in run()
143 Replace.add(replaceStmtWithText(*Result.SourceManager, *Node, "")); in run()
145 // release version. in run()
176 ToTemplate.substr(Index + 2, EndOfIdentifier - Index - 2)); in create()
190 std::string(ToTemplate.substr(Index, NextIndex - Index))}); in create()
211 llvm::errs() << "Node " << Element.Value in run()
213 llvm::report_fatal_error("Unbound node in replacement template."); in run()
216 CharSourceRange::getTokenRange(NodeIter->second.getSourceRange()); in run()
218 Result.Context->getLangOpts()); in run()
224 llvm::errs() << "Node to be replaced " << FromId in run()
226 llvm::report_fatal_error("FromId node not bound in MatchResult"); in run()
230 Result.Context->getLangOpts()); in run()