Lines Matching refs:makeRule
29 using ::clang::transformer::makeRule;
171 auto R = makeRule( in ruleStrlenSize()
196 RewriteRule Rule = makeRule( in TEST_F()
219 makeRule(callExpr(callee(functionDecl(hasName("f")))), in TEST_F()
236 RewriteRule Rule = makeRule( in TEST_F()
255 RewriteRule Rule = makeRule(callExpr(callee(functionDecl(hasName("f")))), in TEST_F()
273 RewriteRule Rule = makeRule(callExpr(callee(functionDecl(hasName("f")))), in TEST_F()
292 RewriteRule Rule = makeRule(functionDecl(hasName("bad")).bind(Fun), in TEST_F()
324 testRule(makeRule(declRefExpr(to(functionDecl(hasName("bad")))).bind(Ref), in TEST_F()
342 Transformer T(makeRule(declRefExpr(to(functionDecl())).bind(Ref), in TEST_F()
352 makeRule(memberExpr(clang::ast_matchers::member(hasName("bad"))).bind(E), in TEST_F()
406 testRule(makeRule(memberExpr().bind(E), in TEST_F()
438 testRule(makeRule(memberExpr().bind(MemExpr), in TEST_F()
446 testRule(makeRule(returnStmt().bind("return"), noEdits()), Input, Input); in TEST_F()
453 testRule(makeRule(returnStmt().bind("return"), noopEdit(node("return"))), in TEST_F()
461 testRule(makeRule(returnStmt().bind("return"), in TEST_F()
470 testRule(makeRule(returnStmt().bind("return"), in TEST_F()
480 testRule(makeRule(functionDecl(hasDescendant(returnStmt().bind("return"))) in TEST_F()
493 makeRule(declRefExpr(to(varDecl(hasName("x")))), changeTo(cat("3"))); in TEST_F()
494 testRule(makeRule(functionDecl(hasName("f")).bind("fun"), in TEST_F()
503 auto IntToChar = makeRule(typeLoc(loc(qualType(isInteger(), builtinType()))), in TEST_F()
505 testRule(makeRule(functionDecl(hasName("f")).bind("fun"), in TEST_F()
519 makeRule(declRefExpr(to(varDecl(hasName("x")))), changeTo(cat("3"))); in TEST_F()
520 testRule(makeRule(functionDecl(hasName("f"), hasBody(stmt().bind("body"))), in TEST_F()
531 makeRule(declRefExpr(to(varDecl(hasName("x")))), changeTo(cat("3"))); in TEST_F()
533 makeRule( in TEST_F()
544 makeRule(typeLoc(loc(qualType(isInteger(), builtinType()))).bind("loc"), in TEST_F()
547 makeRule(functionDecl(hasName("f"), in TEST_F()
560 auto InlineVar = makeRule(declRefExpr(to(varDecl(equalsBoundNode(VarId)))), in TEST_F()
562 testRule(makeRule(functionDecl(hasName("f"), in TEST_F()
573 makeRule(declRefExpr(to(varDecl(hasName("x")))), changeTo(cat("3"))); in TEST_F()
574 Transformer T(makeRule(functionDecl(hasName("f")), in TEST_F()
587 makeRule(qualType(isInteger(), builtinType()), changeTo(cat("char"))); in TEST_F()
589 makeRule(functionDecl( in TEST_F()
614 makeRule(declRefExpr(to(varDecl(hasName("x")))), changeTo(cat("3"))); in TEST_F()
615 testRule(makeRule(functionDecl(hasName("f"), hasBody(stmt().bind("body"))), in TEST_F()
631 makeRule(declRefExpr(to(varDecl(hasName("x")))), changeTo(cat("3"))); in TEST_F()
632 testRule(makeRule(functionDecl(hasName("f")).bind("fun"), in TEST_F()
646 makeRule(typeLoc(loc(qualType(isInteger(), builtinType()))).bind("loc"), in TEST_F()
649 makeRule( in TEST_F()
670 makeRule(declRefExpr(to(varDecl(hasName("x")))), changeTo(cat("3"))); in TEST_F()
672 makeRule(functionDecl(hasName("f"), hasBody(stmt().bind("body"))), in TEST_F()
697 makeRule(returnStmt().bind(Ret), in TEST_F()
719 makeRule(declStmt().bind(Decl), in TEST_F()
739 makeRule(declStmt().bind(Decl), remove(statement(std::string(Decl)))), in TEST_F()
758 makeRule( in TEST_F()
793 makeRule(ifStmt(hasCondition(expr().bind(C)), hasThen(stmt().bind(T)), in TEST_F()
819 testRule(makeRule(ifStmt(hasCondition(expr().bind(C)), in TEST_F()
848 makeRule( in TEST_F()
875 testRule(makeRule(ifStmt(hasCondition(expr().bind(C)), in TEST_F()
887 RewriteRule FlagRule = makeRule( in TEST_F()
925 makeRule(callExpr(callee(functionDecl(hasName("f1")))), in TEST_F()
928 makeRule(callExpr(callee(functionDecl(hasAnyName("f1", "f2")))), in TEST_F()
950 makeRule(callExpr(callee(functionDecl(hasName("f1")))), in TEST_F()
953 makeRule(callExpr(callee(functionDecl(hasAnyName("f1", "f2")))), in TEST_F()
978 makeRule(callExpr(callee(functionDecl(hasName("f1")))), in TEST_F()
981 makeRule(callExpr(callee(functionDecl(hasAnyName("f1", "f2")))), in TEST_F()
983 RewriteRule DeclRule = makeRule(functionDecl(hasName("f2")).bind("fun"), in TEST_F()
1008 makeRule(callExpr(callee(functionDecl(hasName("f1")))), in TEST_F()
1011 makeRule(implicitCastExpr(hasSourceExpression(callExpr())), in TEST_F()
1033 makeRule(binaryOperator().bind(O), in TEST_F()
1047 Transformer T(makeRule(binaryOperator(hasLHS(expr().bind(L))).bind(O), in TEST_F()
1062 Transformer T(makeRule(expr().bind(E), in TEST_F()
1076 Transformer T(makeRule(functionDecl(hasName("errorOccurred")), in TEST_F()
1124 testRule(makeRule(traverse(TK_IgnoreUnlessSpelledInSource, MatchedRecord), in TEST_F()
1128 testRule(makeRule(traverse(TK_AsIs, MatchedRecord), RewriteRule), in TEST_F()
1178 testRule(makeRule(traverse(TK_IgnoreUnlessSpelledInSource, MatchedRecord), in TEST_F()
1182 testRule(makeRule(traverse(TK_AsIs, MatchedRecord), RewriteRule), in TEST_F()
1251 testRule(makeRule(traverse(TK_IgnoreUnlessSpelledInSource, MatchedLoop), in TEST_F()
1255 testRuleFailure(makeRule(traverse(TK_AsIs, MatchedLoop), RewriteRule), in TEST_F()
1324 testRule(makeRule(traverse(TK_IgnoreUnlessSpelledInSource, MatchedLoop), in TEST_F()
1328 testRuleFailure(makeRule(traverse(TK_AsIs, MatchedLoop), RewriteRule), in TEST_F()
1365 testRule(makeRule(traverse(TK_IgnoreUnlessSpelledInSource, MatchedField), in TEST_F()
1390 testRule(makeRule(traverse(TK_AsIs, MatchedField), in TEST_F()
1410 RewriteRule R = makeRule(integerLiteral(equals(0)).bind(zero), in TEST_F()
1491 testRule(makeRule(integerLiteral(), changeTo(cat("LIT"))), Input, Expected); in TEST_F()
1507 testRule(makeRule(binaryOperator(hasLHS(expr().bind(E))), in TEST_F()
1525 testRule(makeRule(binaryOperator(hasRHS(expr().bind(E))), in TEST_F()
1540 RewriteRule R = makeRule(integerLiteral(equals(0)).bind(zero), in TEST_F()
1563 RewriteRule QualTypeRule = makeRule(qualType(), changeTo(cat("Q"))); in TEST()
1567 RewriteRule TypeRule = makeRule(arrayType(), changeTo(cat("T"))); in TEST()
1580 makeRule(functionDecl(hasName("RemoveThisFunction")), changeTo(cat(""))), in TEST_F()
1619 makeRule(callExpr(callee( in TEST_F()