Home | History | Annotate | Download | only in ASTMatchers

Lines Matching full:vardecl

284       varDecl(hasName("z_float"),
288 varDecl(hasName("z_float"),
292 varDecl(hasName("z_char"),
309 varDecl(hasName("z_float"),
313 varDecl(hasName("z_float"),
317 varDecl(hasName("z_char"),
388 Code, varDecl(hasName("MyVar1"), hasDeclContext(translationUnitDecl()))));
390 Code, varDecl(hasName("MyVar2"), hasDeclContext(translationUnitDecl()))));
393 varDecl(hasName("MyVar2"),
435 hasArgument(0, declRefExpr(to(varDecl())))))));
438 hasArgument(0, declRefExpr(to(varDecl()))),
443 hasArgument(0, declRefExpr(to(varDecl()))),
449 hasArgument(0, declRefExpr(to(varDecl()))),
497 cxxCatchStmt(anyOf(hasDescendant(varDecl()), isCatchAll()))));
699 auto VD = internal::Matcher<VarDecl>(Name).dynCastTo<Decl>();
819 varDecl(hasDescendant(isInteger())).bind("x"))),
840 varDecl(hasName("i"), has(isInteger()))));
842 varDecl(hasName("i"), has(isInteger()))));
852 varDecl(hasName("i"), hasType(qualType(has(builtinType()))))));
855 varDecl(hasName("i"), hasType(qualType(has(pointerType()))))));
883 has(declRefExpr(to(varDecl(hasName("i"))))));
894 hasDescendant(declRefExpr(to(varDecl(hasName("i"))))));
924 varDecl(hasType(namedDecl(hasName("S"))))));
1042 varDecl(hasName("a"),
1050 varDecl(hasType(templateSpecializationType(
1069 matches("class X {}; void y() { X x; }", varDecl(hasType(ClassX))));
1071 notMatches("class X {}; void y() { X *x; }", varDecl(hasType(ClassX))));
1074 varDecl(hasType(pointsTo(ClassX)))));
1089 matches("class X {}; void y() { X x; }", varDecl(hasType(ClassX))));
1091 notMatches("class X {}; void y() { X *x; }", varDecl(hasType(ClassX))));
1096 varDecl(hasName("x"), hasTypeLoc(loc(asString("int"))))));
1323 varDecl(hasInitializer(
1347 auto M = varDecl(hasName("X"), hasLocalStorage());
1352 M = varDecl(hasName("X"), hasGlobalStorage());
1362 EXPECT_TRUE(matches(T, varDecl(hasName("x"), hasAutomaticStorageDuration())));
1364 notMatches(T, varDecl(hasName("y"), hasAutomaticStorageDuration())));
1366 notMatches(T, varDecl(hasName("a"), hasAutomaticStorageDuration())));
1368 EXPECT_TRUE(matches(T, varDecl(hasName("y"), hasStaticStorageDuration())));
1369 EXPECT_TRUE(matches(T, varDecl(hasName("a"), hasStaticStorageDuration())));
1370 EXPECT_TRUE(notMatches(T, varDecl(hasName("x"), hasStaticStorageDuration())));
1376 EXPECT_TRUE(notMatches(T, varDecl(hasName("x"), hasThreadStorageDuration())));
1377 EXPECT_TRUE(notMatches(T, varDecl(hasName("y"), hasThreadStorageDuration())));
1378 EXPECT_TRUE(notMatches(T, varDecl(hasName("a"), hasThreadStorageDuration())));
1384 varDecl(hasName("i"))));
1389 cxxMemberCallExpr(on(declRefExpr(to(varDecl(hasName("y"))))));
1458 EXPECT_TRUE(matches("int i = 0;", varDecl(hasType(isInteger()))));
1462 to(varDecl(hasType(isInteger()))))))));
1466 EXPECT_TRUE(notMatches("int *i;", varDecl(hasType(isInteger()))));
1469 to(varDecl(hasType(isInteger()))))))));
1473 EXPECT_TRUE(matches("char i = 0;", varDecl(hasType(isAnyCharacter()))));
1477 EXPECT_TRUE(notMatches("int i;", varDecl(hasType(isAnyCharacter()))));
1591 hasArgument(0, declRefExpr(to(varDecl(hasName("y"))))));
1599 hasArgument(42, declRefExpr(to(varDecl(hasName("y"))))));
1605 hasAnyArgument(declRefExpr(to(varDecl(hasName("y"))))));
1628 DeclarationMatcher ReferenceClassX = varDecl(
1648 varDecl(hasType(qualType(referenceType())))));
1653 varDecl(hasType(qualType(hasCanonicalType(referenceType()))))));
1658 varDecl(hasType(hasLocalQualifiers()))));
1660 varDecl(hasType(hasLocalQualifiers()))));
1662 varDecl(hasType(hasLocalQualifiers()))));
1664 varDecl(hasType(hasLocalQualifiers()))));
1669 cxxMethodDecl(hasParameter(0, varDecl()))));
1676 varDecl()))));
1738 varDecl(hasName("foo"), isConstexpr())));
1988 hasArgument(0, declRefExpr(to(varDecl(hasName("y"))))));
2004 hasArgument(42, declRefExpr(to(varDecl(hasName("y"))))));
2267 hasArgument(0, declRefExpr(to(varDecl(hasName("y"))))));
2280 hasArgument(42, declRefExpr(to(varDecl(hasName("y"))))));
2694 varDecl(hasName("a"), isDefinition());
2831 cxxForRangeStmt(hasRangeInit(declRefExpr(to(varDecl(hasName("a"))))))));
2982 EXPECT_TRUE(notMatches("int i;", varDecl(isPublic(), hasName("i"))));
2983 EXPECT_TRUE(notMatches("int i;", varDecl(isProtected(), hasName("i"))));
2984 EXPECT_TRUE(notMatches("int i;", varDecl(isPrivate(), hasName("i"))));
3045 varDecl(hasType(isVolatileQualified()))));
3047 varDecl(hasType(isVolatileQualified()))));
3049 varDecl(hasType(isVolatileQualified()))));
3054 varDecl(hasType(isConstQualified()))));
3059 varDecl(hasType(isConstQualified()))));
3064 varDecl(hasType(isConstQualified()))));
3066 varDecl(hasType(isConstQualified()))));
3071 varDecl(hasType(isConstQualified()))));
3073 varDecl(hasType(isConstQualified()))));
3198 varDecl(hasInitializer(implicitCastExpr()))));
3201 varDecl(hasInitializer(implicitCastExpr()))));
3204 varDecl(hasInitializer(implicitCastExpr()))));
3213 varDecl(hasInitializer(implicitCastExpr()))));
3215 varDecl(hasInitializer(implicitCastExpr()))));
3218 varDecl(hasInitializer(implicitCastExpr()))));
3220 varDecl(hasInitializer(implicitCastExpr()))));
3223 varDecl(hasInitializer(implicitCastExpr()))));
3231 varDecl(hasInitializer(ignoringImpCasts(
3232 declRefExpr(to(varDecl(hasName("x")))))))));
3235 varDecl(hasInitializer(ignoringImpCasts(
3244 varDecl(hasInitializer(ignoringImpCasts(
3247 varDecl(hasInitializer(ignoringImpCasts(
3253 varDecl(hasInitializer(ignoringImpCasts(
3256 varDecl(hasInitializer(ignoringImpCasts(
3259 varDecl(hasInitializer(ignoringImpCasts(
3262 varDecl(hasInitializer(ignoringImpCasts(
3270 varDecl(hasInitializer(ignoringImpCasts(
3271 declRefExpr(to(varDecl(hasName("x")))))))));
3278 varDecl(hasInitializer(ignoringParenCasts(
3281 varDecl(hasInitializer(ignoringParenCasts(
3287 varDecl(hasInitializer(ignoringParenCasts(
3291 varDecl(hasInitializer(ignoringParenCasts(
3294 varDecl(hasInitializer(ignoringParenCasts(
3301 varDecl(hasInitializer(ignoringParenCasts(
3309 varDecl(hasInitializer(ignoringParenCasts(
3315 varDecl(hasInitializer(ignoringParenCasts(
3319 varDecl(hasInitializer(ignoringParenCasts(
3329 varDecl(hasInitializer(ignoringParenImpCasts(
3330 declRefExpr(to(varDecl(hasName("x")))))))));
3333 varDecl(hasInitializer(ignoringParenImpCasts(
3341 varDecl(hasInitializer(ignoringParenImpCasts(
3342 declRefExpr(to(varDecl(hasName("x")))))))));
3344 varDecl(hasInitializer(ignoringParenImpCasts(
3353 varDecl(hasInitializer(ignoringParenImpCasts(
3358 varDecl(hasInitializer(ignoringParenImpCasts(
3361 varDecl(hasInitializer(ignoringParenImpCasts(
3364 varDecl(hasInitializer(ignoringParenImpCasts(
3401 varDecl(hasInitializer(exprWithCleanups()))));
3404 varDecl(hasInitializer(exprWithCleanups()))));
3457 declStmt(hasSingleDecl(varDecl(hasInitializer(anything()))));
3465 DeclarationMatcher MatchesInit = varDecl(hasInitializer(anything()));
3561 varDecl(isExceptionVariable())));
3563 varDecl(isExceptionVariable())));
3921 varDecl(isInstantiated())));
4006 varDecl(hasName("c"), hasType(recordDecl(hasName("C"),
4049 varDecl(hasName("x"),
4051 0, varDecl(hasType(asString("int"))))).bind("f"))).bind("v"),
4238 varDecl(hasName("b")))))))));
4274 matches("int (*array)[4];", varDecl(hasType(pointsTo(parenType())))));
4275 EXPECT_TRUE(notMatches("int *array[4];", varDecl(hasType(parenType()))));
4279 varDecl(hasType(pointsTo(parenType(innerType(functionType())))))));
4282 varDecl(hasType(pointsTo(parenType(innerType(functionType())))))));
4308 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),
4310 EXPECT_TRUE(matches(Fragment, varDecl(hasName("ptr"),
4312 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),
4314 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),
4316 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),
4318 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),
4322 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),
4324 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),
4326 EXPECT_TRUE(matches(Fragment, varDecl(hasName("ptr"),
4328 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),
4332 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),
4334 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),
4336 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),
4338 EXPECT_TRUE(matches(Fragment, varDecl(hasName("ref"),
4340 EXPECT_TRUE(matches(Fragment, varDecl(hasName("ref"),
4342 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),
4346 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),
4348 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),
4350 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),
4352 EXPECT_TRUE(matches(Fragment, varDecl(hasName("ref"),
4354 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),
4356 EXPECT_TRUE(matches(Fragment, varDecl(hasName("ref"),
4366 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("a"),
4368 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("b"),
4370 EXPECT_TRUE(matches(Fragment, varDecl(hasName("c"),
4372 EXPECT_TRUE(matches(Fragment, varDecl(hasName("c"),
4374 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("c"),
4376 EXPECT_TRUE(matches(Fragment, varDecl(hasName("d"),
4378 EXPECT_TRUE(matches(Fragment, varDecl(hasName("d"),
4380 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("d"),
4382 EXPECT_TRUE(matches(Fragment, varDecl(hasName("e"),
4384 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("e"),
4386 EXPECT_TRUE(matches(Fragment, varDecl(hasName("e"),
4420 EXPECT_TRUE(matches("typedef int X; X a;", varDecl(hasName("a"),
4843 "int i = 1;", varDecl(hasType(qualType().bind("type")),
4847 varDecl(hasType(qualType().bind("type")),
4854 "int i = 1;", varDecl(namedDecl(hasName("i")).bind("name"),
4910 forEachDescendant(varDecl(hasType(
4913 new VerifyIdIsBoundTo<VarDecl>("decl", 2)));
4924 hasName("f"), forEachDescendant(varDecl().bind("d")),
4926 new VerifyIdIsBoundTo<VarDecl>("d", 5)));
4938 varDecl(hasType(recordDecl(hasName("StringRef")))).bind("var")))),
4941 on(declRefExpr(to(varDecl(equalsBoundNode("var")))))))))))
4954 varDecl(hasType(recordDecl(hasName("StringRef")))).bind("var")))),
4957 on(declRefExpr(to(varDecl(equalsBoundNode("var")))))))))))