Home
last modified time | relevance | path

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

12

/llvm-project-15.0.7/clang/include/clang/AST/
H A DASTTypeTraits.h51 class ASTNodeKind {
54 ASTNodeKind() : KindId(NKI_None) {} in ASTNodeKind() function
58 static ASTNodeKind getFromNodeKind() { in getFromNodeKind()
74 bool isSame(ASTNodeKind Other) const { in isSame()
97 static ASTNodeKind getMostDerivedType(ASTNodeKind Kind1, ASTNodeKind Kind2);
102 static ASTNodeKind getMostDerivedCommonAncestor(ASTNodeKind Kind1,
105 ASTNodeKind getCladeKind() const;
110 static inline ASTNodeKind getEmptyKey() { return ASTNodeKind(); } in getEmptyKey()
117 static bool isEqual(const ASTNodeKind &LHS, const ASTNodeKind &RHS) { in isEqual()
492 ASTNodeKind NodeKind;
[all …]
/llvm-project-15.0.7/clang/lib/AST/
H A DASTTypeTraits.cpp26 const ASTNodeKind::KindInfo ASTNodeKind::AllKindInfo[] = {
59 bool ASTNodeKind::isBaseOf(ASTNodeKind Other, unsigned *Distance) const { in isBaseOf()
76 ASTNodeKind ASTNodeKind::getCladeKind() const { in getCladeKind()
89 ASTNodeKind ASTNodeKind::getMostDerivedType(ASTNodeKind Kind1, in getMostDerivedType()
96 ASTNodeKind ASTNodeKind::getMostDerivedCommonAncestor(ASTNodeKind Kind1, in getMostDerivedCommonAncestor()
105 ASTNodeKind ASTNodeKind::getFromNode(const Decl &D) { in getFromNode()
115 ASTNodeKind ASTNodeKind::getFromNode(const Stmt &S) { in getFromNode()
126 ASTNodeKind ASTNodeKind::getFromNode(const Type &T) { in getFromNode()
136 ASTNodeKind ASTNodeKind::getFromNode(const TypeLoc &T) { in getFromNode()
147 ASTNodeKind ASTNodeKind::getFromNode(const OMPClause &C) { in getFromNode()
[all …]
/llvm-project-15.0.7/clang/unittests/AST/
H A DASTTypeTraitsTest.cpp19 TEST(ASTNodeKind, NoKind) { in TEST() argument
20 EXPECT_FALSE(ASTNodeKind().isBaseOf(ASTNodeKind())); in TEST()
21 EXPECT_FALSE(ASTNodeKind().isSame(ASTNodeKind())); in TEST()
28 TEST(ASTNodeKind, IsNone) { in TEST() argument
29 EXPECT_TRUE(ASTNodeKind().isNone()); in TEST()
34 TEST(ASTNodeKind, Bases) { in TEST() argument
54 TEST(ASTNodeKind, BaseDistances) { in TEST() argument
67 TEST(ASTNodeKind, SameBase) { in TEST() argument
74 TEST(ASTNodeKind, DiffBase) { in TEST() argument
115 TEST(ASTNodeKind, UnknownKind) { in TEST() argument
[all …]
/llvm-project-15.0.7/clang/include/clang/ASTMatchers/Dynamic/
H A DVariantValue.h52 static ArgKind MakeNodeArg(ASTNodeKind MatcherKind) { in MakeNodeArg()
57 ASTNodeKind getMatcherKind() const { in getMatcherKind()
61 ASTNodeKind getNodeKind() const { in getNodeKind()
87 ASTNodeKind NodeKind;
126 ASTNodeKind NodeKind;
139 virtual bool isConvertibleTo(ASTNodeKind Kind,
189 bool hasTypedMatcher(ASTNodeKind NK) const { in hasTypedMatcher()
267 VariantValue(ASTNodeKind NodeKind);
298 const ASTNodeKind &getNodeKind() const;
299 void setNodeKind(ASTNodeKind NodeKind);
[all …]
H A DParser.h105 virtual ASTNodeKind nodeMatcherType(MatcherCtor) const = 0;
155 ASTNodeKind nodeMatcherType(MatcherCtor) const override;
H A DRegistry.h86 static ASTNodeKind nodeMatcherType(MatcherCtor);
/llvm-project-15.0.7/clang/lib/ASTMatchers/Dynamic/
H A DMarshallers.h312 virtual ASTNodeKind nodeMatcherType() const { return ASTNodeKind(); }
584 std::vector<ASTNodeKind> RetKinds;
619 const ASTNodeKind DerivedKind;
934 ASTNodeKind CladeNodeKind;
935 std::vector<ASTNodeKind> NodeKinds;
1010 std::vector<ASTNodeKind> NodeKinds;
1059 std::vector<ASTNodeKind> RetTypes;
1070 std::vector<ASTNodeKind> RetTypes;
1083 std::vector<ASTNodeKind> RetTypes;
1096 std::vector<ASTNodeKind> RetTypes;
[all …]
H A DRegistry.cpp602 ASTNodeKind Registry::nodeMatcherType(MatcherCtor Ctor) { in nodeMatcherType()
648 ASTNodeKind InitialTypes[] = { in getAcceptedCompletionTypes()
649 ASTNodeKind::getFromNodeKind<Decl>(), in getAcceptedCompletionTypes()
650 ASTNodeKind::getFromNodeKind<QualType>(), in getAcceptedCompletionTypes()
651 ASTNodeKind::getFromNodeKind<Type>(), in getAcceptedCompletionTypes()
652 ASTNodeKind::getFromNodeKind<Stmt>(), in getAcceptedCompletionTypes()
655 ASTNodeKind::getFromNodeKind<TypeLoc>()}; in getAcceptedCompletionTypes()
688 std::set<ASTNodeKind> RetKinds; in getMatcherCompletions()
703 ASTNodeKind LeastDerivedKind; in getMatcherCompletions()
716 ASTNodeKind LeastDerivedKind; in getMatcherCompletions()
[all …]
H A DVariantValue.cpp111 bool isConvertibleTo(ASTNodeKind Kind, unsigned *Specificity) const override { in isConvertibleTo()
168 bool isConvertibleTo(ASTNodeKind Kind, unsigned *Specificity) const override { in isConvertibleTo()
211 bool isConvertibleTo(ASTNodeKind Kind, unsigned *Specificity) const override { in isConvertibleTo()
274 VariantValue::VariantValue(ASTNodeKind NodeKind) : Type(VT_Nothing) { in VariantValue()
396 const ASTNodeKind &VariantValue::getNodeKind() const { in getNodeKind()
401 void VariantValue::setNodeKind(ASTNodeKind NewValue) { in setNodeKind()
404 Value.NodeKind = new ASTNodeKind(NewValue); in setNodeKind()
H A DParser.cpp530 ASTNodeKind NK = S->nodeMatcherType(*MappedMatcher); in parseMatcherBuilder()
861 ASTNodeKind Parser::RegistrySema::nodeMatcherType(MatcherCtor Ctor) const { in nodeMatcherType()
/llvm-project-15.0.7/clang/unittests/ASTMatchers/Dynamic/
H A DVariantValueTest.cpp188 VariantValue Value = ASTNodeKind::getFromNodeKind<Stmt>(); in TEST()
190 EXPECT_TRUE(Value.getNodeKind().isSame(ASTNodeKind::getFromNodeKind<Stmt>())); in TEST()
192 Value = ASTNodeKind::getFromNodeKind<CXXMethodDecl>(); in TEST()
195 ASTNodeKind::getFromNodeKind<CXXMethodDecl>())); in TEST()
197 Value.setNodeKind(ASTNodeKind::getFromNodeKind<PointerType>()); in TEST()
200 Value.getNodeKind().isSame(ASTNodeKind::getFromNodeKind<PointerType>())); in TEST()
H A DRegistryTest.cpp533 …Ctor = Registry::buildMatcherCtor(Ctor, {}, Args(ASTNodeKind::getFromNodeKind<WhileStmt>(), ASTNod… in TEST_F()
540 …tor = Registry::buildMatcherCtor(Ctor, {}, Args(ASTNodeKind::getFromNodeKind<FunctionDecl>(), ASTN… in TEST_F()
545 …EXPECT_TRUE(Registry::nodeMatcherType(*lookupMatcherCtor("callExpr")).isSame(ASTNodeKind::getFromN… in TEST_F()
H A DParserTest.cpp37 ASTNodeKind nodeMatcherType(MatcherCtor) const override { return {}; } in nodeMatcherType()
/llvm-project-15.0.7/clang/include/clang/ASTMatchers/
H A DASTMatchersInternal.h461 bool canMatchNodesOfKind(ASTNodeKind Kind) const;
518 bool canConvertTo(ASTNodeKind To) const;
545 DynTypedMatcher(ASTNodeKind SupportedKind, ASTNodeKind RestrictKind,
551 ASTNodeKind SupportedKind;
557 ASTNodeKind RestrictKind;
585 ASTNodeKind::getFromNodeKind<T>()));
671 ASTNodeKind::getFromNodeKind<T>()));
837 const ASTNodeKind SourceKind = getSupportedKind();
1357 Op, ASTNodeKind::getFromNodeKind<T>(),
1549 ASTNodeKind::getFromNodeKind<T>())
[all …]
/llvm-project-15.0.7/clang/lib/ASTMatchers/
H A DASTMatchersInternal.cpp197 ASTNodeKind SupportedKind, in constructVariadic()
220 ASTNodeKind::getMostDerivedType(RestrictKind, IM.RestrictKind); in constructVariadic()
253 ASTNodeKind RestrictKind) { in constructRestrictedWrapper()
266 DynTypedMatcher DynTypedMatcher::trueMatcher(ASTNodeKind NodeKind) { in trueMatcher()
275 bool DynTypedMatcher::canMatchNodesOfKind(ASTNodeKind Kind) const { in canMatchNodesOfKind()
279 DynTypedMatcher DynTypedMatcher::dynCastTo(const ASTNodeKind Kind) const { in dynCastTo()
282 Copy.RestrictKind = ASTNodeKind::getMostDerivedType(Kind, RestrictKind); in dynCastTo()
350 bool DynTypedMatcher::canConvertTo(ASTNodeKind To) const { in canConvertTo()
352 auto QualKind = ASTNodeKind::getFromNodeKind<QualType>(); in canConvertTo()
353 auto TypeKind = ASTNodeKind::getFromNodeKind<Type>(); in canConvertTo()
H A DASTMatchFinder.cpp1060 const std::vector<unsigned short> &getFilterForKind(ASTNodeKind Kind) { in getFilterForKind()
1318 llvm::DenseMap<ASTNodeKind, std::vector<unsigned short>> MatcherFiltersMap;
/llvm-project-15.0.7/clang/include/clang/Tooling/ASTDiff/
H A DASTDiff.h44 ASTNodeKind getType() const;
/llvm-project-15.0.7/clang-tools-extra/clangd/
H A DXRefs.cpp172 ASTNodeKind *NodeKind = nullptr) { in getDeclAtPositionWithRelations()
198 ASTNodeKind *NodeKind = nullptr) { in getDeclAtPosition()
345 const SymbolIndex *Index, ASTNodeKind &NodeKind) { in locateASTReferent()
394 if (NodeKind.isSame(ASTNodeKind::getFromNodeKind<OverrideAttr>()) || in locateASTReferent()
395 NodeKind.isSame(ASTNodeKind::getFromNodeKind<FinalAttr>())) { in locateASTReferent()
541 bool isDependentName(ASTNodeKind NodeKind) { in isDependentName()
542 return NodeKind.isSame(ASTNodeKind::getFromNodeKind<OverloadExpr>()) || in isDependentName()
544 ASTNodeKind::getFromNodeKind<CXXDependentScopeMemberExpr>()) || in isDependentName()
546 ASTNodeKind::getFromNodeKind<DependentScopeDeclRefExpr>()); in isDependentName()
554 ASTNodeKind NodeKind) { in locateSymbolTextually()
[all …]
H A DXRefs.h65 ASTNodeKind NodeKind);
/llvm-project-15.0.7/clang/lib/Tooling/Transformer/
H A DRangeSelector.cpp36 static Error typeError(StringRef ID, const ASTNodeKind &Kind) { in typeError()
41 static Error typeError(StringRef ID, const ASTNodeKind &Kind, in typeError()
H A DRewriteRule.cpp399 std::map<ASTNodeKind, in buildMatchers()
/llvm-project-15.0.7/clang/include/clang/Analysis/FlowSensitive/
H A DMatchSwitch.h140 DynTypedMatcher::VO_AnyOf, ASTNodeKind::getFromNodeKind<Stmt>(), in BuildMatcher()
/llvm-project-15.0.7/clang/unittests/ASTMatchers/
H A DASTMatchersInternalTest.cpp148 ASTNodeKind::getFromNodeKind<QualType>(), in TEST()
/llvm-project-15.0.7/clang/lib/Tooling/Refactoring/Rename/
H A DUSRLocFinder.cpp487 if (ASTNodeKind::getFromNodeKind<Decl>().isBaseOf(Parents[0].getNodeKind())) in getClosestAncestorDecl()
/llvm-project-15.0.7/clang-tools-extra/clangd/unittests/
H A DXRefsTests.cpp1249 testPath(TU.Filename), ASTNodeKind()); in TEST()

12