Home
last modified time | relevance | path

Searched refs:isBaseOf (Results 1 – 6 of 6) sorted by relevance

/external/clang/unittests/AST/
DASTTypeTraitsTest.cpp21 EXPECT_FALSE(ASTNodeKind().isBaseOf(ASTNodeKind())); in TEST()
36 EXPECT_TRUE(DNT<Decl>().isBaseOf(DNT<VarDecl>())); in TEST()
38 EXPECT_FALSE(DNT<VarDecl>().isBaseOf(DNT<Decl>())); in TEST()
45 EXPECT_TRUE(DNT<Expr>().isBaseOf(DNT<Expr>(), &Distance)); in TEST()
48 EXPECT_TRUE(DNT<Stmt>().isBaseOf(DNT<IfStmt>(), &Distance)); in TEST()
52 EXPECT_TRUE(DNT<DeclaratorDecl>().isBaseOf(DNT<ParmVarDecl>(), &Distance)); in TEST()
57 EXPECT_TRUE(DNT<Expr>().isBaseOf(DNT<CallExpr>())); in TEST()
58 EXPECT_TRUE(DNT<Expr>().isBaseOf(DNT<BinaryOperator>())); in TEST()
59 EXPECT_FALSE(DNT<CallExpr>().isBaseOf(DNT<BinaryOperator>())); in TEST()
60 EXPECT_FALSE(DNT<BinaryOperator>().isBaseOf(DNT<CallExpr>())); in TEST()
[all …]
/external/clang/lib/AST/
DASTTypeTraits.cpp42 bool ASTNodeKind::isBaseOf(ASTNodeKind Other, unsigned *Distance) const { in isBaseOf() function in clang::ast_type_traits::ASTNodeKind
43 return isBaseOf(KindId, Other.KindId, Distance); in isBaseOf()
46 bool ASTNodeKind::isBaseOf(NodeKindId Base, NodeKindId Derived, in isBaseOf() function in clang::ast_type_traits::ASTNodeKind
63 if (Kind1.isBaseOf(Kind2)) return Kind2; in getMostDerivedType()
64 if (Kind2.isBaseOf(Kind1)) return Kind1; in getMostDerivedType()
71 while (!isBaseOf(Parent, Kind2.KindId, nullptr) && Parent != NKI_None) { in getMostDerivedCommonAncestor()
/external/clang/include/clang/AST/
DASTTypeTraits.h75 bool isBaseOf(ASTNodeKind Other, unsigned *Distance = nullptr) const;
149 static bool isBaseOf(NodeKindId Base, NodeKindId Derived, unsigned *Distance);
375 if (ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind))
380 assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind));
/external/clang/lib/ASTMatchers/
DASTMatchersInternal.cpp170 return RestrictKind.isBaseOf(Kind); in canMatchNodesOfKind()
185 if (RestrictKind.isBaseOf(DynNode.getNodeKind()) && in matches()
199 assert(RestrictKind.isBaseOf(DynNode.getNodeKind())); in matchesNoKindCheck()
225 return From.isBaseOf(To); in canConvertTo()
/external/clang/lib/ASTMatchers/Dynamic/
DVariantValue.cpp44 if (!MatcherKind.isBaseOf(To.MatcherKind, &Distance)) in isConvertibleTo()
DMarshallers.h405 if (Kind.isSame(DerivedKind) || !Kind.isBaseOf(DerivedKind)) {