Lines Matching full:code
42 template <typename M> TestMatch matchCode(StringRef Code, M Matcher) { in matchCode() argument
43 auto ASTUnit = tooling::buildASTFromCode(Code); in matchCode()
83 // Applies \p Selector to code containing assorted node types, where the match
88 StringRef Code = R"cc( in selectFromAssorted() local
108 return Selector(matchCode(Code, Matcher).Result); in selectFromAssorted()
131 StringRef Code = R"cc( in TEST() local
139 TestMatch Match = matchCode(Code, M); in TEST()
150 StringRef Code = R"cc( in TEST() local
159 TestMatch Match = matchCode(Code, M); in TEST()
170 StringRef Code = R"cc( in TEST() local
175 TestMatch Match = matchCode(Code, callExpr().bind(Call)); in TEST()
208 StringRef Code = R"cc( in TEST() local
214 matchCode(Code, declRefExpr(to(namedDecl(hasName("y")))).bind("yvar")); in TEST()
224 StringRef Code = R"cc( in TEST() local
230 matchCode(Code, declRefExpr(to(namedDecl(hasName("y")))).bind("yvar")); in TEST()
239 StringRef Code = R"cc( in TEST() local
246 matchCode(Code, declRefExpr(to(namedDecl(hasName("y")))).bind("yvar")); in TEST()
255 StringRef Code = R"cc( in TEST() local
262 TestMatch Match = matchCode(Code, Matcher); in TEST()
267 StringRef Code = R"cc( in TEST() local
275 TestMatch Match = matchCode(Code, Matcher); in TEST()
281 StringRef Code = R"cc( in TEST() local
288 TestMatch Match = matchCode(Code, Matcher); in TEST()
293 StringRef Code = R"cc( in TEST() local
300 TestMatch Match = matchCode(Code, Matcher); in TEST()
305 StringRef Code = R"cc( in TEST() local
313 TestMatch Match = matchCode(Code, Matcher); in TEST()
318 StringRef Code = R"cc( in TEST() local
326 TestMatch Match = matchCode(Code, Matcher); in TEST()
331 StringRef Code = "int f() { return 3; }"; in TEST() local
332 TestMatch Match = matchCode(Code, returnStmt().bind("id")); in TEST()
337 StringRef Code = "int f() { return 3; }"; in TEST() local
338 TestMatch Match = matchCode(Code, expr().bind("id")); in TEST()
343 StringRef Code = "int f() { return 3; }"; in TEST() local
344 TestMatch Match = matchCode(Code, expr().bind("id")); in TEST()
350 StringRef Code = "int f() { return 3; }"; in TEST() local
351 TestMatch Match = matchCode(Code, expr().bind("id")); in TEST()
358 StringRef Code = R"cc( in TEST() local
368 TestMatch Match = matchCode(Code, memberExpr().bind(ID)); in TEST()
374 StringRef Code = R"cc( in TEST() local
387 TestMatch Match = matchCode(Code, memberExpr().bind(ID)); in TEST()
392 StringRef Code = R"cc( in TEST() local
403 TestMatch Match = matchCode(Code, memberExpr().bind(ID)); in TEST()
408 StringRef Code = R"cc( in TEST() local
419 TestMatch Match = matchCode(Code, memberExpr().bind(ID)); in TEST()
424 StringRef Code = R"cc( in TEST() local
430 TestMatch Match = matchCode(Code, functionDecl().bind(ID)); in TEST()
435 StringRef Code = R"cc( in TEST() local
442 TestMatch Match = matchCode(Code, declRefExpr(to(functionDecl())).bind(Ref)); in TEST()
447 StringRef Code = R"cc( in TEST() local
455 TestMatch Match = matchCode(Code, cxxCtorInitializer().bind(Init)); in TEST()
460 StringRef Code = R"cc( in TEST() local
476 Code, varDecl(hasName("a"), hasTypeLoc(typeLoc().bind(CtorTy)))); in TEST()
480 Code, cxxFunctionalCastExpr(hasTypeLoc(typeLoc().bind(CtorTy)))); in TEST()
484 Code, cxxTemporaryObjectExpr(hasTypeLoc(typeLoc().bind(CtorTy)))); in TEST()
489 StringRef Code = R"cc( in TEST() local
500 matchCode(Code, varDecl(hasName("a"), hasTypeLoc(typeLoc().bind(Loc)))); in TEST()
512 StringRef Code = R"cc( in TEST() local
522 TestMatch Match = matchCode(Code, declRefExpr(to(functionDecl())).bind(Ref)); in TEST()
531 const StringRef Code = R"cc( in TEST() local
541 TestMatch Match = matchCode(Code, callExpr().bind(ID)); in TEST()
546 const StringRef Code = R"cc( in TEST() local
556 TestMatch Match = matchCode(Code, callExpr().bind(ID)); in TEST()
561 const StringRef Code = R"cc( in TEST() local
571 TestMatch Match = matchCode(Code, callExpr().bind(ID)); in TEST()
578 const StringRef Code = R"cc( in TEST() local
589 matchCode(Code, callExpr(callee(functionDecl(hasName("bar")))).bind(ID)); in TEST()
594 const StringRef Code = R"cc( in TEST() local
604 TestMatch Match = matchCode(Code, callExpr().bind(ID)); in TEST()
610 const StringRef Code = R"cc( in TEST() local
620 TestMatch Match = matchCode(Code, callExpr().bind(ID)); in TEST()
626 const StringRef Code = R"cc( in TEST() local
639 TestMatch Match = matchCode(Code, callExpr().bind(ID)); in TEST()
655 const StringRef Code = R"cc( in TEST() local
664 TestMatch Match = matchCode(Code, cxxTemporaryObjectExpr().bind(ID)); in TEST()
669 const StringRef Code = R"cc( in TEST() local
678 TestMatch Match = matchCode(Code, cxxConstructExpr().bind(ID)); in TEST()
683 const StringRef Code = R"cc( in TEST() local
692 TestMatch Match = matchCode(Code, cxxTemporaryObjectExpr().bind(ID)); in TEST()
697 StringRef Code = R"cc( in TEST() local
702 TestMatch Match = matchCode(Code, compoundStmt().bind(ID)); in TEST()
709 StringRef Code = "void f() {}"; in TEST() local
711 TestMatch Match = matchCode(Code, compoundStmt().bind(ID)); in TEST()
723 StringRef Code = R"cc( in TEST() local
730 TestMatch Match = matchCode(Code, initListExpr().bind(ID)); in TEST()
737 StringRef Code = R"cc( in TEST() local
744 TestMatch Match = matchCode(Code, initListExpr().bind(ID)); in TEST()
756 StringRef Code = R"cc( in TEST() local
765 TestMatch Match = matchCode(Code, ifStmt().bind(ID)); in TEST()
770 StringRef Code = R"cc( in TEST() local
779 TestMatch Match = matchCode(Code, ifStmt().bind(ID)); in TEST()
786 StringRef Code = R"cc( in TEST() local
792 TestMatch Match = matchCode(Code, functionDecl(hasName("bad")).bind(Fun)); in TEST()
799 StringRef Code = R"cc( in TEST() local
805 TestMatch Match = matchCode(Code, returnStmt().bind(Ret)); in TEST()
811 StringRef Code = R"cc( in TEST() local
818 matchCode(Code, binaryOperator(hasLHS(expr().bind(ID))).bind(Op)); in TEST()
824 StringRef Code = R"cc( in TEST() local
830 TestMatch Match = matchCode(Code, binaryOperator().bind(Op)); in TEST()