Lines Matching defs:constructMatcher
42 VariantMatcher constructMatcher(StringRef MatcherName,
49 Out = Registry::constructMatcher(*Ctor, SourceRange(), Args(), Error);
54 VariantMatcher constructMatcher(StringRef MatcherName,
62 Out = Registry::constructMatcher(*Ctor, SourceRange(), Args(Arg1), Error);
67 VariantMatcher constructMatcher(StringRef MatcherName,
76 Out = Registry::constructMatcher(*Ctor, SourceRange(), Args(Arg1, Arg2),
129 Matcher<Stmt> IsArrowValue = constructMatcher(
130 "memberExpr", constructMatcher("isArrow")).getTypedMatcher<Stmt>();
132 constructMatcher("cxxBoolLiteral").getTypedMatcher<Stmt>();
146 Matcher<Decl> Value = constructMatcher(
147 "namedDecl", constructMatcher("hasName", StringRef("X")))
152 Value = functionDecl(constructMatcher("parameterCountIs", 2)
159 Matcher<Decl> HasInitializerSimple = constructMatcher(
160 "varDecl", constructMatcher("hasInitializer", constructMatcher("stmt")))
162 Matcher<Decl> HasInitializerComplex = constructMatcher(
164 constructMatcher("hasInitializer", constructMatcher("callExpr")))
180 functionDecl(constructMatcher(
181 "hasParameter", 1, constructMatcher("hasName", StringRef("x")))
188 Matcher<Stmt> CallExpr0 = constructMatcher(
190 constructMatcher("callee", constructMatcher("memberExpr",
191 constructMatcher("isArrow"))))
194 Matcher<Stmt> CallExpr1 = constructMatcher(
196 constructMatcher(
198 constructMatcher("cxxMethodDecl",
199 constructMatcher("hasName", StringRef("x")))))
211 constructMatcher(
212 "loc", constructMatcher("asString", StringRef("const double *")))
216 constructMatcher(
231 const VariantMatcher IsDefinition = constructMatcher("isDefinition");
233 constructMatcher("varDecl", IsDefinition).getTypedMatcher<Decl>();
235 constructMatcher("recordDecl", IsDefinition).getTypedMatcher<Decl>();
237 constructMatcher("functionDecl", IsDefinition).getTypedMatcher<Decl>();
245 Matcher<Decl> Anything = constructMatcher("anything").getTypedMatcher<Decl>();
246 Matcher<Decl> RecordDecl = constructMatcher(
247 "recordDecl", constructMatcher("hasName", StringRef("Foo")),
257 Matcher<Stmt> ConstructExpr = constructMatcher(
259 constructMatcher(
261 constructMatcher(
263 constructMatcher(
264 "ofClass", constructMatcher("hasName", StringRef("Foo"))))))
272 Matcher<Decl> HasTemplateArgument = constructMatcher(
274 constructMatcher(
276 constructMatcher("refersToType",
277 constructMatcher("asString", StringRef("int")))))
286 Matcher<Type> M = constructMatcher(
288 constructMatcher("pointee", constructMatcher("isConstQualified"),
289 constructMatcher("isInteger"))).getTypedMatcher<Type>();
293 M = constructMatcher(
295 constructMatcher("hasElementType", constructMatcher("builtinType")))
302 Matcher<Decl> CtorDecl = constructMatcher(
304 constructMatcher(
306 constructMatcher("forField",
307 constructMatcher("hasName", StringRef("foo")))))
315 Matcher<Decl> D = constructMatcher(
317 constructMatcher(
319 constructMatcher("recordDecl",
320 constructMatcher("hasName", StringRef("X")))))
326 Matcher<Stmt> S = constructMatcher(
328 constructMatcher(
330 constructMatcher("varDecl",
331 constructMatcher("hasName", StringRef("X")))))
338 S = constructMatcher(
339 "compoundStmt", constructMatcher("hasParent", constructMatcher("ifStmt")))
346 Matcher<Decl> D = constructMatcher(
348 constructMatcher("recordDecl",
349 constructMatcher("hasName", StringRef("Foo"))),
350 constructMatcher("functionDecl",
351 constructMatcher("hasName", StringRef("foo"))))
358 D = constructMatcher(
359 "allOf", constructMatcher("recordDecl"),
360 constructMatcher(
362 constructMatcher("anyOf",
363 constructMatcher("hasName", StringRef("Foo")),
364 constructMatcher("hasName", StringRef("Bar")))))
375 constructMatcher(
377 constructMatcher("namedDecl",
378 constructMatcher("hasName", StringRef("Bar"))))
384 D = constructMatcher(
385 "namedDecl", constructMatcher("hasName", StringRef("Foo")),
386 constructMatcher("unless", constructMatcher("recordDecl")))
395 EXPECT_TRUE(constructMatcher("hasInitializer", Error.get()).isNull());
399 EXPECT_TRUE(constructMatcher("isArrow", StringRef(), Error.get()).isNull());
403 EXPECT_TRUE(constructMatcher("anyOf", Error.get()).isNull());
407 EXPECT_TRUE(constructMatcher("unless", StringRef(), StringRef(),
414 EXPECT_TRUE(constructMatcher("ofClass", StringRef(), Error.get()).isNull());
420 constructMatcher("cxxRecordDecl", constructMatcher("cxxRecordDecl"),
421 constructMatcher("parameterCountIs", 3), Error.get())
429 EXPECT_TRUE(constructMatcher("anyOf", StringRef(), StringRef(),
435 EXPECT_TRUE(constructMatcher(
437 constructMatcher("allOf",
438 constructMatcher("isDerivedFrom", StringRef("FOO")),
439 constructMatcher("isArrow")),
501 Matcher<Decl> Value = constructMatcher(
502 "decl", constructMatcher("hasAttr", StringRef("attr::WarnUnused")))
509 Matcher<Stmt> Value = constructMatcher("parenExpr").getTypedMatcher<Stmt>();