Home
last modified time | relevance | path

Searched refs:Replacements (Results 1 – 25 of 54) sorted by relevance

123

/external/swiftshader/third_party/llvm-7.0/llvm/unittests/Support/
DFormatVariadicTest.cpp40 auto Replacements = formatv_object_base::parseFormatString(""); in TEST() local
41 EXPECT_EQ(0U, Replacements.size()); in TEST()
46 auto Replacements = formatv_object_base::parseFormatString(kFormatString); in TEST() local
47 ASSERT_EQ(1U, Replacements.size()); in TEST()
48 EXPECT_EQ(kFormatString, Replacements[0].Spec); in TEST()
49 EXPECT_EQ(ReplacementType::Literal, Replacements[0].Type); in TEST()
54 auto Replacements = formatv_object_base::parseFormatString("{{"); in TEST() local
55 ASSERT_EQ(1u, Replacements.size()); in TEST()
56 EXPECT_EQ("{", Replacements[0].Spec); in TEST()
57 EXPECT_EQ(ReplacementType::Literal, Replacements[0].Type); in TEST()
[all …]
/external/clang/unittests/Tooling/
DReplacementsYamlTest.cpp26 Doc.Replacements in TEST()
28 Doc.Replacements 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()
79 ASSERT_EQ("/path/to/file2.h", DocActual.Replacements[1].getFilePath()); in TEST()
80 ASSERT_EQ(301u, DocActual.Replacements[1].getOffset()); in TEST()
81 ASSERT_EQ(2u, DocActual.Replacements[1].getLength()); in TEST()
[all …]
DRefactoringTest.cpp115 Replacements Replaces; in TEST_F()
142 Replacements Replaces; in TEST_F()
158 Replacements Replaces; in TEST_F()
186 tooling::Replacements Replaces; in TEST_F()
204 Replacements Replaces; in TEST()
239 Replacements Replaces; in TEST()
248 Replacements Replaces; in TEST()
308 Replacements Replaces; in TEST_F()
458 Replacements Replaces; in TEST()
474 Replacements Replaces = {Replacement("foo", 0, 2, "1234")}; in TEST()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/IPO/
DConstantMerge.cpp104 SmallVector<std::pair<GlobalVariable*, GlobalVariable*>, 32> Replacements; in mergeConstants() local
192 Replacements.push_back(std::make_pair(GV, Slot)); in mergeConstants()
195 if (Replacements.empty()) in mergeConstants()
202 for (unsigned i = 0, e = Replacements.size(); i != e; ++i) { in mergeConstants()
204 if (Replacements[i].first->getAlignment() || in mergeConstants()
205 Replacements[i].second->getAlignment()) { in mergeConstants()
206 Replacements[i].second->setAlignment( in mergeConstants()
207 std::max(getAlignment(Replacements[i].first), in mergeConstants()
208 getAlignment(Replacements[i].second))); in mergeConstants()
211 copyDebugLocMetadata(Replacements[i].first, Replacements[i].second); in mergeConstants()
[all …]
/external/swiftshader/third_party/LLVM/lib/Transforms/IPO/
DConstantMerge.cpp114 SmallVector<std::pair<GlobalVariable*, GlobalVariable*>, 32> Replacements; in runOnModule() local
192 Replacements.push_back(std::make_pair(GV, Slot)); in runOnModule()
195 if (Replacements.empty()) in runOnModule()
202 for (unsigned i = 0, e = Replacements.size(); i != e; ++i) { in runOnModule()
204 if (Replacements[i].first->getAlignment() || in runOnModule()
205 Replacements[i].second->getAlignment()) { in runOnModule()
206 Replacements[i].second->setAlignment(std::max( in runOnModule()
207 Replacements[i].first->getAlignment(), in runOnModule()
208 Replacements[i].second->getAlignment())); in runOnModule()
212 Replacements[i].first->replaceAllUsesWith(Replacements[i].second); in runOnModule()
[all …]
/external/llvm/lib/Transforms/IPO/
DConstantMerge.cpp80 SmallVector<std::pair<GlobalVariable*, GlobalVariable*>, 32> Replacements; in mergeConstants() local
162 Replacements.push_back(std::make_pair(GV, Slot)); in mergeConstants()
165 if (Replacements.empty()) in mergeConstants()
172 for (unsigned i = 0, e = Replacements.size(); i != e; ++i) { in mergeConstants()
174 if (Replacements[i].first->getAlignment() || in mergeConstants()
175 Replacements[i].second->getAlignment()) { in mergeConstants()
176 Replacements[i].second->setAlignment( in mergeConstants()
177 std::max(getAlignment(Replacements[i].first), in mergeConstants()
178 getAlignment(Replacements[i].second))); in mergeConstants()
182 Replacements[i].first->replaceAllUsesWith(Replacements[i].second); in mergeConstants()
[all …]
/external/clang/unittests/Format/
DCleanupTest.cpp26 tooling::Replacements Replaces = format::cleanup(Style, Code, Ranges); in cleanup()
256 const tooling::Replacements Replaces) { in apply()
266 const tooling::Replacements Replaces) { in formatAndApply()
307 tooling::Replacements Replaces = { in TEST_F()
318 tooling::Replacements Replaces = {createInsertion("#include \"a.h\"")}; in TEST_F()
335 tooling::Replacements Replaces = {createInsertion("#include \"b.h\"")}; in TEST_F()
360 tooling::Replacements Replaces = {createInsertion("#include \"a.h\"")}; in TEST_F()
372 tooling::Replacements Replaces = {createInsertion("#include <a>")}; in TEST_F()
385 tooling::Replacements Replaces = {createInsertion("#include \"z.h\"")}; in TEST_F()
397 tooling::Replacements Replaces = {createInsertion("#include \"z.h\"")}; in TEST_F()
[all …]
/external/clang/include/clang/Tooling/Core/
DReplacement.h148 typedef std::set<Replacement> Replacements; typedef
156 bool applyAllReplacements(const Replacements &Replaces, Rewriter &Rewrite);
175 const Replacements &Replaces);
179 unsigned shiftedCodePosition(const Replacements& Replaces, unsigned Position);
208 std::vector<Replacement> Replacements; member
217 std::vector<Range> calculateChangedRanges(const Replacements &Replaces);
228 calculateRangesAfterReplacements(const Replacements &Replaces,
233 std::map<std::string, Replacements>
234 groupReplacementsByFile(const Replacements &Replaces);
239 Replacements mergeReplacements(const Replacements &First,
[all …]
/external/v8/tools/clang/empty_string/
DEmptyStringConverter.cpp23 using clang::tooling::Replacements;
32 ConstructorCallback(Replacements* replacements) in ConstructorCallback()
38 Replacements* const replacements_;
45 InitializerCallback(Replacements* replacements) in InitializerCallback()
51 Replacements* const replacements_;
59 TemporaryCallback(Replacements* replacements) : replacements_(replacements) {} in TemporaryCallback()
64 Replacements* const replacements_;
69 explicit EmptyStringConverter(Replacements* replacements) in EmptyStringConverter()
171 Replacements replacements; in main()
/external/clang/lib/Tooling/Core/
DReplacement.cpp158 unsigned shiftedCodePosition(const Replacements &Replaces, unsigned Position) { in shiftedCodePosition()
221 bool applyAllReplacements(const Replacements &Replaces, Rewriter &Rewrite) { in applyAllReplacements()
223 for (Replacements::const_iterator I = Replaces.begin(), in applyAllReplacements()
253 const Replacements &Replaces) { in applyAllReplacements()
269 for (Replacements::const_iterator I = Replaces.begin(), E = Replaces.end(); in applyAllReplacements()
309 std::vector<Range> calculateChangedRanges(const Replacements &Replaces) { in calculateChangedRanges()
322 calculateRangesAfterReplacements(const Replacements &Replaces, in calculateRangesAfterReplacements()
325 tooling::Replacements FakeReplaces; in calculateRangesAfterReplacements()
330 tooling::Replacements NewReplaces = mergeReplacements(FakeReplaces, Replaces); in calculateRangesAfterReplacements()
430 std::map<std::string, Replacements>
[all …]
/external/v8/tools/clang/rewrite_scoped_refptr/
DRewriteScopedRefptr.cpp30 using clang::tooling::Replacements;
159 explicit GetRewriterCallback(Replacements* replacements) in GetRewriterCallback()
164 Replacements* const replacements_;
177 explicit VarRewriterCallback(Replacements* replacements) in VarRewriterCallback()
182 Replacements* const replacements_;
211 explicit FunctionRewriterCallback(Replacements* replacements) in FunctionRewriterCallback()
216 Replacements* const replacements_;
244 explicit MacroRewriterCallback(Replacements* replacements) in MacroRewriterCallback()
249 Replacements* const replacements_;
275 Replacements replacements; in main()
/external/clang/include/clang/Format/
DFormat.h767 tooling::Replacements sortIncludes(const FormatStyle &Style, StringRef Code,
775 llvm::Expected<tooling::Replacements>
776 formatReplacements(StringRef Code, const tooling::Replacements &Replaces,
784 llvm::Expected<tooling::Replacements>
785 cleanupAroundReplacements(StringRef Code, const tooling::Replacements &Replaces,
800 tooling::Replacements reformat(const FormatStyle &Style,
808 tooling::Replacements reformat(const FormatStyle &Style, StringRef Code,
817 tooling::Replacements cleanup(const FormatStyle &Style,
825 tooling::Replacements cleanup(const FormatStyle &Style, StringRef Code,
/external/clang/include/clang/Tooling/
DRefactoring.h47 Replacements &getReplacements();
68 Replacements Replace;
86 bool formatAndApplyAllReplacements(const Replacements &Replaces,
DRefactoringCallbacks.h44 Replacements &getReplacements();
47 Replacements Replace;
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/WebAssembly/
DWebAssemblyAddMissingPrototypes.cpp65 std::vector<std::pair<Function*, Function*>> Replacements; in runOnModule() local
123 Replacements.emplace_back(&F, NewF); in runOnModule()
136 for (auto &Pair : Replacements) { in runOnModule()
143 return !Replacements.empty(); in runOnModule()
/external/clang/lib/Format/
DFormat.cpp800 tooling::Replacements
803 FormatTokenLexer &Tokens, tooling::Replacements &Result) override { in analyze()
835 tooling::Replacements &Result) { in requoteJSStringLiteral()
991 tooling::Replacements
994 FormatTokenLexer &Tokens, tooling::Replacements &Result) override { in analyze()
1149 tooling::Replacements generateFixes() { in generateFixes()
1150 tooling::Replacements Fixes; in generateFixes()
1219 tooling::Replacements &Replaces, unsigned *Cursor) { in sortCppIncludes()
1323 tooling::Replacements sortCppIncludes(const FormatStyle &Style, StringRef Code, in sortCppIncludes()
1326 tooling::Replacements &Replaces, in sortCppIncludes()
[all …]
DTokenAnalyzer.cpp91 tooling::Replacements TokenAnalyzer::process() { in process()
92 tooling::Replacements Result; in process()
109 tooling::Replacements RunResult = in process()
114 for (tooling::Replacements::iterator I = RunResult.begin(), in process()
DTokenAnalyzer.h84 tooling::Replacements process();
87 virtual tooling::Replacements
90 FormatTokenLexer &Tokens, tooling::Replacements &Result) = 0;
/external/v8/tools/clang/pass_to_move/
DPassToMove.cpp26 using clang::tooling::Replacements;
33 explicit RewriterCallback(Replacements* replacements) in RewriterCallback()
38 Replacements* const replacements_;
86 Replacements replacements; in main()
/external/swiftshader/third_party/llvm-7.0/llvm/include/llvm/Support/
DFormatVariadic.h83 std::vector<ReplacementItem> Replacements; variable
93 : Fmt(Fmt), Replacements(parseFormatString(Fmt)) { in formatv_object_base()
102 Replacements(std::move(rhs.Replacements)) { in formatv_object_base()
107 for (auto &R : Replacements) { in format()
/external/v8/tools/clang/base_bind_rewriters/
DBaseBindRewriters.cpp26 using Replacements = std::vector<clang::tooling::Replacement>; typedef
64 explicit PassedToMoveRewriter(Replacements* replacements) in PassedToMoveRewriter()
131 Replacements* replacements_;
146 explicit BindOnceRewriter(Replacements* replacements) in BindOnceRewriter()
178 Replacements* replacements_;
194 explicit PassByValueRewriter(Replacements* replacements) in PassByValueRewriter()
226 Replacements* replacements_;
244 explicit AddStdMoveRewriter(Replacements* replacements) in AddStdMoveRewriter()
576 Replacements* replacements_;
595 explicit AdaptCallbackForRepeatingRewriter(Replacements* replacements) in AdaptCallbackForRepeatingRewriter()
[all …]
/external/swiftshader/src/OpenGL/compiler/preprocessor/
DMacro.h36 typedef std::vector<Token> Replacements; typedef
49 Replacements replacements;
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Support/
DFormatVariadic.cpp146 std::vector<ReplacementItem> Replacements; in parseFormatString() local
151 Replacements.push_back(I); in parseFormatString()
153 return Replacements; in parseFormatString()
/external/swiftshader/third_party/llvm-subzero/include/llvm/Support/
DFormatVariadic.h83 std::vector<ReplacementItem> Replacements; variable
93 : Fmt(Fmt), Replacements(parseFormatString(Fmt)) { in formatv_object_base()
98 for (auto &R : Replacements) { in format()
/external/clang/lib/Tooling/
DRefactoring.cpp34 Replacements &RefactoringTool::getReplacements() { return Replace; } in getReplacements()
65 bool formatAndApplyAllReplacements(const Replacements &Replaces, in formatAndApplyAllReplacements()

123