Lines Matching full:results

54 bool isMutated(const SmallVectorImpl<BoundNodes> &Results, ASTUnit *AST) {
55 const auto *const S = selectFirst<Stmt>("stmt", Results);
56 const auto *const E = selectFirst<Expr>("expr", Results);
61 bool isDeclMutated(const SmallVectorImpl<BoundNodes> &Results, ASTUnit *AST) {
62 const auto *const S = selectFirst<Stmt>("stmt", Results);
63 const auto *const D = selectFirst<Decl>("decl", Results);
69 mutatedBy(const SmallVectorImpl<BoundNodes> &Results, ASTUnit *AST) {
70 const auto *const S = selectFirst<Stmt>("stmt", Results);
74 for (const auto *E = selectFirst<Expr>("expr", Results); E != nullptr;) {
118 const auto Results =
120 EXPECT_FALSE(isMutated(Results, AST.get()));
135 const auto Results =
137 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre(ModExpr));
144 const auto Results =
146 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre(ModExpr));
154 const auto Results =
156 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre(ModExpr));
165 const auto Results =
167 EXPECT_FALSE(isMutated(Results, AST.get()));
175 const auto Results =
177 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre(ModExpr));
187 const auto Results =
189 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre(ModExpr));
198 const auto Results =
200 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre(ModExpr));
208 const auto Results =
210 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre(ModExpr));
226 const auto Results =
228 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("b", "b.nonconst()"));
236 const auto Results =
238 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre(ModExpr));
250 const auto Results =
252 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("x.mf()"));
260 auto Results =
262 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("x.mf<T>()"));
266 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
267 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("x.mf()"));
273 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
274 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("x.mf()"));
280 const auto Results =
282 EXPECT_FALSE(isMutated(Results, AST.get()));
290 const auto Results =
292 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("x.push_back(T())"));
301 const auto Results =
303 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("(ref .* m)()"));
310 const auto Results =
312 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("(ref .* m)()"));
319 const auto Results =
321 EXPECT_FALSE(isMutated(Results, AST.get()));
330 const auto Results =
332 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("x = 10"));
338 const auto Results =
340 EXPECT_FALSE(isMutated(Results, AST.get()));
349 const auto Results =
351 EXPECT_TRUE(isMutated(Results, AST.get()));
365 const auto Results =
367 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("x << t"));
380 auto Results =
382 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("(x << ... << args)"));
389 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
390 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("(args << ... << x)"));
397 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
398 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("x << args"));
405 auto Results =
407 EXPECT_FALSE(isMutated(Results, AST.get()));
410 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
411 EXPECT_FALSE(isMutated(Results, AST.get()));
415 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
416 EXPECT_FALSE(isMutated(Results, AST.get()));
420 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
421 EXPECT_FALSE(isMutated(Results, AST.get()));
424 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
425 EXPECT_FALSE(isMutated(Results, AST.get()));
429 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
430 EXPECT_FALSE(isMutated(Results, AST.get()));
435 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
436 EXPECT_FALSE(isMutated(Results, AST.get()));
441 auto Results =
443 EXPECT_FALSE(isMutated(Results, AST.get()));
446 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
447 EXPECT_FALSE(isMutated(Results, AST.get()));
451 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
452 EXPECT_FALSE(isMutated(Results, AST.get()));
456 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
457 EXPECT_FALSE(isMutated(Results, AST.get()));
461 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
462 EXPECT_FALSE(isMutated(Results, AST.get()));
467 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
468 EXPECT_FALSE(isMutated(Results, AST.get()));
473 auto Results =
475 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("g(x)"));
479 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
480 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("g(x)"));
484 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
485 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("g(x)"));
491 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
492 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("g<int>(x)"));
496 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
497 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("g(x)"));
501 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
502 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("g(x)"));
506 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
507 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("x + 1"));
510 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
511 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("x"));
514 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
515 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("x"));
520 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
521 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("A<0>::mf(x)"));
535 auto Results =
537 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("parser(x)"));
542 auto Results =
544 EXPECT_FALSE(isMutated(Results, AST.get()));
548 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
549 EXPECT_FALSE(isMutated(Results, AST.get()));
553 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
554 EXPECT_FALSE(isMutated(Results, AST.get()));
561 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
562 EXPECT_FALSE(isMutated(Results, AST.get()));
566 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
567 EXPECT_FALSE(isMutated(Results, AST.get()));
571 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
572 EXPECT_FALSE(isMutated(Results, AST.get()));
576 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
577 EXPECT_FALSE(isMutated(Results, AST.get()));
583 auto Results =
585 EXPECT_THAT(mutatedBy(Results, AST.get()),
590 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
591 EXPECT_THAT(mutatedBy(Results, AST.get()),
596 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
597 EXPECT_THAT(mutatedBy(Results, AST.get()),
602 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
603 EXPECT_THAT(mutatedBy(Results, AST.get()),
610 auto Results =
612 EXPECT_THAT(mutatedBy(Results, AST.get()),
617 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
618 EXPECT_THAT(mutatedBy(Results, AST.get()),
623 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
624 EXPECT_THAT(mutatedBy(Results, AST.get()),
629 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
630 EXPECT_THAT(mutatedBy(Results, AST.get()),
641 const auto Results =
643 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("x", "mod(x)"));
649 const auto Results =
651 EXPECT_FALSE(isMutated(Results, AST.get()));
659 auto Results =
661 EXPECT_FALSE(isMutated(Results, AST.get()));
665 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
666 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("std::move(x) = y"));
670 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
671 EXPECT_FALSE(isMutated(Results, AST.get()));
677 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
678 EXPECT_FALSE(isMutated(Results, AST.get()));
683 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
684 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("y = std::move(x)"));
690 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
691 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("y = std::move(x)"));
697 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
698 EXPECT_FALSE(isMutated(Results, AST.get()));
703 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
704 EXPECT_FALSE(isMutated(Results, AST.get()));
708 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
709 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("y = std::move(x)"));
714 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
715 EXPECT_FALSE(isMutated(Results, AST.get()));
722 auto Results =
724 EXPECT_FALSE(isMutated(Results, AST.get()));
729 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
730 EXPECT_THAT(mutatedBy(Results, AST.get()),
741 auto Results =
743 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("g(x)"));
748 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
749 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("g(x)"));
754 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
755 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("g(t, x)"));
760 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
761 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("t.mf(x)"));
767 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
768 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("s.mf(x)"));
774 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
775 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("s.mf<T>(x)"));
780 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
781 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("f(x)"));
786 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
787 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("T(x)"));
794 auto Results =
796 EXPECT_FALSE(isMutated(Results, AST.get()));
799 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
800 EXPECT_FALSE(isMutated(Results, AST.get()));
804 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
805 EXPECT_FALSE(isMutated(Results, AST.get()));
810 const auto Results =
812 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("return x;"));
817 const auto Results =
819 EXPECT_FALSE(isMutated(Results, AST.get()));
825 const auto Results =
827 EXPECT_THAT(mutatedBy(Results, AST.get()),
834 const auto Results =
836 EXPECT_THAT(mutatedBy(Results, AST.get()),
844 const auto Results =
846 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("&x"));
852 const auto Results =
854 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("x"));
880 auto Results =
882 EXPECT_THAT(mutatedBy(Results, AST.get()),
889 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
890 EXPECT_THAT(mutatedBy(Results, AST.get()),
898 auto Results =
900 EXPECT_FALSE(isMutated(Results, AST.get()));
903 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
904 EXPECT_FALSE(isMutated(Results, AST.get()));
910 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
911 EXPECT_FALSE(isMutated(Results, AST.get()));
917 const auto Results =
919 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("r", "r = 10"));
925 const auto Results =
927 EXPECT_FALSE(isMutated(Results, AST.get()));
933 auto Results =
935 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("g(x)"));
941 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
942 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("g(x)"));
948 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
949 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("g(x, y)"));
950 Results = match(withEnclosingCompound(declRefTo("y")), AST->getASTContext());
951 EXPECT_FALSE(isMutated(Results, AST.get()));
957 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
958 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("g(y, x)"));
959 Results = match(withEnclosingCompound(declRefTo("y")), AST->getASTContext());
960 EXPECT_FALSE(isMutated(Results, AST.get()));
964 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
965 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("x"));
970 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
971 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("x"));
976 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
977 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("x"));
986 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
987 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("g(x)"));
996 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
997 EXPECT_FALSE(isMutated(Results, AST.get()));
1006 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1007 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("f1(x)"));
1016 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1017 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("f1(x)"));
1023 auto Results =
1025 EXPECT_FALSE(isMutated(Results, AST.get()));
1029 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1030 EXPECT_FALSE(isMutated(Results, AST.get()));
1034 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1035 EXPECT_FALSE(isMutated(Results, AST.get()));
1039 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1040 EXPECT_FALSE(isMutated(Results, AST.get()));
1046 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1047 EXPECT_FALSE(isMutated(Results, AST.get()));
1051 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1052 EXPECT_FALSE(isMutated(Results, AST.get()));
1057 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1058 EXPECT_FALSE(isMutated(Results, AST.get()));
1063 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1064 EXPECT_FALSE(isMutated(Results, AST.get()));
1073 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1074 EXPECT_FALSE(isMutated(Results, AST.get()));
1081 const auto Results =
1083 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("x[0] = 10"));
1088 const auto Results =
1090 EXPECT_FALSE(isMutated(Results, AST.get()));
1099 auto Results =
1101 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("x.vb.va.vi = 10"));
1106 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1107 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("x.y.z = 10"));
1113 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1114 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("x.y.z = 10"));
1121 auto Results =
1123 EXPECT_FALSE(isMutated(Results, AST.get()));
1127 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1128 EXPECT_FALSE(isMutated(Results, AST.get()));
1134 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1135 EXPECT_FALSE(isMutated(Results, AST.get()));
1143 const auto Results =
1145 EXPECT_FALSE(isMutated(Results, AST.get()));
1151 auto Results =
1153 EXPECT_THAT(mutatedBy(Results, AST.get()),
1158 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1159 EXPECT_THAT(mutatedBy(Results, AST.get()),
1166 const auto Results =
1168 EXPECT_THAT(mutatedBy(Results, AST.get()),
1175 auto Results =
1177 EXPECT_FALSE(isMutated(Results, AST.get()));
1181 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1182 EXPECT_FALSE(isMutated(Results, AST.get()));
1190 const auto Results =
1192 EXPECT_TRUE(isMutated(Results, AST.get()));
1198 const auto Results =
1200 EXPECT_TRUE(isMutated(Results, AST.get()));
1208 const auto Results =
1210 EXPECT_TRUE(isMutated(Results, AST.get()));
1218 const auto Results =
1220 EXPECT_FALSE(isMutated(Results, AST.get()));
1228 const auto Results =
1230 EXPECT_TRUE(isMutated(Results, AST.get()));
1238 auto Results =
1240 EXPECT_TRUE(isMutated(Results, AST.get()));
1245 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1246 EXPECT_TRUE(isMutated(Results, AST.get()));
1255 const auto Results =
1257 EXPECT_TRUE(isMutated(Results, AST.get()));
1265 const auto Results =
1267 EXPECT_TRUE(isMutated(Results, AST.get()));
1273 auto Results =
1275 EXPECT_FALSE(isMutated(Results, AST.get()));
1281 const auto Results =
1283 EXPECT_TRUE(isMutated(Results, AST.get()));
1291 const auto Results =
1293 EXPECT_TRUE(isMutated(Results, AST.get()));
1308 const auto Results =
1310 EXPECT_TRUE(isMutated(Results, AST.get()));
1317 const auto Results =
1319 EXPECT_THAT(mutatedBy(Results, AST.get()),
1327 const auto Results =
1329 EXPECT_FALSE(isMutated(Results, AST.get()));
1334 const auto Results =
1336 EXPECT_FALSE(isMutated(Results, AST.get()));
1341 const auto Results =
1343 EXPECT_THAT(mutatedBy(Results, AST.get()),
1349 const auto Results =
1351 EXPECT_THAT(mutatedBy(Results, AST.get()),
1360 auto Results =
1362 EXPECT_THAT(mutatedBy(Results, AST.get()),
1367 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1368 EXPECT_THAT(mutatedBy(Results, AST.get()),
1375 const auto Results =
1377 EXPECT_TRUE(isMutated(Results, AST.get()));
1382 auto Results =
1384 EXPECT_FALSE(isMutated(Results, AST.get()));
1388 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1389 EXPECT_TRUE(isMutated(Results, AST.get()));
1394 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1395 EXPECT_TRUE(isMutated(Results, AST.get()));
1401 auto Results =
1403 EXPECT_FALSE(isMutated(Results, AST.get()));
1407 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1408 EXPECT_FALSE(isMutated(Results, AST.get()));
1415 const auto Results =
1417 EXPECT_THAT(mutatedBy(Results, AST.get()),
1424 const auto Results =
1426 EXPECT_TRUE(isMutated(Results, AST.get()));
1433 const auto Results =
1435 EXPECT_FALSE(isMutated(Results, AST.get()));
1442 const auto Results =
1444 EXPECT_FALSE(isMutated(Results, AST.get()));
1451 auto Results =
1453 EXPECT_FALSE(isMutated(Results, AST.get()));
1456 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1457 EXPECT_FALSE(isMutated(Results, AST.get()));
1460 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1461 EXPECT_FALSE(isMutated(Results, AST.get()));
1464 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1465 EXPECT_FALSE(isMutated(Results, AST.get()));
1468 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1469 EXPECT_FALSE(isMutated(Results, AST.get()));
1472 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1473 EXPECT_FALSE(isMutated(Results, AST.get()));
1478 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1479 EXPECT_FALSE(isMutated(Results, AST.get()));
1483 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1484 EXPECT_FALSE(isMutated(Results, AST.get()));
1489 auto Results =
1491 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("x++"));
1498 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1499 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("x.f()"));
1518 auto Results =
1520 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("* x = 10"));
1523 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1524 EXPECT_FALSE(isMutated(Results, AST.get()));
1528 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1529 EXPECT_FALSE(isMutated(Results, AST.get()));
1533 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1534 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("x"));
1539 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1540 EXPECT_FALSE(isMutated(Results, AST.get()));
1545 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1546 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("x"));
1551 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1552 EXPECT_FALSE(isMutated(Results, AST.get()));
1557 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1558 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("x->mf()"));
1565 SmallVector<BoundNodes, 1> Results{};
1569 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1570 EXPECT_FALSE(isDeclMutated(Results, AST.get()));
1574 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
1575 EXPECT_TRUE(isDeclMutated(Results, AST.get()));
1588 auto Results =
1590 EXPECT_TRUE(isMutated(Results, AST.get()));
1591 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("(x)"));
1614 static bool isPointeeMutated(const SmallVectorImpl<BoundNodes> &Results,
1616 const auto *const S = selectFirst<Stmt>("stmt", Results);
1617 const auto *const E = selectFirst<Expr>("expr", Results);
1623 static bool isDeclPointeeMutated(const SmallVectorImpl<BoundNodes> &Results,
1625 const auto *const S = selectFirst<Stmt>("stmt", Results);
1626 const auto *const D = selectFirst<Decl>("decl", Results);
1636 auto Results =
1638 EXPECT_FALSE(isPointeeMutated(Results, AST.get()));
1643 auto Results =
1645 EXPECT_TRUE(isPointeeMutated(Results, AST.get()));
1650 auto Results =
1652 EXPECT_TRUE(isPointeeMutated(Results, AST.get()));
1661 auto Results =
1663 EXPECT_FALSE(isPointeeMutated(Results, AST.get()));
1669 auto Results =
1671 EXPECT_TRUE(isPointeeMutated(Results, AST.get()));
1677 auto Results =
1679 EXPECT_TRUE(isPointeeMutated(Results, AST.get()));
1687 auto Results =
1689 EXPECT_TRUE(isPointeeMutated(Results, AST.get()));
1695 auto Results =
1697 EXPECT_FALSE(isPointeeMutated(Results, AST.get()));
1705 auto Results =
1707 EXPECT_TRUE(isPointeeMutated(Results, AST.get()));
1713 auto Results =
1715 EXPECT_FALSE(isPointeeMutated(Results, AST.get()));
1723 auto Results =
1725 EXPECT_FALSE(isPointeeMutated(Results, AST.get()));
1730 auto Results =
1732 EXPECT_TRUE(isPointeeMutated(Results, AST.get()));
1737 auto Results =
1739 EXPECT_TRUE(isPointeeMutated(Results, AST.get()));
1748 auto Results =
1750 EXPECT_FALSE(isPointeeMutated(Results, AST.get()));
1755 auto Results =
1757 EXPECT_TRUE(isPointeeMutated(Results, AST.get()));
1766 auto Results =
1768 EXPECT_FALSE(isPointeeMutated(Results, AST.get()));
1774 auto Results =
1776 EXPECT_TRUE(isPointeeMutated(Results, AST.get()));
1785 auto Results =
1787 EXPECT_FALSE(isPointeeMutated(Results, AST.get()));
1793 auto Results =
1795 EXPECT_FALSE(isPointeeMutated(Results, AST.get()));
1801 auto Results =
1803 EXPECT_FALSE(isPointeeMutated(Results, AST.get()));
1809 auto Results =
1811 EXPECT_TRUE(isPointeeMutated(Results, AST.get()));
1819 auto Results =
1821 EXPECT_TRUE(isPointeeMutated(Results, AST.get()));
1834 auto Results =
1836 EXPECT_TRUE(isPointeeMutated(Results, AST.get()));
1845 auto Results =
1847 EXPECT_FALSE(isPointeeMutated(Results, AST.get()));
1853 auto Results =
1855 EXPECT_TRUE(isPointeeMutated(Results, AST.get()));
1864 auto Results =
1866 EXPECT_FALSE(isPointeeMutated(Results, AST.get()));
1872 auto Results =
1874 EXPECT_TRUE(isPointeeMutated(Results, AST.get()));
1884 auto Results =
1886 EXPECT_FALSE(isPointeeMutated(Results, AST.get()));
1892 auto Results =
1894 EXPECT_TRUE(isPointeeMutated(Results, AST.get()));
1904 auto Results =
1906 EXPECT_TRUE(isPointeeMutated(Results, AST.get()));
1917 auto Results =
1919 EXPECT_TRUE(isPointeeMutated(Results, AST.get()));
1928 auto Results =
1930 EXPECT_TRUE(isPointeeMutated(Results, AST.get()));
1941 auto Results =
1943 EXPECT_TRUE(isDeclPointeeMutated(Results, AST.get()));
1953 auto Results =
1955 EXPECT_TRUE(isDeclPointeeMutated(Results, AST.get()));
1966 auto Results =
1968 EXPECT_TRUE(isPointeeMutated(Results, AST.get()));
1977 auto Results =
1979 EXPECT_FALSE(isPointeeMutated(Results, AST.get()));
1990 auto Results =
1992 EXPECT_TRUE(isPointeeMutated(Results, AST.get()));
2002 auto Results =
2004 EXPECT_TRUE(isPointeeMutated(Results, AST.get()));