/external/llvm-project/llvm/unittests/Support/ |
D | FormatVariadicTest.cpp | 39 auto Replacements = formatv_object_base::parseFormatString(""); in TEST() local 40 EXPECT_EQ(0U, Replacements.size()); in TEST() 45 auto Replacements = formatv_object_base::parseFormatString(kFormatString); in TEST() local 46 ASSERT_EQ(1U, Replacements.size()); in TEST() 47 EXPECT_EQ(kFormatString, Replacements[0].Spec); in TEST() 48 EXPECT_EQ(ReplacementType::Literal, Replacements[0].Type); in TEST() 53 auto Replacements = formatv_object_base::parseFormatString("{{"); in TEST() local 54 ASSERT_EQ(1u, Replacements.size()); in TEST() 55 EXPECT_EQ("{", Replacements[0].Spec); in TEST() 56 EXPECT_EQ(ReplacementType::Literal, Replacements[0].Type); in TEST() [all …]
|
/external/llvm-project/clang/include/clang/Tooling/Core/ |
D | Replacement.h | 115 /// Only replacements that are in a valid file can be applied. 153 /// e.g. fail applying replacements and replacements conflict. 163 /// replacement in a set of replacements. 193 // replacements, that is causing problem. 196 // An existing replacement in a replacements set that is causing problem. 200 /// Less-than operator between two Replacements. 203 /// Equal-to operator between two Replacements. 206 /// Maintains a set of replacements that are conflict-free. 207 /// Two replacements are considered conflicts if they overlap or have the same 209 class Replacements { [all …]
|
/external/clang/include/clang/Tooling/Core/ |
D | Replacement.h | 109 /// Only replacements that are in a valid file can be applied. 140 /// \brief Less-than operator between two Replacements. 143 /// \brief Equal-to operator between two Replacements. 146 /// \brief A set of Replacements. 148 typedef std::set<Replacement> Replacements; typedef 150 /// \brief Apply all replacements in \p Replaces to the Rewriter \p Rewrite. 155 /// \returns true if all replacements apply. false otherwise. 156 bool applyAllReplacements(const Replacements &Replaces, Rewriter &Rewrite); 158 /// \brief Apply all replacements in \p Replaces to the Rewriter \p Rewrite. 163 /// \returns true if all replacements apply. false otherwise. [all …]
|
/external/llvm-project/clang/unittests/Tooling/ |
D | ReplacementsYamlTest.cpp | 9 // Tests for serialization of Replacements. 24 Doc.Replacements.emplace_back("/path/to/file1.h", 232, 56, "replacement #1"); in TEST() 25 Doc.Replacements.emplace_back("/path/to/file2.h", 301, 2, "replacement #2"); in TEST() 36 "Replacements:\n" in TEST() 53 Doc.Replacements.emplace_back("/path/to/file1.h", 0, 0, "#include <utility>\n"); in TEST() 64 "Replacements:\n" in TEST() 76 "Replacements:\n" in TEST() 90 ASSERT_EQ(2u, DocActual.Replacements.size()); in TEST() 92 ASSERT_EQ("/path/to/file1.h", DocActual.Replacements[0].getFilePath()); in TEST() 93 ASSERT_EQ(232u, DocActual.Replacements[0].getOffset()); in TEST() [all …]
|
/external/webrtc/third_party/abseil-cpp/absl/strings/ |
D | str_replace_test.cc | 83 // The replacements are not recursive. in TEST() 146 std::map<const char *, const char *> replacements; in TEST() local 147 replacements["$who"] = "Bob"; in TEST() 148 replacements["$count"] = "5"; in TEST() 149 replacements["#Noun"] = "Apples"; in TEST() 151 replacements); in TEST() 167 std::map<absl::string_view, absl::string_view> replacements; in TEST() local 168 replacements["$who"] = "Bob"; in TEST() 169 replacements["$count"] = "5"; in TEST() 170 replacements["#Noun"] = "Apples"; in TEST() [all …]
|
D | str_replace.h | 53 // Replaces character sequences within a given string with replacements provided 54 // within an initializer list of key/value pairs. Candidate replacements are 71 replacements); 79 // std::map<const absl::string_view, const absl::string_view> replacements; 80 // replacements["$who"] = "Bob"; 81 // replacements["$count"] = "5"; 82 // replacements["#Noun"] = "Apples"; 85 // replacements); 89 // std::vector<std::pair<const absl::string_view, std::string>> replacements; 90 // replacements.push_back({"&", "&"}); [all …]
|
/external/angle/third_party/abseil-cpp/absl/strings/ |
D | str_replace_test.cc | 83 // The replacements are not recursive. in TEST() 146 std::map<const char *, const char *> replacements; in TEST() local 147 replacements["$who"] = "Bob"; in TEST() 148 replacements["$count"] = "5"; in TEST() 149 replacements["#Noun"] = "Apples"; in TEST() 151 replacements); in TEST() 167 std::map<absl::string_view, absl::string_view> replacements; in TEST() local 168 replacements["$who"] = "Bob"; in TEST() 169 replacements["$count"] = "5"; in TEST() 170 replacements["#Noun"] = "Apples"; in TEST() [all …]
|
D | str_replace.h | 53 // Replaces character sequences within a given string with replacements provided 54 // within an initializer list of key/value pairs. Candidate replacements are 71 replacements); 79 // std::map<const absl::string_view, const absl::string_view> replacements; 80 // replacements["$who"] = "Bob"; 81 // replacements["$count"] = "5"; 82 // replacements["#Noun"] = "Apples"; 85 // replacements); 89 // std::vector<std::pair<const absl::string_view, std::string>> replacements; 90 // replacements.push_back({"&", "&"}); [all …]
|
/external/abseil-cpp/absl/strings/ |
D | str_replace_test.cc | 83 // The replacements are not recursive. in TEST() 146 std::map<const char *, const char *> replacements; in TEST() local 147 replacements["$who"] = "Bob"; in TEST() 148 replacements["$count"] = "5"; in TEST() 149 replacements["#Noun"] = "Apples"; in TEST() 151 replacements); in TEST() 167 std::map<absl::string_view, absl::string_view> replacements; in TEST() local 168 replacements["$who"] = "Bob"; in TEST() 169 replacements["$count"] = "5"; in TEST() 170 replacements["#Noun"] = "Apples"; in TEST() [all …]
|
D | str_replace.h | 53 // Replaces character sequences within a given string with replacements provided 54 // within an initializer list of key/value pairs. Candidate replacements are 71 replacements); 79 // std::map<const absl::string_view, const absl::string_view> replacements; 80 // replacements["$who"] = "Bob"; 81 // replacements["$count"] = "5"; 82 // replacements["#Noun"] = "Apples"; 85 // replacements); 89 // std::vector<std::pair<const absl::string_view, std::string>> replacements; 90 // replacements.push_back({"&", "&"}); [all …]
|
/external/rust/crates/grpcio-sys/grpc/third_party/abseil-cpp/absl/strings/ |
D | str_replace_test.cc | 83 // The replacements are not recursive. in TEST() 146 std::map<const char *, const char *> replacements; in TEST() local 147 replacements["$who"] = "Bob"; in TEST() 148 replacements["$count"] = "5"; in TEST() 149 replacements["#Noun"] = "Apples"; in TEST() 151 replacements); in TEST() 167 std::map<absl::string_view, absl::string_view> replacements; in TEST() local 168 replacements["$who"] = "Bob"; in TEST() 169 replacements["$count"] = "5"; in TEST() 170 replacements["#Noun"] = "Apples"; in TEST() [all …]
|
D | str_replace.h | 53 // Replaces character sequences within a given string with replacements provided 54 // within an initializer list of key/value pairs. Candidate replacements are 71 replacements); 79 // std::map<const absl::string_view, const absl::string_view> replacements; 80 // replacements["$who"] = "Bob"; 81 // replacements["$count"] = "5"; 82 // replacements["#Noun"] = "Apples"; 85 // replacements); 89 // std::vector<std::pair<const absl::string_view, std::string>> replacements; 90 // replacements.push_back({"&", "&"}); [all …]
|
/external/openscreen/third_party/abseil/src/absl/strings/ |
D | str_replace_test.cc | 83 // The replacements are not recursive. in TEST() 146 std::map<const char *, const char *> replacements; in TEST() local 147 replacements["$who"] = "Bob"; in TEST() 148 replacements["$count"] = "5"; in TEST() 149 replacements["#Noun"] = "Apples"; in TEST() 151 replacements); in TEST() 167 std::map<absl::string_view, absl::string_view> replacements; in TEST() local 168 replacements["$who"] = "Bob"; in TEST() 169 replacements["$count"] = "5"; in TEST() 170 replacements["#Noun"] = "Apples"; in TEST() [all …]
|
D | str_replace.h | 53 // Replaces character sequences within a given string with replacements provided 54 // within an initializer list of key/value pairs. Candidate replacements are 71 replacements); 79 // std::map<const absl::string_view, const absl::string_view> replacements; 80 // replacements["$who"] = "Bob"; 81 // replacements["$count"] = "5"; 82 // replacements["#Noun"] = "Apples"; 85 // replacements); 89 // std::vector<std::pair<const absl::string_view, std::string>> replacements; 90 // replacements.push_back({"&", "&"}); [all …]
|
/external/libtextclassifier/abseil-cpp/absl/strings/ |
D | str_replace_test.cc | 83 // The replacements are not recursive. in TEST() 146 std::map<const char *, const char *> replacements; in TEST() local 147 replacements["$who"] = "Bob"; in TEST() 148 replacements["$count"] = "5"; in TEST() 149 replacements["#Noun"] = "Apples"; in TEST() 151 replacements); in TEST() 167 std::map<absl::string_view, absl::string_view> replacements; in TEST() local 168 replacements["$who"] = "Bob"; in TEST() 169 replacements["$count"] = "5"; in TEST() 170 replacements["#Noun"] = "Apples"; in TEST() [all …]
|
D | str_replace.h | 53 // Replaces character sequences within a given string with replacements provided 54 // within an initializer list of key/value pairs. Candidate replacements are 71 replacements); 79 // std::map<const absl::string_view, const absl::string_view> replacements; 80 // replacements["$who"] = "Bob"; 81 // replacements["$count"] = "5"; 82 // replacements["#Noun"] = "Apples"; 85 // replacements); 89 // std::vector<std::pair<const absl::string_view, std::string>> replacements; 90 // replacements.push_back({"&", "&"}); [all …]
|
/external/clang/unittests/Tooling/ |
D | ReplacementsYamlTest.cpp | 10 // Tests for serialization of Replacements. 26 Doc.Replacements in TEST() 28 Doc.Replacements in TEST() 41 "Replacements: \n" // Extra whitespace here! in TEST() 58 "Replacements:\n" in TEST() 72 ASSERT_EQ(2u, DocActual.Replacements.size()); in TEST() 75 ASSERT_EQ("/path/to/file1.h", DocActual.Replacements[0].getFilePath()); in TEST() 76 ASSERT_EQ(232u, DocActual.Replacements[0].getOffset()); in TEST() 77 ASSERT_EQ(56u, DocActual.Replacements[0].getLength()); in TEST() 78 ASSERT_EQ("replacement #1", DocActual.Replacements[0].getReplacementText()); in TEST() [all …]
|
/external/cldr/tools/java/org/unicode/cldr/util/ |
D | FileCopier.java | 19 …* Copy the contents of the reader to the Writer, performing all the replacements specified in the … 22 * @param replacements 26 …public static void copyAndReplace(Reader rdr, Map<String, String> replacements, Writer out) throws… in copyAndReplace() argument 27 if (replacements == null || replacements.isEmpty()) { in copyAndReplace() 35 for (String key : replacements.keySet()) { in copyAndReplace() 37 line = line.replaceAll(key, replacements.get(key)); in copyAndReplace() 49 * flushed and left open. The replacements as specified in the Map will be performed. 53 * @param replacements 57 …oid copyAndReplace(Class<?> cls, String srcFile, Charset charSet, Map<String, String> replacements, in copyAndReplace() argument 59 …opyAndReplace(new InputStreamReader(cls.getResourceAsStream(srcFile), charSet), replacements, out); in copyAndReplace() [all …]
|
/external/llvm-project/clang/lib/Tooling/Refactoring/ |
D | AtomicChange.cpp | 26 // This converts AtomicChange's internal implementation of the replacements 27 // set to a vector of replacements. 61 Io.mapRequired("Replacements", Doc.Replaces); in mapping() 76 Io.mapRequired("Replacements", Keys->Replaces); in mapping() 109 const clang::tooling::Replacements &Replaces) { in getRangesForFormating() 114 // This works assuming that replacements are ordered by offset. in getRangesForFormating() 142 // Creates replacements for inserting/deleting #include headers. 143 llvm::Expected<Replacements> 147 // Create header insertion/deletion replacements to be cleaned up in createReplacementsForHeaders() 148 // (i.e. converted to real insertion/deletion replacements). in createReplacementsForHeaders() [all …]
|
/external/llvm-project/clang/lib/Tooling/Core/ |
D | Replacement.cpp | 157 Replacements::getReplacementInChangedCode(const Replacement &R) const { in getReplacementInChangedCode() 170 "existing replacements"; in getReplacementErrString() 191 Replacements Replacements::getCanonicalReplacements() const { in getCanonicalReplacements() 193 // Merge adjacent replacements. in getCanonicalReplacements() 205 "Existing replacements must not overlap."); in getCanonicalReplacements() 213 return Replacements(NewReplacesImpl.begin(), NewReplacesImpl.end()); in getCanonicalReplacements() 217 // has the same effect, so we need to compare replacements associated to 219 llvm::Expected<Replacements> 220 Replacements::mergeIfOrderIndependent(const Replacement &R) const { in mergeIfOrderIndependent() 221 Replacements Rs(R); in mergeIfOrderIndependent() [all …]
|
/external/clang/include/clang/Tooling/ |
D | Refactoring.h | 35 /// passed to run() and runAndSave() should add replacements to 45 /// \brief Returns the set of replacements to which replacements should 47 Replacements &getReplacements(); 49 /// \brief Call run(), apply all generated replacements, and immediately save 55 /// \brief Apply all stored replacements to the given Rewriter. 60 /// \returns true if all replacements apply. false otherwise. 68 Replacements Replace; 72 /// Replacements on the related file in \p Rewriter. In addition to applying 73 /// given Replacements, this function also formats the changed code. 75 /// \pre Replacements must be conflict-free. [all …]
|
/external/llvm-project/clang/include/clang/Tooling/ |
D | Refactoring.h | 35 /// passed to run() and runAndSave() should add replacements to 45 /// Returns the file path to replacements map to which replacements 47 std::map<std::string, Replacements> &getReplacements(); 49 /// Call run(), apply all generated replacements, and immediately save 55 /// Apply all stored replacements to the given Rewriter. 63 /// \returns true if all replacements apply. false otherwise. 71 std::map<std::string, Replacements> FileToReplaces; 75 /// Replacements on the related file in \p Rewriter. In addition to applying 76 /// given Replacements, this function also formats the changed code. 78 /// \pre Replacements must be conflict-free. [all …]
|
/external/swiftshader/src/OpenGL/compiler/preprocessor/ |
D | MacroExpander.cpp | 232 assert(context->replacements[context->index] == token); in ungetToken() 259 std::vector<Token> replacements; in pushMacro() local 260 if (!expandMacro(*macro, identifier, &replacements)) in pushMacro() 268 context->replacements.swap(replacements); in pushMacro() 270 mTotalTokensInContexts += context->replacements.size(); in pushMacro() 293 mTotalTokensInContexts -= context->replacements.size(); in popMacro() 299 std::vector<Token> *replacements) in expandMacro() argument 301 replacements->clear(); in expandMacro() 310 replacements->assign(macro.replacements.begin(), macro.replacements.end()); in expandMacro() 317 assert(replacements->size() == 1); in expandMacro() [all …]
|
/external/angle/src/compiler/preprocessor/ |
D | MacroExpander.cpp | 226 ASSERT(context->replacements[context->index] == token); in ungetToken() 253 std::vector<Token> replacements; in pushMacro() local 254 if (!expandMacro(*macro, identifier, &replacements)) in pushMacro() 262 context->replacements.swap(replacements); in pushMacro() 264 mTotalTokensInContexts += context->replacements.size(); in pushMacro() 287 mTotalTokensInContexts -= context->replacements.size(); in popMacro() 293 std::vector<Token> *replacements) in expandMacro() argument 295 replacements->clear(); in expandMacro() 304 replacements->assign(macro.replacements.begin(), macro.replacements.end()); in expandMacro() 311 ASSERT(replacements->size() == 1); in expandMacro() [all …]
|
/external/tensorflow/tensorflow/python/autograph/pyct/ |
D | templates.py | 111 def __init__(self, replacements): argument 115 replacements: A mapping from placeholder names to (lists of) AST nodes 118 self.replacements = replacements 138 repl = self.replacements[key] 155 if node.arg not in self.replacements: 174 if node.name not in self.replacements: 177 repl = self.replacements[node.name] 187 if node.attr not in self.replacements: 190 repl = self.replacements[node.attr] 198 if node.id not in self.replacements: [all …]
|