Lines Matching refs:Replacement

36   Replacement createReplacement(SourceLocation Start, unsigned Length,
38 return Replacement(Context.Sources, Start, Length, ReplacementText);
47 Replacement Replace(createReplacement(Location, 4, ""));
55 Replacement Replace(createReplacement(Location, 17, ""));
63 Replacement Replace(createReplacement(Location, 0, "result"));
72 Replacement Replace(createReplacement(Location, 12, "x"));
81 Replacement Replace1(createReplacement(Location1, 12, "x\ny\n"));
88 Replacement Replace2(createReplacement(Location2, 1, "f"));
94 Replacement Replace("nonexistent-file.cpp", 0, 1, "");
99 Replacement Replace("/path/to/file.cpp", 0, 1, "");
104 Replacement Replace1(Context.Sources, SourceLocation(), 0, "");
107 Replacement Replace2;
115 Replaces.insert(Replacement(Context.Sources, Context.getLocation(ID, 2, 1),
117 Replaces.insert(Replacement(Context.Sources, Context.getLocation(ID, 3, 1),
129 std::vector<Replacement> Replaces;
130 Replaces.push_back(Replacement(Context.Sources, Context.getLocation(ID, 2, 1),
133 Replacement(Context.Sources, Context.getLocation(ID, 3, 1), 5, "other"));
142 Replaces.insert(Replacement(Context.Sources, Context.getLocation(ID, 2, 1),
144 Replaces.insert(Replacement(Context.Sources, Context.getLocation(ID, 2, 1),
146 Replaces.insert(Replacement(Context.Sources, Context.getLocation(ID, 2, 1),
158 Replaces.insert(Replacement(Context.Sources, Context.getLocation(IDa, 1, 1),
160 Replaces.insert(Replacement(Context.Sources, SourceLocation(),
162 Replaces.insert(Replacement(Context.Sources, Context.getLocation(IDz, 1, 1),
171 Replaces.insert(Replacement("", 0, 1, ""));
172 Replaces.insert(Replacement("", 4, 3, " "));
189 std::vector<Replacement> Replaces;
190 Replaces.push_back(Replacement("", 0, 1, ""));
191 Replaces.push_back(Replacement("", 4, 3, " "));
206 Replaces.insert(Replacement("", 4, 0, "\"\n\""));
216 Replaces.insert(Replacement("", 0, 4, "abcd"));
275 Replaces.insert(Replacement(Context.Sources, Context.getLocation(ID, 2, 1),
327 void expectReplacementAt(const Replacement &Replace,
339 Replace = Replacement(*SM, Record, "");
343 Replacement Replace;
346 TEST(Replacement, CanBeConstructedFromNode) {
352 TEST(Replacement, ReplacesAtSpellingLocation) {
362 Replace = Replacement(*SM, Call, "");
366 Replacement Replace;
369 TEST(Replacement, FunctionCall) {
375 TEST(Replacement, TemplatedFunctionCall) {
389 Replace = Replacement(*SM, &NNSLoc, "", Context->getLangOpts());
396 Replacement Replace;
399 TEST(Replacement, ColonColon) {
422 std::vector<Replacement> Input;
423 Input.push_back(Replacement("fileA", 50, 0, " foo "));
424 Input.push_back(Replacement("fileA", 10, 3, " bar "));
425 Input.push_back(Replacement("fileA", 10, 2, " bar ")); // Length differs
426 Input.push_back(Replacement("fileA", 9, 3, " bar ")); // Offset differs
427 Input.push_back(Replacement("fileA", 50, 0, " foo ")); // Duplicate
428 Input.push_back(Replacement("fileA", 51, 3, " bar "));
429 Input.push_back(Replacement("fileB", 51, 3, " bar ")); // Filename differs!
430 Input.push_back(Replacement("fileB", 60, 1, " bar "));
431 Input.push_back(Replacement("fileA", 60, 2, " bar "));
432 Input.push_back(Replacement("fileA", 51, 3, " moo ")); // Replacement text
435 std::vector<Replacement> Expected;
436 Expected.push_back(Replacement("fileA", 9, 3, " bar "));
437 Expected.push_back(Replacement("fileA", 10, 2, " bar "));
438 Expected.push_back(Replacement("fileA", 10, 3, " bar "));
439 Expected.push_back(Replacement("fileA", 50, 0, " foo "));
440 Expected.push_back(Replacement("fileA", 51, 3, " bar "));
441 Expected.push_back(Replacement("fileA", 51, 3, " moo "));
442 Expected.push_back(Replacement("fileB", 60, 1, " bar "));
443 Expected.push_back(Replacement("fileA", 60, 2, " bar "));
454 std::vector<Replacement> Input;
455 Input.push_back(Replacement("fileA", 0, 5, " foo "));
456 Input.push_back(Replacement("fileA", 0, 5, " foo ")); // Duplicate not a
458 Input.push_back(Replacement("fileA", 2, 6, " bar "));
459 Input.push_back(Replacement("fileA", 7, 3, " moo "));
472 std::vector<Replacement> Input;
476 Input.push_back(Replacement("fileA", 0, 5, " foo ")); // 0
477 Input.push_back(Replacement("fileA", 5, 5, " bar ")); // 1
478 Input.push_back(Replacement("fileA", 6, 0, " bar ")); // 3
479 Input.push_back(Replacement("fileA", 5, 5, " moo ")); // 2
480 Input.push_back(Replacement("fileA", 7, 2, " bar ")); // 4
481 Input.push_back(Replacement("fileA", 15, 5, " golf ")); // 5
482 Input.push_back(Replacement("fileA", 16, 5, " bag ")); // 6
483 Input.push_back(Replacement("fileA", 10, 3, " club ")); // 7
486 // Replacement. #4 ensures #3 hasn't messed up the conflicting range size.
516 for (tooling::Replacement M : Merged)
528 for (tooling::Replacement M : Merged)