Home
last modified time | relevance | path

Searched refs:ASTNodeKind (Results 1 – 10 of 10) sorted by relevance

/external/clang/include/clang/AST/
DASTTypeTraits.h46 class ASTNodeKind {
49 ASTNodeKind() : KindId(NKI_None) {} in ASTNodeKind() function
53 static ASTNodeKind getFromNodeKind() { in getFromNodeKind()
54 return ASTNodeKind(KindToKindId<T>::Id); in getFromNodeKind()
59 static ASTNodeKind getFromNode(const Decl &D);
60 static ASTNodeKind getFromNode(const Stmt &S);
61 static ASTNodeKind getFromNode(const Type &T);
65 bool isSame(ASTNodeKind Other) const;
73 bool isBaseOf(ASTNodeKind Other, unsigned *Distance = nullptr) const;
79 bool operator<(const ASTNodeKind &Other) const {
[all …]
/external/clang/lib/AST/
DASTTypeTraits.cpp23 const ASTNodeKind::KindInfo ASTNodeKind::AllKindInfo[] = {
42 bool ASTNodeKind::isBaseOf(ASTNodeKind Other, unsigned *Distance) const { in isBaseOf()
46 bool ASTNodeKind::isSame(ASTNodeKind Other) const { in isSame()
50 bool ASTNodeKind::isBaseOf(NodeKindId Base, NodeKindId Derived, in isBaseOf()
63 StringRef ASTNodeKind::asStringRef() const { return AllKindInfo[KindId].Name; } in asStringRef()
65 ASTNodeKind ASTNodeKind::getMostDerivedType(ASTNodeKind Kind1, in getMostDerivedType()
66 ASTNodeKind Kind2) { in getMostDerivedType()
69 return ASTNodeKind(); in getMostDerivedType()
72 ASTNodeKind ASTNodeKind::getMostDerivedCommonAncestor(ASTNodeKind Kind1, in getMostDerivedCommonAncestor()
73 ASTNodeKind Kind2) { in getMostDerivedCommonAncestor()
[all …]
/external/clang/unittests/AST/
DASTTypeTraitsTest.cpp20 TEST(ASTNodeKind, NoKind) { in TEST() argument
21 EXPECT_FALSE(ASTNodeKind().isBaseOf(ASTNodeKind())); in TEST()
22 EXPECT_FALSE(ASTNodeKind().isSame(ASTNodeKind())); in TEST()
25 template <typename T> static ASTNodeKind DNT() { in DNT()
26 return ASTNodeKind::getFromNodeKind<T>(); in DNT()
29 TEST(ASTNodeKind, IsNone) { in TEST() argument
30 EXPECT_TRUE(ASTNodeKind().isNone()); in TEST()
35 TEST(ASTNodeKind, Bases) { in TEST() argument
43 TEST(ASTNodeKind, BaseDistances) { in TEST() argument
56 TEST(ASTNodeKind, SameBase) { in TEST() argument
[all …]
/external/clang/lib/ASTMatchers/Dynamic/
DMarshallers.h65 return ArgKind(ast_type_traits::ASTNodeKind::getFromNodeKind<T>());
122 virtual void getArgKinds(ast_type_traits::ASTNodeKind ThisKind, unsigned ArgNo,
133 ast_type_traits::ASTNodeKind Kind, unsigned *Specificity = nullptr,
134 ast_type_traits::ASTNodeKind *LeastDerivedKind = nullptr) const = 0;
142 ArrayRef<ast_type_traits::ASTNodeKind> RetKinds,
143 ast_type_traits::ASTNodeKind Kind, unsigned *Specificity,
144 ast_type_traits::ASTNodeKind *LeastDerivedKind) {
145 for (const ast_type_traits::ASTNodeKind &NodeKind : RetKinds) {
177 ArrayRef<ast_type_traits::ASTNodeKind> RetKinds,
191 void getArgKinds(ast_type_traits::ASTNodeKind ThisKind, unsigned ArgNo,
[all …]
DRegistry.cpp373 const std::set<ASTNodeKind> &KS) { in operator <<()
375 for (std::set<ASTNodeKind>::const_iterator I = KS.begin(), E = KS.end(); in operator <<()
392 ASTNodeKind InitialTypes[] = { in getAcceptedCompletionTypes()
393 ASTNodeKind::getFromNodeKind<Decl>(), in getAcceptedCompletionTypes()
394 ASTNodeKind::getFromNodeKind<QualType>(), in getAcceptedCompletionTypes()
395 ASTNodeKind::getFromNodeKind<Type>(), in getAcceptedCompletionTypes()
396 ASTNodeKind::getFromNodeKind<Stmt>(), in getAcceptedCompletionTypes()
397 ASTNodeKind::getFromNodeKind<NestedNameSpecifier>(), in getAcceptedCompletionTypes()
398 ASTNodeKind::getFromNodeKind<NestedNameSpecifierLoc>(), in getAcceptedCompletionTypes()
399 ASTNodeKind::getFromNodeKind<TypeLoc>()}; in getAcceptedCompletionTypes()
[all …]
DVariantValue.cpp101 bool isConvertibleTo(ast_type_traits::ASTNodeKind Kind, in isConvertibleTo()
159 bool isConvertibleTo(ast_type_traits::ASTNodeKind Kind, in isConvertibleTo()
202 bool isConvertibleTo(ast_type_traits::ASTNodeKind Kind, in isConvertibleTo()
/external/clang/include/clang/ASTMatchers/Dynamic/
DVariantValue.h46 ArgKind(ast_type_traits::ASTNodeKind MatcherKind) in ArgKind()
50 ast_type_traits::ASTNodeKind getMatcherKind() const { in getMatcherKind()
74 ast_type_traits::ASTNodeKind MatcherKind;
96 MatcherOps(ast_type_traits::ASTNodeKind NodeKind) : NodeKind(NodeKind) {} in MatcherOps()
117 ast_type_traits::ASTNodeKind NodeKind;
130 virtual bool isConvertibleTo(ast_type_traits::ASTNodeKind Kind,
187 bool isConvertibleTo(ast_type_traits::ASTNodeKind Kind, in isConvertibleTo()
226 : MatcherOps(ast_type_traits::ASTNodeKind::getFromNodeKind<T>()) {} in TypedMatcherOps()
/external/clang/lib/ASTMatchers/
DASTMatchersInternal.cpp135 RestrictKind = ast_type_traits::ASTNodeKind::getMostDerivedType( in constructVariadic()
163 ast_type_traits::ASTNodeKind NodeKind) { in trueMatcher()
168 ast_type_traits::ASTNodeKind Kind) const { in canMatchNodesOfKind()
173 const ast_type_traits::ASTNodeKind Kind) const { in dynCastTo()
177 ast_type_traits::ASTNodeKind::getMostDerivedType(Kind, RestrictKind); in dynCastTo()
216 bool DynTypedMatcher::canConvertTo(ast_type_traits::ASTNodeKind To) const { in canConvertTo()
218 auto QualKind = ast_type_traits::ASTNodeKind::getFromNodeKind<QualType>(); in canConvertTo()
219 auto TypeKind = ast_type_traits::ASTNodeKind::getFromNodeKind<Type>(); in canConvertTo()
DASTMatchFinder.cpp566 getFilterForKind(ast_type_traits::ASTNodeKind Kind) { in getFilterForKind()
742 llvm::DenseMap<ast_type_traits::ASTNodeKind, std::vector<unsigned short>>
/external/clang/include/clang/ASTMatchers/
DASTMatchersInternal.h263 SupportedKind(ast_type_traits::ASTNodeKind::getFromNodeKind<T>()), in DynTypedMatcher()
289 static DynTypedMatcher trueMatcher(ast_type_traits::ASTNodeKind NodeKind);
296 bool canMatchNodesOfKind(ast_type_traits::ASTNodeKind Kind) const;
300 DynTypedMatcher dynCastTo(const ast_type_traits::ASTNodeKind Kind) const;
326 typedef std::pair<ast_type_traits::ASTNodeKind, uint64_t> MatcherIDType;
338 ast_type_traits::ASTNodeKind getSupportedKind() const { in getSupportedKind()
348 return canConvertTo(ast_type_traits::ASTNodeKind::getFromNodeKind<T>()); in canConvertTo()
350 bool canConvertTo(ast_type_traits::ASTNodeKind To) const;
369 DynTypedMatcher(ast_type_traits::ASTNodeKind SupportedKind, in DynTypedMatcher()
370 ast_type_traits::ASTNodeKind RestrictKind, in DynTypedMatcher()
[all …]