13 #ifndef LLVM_CLANG_AST_RECURSIVEASTVISITOR_H 14 #define LLVM_CLANG_AST_RECURSIVEASTVISITOR_H 43 #include "llvm/ADT/PointerIntPair.h" 44 #include "llvm/ADT/SmallVector.h" 45 #include "llvm/Support/Casting.h" 48 #include <type_traits> 54 #define UNARYOP_LIST() \ 55 OPERATOR(PostInc) OPERATOR(PostDec) OPERATOR(PreInc) OPERATOR(PreDec) \ 56 OPERATOR(AddrOf) OPERATOR(Deref) OPERATOR(Plus) OPERATOR(Minus) \ 57 OPERATOR(Not) OPERATOR(LNot) OPERATOR(Real) OPERATOR(Imag) \ 58 OPERATOR(Extension) OPERATOR(Coawait) 61 #define BINOP_LIST() \ 62 OPERATOR(PtrMemD) OPERATOR(PtrMemI) OPERATOR(Mul) OPERATOR(Div) \ 63 OPERATOR(Rem) OPERATOR(Add) OPERATOR(Sub) OPERATOR(Shl) OPERATOR(Shr) \ 64 OPERATOR(LT) OPERATOR(GT) OPERATOR(LE) OPERATOR(GE) OPERATOR(EQ) \ 65 OPERATOR(NE) OPERATOR(Cmp) OPERATOR(And) OPERATOR(Xor) OPERATOR(Or) \ 66 OPERATOR(LAnd) OPERATOR(LOr) OPERATOR(Assign) OPERATOR(Comma) 70 OPERATOR(Mul) OPERATOR(Div) OPERATOR(Rem) OPERATOR(Add) OPERATOR(Sub) \ 71 OPERATOR(Shl) OPERATOR(Shr) OPERATOR(And) OPERATOR(Or) OPERATOR(Xor) 79 #define TRY_TO(CALL_EXPR) \ 81 if (!getDerived().CALL_EXPR) \ 161 Derived &
getDerived() {
return *
static_cast<Derived *
>(
this); }
313 #define ATTR_VISITOR_DECLS_ONLY 314 #include "clang/AST/AttrVisitor.inc" 315 #undef ATTR_VISITOR_DECLS_ONLY 322 template<
typename T,
typename U>
323 struct has_same_member_pointer_type : std::false_type {};
324 template<
typename T,
typename U,
typename R,
typename...
P>
325 struct has_same_member_pointer_type<R (T::*)(P...), R (U::*)(P...)>
333 #define TRAVERSE_STMT_BASE(NAME, CLASS, VAR, QUEUE) \ 334 (has_same_member_pointer_type<decltype( \ 335 &RecursiveASTVisitor::Traverse##NAME), \ 336 decltype(&Derived::Traverse##NAME)>::value \ 337 ? static_cast<typename std::conditional< \ 338 has_same_member_pointer_type< \ 339 decltype(&RecursiveASTVisitor::Traverse##NAME), \ 340 decltype(&Derived::Traverse##NAME)>::value, \ 341 Derived &, RecursiveASTVisitor &>::type>(*this) \ 342 .Traverse##NAME(static_cast<CLASS *>(VAR), QUEUE) \ 343 : getDerived().Traverse##NAME(static_cast<CLASS *>(VAR))) 348 #define TRY_TO_TRAVERSE_OR_ENQUEUE_STMT(S) \ 350 if (!TRAVERSE_STMT_BASE(Stmt, Stmt, S, Queue)) \ 356 #define ABSTRACT_STMT(STMT) 357 #define STMT(CLASS, PARENT) \ 358 bool Traverse##CLASS(CLASS *S, DataRecursionQueue *Queue = nullptr); 359 #include "clang/AST/StmtNodes.inc" 365 #define STMT(CLASS, PARENT) \ 366 bool WalkUpFrom##CLASS(CLASS *S) { \ 367 TRY_TO(WalkUpFrom##PARENT(S)); \ 368 TRY_TO(Visit##CLASS(S)); \ 371 bool Visit##CLASS(CLASS *S) { return true; } 372 #include "clang/AST/StmtNodes.inc" 377 #define OPERATOR(NAME) \ 378 bool TraverseUnary##NAME(UnaryOperator *S, \ 379 DataRecursionQueue *Queue = nullptr) { \ 380 if (!getDerived().shouldTraversePostOrder()) \ 381 TRY_TO(WalkUpFromUnary##NAME(S)); \ 382 TRY_TO_TRAVERSE_OR_ENQUEUE_STMT(S->getSubExpr()); \ 385 bool WalkUpFromUnary##NAME(UnaryOperator *S) { \ 386 TRY_TO(WalkUpFromUnaryOperator(S)); \ 387 TRY_TO(VisitUnary##NAME(S)); \ 390 bool VisitUnary##NAME(UnaryOperator *S) { return true; } 398 #define GENERAL_BINOP_FALLBACK(NAME, BINOP_TYPE) \ 399 bool TraverseBin##NAME(BINOP_TYPE *S, DataRecursionQueue *Queue = nullptr) { \ 400 if (!getDerived().shouldTraversePostOrder()) \ 401 TRY_TO(WalkUpFromBin##NAME(S)); \ 402 TRY_TO_TRAVERSE_OR_ENQUEUE_STMT(S->getLHS()); \ 403 TRY_TO_TRAVERSE_OR_ENQUEUE_STMT(S->getRHS()); \ 406 bool WalkUpFromBin##NAME(BINOP_TYPE *S) { \ 407 TRY_TO(WalkUpFrom##BINOP_TYPE(S)); \ 408 TRY_TO(VisitBin##NAME(S)); \ 411 bool VisitBin##NAME(BINOP_TYPE *S) { return true; } 413 #define OPERATOR(NAME) GENERAL_BINOP_FALLBACK(NAME, BinaryOperator) 421 #define OPERATOR(NAME) \ 422 GENERAL_BINOP_FALLBACK(NAME##Assign, CompoundAssignOperator) 426 #undef GENERAL_BINOP_FALLBACK 432 #define ABSTRACT_TYPE(CLASS, BASE) 433 #define TYPE(CLASS, BASE) bool Traverse##CLASS##Type(CLASS##Type *T); 434 #include "clang/AST/TypeNodes.def" 440 #define TYPE(CLASS, BASE) \ 441 bool WalkUpFrom##CLASS##Type(CLASS##Type *T) { \ 442 TRY_TO(WalkUpFrom##BASE(T)); \ 443 TRY_TO(Visit##CLASS##Type(T)); \ 446 bool Visit##CLASS##Type(CLASS##Type *T) { return true; } 447 #include "clang/AST/TypeNodes.def" 453 #define ABSTRACT_TYPELOC(CLASS, BASE) 454 #define TYPELOC(CLASS, BASE) bool Traverse##CLASS##TypeLoc(CLASS##TypeLoc TL); 455 #include "clang/AST/TypeLocNodes.def" 474 #define TYPE(CLASS, BASE) \ 475 bool WalkUpFrom##CLASS##TypeLoc(CLASS##TypeLoc TL) { \ 476 TRY_TO(WalkUpFrom##BASE##Loc(TL)); \ 477 TRY_TO(Visit##CLASS##TypeLoc(TL)); \ 480 bool Visit##CLASS##TypeLoc(CLASS##TypeLoc TL) { return true; } 481 #include "clang/AST/TypeNodes.def" 486 #define ABSTRACT_DECL(DECL) 487 #define DECL(CLASS, BASE) bool Traverse##CLASS##Decl(CLASS##Decl *D); 488 #include "clang/AST/DeclNodes.inc" 494 #define DECL(CLASS, BASE) \ 495 bool WalkUpFrom##CLASS##Decl(CLASS##Decl *D) { \ 496 TRY_TO(WalkUpFrom##BASE(D)); \ 497 TRY_TO(Visit##CLASS##Decl(D)); \ 500 bool Visit##CLASS##Decl(CLASS##Decl *D) { return true; } 501 #include "clang/AST/DeclNodes.inc" 507 bool TraverseTemplateParameterListHelper(TemplateParameterList *TPL);
510 template <
typename T>
511 bool TraverseDeclTemplateParameterLists(T *D);
513 #define DEF_TRAVERSE_TMPL_INST(TMPLDECLKIND) \ 514 bool TraverseTemplateInstantiations(TMPLDECLKIND##TemplateDecl *D); 518 #undef DEF_TRAVERSE_TMPL_INST 519 bool TraverseTemplateArgumentLocsHelper(
const TemplateArgumentLoc *TAL,
521 bool TraverseArrayTypeLocHelper(ArrayTypeLoc TL);
522 bool TraverseRecordHelper(RecordDecl *D);
523 bool TraverseCXXRecordHelper(CXXRecordDecl *D);
524 bool TraverseDeclaratorHelper(DeclaratorDecl *D);
525 bool TraverseDeclContextHelper(DeclContext *DC);
526 bool TraverseFunctionHelper(FunctionDecl *D);
527 bool TraverseVarHelper(VarDecl *D);
528 bool TraverseOMPExecutableDirective(OMPExecutableDirective *S);
529 bool TraverseOMPLoopDirective(OMPLoopDirective *S);
531 #define OPENMP_CLAUSE(Name, Class) bool Visit##Class(Class *C); 532 #include "clang/Basic/OpenMPKinds.def" 534 template <
typename T>
bool VisitOMPClauseList(T *
Node);
537 bool VisitOMPClauseWithPostUpdate(OMPClauseWithPostUpdate *
Node);
540 bool PostVisitStmt(Stmt *S);
543 template <
typename Derived>
544 bool RecursiveASTVisitor<Derived>::dataTraverseNode(Stmt *S,
546 #define DISPATCH_STMT(NAME, CLASS, VAR) \ 547 return TRAVERSE_STMT_BASE(NAME, CLASS, VAR, Queue); 552 if (BinaryOperator *BinOp = dyn_cast<BinaryOperator>(S)) {
553 switch (BinOp->getOpcode()) {
554 #define OPERATOR(NAME) \ 556 DISPATCH_STMT(Bin##NAME, BinaryOperator, S); 562 #define OPERATOR(NAME) \ 563 case BO_##NAME##Assign: \ 564 DISPATCH_STMT(Bin##NAME##Assign, CompoundAssignOperator, S); 570 }
else if (UnaryOperator *UnOp = dyn_cast<UnaryOperator>(S)) {
571 switch (UnOp->getOpcode()) {
572 #define OPERATOR(NAME) \ 574 DISPATCH_STMT(Unary##NAME, UnaryOperator, S); 583 switch (S->getStmtClass()) {
586 #define ABSTRACT_STMT(STMT) 587 #define STMT(CLASS, PARENT) \ 588 case Stmt::CLASS##Class: \ 589 DISPATCH_STMT(CLASS, CLASS, S); 590 #include "clang/AST/StmtNodes.inc" 598 template <
typename Derived>
599 bool RecursiveASTVisitor<Derived>::PostVisitStmt(Stmt *S) {
600 switch (S->getStmtClass()) {
603 #define ABSTRACT_STMT(STMT) 604 #define STMT(CLASS, PARENT) \ 605 case Stmt::CLASS##Class: \ 606 TRY_TO(WalkUpFrom##CLASS(static_cast<CLASS *>(S))); break; 607 #define INITLISTEXPR(CLASS, PARENT) \ 608 case Stmt::CLASS##Class: \ 610 auto ILE = static_cast<CLASS *>(S); \ 611 if (auto Syn = ILE->isSemanticForm() ? ILE->getSyntacticForm() : ILE) \ 612 TRY_TO(WalkUpFrom##CLASS(Syn)); \ 613 if (auto Sem = ILE->isSemanticForm() ? ILE : ILE->getSemanticForm()) \ 614 TRY_TO(WalkUpFrom##CLASS(Sem)); \ 617 #include "clang/AST/StmtNodes.inc" 625 template <
typename Derived>
632 Queue->push_back({S,
false});
637 LocalQueue.push_back({S,
false});
639 while (!LocalQueue.empty()) {
640 auto &CurrSAndVisited = LocalQueue.back();
641 Stmt *CurrS = CurrSAndVisited.getPointer();
642 bool Visited = CurrSAndVisited.getInt();
644 LocalQueue.pop_back();
647 TRY_TO(PostVisitStmt(CurrS));
653 CurrSAndVisited.setInt(
true);
654 size_t N = LocalQueue.size();
655 TRY_TO(dataTraverseNode(CurrS, &LocalQueue));
657 std::reverse(LocalQueue.begin() + N, LocalQueue.end());
659 LocalQueue.pop_back();
666 #define DISPATCH(NAME, CLASS, VAR) \ 667 return getDerived().Traverse##NAME(static_cast<CLASS *>(VAR)) 669 template <
typename Derived>
675 #define ABSTRACT_TYPE(CLASS, BASE) 676 #define TYPE(CLASS, BASE) \ 678 DISPATCH(CLASS##Type, CLASS##Type, const_cast<Type *>(T.getTypePtr())); 679 #include "clang/AST/TypeNodes.def" 685 template <
typename Derived>
691 #define ABSTRACT_TYPELOC(CLASS, BASE) 692 #define TYPELOC(CLASS, BASE) \ 693 case TypeLoc::CLASS: \ 694 return getDerived().Traverse##CLASS##TypeLoc(TL.castAs<CLASS##TypeLoc>()); 695 #include "clang/AST/TypeLocNodes.def" 702 #define VISITORCLASS RecursiveASTVisitor 703 #include "clang/AST/AttrVisitor.inc" 706 template <
typename Derived>
717 #define ABSTRACT_DECL(DECL) 718 #define DECL(CLASS, BASE) \ 720 if (!getDerived().Traverse##CLASS##Decl(static_cast<CLASS##Decl *>(D))) \ 723 #include "clang/AST/DeclNodes.inc" 727 for (
auto *I : D->
attrs()) {
736 template <
typename Derived>
761 template <
typename Derived>
787 template <
typename Derived>
816 template <
typename Derived>
826 template <
typename Derived>
857 template <
typename Derived>
872 return getDerived().TraverseTypeLoc(TSI->getTypeLoc());
896 template <
typename Derived>
899 for (
unsigned I = 0; I != NumArgs; ++I) {
906 template <
typename Derived>
918 template <
typename Derived>
933 #define DEF_TRAVERSE_TYPE(TYPE, CODE) \ 934 template <typename Derived> \ 935 bool RecursiveASTVisitor<Derived>::Traverse##TYPE(TYPE *T) { \ 936 if (!getDerived().shouldTraversePostOrder()) \ 937 TRY_TO(WalkUpFrom##TYPE(T)); \ 939 if (getDerived().shouldTraversePostOrder()) \ 940 TRY_TO(WalkUpFrom##TYPE(T)); \ 981 if (T->getSizeExpr())
991 if (T->getSizeExpr())
997 if (T->getSizeExpr())
1012 for (
const auto &A : T->param_types()) {
1016 for (
const auto &E : T->exceptions()) {
1020 if (Expr *NE = T->getNoexceptExpr())
1072 if (T->getQualifier()) {
1095 if (T->getBaseType().getTypePtr() != T)
1097 for (
auto typeArg : T->getTypeArgsAsWritten()) {
1119 template <typename Derived> \
1122 TRY_TO(WalkUpFrom##
TYPE(const_cast<TYPE *>(TL.getTypePtr()))); \
1123 TRY_TO(WalkUpFrom##
TYPE##Loc(TL)); \
1128 template <
typename Derived>
1182 template <typename Derived>
1248 for (
unsigned I = 0, E = TL.getNumParams(); I != E; ++I) {
1249 if (TL.getParam(I)) {
1251 }
else if (I < T->getNumParams()) {
1305 for (
unsigned I = 0, E = TL.getNumArgs(); I != E; ++I) {
1321 if (TL.getQualifierLoc()) {
1332 if (TL.getQualifierLoc()) {
1336 for (
unsigned I = 0, E = TL.getNumArgs(); I != E; ++I) {
1353 for (
unsigned i = 0, n = TL.getNumTypeArgs();
i != n; ++
i)
1373 template <typename Derived>
1375 const Decl *Child) {
1378 if (isa<BlockDecl>(Child) || isa<CapturedDecl>(Child))
1381 if (
const CXXRecordDecl* Cls = dyn_cast<CXXRecordDecl>(Child))
1382 return Cls->isLambda();
1386 template <
typename Derived>
1391 for (
auto *Child : DC->
decls()) {
1400 #define DEF_TRAVERSE_DECL(DECL, CODE) \ 1401 template <typename Derived> \ 1402 bool RecursiveASTVisitor<Derived>::Traverse##DECL(DECL *D) { \ 1403 bool ShouldVisitChildren = true; \ 1404 bool ReturnValue = true; \ 1405 if (!getDerived().shouldTraversePostOrder()) \ 1406 TRY_TO(WalkUpFrom##DECL(D)); \ 1408 if (ReturnValue && ShouldVisitChildren) \ 1409 TRY_TO(TraverseDeclContextHelper(dyn_cast<DeclContext>(D))); \ 1410 if (ReturnValue && getDerived().shouldTraversePostOrder()) \ 1411 TRY_TO(WalkUpFrom##DECL(D)); \ 1412 return ReturnValue; \ 1421 for (
const auto &I : D->captures()) {
1422 if (I.hasCopyExpr()) {
1426 ShouldVisitChildren =
false;
1431 ShouldVisitChildren =
false;
1443 if (D->getFriendType())
1450 if (D->getFriendType())
1454 for (
unsigned I = 0, E = D->getNumTemplateParameters(); I < E; ++I) {
1457 ITPL != ETPL; ++ITPL) {
1466 if (D->hasExplicitTemplateArgs()) {
1467 TRY_TO(TraverseTemplateArgumentLocsHelper(
1468 D->getTemplateArgsAsWritten()->getTemplateArgs(),
1469 D->getTemplateArgsAsWritten()->NumTemplateArgs));
1503 ShouldVisitChildren =
false;
1521 for (
auto typeParam : *typeParamList) {
1522 TRY_TO(TraverseObjCTypeParamDecl(typeParam));
1535 for (
auto typeParam : *typeParamList) {
1536 TRY_TO(TraverseObjCTypeParamDecl(typeParam));
1549 if (D->getReturnTypeSourceInfo()) {
1555 if (D->isThisDeclarationADefinition()) {
1558 ShouldVisitChildren =
false;
1562 if (D->hasExplicitBound()) {
1571 if (D->getTypeSourceInfo())
1575 ShouldVisitChildren =
false;
1594 for (
auto *I : D->varlists()) {
1600 for (
auto *C : D->clauselists()) {
1601 TRY_TO(TraverseOMPClause(C));
1614 for (
auto *C : D->clauselists())
1615 TRY_TO(TraverseOMPClause(C));
1623 for (
auto *I : D->varlists())
1625 for (
auto *C : D->clauselists())
1626 TRY_TO(TraverseOMPClause(C));
1630 template <typename Derived>
1642 template <
typename Derived>
1643 template <
typename T>
1645 for (
unsigned i = 0;
i < D->getNumTemplateParameterLists();
i++) {
1647 TraverseTemplateParameterListHelper(TPL);
1652 template <
typename Derived>
1656 for (
auto *RD : SD->redecls()) {
1658 if (cast<CXXRecordDecl>(RD)->isInjectedClassName())
1662 cast<ClassTemplateSpecializationDecl>(RD)->getSpecializationKind()) {
1683 template <
typename Derived>
1687 for (
auto *RD : SD->redecls()) {
1689 cast<VarTemplateSpecializationDecl>(RD)->getSpecializationKind()) {
1708 template <
typename Derived>
1712 for (
auto *RD : FD->redecls()) {
1713 switch (RD->getTemplateSpecializationKind()) {
1738 #define DEF_TRAVERSE_TMPL_DECL(TMPLDECLKIND) \ 1739 DEF_TRAVERSE_DECL(TMPLDECLKIND##TemplateDecl, { \ 1740 TRY_TO(TraverseTemplateParameterListHelper(D->getTemplateParameters())); \ 1741 TRY_TO(TraverseDecl(D->getTemplatedDecl())); \ 1749 if (getDerived().shouldVisitTemplateInstantiations() && \ 1750 D == D->getCanonicalDecl()) \ 1751 TRY_TO(TraverseTemplateInstantiations(D)); \ 1766 if (D->hasDefaultArgument() && !D->defaultArgumentWasInherited()) {
1778 if (D->getTypeForDecl())
1780 if (D->hasDefaultArgument() && !D->defaultArgumentWasInherited())
1818 TRY_TO(TraverseDeclTemplateParameterLists(D));
1820 if (D->getTypeForDecl())
1829 template <typename Derived>
1834 TRY_TO(TraverseDeclTemplateParameterLists(D));
1839 template <
typename Derived>
1846 template <
typename Derived>
1848 if (!TraverseRecordHelper(D))
1851 for (
const auto &I : D->
bases()) {
1865 DEF_TRAVERSE_DECL(TMPLDECLKIND##TemplateSpecializationDecl, { \
1890 template <
typename Derived>
1893 for (
unsigned I = 0; I < Count; ++I) {
1899 #define DEF_TRAVERSE_TMPL_PART_SPEC_DECL(TMPLDECLKIND, DECLKIND) \ 1900 DEF_TRAVERSE_DECL(TMPLDECLKIND##TemplatePartialSpecializationDecl, { \ 1902 if (TemplateParameterList *TPL = D->getTemplateParameters()) { \ 1903 for (TemplateParameterList::iterator I = TPL->begin(), E = TPL->end(); \ 1905 TRY_TO(TraverseDecl(*I)); \ 1909 TRY_TO(TraverseTemplateArgumentLocsHelper( \ 1910 D->getTemplateArgsAsWritten()->getTemplateArgs(), \ 1911 D->getTemplateArgsAsWritten()->NumTemplateArgs)); \ 1916 TRY_TO(Traverse##DECLKIND##Helper(D)); \ 1935 template <typename Derived>
1937 TRY_TO(TraverseDeclTemplateParameterLists(D));
1947 TRY_TO(TraverseVarHelper(D));
1948 for (
auto *Binding : D->bindings()) {
1961 TRY_TO(TraverseDeclaratorHelper(D));
1962 if (D->isBitField())
1964 else if (D->hasInClassInitializer())
1969 TRY_TO(TraverseDeclaratorHelper(D));
1970 if (D->isBitField())
1976 TRY_TO(TraverseDeclaratorHelper(D));
1977 if (D->isBitField())
1982 template <typename Derived>
1984 TRY_TO(TraverseDeclTemplateParameterLists(D));
2000 FTSI->TemplateArgumentsAsWritten) {
2001 TRY_TO(TraverseTemplateArgumentLocsHelper(TALI->getTemplateArgs(),
2002 TALI->NumTemplateArgs));
2025 for (
auto *I : Ctor->inits()) {
2039 ShouldVisitChildren =
false;
2040 ReturnValue = TraverseFunctionHelper(D);
2046 ShouldVisitChildren =
false;
2047 ReturnValue = TraverseFunctionHelper(D);
2053 ShouldVisitChildren =
false;
2054 ReturnValue = TraverseFunctionHelper(D);
2060 ShouldVisitChildren =
false;
2061 ReturnValue = TraverseFunctionHelper(D);
2069 ShouldVisitChildren =
false;
2070 ReturnValue = TraverseFunctionHelper(D);
2076 ShouldVisitChildren =
false;
2077 ReturnValue = TraverseFunctionHelper(D);
2080 template <typename Derived>
2082 TRY_TO(TraverseDeclaratorHelper(D));
2084 if (!isa<ParmVarDecl>(D) &&
2096 TRY_TO(TraverseDeclaratorHelper(D));
2097 if (D->hasDefaultArgument() && !D->defaultArgumentWasInherited())
2102 TRY_TO(TraverseVarHelper(D));
2104 if (D->hasDefaultArg() && D->hasUninstantiatedDefaultArg() &&
2105 !D->hasUnparsedDefaultArg())
2108 if (D->hasDefaultArg() && !D->hasUninstantiatedDefaultArg() &&
2109 !D->hasUnparsedDefaultArg())
2126 template <typename Derived> \
2129 bool ShouldVisitChildren =
true; \
2130 bool ReturnValue =
true; \
2132 TRY_TO(WalkUpFrom##
STMT(S)); \
2134 if (ShouldVisitChildren) { \
2136 TRY_TO_TRAVERSE_OR_ENQUEUE_STMT(SubStmt); \
2140 TRY_TO(WalkUpFrom##
STMT(S)); \
2141 return ReturnValue; \
2146 for (
unsigned I = 0, E = S->getNumInputs(); I < E; ++I) {
2149 for (
unsigned I = 0, E = S->getNumOutputs(); I < E; ++I) {
2152 for (
unsigned I = 0, E = S->getNumClobbers(); I < E; ++I) {
2170 for (
auto *I : S->decls()) {
2178 ShouldVisitChildren =
false;
2213 ShouldVisitChildren =
false;
2231 if (S->hasExplicitTemplateArgs()) {
2232 TRY_TO(TraverseTemplateArgumentLocsHelper(S->getTemplateArgs(),
2233 S->getNumTemplateArgs()));
2240 TRY_TO(TraverseTemplateArgumentLocsHelper(S->getTemplateArgs(),
2241 S->getNumTemplateArgs()));
2247 if (S->hasExplicitTemplateArgs()) {
2248 TRY_TO(TraverseTemplateArgumentLocsHelper(S->getTemplateArgs(),
2249 S->getNumTemplateArgs()));
2256 TRY_TO(TraverseTemplateArgumentLocsHelper(S->getTemplateArgs(),
2257 S->getNumTemplateArgs()));
2294 template <typename Derived>
2301 TRY_TO(WalkUpFromInitListExpr(S));
2317 template <
typename Derived>
2337 ShouldVisitChildren =
false;
2345 e = S->semantics_end();
2349 sub = OVE->getSourceExpr();
2352 ShouldVisitChildren =
false;
2377 if (S->isArgumentType())
2384 if (S->isTypeOperand())
2397 if (S->isTypeOperand())
2402 for (
unsigned I = 0, N = S->getNumArgs(); I != N; ++I)
2426 for (
unsigned I = 0, N = S->capture_size(); I != N; ++I) {
2438 TypeLoc TL = S->getCallOperator()->getTypeSourceInfo()->getTypeLoc();
2441 for (
Decl *D : S->getExplicitTemplateParameters()) {
2445 if (S->hasExplicitParameters()) {
2447 for (
unsigned I = 0, N = Proto.
getNumParams(); I != N; ++I)
2450 if (S->hasExplicitResultType())
2454 for (
const auto &E : T->exceptions())
2457 if (
Expr *NE = T->getNoexceptExpr())
2462 ShouldVisitChildren =
false;
2510 if (
TypeSourceInfo *DestroyedTypeInfo = S->getDestroyedTypeInfo())
2566 if (S->hasExplicitTemplateArgs()) {
2567 TRY_TO(TraverseTemplateArgumentLocsHelper(S->getTemplateArgs(),
2568 S->getNumTemplateArgs()));
2574 if (S->hasExplicitTemplateArgs()) {
2575 TRY_TO(TraverseTemplateArgumentLocsHelper(S->getTemplateArgs(),
2576 S->getNumTemplateArgs()));
2614 ShouldVisitChildren =
false;
2618 if (!
getDerived().shouldVisitImplicitCode()) {
2620 ShouldVisitChildren =
false;
2624 if (!
getDerived().shouldVisitImplicitCode()) {
2626 ShouldVisitChildren =
false;
2630 if (!
getDerived().shouldVisitImplicitCode()) {
2632 ShouldVisitChildren =
false;
2636 if (!
getDerived().shouldVisitImplicitCode()) {
2638 ShouldVisitChildren =
false;
2658 template <typename Derived>
2661 for (
auto *C : S->
clauses()) {
2662 TRY_TO(TraverseOMPClause(C));
2667 template <
typename Derived>
2670 return TraverseOMPExecutableDirective(S);
2674 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2677 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2680 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2683 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2686 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2689 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2692 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2695 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2699 TRY_TO(TraverseOMPExecutableDirective(S));
2703 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2706 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2709 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2712 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2715 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2718 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2721 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2724 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2727 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2730 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2733 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2736 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2739 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2742 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2745 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2748 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2751 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2754 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2757 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2760 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2763 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2766 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2769 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2772 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2775 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2778 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2781 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2784 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2787 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2790 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2793 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2796 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2799 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2802 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2805 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2808 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2811 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2814 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2817 template <typename Derived>
2822 #define OPENMP_CLAUSE(Name, Class) \ 2824 TRY_TO(Visit##Class(static_cast<Class *>(C))); \ 2826 #include "clang/Basic/OpenMPKinds.def" 2835 template <
typename Derived>
2842 template <
typename Derived>
2845 TRY_TO(VisitOMPClauseWithPreInit(Node));
2850 template <
typename Derived>
2857 template <
typename Derived>
2860 TRY_TO(VisitOMPClauseList(C));
2864 template <
typename Derived>
2866 TRY_TO(VisitOMPClauseWithPreInit(C));
2871 template <
typename Derived>
2877 template <
typename Derived>
2880 TRY_TO(VisitOMPClauseWithPreInit(C));
2885 template <
typename Derived>
2891 template <
typename Derived>
2897 template <
typename Derived>
2904 template <
typename Derived>
2909 template <
typename Derived>
2914 template <
typename Derived>
2920 template <
typename Derived>
2926 template <
typename Derived>
2932 template <
typename Derived>
2938 template <
typename Derived>
2944 template <
typename Derived>
2947 TRY_TO(VisitOMPClauseWithPreInit(C));
2952 template <
typename Derived>
2958 template <
typename Derived>
2963 template <
typename Derived>
2968 template <
typename Derived>
2974 template <
typename Derived>
2979 template <
typename Derived>
2984 template <
typename Derived>
2989 template <
typename Derived>
2994 template <
typename Derived>
2999 template <
typename Derived>
3004 template <
typename Derived>
3009 template <
typename Derived>
3014 template <
typename Derived>
3015 template <
typename T>
3017 for (
auto *E : Node->varlists()) {
3023 template <
typename Derived>
3025 TRY_TO(VisitOMPClauseList(C));
3032 template <
typename Derived>
3035 TRY_TO(VisitOMPClauseList(C));
3036 TRY_TO(VisitOMPClauseWithPreInit(C));
3040 for (
auto *E : C->
inits()) {
3046 template <
typename Derived>
3049 TRY_TO(VisitOMPClauseList(C));
3050 TRY_TO(VisitOMPClauseWithPostUpdate(C));
3066 template <
typename Derived>
3068 TRY_TO(VisitOMPClauseList(C));
3072 template <
typename Derived>
3076 TRY_TO(VisitOMPClauseList(C));
3077 TRY_TO(VisitOMPClauseWithPostUpdate(C));
3078 for (
auto *E : C->privates()) {
3081 for (
auto *E : C->inits()) {
3084 for (
auto *E : C->updates()) {
3087 for (
auto *E : C->finals()) {
3093 template <
typename Derived>
3096 TRY_TO(VisitOMPClauseList(C));
3100 template <
typename Derived>
3102 TRY_TO(VisitOMPClauseList(C));
3115 template <
typename Derived>
3118 TRY_TO(VisitOMPClauseList(C));
3131 template <
typename Derived>
3136 TRY_TO(VisitOMPClauseList(C));
3137 TRY_TO(VisitOMPClauseWithPostUpdate(C));
3153 template <
typename Derived>
3158 TRY_TO(VisitOMPClauseList(C));
3159 TRY_TO(VisitOMPClauseWithPostUpdate(C));
3175 template <
typename Derived>
3180 TRY_TO(VisitOMPClauseList(C));
3181 TRY_TO(VisitOMPClauseWithPostUpdate(C));
3199 template <
typename Derived>
3201 TRY_TO(VisitOMPClauseList(C));
3205 template <
typename Derived>
3207 TRY_TO(VisitOMPClauseList(C));
3211 template <
typename Derived>
3213 TRY_TO(VisitOMPClauseWithPreInit(C));
3218 template <
typename Derived>
3220 TRY_TO(VisitOMPClauseList(C));
3224 template <
typename Derived>
3227 TRY_TO(VisitOMPClauseWithPreInit(C));
3232 template <
typename Derived>
3235 TRY_TO(VisitOMPClauseWithPreInit(C));
3240 template <
typename Derived>
3247 template <
typename Derived>
3254 template <
typename Derived>
3261 template <
typename Derived>
3267 template <
typename Derived>
3270 TRY_TO(VisitOMPClauseWithPreInit(C));
3275 template <
typename Derived>
3281 template <
typename Derived>
3283 TRY_TO(VisitOMPClauseList(C));
3287 template <
typename Derived>
3289 TRY_TO(VisitOMPClauseList(C));
3293 template <
typename Derived>
3296 TRY_TO(VisitOMPClauseList(C));
3300 template <
typename Derived>
3303 TRY_TO(VisitOMPClauseList(C));
3324 #undef DEF_TRAVERSE_STMT 3325 #undef TRAVERSE_STMT 3326 #undef TRAVERSE_STMT_BASE 3332 #endif // LLVM_CLANG_AST_RECURSIVEASTVISITOR_H ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
A call to an overloaded operator written using operator syntax.
ObjCIndirectCopyRestoreExpr - Represents the passing of a function argument by indirect copy-restore ...
This represents '#pragma omp distribute simd' composite directive.
This represents '#pragma omp master' directive.
Represents a type that was referred to using an elaborated type keyword, e.g., struct S...
VarDecl * getCapturedVar() const
Retrieve the declaration of the local variable being captured.
The null pointer literal (C++11 [lex.nullptr])
This represents '#pragma omp task' directive.
This represents a GCC inline-assembly statement extension.
Represents a function declaration or definition.
Represents a 'co_await' expression while the type of the promise is dependent.
helper_expr_const_range reduction_ops() const
This represents 'thread_limit' clause in the '#pragma omp ...' directive.
Expr * getInit() const
Get the initializer.
bool TraverseCXXBaseSpecifier(const CXXBaseSpecifier &Base)
Recursively visit a base specifier.
helper_expr_const_range lhs_exprs() const
This represents clause 'copyin' in the '#pragma omp ...' directives.
const TypeClass * getTypePtr() const
PointerType - C99 6.7.5.1 - Pointer Declarators.
Represents the dependent type named by a dependently-scoped typename using declaration, e.g.
A (possibly-)qualified type.
#define DEF_TRAVERSE_TMPL_SPEC_DECL(TMPLDECLKIND)
ArrayRef< OMPClause * > clauses()
bool shouldWalkTypesOfTypeLocs() const
Return whether this visitor should recurse into the types of TypeLocs.
const TypeClass * getTypePtr() const
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
This represents 'atomic_default_mem_order' clause in the '#pragma omp requires' directive.
DEF_TRAVERSE_TYPE(ComplexType, { TRY_TO(TraverseType(T->getElementType()));}) DEF_TRAVERSE_TYPE(PointerType
NestedNameSpecifierLoc getTemplateQualifierLoc() const
virtual Stmt * getBody() const
getBody - If this Decl represents a declaration for a body of code, such as a function or method defi...
helper_expr_const_range rhs_exprs() const
private_copies_range private_copies()
Expr *const * semantics_iterator
Represents a 'co_return' statement in the C++ Coroutines TS.
Stmt - This represents one statement.
This represents clause 'in_reduction' in the '#pragma omp task' directives.
This represents '#pragma omp allocate ...' directive.
IfStmt - This represents an if/then/else.
QualType getPointeeType() const
If this is a pointer, ObjC object pointer, or block pointer, this returns the respective pointee...
Class that handles pre-initialization statement for some clauses, like 'shedule', 'firstprivate' etc...
An instance of this object exists for each enum constant that is defined.
Represents the declaration of a typedef-name via the 'typedef' type specifier.
C Language Family Type Representation.
Microsoft's '__super' specifier, stored as a CXXRecordDecl* of the class it appeared in...
Represents a qualified type name for which the type name is dependent.
This represents '#pragma omp for simd' directive.
spec_range specializations() const
The template argument is an expression, and we've not resolved it to one of the other forms yet...
Expr * getAllocator() const
Returns allocator.
#define TRY_TO_TRAVERSE_OR_ENQUEUE_STMT(S)
helper_expr_const_range rhs_exprs() const
Decl - This represents one declaration (or definition), e.g.
This represents 'grainsize' clause in the '#pragma omp ...' directive.
bool shouldTraversePostOrder() const
Return whether this visitor should traverse post-order.
This represents '#pragma omp teams distribute parallel for' composite directive.
Represents the index of the current element of an array being initialized by an ArrayInitLoopExpr.
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
NestedNameSpecifier * getPrefix() const
Return the prefix of this nested name specifier.
This represents 'if' clause in the '#pragma omp ...' directive.
Defines the C++ template declaration subclasses.
bool isWritten() const
Determine whether this initializer is explicitly written in the source code.
Represents a C++11 auto or C++14 decltype(auto) type.
Represents an attribute applied to a statement.
ParenExpr - This represents a parethesized expression, e.g.
helper_expr_const_range assignment_ops() const
bool isCXXForRangeDecl() const
Determine whether this variable is the for-range-declaration in a C++0x for-range statement...
This represents 'priority' clause in the '#pragma omp ...' directive.
bool VisitTypeLoc(TypeLoc TL)
The base class of the type hierarchy.
Represents an empty-declaration.
helper_expr_const_range lhs_exprs() const
This represents '#pragma omp target teams distribute' combined directive.
Represents Objective-C's @throw statement.
bool isSemanticForm() const
llvm::iterator_range< child_iterator > child_range
Declaration of a variable template.
The template argument is a declaration that was provided for a pointer, reference, or pointer to member non-type template parameter.
Represent a C++ namespace.
Represents a call to a C++ constructor.
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent...
Expr * getCondition() const
Returns condition.
A container of type source information.
This represents 'update' clause in the '#pragma omp atomic' directive.
Expr * getCondition() const
Returns condition.
This represents '#pragma omp parallel for' directive.
MS property subscript expression.
This represents '#pragma omp target teams distribute parallel for' combined directive.
bool TraverseTemplateName(TemplateName Template)
Recursively visit a template name and dispatch to the appropriate method.
Describes the capture of a variable or of this, or of a C++1y init-capture.
Represents a C++ constructor within a class.
Represents a prvalue temporary that is written into memory so that a reference can bind to it...
Expr * getAlignment()
Returns alignment.
Expr * getNumForLoops() const
Return the number of associated for-loops.
QualType getElementType() const
bool isCompleteDefinition() const
Return true if this decl has its body fully specified.
An identifier, stored as an IdentifierInfo*.
This represents '#pragma omp target exit data' directive.
This represents 'read' clause in the '#pragma omp atomic' directive.
FriendDecl - Represents the declaration of a friend entity, which can be a function, a type, or a templated function or type.
helper_expr_const_range assignment_ops() const
TRY_TO(TraverseType(T->getPointeeType()))
Represents a variable declaration or definition.
This represents clause 'private' in the '#pragma omp ...' directives.
ObjCIsaExpr - Represent X->isa and X.isa when X is an ObjC 'id' type.
This represents 'num_threads' clause in the '#pragma omp ...' directive.
CompoundLiteralExpr - [C99 6.5.2.5].
Wrapper of type source information for a type with non-trivial direct qualifiers. ...
Derived & getDerived()
Return a reference to the derived class.
Represents an empty template argument, e.g., one that has not been deduced.
This represents 'defaultmap' clause in the '#pragma omp ...' directive.
decl_range decls() const
decls_begin/decls_end - Iterate over the declarations stored in this context.
Declaration context for names declared as extern "C" in C++.
Represents a C++17 deduced template specialization type.
QualifiedTemplateName * getAsQualifiedTemplateName() const
Retrieve the underlying qualified template name structure, if any.
ObjCMethodDecl - Represents an instance or class method declaration.
bool dataTraverseStmtPre(Stmt *S)
Invoked before visiting a statement or expression via data recursion.
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>".
A namespace, stored as a NamespaceDecl*.
Implicit construction of a std::initializer_list<T> object from an array temporary within list-initia...
Stores a list of template parameters for a TemplateDecl and its derived classes.
This represents implicit clause 'flush' for the '#pragma omp flush' directive.
Defines the Objective-C statement AST node classes.
const DeclarationNameInfo & getNameInfo() const
Gets the name info for specified reduction identifier.
SpecifierKind getKind() const
Determine what kind of nested name specifier is stored.
A C++ throw-expression (C++ [except.throw]).
This represents 'reverse_offload' clause in the '#pragma omp requires' directive. ...
Represents an expression – generally a full-expression – that introduces cleanups to be run at the ...
Represents a parameter to a function.
Represents the result of substituting a type for a template type parameter.
Defines the clang::Expr interface and subclasses for C++ expressions.
SmallVectorImpl< llvm::PointerIntPair< Stmt *, 1, bool > > DataRecursionQueue
A queue used for performing data recursion over statements.
Expr * getGrainsize() const
Return safe iteration space distance.
This represents 'nogroup' clause in the '#pragma omp ...' directive.
bool TraverseDecl(Decl *D)
Recursively visit a declaration, by dispatching to Traverse*Decl() based on the argument's dynamic ty...
Represents the builtin template declaration which is used to implement __make_integer_seq and other b...
This represents 'allocator' clause in the '#pragma omp ...' directive.
const Type * getTypePtr() const
This represents 'safelen' clause in the '#pragma omp ...' directive.
A C++ static_cast expression (C++ [expr.static.cast]).
Base wrapper for a particular "section" of type source info.
LabelStmt - Represents a label, which has a substatement.
Represents a struct/union/class.
Represents a C99 designated initializer expression.
Represents a function call to one of __builtin_LINE(), __builtin_COLUMN(), __builtin_FUNCTION(), or __builtin_FILE().
This represents '#pragma omp parallel' directive.
ShuffleVectorExpr - clang-specific builtin-in function __builtin_shufflevector.
Represents a class type in Objective C.
Expr * getAsExpr() const
Retrieve the template argument as an expression.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
A C++ nested-name-specifier augmented with source location information.
Represents a dependent template name that cannot be resolved prior to template instantiation.
This represents 'simd' clause in the '#pragma omp ...' directive.
TypeSourceInfo * getTypeSourceInfo() const
The template argument is an integral value stored in an llvm::APSInt that was provided for an integra...
#define TYPE(CLASS, BASE)
NameKind getNameKind() const
Determine what kind of name this is.
Represents a member of a struct/union/class.
const Type * getAsType() const
Retrieve the type stored in this nested name specifier.
This represents clause 'lastprivate' in the '#pragma omp ...' directives.
TypeSourceInfo * getTypeSourceInfo() const
Returns the declarator information for a base class or delegating initializer.
This represents clause 'allocate' in the '#pragma omp ...' directives.
Represents a place-holder for an object not to be initialized by anything.
Expr * getChunkSize()
Get chunk size.
GNUNullExpr - Implements the GNU __null extension, which is a name for a null pointer constant that h...
This represents clause 'map' in the '#pragma omp ...' directives.
This represents clause 'to' in the '#pragma omp ...' directives.
Represents the result of substituting a set of types for a template type parameter pack...
ParmVarDecl * getParam(unsigned i) const
This represents '#pragma omp target simd' directive.
Represents a C++ member access expression for which lookup produced a set of overloaded functions...
Defines some OpenMP-specific enums and functions.
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
Expr * getSafelen() const
Return safe iteration space distance.
bool TraverseSynOrSemInitListExpr(InitListExpr *S, DataRecursionQueue *Queue=nullptr)
Recursively visit the syntactic or semantic form of an initialization list.
Represents an access specifier followed by colon ':'.
This represents '#pragma omp barrier' directive.
Wrapper of type source information for a type with no direct qualifiers.
Declaration of a function specialization at template class scope.
ObjCArrayLiteral - used for objective-c array containers; as in: @["Hello", NSApp, [NSNumber numberWithInt:42]];.
This is a common base class for loop directives ('omp simd', 'omp for', 'omp for simd' etc...
Expr * getNumTeams()
Return NumTeams number.
Represents a reference to a non-type template parameter pack that has been substituted with a non-tem...
This represents '#pragma omp critical' directive.
ArrayRef< ParmVarDecl * > parameters() const
Represents Objective-C's @catch statement.
#define TRY_TO(CALL_EXPR)
#define DEF_TRAVERSE_TMPL_DECL(TMPLDECLKIND)
Provides information about a function template specialization, which is a FunctionDecl that has been ...
Stmt::child_range getStmtChildren(Stmt *S)
This represents clause 'copyprivate' in the '#pragma omp ...' directives.
IndirectGotoStmt - This represents an indirect goto.
Describes an C or C++ initializer list.
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
Represents a C++ using-declaration.
This represents '#pragma omp distribute parallel for' composite directive.
This represents '#pragma omp teams distribute parallel for simd' composite directive.
An rvalue reference type, per C++11 [dcl.ref].
ForStmt - This represents a 'for (init;cond;inc)' stmt.
NestedNameSpecifierLoc getQualifierLoc() const
Gets the nested name specifier.
Stmt * getBody(const FunctionDecl *&Definition) const
Retrieve the body (definition) of the function.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
bool TraverseDeclarationNameInfo(DeclarationNameInfo NameInfo)
Recursively visit a name with its location information.
#define DEF_TRAVERSE_DECL(DECL, CODE)
const Stmt * getPreInitStmt() const
Get pre-initialization statement for the clause.
Sugar type that represents a type that was qualified by a qualifier written as a macro invocation...
Represents a typeof (or typeof) expression (a GCC extension).
A builtin binary operation expression such as "x + y" or "x <= y".
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier (with source-location information) that qualifies the name of this...
CXXForRangeStmt - This represents C++0x [stmt.ranged]'s ranged for statement, represented as 'for (ra...
Class that handles post-update expression for some clauses, like 'lastprivate', 'reduction' etc...
This represents '#pragma omp cancellation point' directive.
FunctionTemplateSpecializationInfo * getTemplateSpecializationInfo() const
If this function is actually a function template specialization, retrieve information about this func...
This represents 'default' clause in the '#pragma omp ...' directive.
ObjCStringLiteral, used for Objective-C string literals i.e.
spec_range specializations() const
CaseStmt - Represent a case statement.
TypoExpr - Internal placeholder for expressions where typo correction still needs to be performed and...
This represents 'final' clause in the '#pragma omp ...' directive.
This represents 'mergeable' clause in the '#pragma omp ...' directive.
This represents '#pragma omp teams' directive.
bool WalkUpFromType(Type *T)
This represents clause 'reduction' in the '#pragma omp ...' directives.
This represents '#pragma omp teams distribute simd' combined directive.
Represents an Objective-C protocol declaration.
AssociationTy< false > Association
Represents binding an expression to a temporary.
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
helper_expr_const_range source_exprs() const
bool WalkUpFromStmt(Stmt *S)
Represents a C++ member access expression where the actual member referenced could not be resolved be...
This represents clause 'is_device_ptr' in the '#pragma omp ...' directives.
A class that does preorder or postorder depth-first traversal on the entire Clang AST and visits each...
Represents the body of a CapturedStmt, and serves as its DeclContext.
Represents an ObjC class declaration.
#define DEF_TRAVERSE_TMPL_PART_SPEC_DECL(TMPLDECLKIND, DECLKIND)
Represents a linkage specification.
bool isInitCapture(const LambdaCapture *Capture) const
Determine whether one of this lambda's captures is an init-capture.
A binding in a decomposition declaration.
helper_expr_const_range source_exprs() const
A default argument (C++ [dcl.fct.default]).
Represents an extended vector type where either the type or size is dependent.
helper_expr_const_range privates() const
This represents clause 'from' in the '#pragma omp ...' directives.
Represents the this expression in C++.
Represents a K&R-style 'int foo()' function, which has no information available about its arguments...
ObjCPropertyImplDecl - Represents implementation declaration of a property in a class or category imp...
helper_expr_const_range reduction_ops() const
This represents '#pragma omp target parallel for simd' directive.
OpenMP 4.0 [2.4, Array Sections].
This represents 'dynamic_allocators' clause in the '#pragma omp requires' directive.
ConditionalOperator - The ?: ternary operator.
bool WalkUpFromTypeLoc(TypeLoc TL)
Represents a C++ pseudo-destructor (C++ [expr.pseudo]).
Represents the declaration of a typedef-name via a C++11 alias-declaration.
CompoundStmt - This represents a group of statements like { stmt stmt }.
Represents a prototype with parameter type info, e.g.
This represents 'threads' clause in the '#pragma omp ...' directive.
helper_expr_const_range destination_exprs() const
This represents '#pragma omp taskgroup' directive.
Expr * getSimdlen() const
Return safe iteration space distance.
helper_expr_const_range source_exprs() const
TemplateSpecializationKind getTemplateSpecializationKind() const
Determine whether this particular class is a specialization or instantiation of a class template or m...
Represents a ValueDecl that came out of a declarator.
This represents clause 'aligned' in the '#pragma omp ...' directives.
OpenMPClauseKind getClauseKind() const
Returns kind of OpenMP clause (private, shared, reduction, etc.).
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand...
helper_expr_const_range private_copies() const
This represents clause 'task_reduction' in the '#pragma omp taskgroup' directives.
ConstantExpr - An expression that occurs in a constant context and optionally the result of evaluatin...
Represents a call to the builtin function __builtin_va_arg.
helper_expr_const_range destination_exprs() const
spec_range specializations() const
This represents '#pragma omp requires...' directive.
This represents '#pragma omp distribute' directive.
This represents implicit clause 'depend' for the '#pragma omp task' directive.
DEF_TRAVERSE_TYPELOC(ComplexType, { TRY_TO(TraverseType(TL.getTypePtr() ->getElementType()));}) DEF_TRAVERSE_TYPELOC(PointerType
Represents an array type in C++ whose size is a value-dependent expression.
TemplateParameterList * getTemplateParameters() const
Get the list of template parameters.
An expression "T()" which creates a value-initialized rvalue of type T, which is a non-class type...
Represents a shadow constructor declaration introduced into a class by a C++11 using-declaration that...
Represents a block literal declaration, which is like an unnamed FunctionDecl.
This represents 'proc_bind' clause in the '#pragma omp ...' directive.
This represents 'capture' clause in the '#pragma omp atomic' directive.
This represents one expression.
bool TraverseConstructorInitializer(CXXCtorInitializer *Init)
Recursively visit a constructor initializer.
This represents 'simdlen' clause in the '#pragma omp ...' directive.
Declaration of a template type parameter.
Expr * getNumTasks() const
Return safe iteration space distance.
bool WalkUpFromDecl(Decl *D)
UnqualTypeLoc getUnqualifiedLoc() const
Skips past any qualifiers, if this is qualified.
Represents a C++ functional cast expression that builds a temporary object.
The template argument is a null pointer or null pointer to member that was provided for a non-type te...
A C++ const_cast expression (C++ [expr.const.cast]).
BlockExpr - Adaptor class for mixing a BlockDecl with expressions.
Represents a C++ destructor within a class.
bool isThisDeclarationADefinition() const
Returns whether this specific declaration of the function is also a definition that does not contain ...
bool WalkUpFromQualifiedTypeLoc(QualifiedTypeLoc TL)
bool canIgnoreChildDeclWhileTraversingDeclContext(const Decl *Child)
bool isImplicit() const
isImplicit - Indicates whether the declaration was implicitly generated by the implementation.
This represents '#pragma omp target teams distribute parallel for simd' combined directive.
Expr * getAllocator() const
Returns the allocator expression or nullptr, if no allocator is specified.
ObjCDictionaryLiteral - AST node to represent objective-c dictionary literals; as in:"name" : NSUserN...
Represents Objective-C's @synchronized statement.
ObjCSelectorExpr used for @selector in Objective-C.
TypeSourceInfo * getNamedTypeInfo() const
getNamedTypeInfo - Returns the source type info associated to the name.
NestedNameSpecifierLoc getPrefix() const
Return the prefix of this nested-name-specifier.
Represents an expression that computes the length of a parameter pack.
CXXTryStmt - A C++ try block, including all handlers.
AsTypeExpr - Clang builtin function __builtin_astype [OpenCL 6.2.4.2] This AST node provides support ...
bool VisitQualifiedTypeLoc(QualifiedTypeLoc TL)
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
Represents a C++ template name within the type system.
Represents the type decltype(expr) (C++11).
This represents '#pragma omp target teams distribute simd' combined directive.
helper_expr_const_range rhs_exprs() const
Defines the clang::TypeLoc interface and its subclasses.
A namespace alias, stored as a NamespaceAliasDecl*.
This represents 'ordered' clause in the '#pragma omp ...' directive.
bool TraverseAST(ASTContext &AST)
Recursively visits an entire AST, starting from the top-level Decls in the AST traversal scope (by de...
This represents '#pragma omp for' directive.
Declaration of an alias template.
Represents a folding of a pack over an operator.
ReturnStmt - This represents a return, optionally of an expression: return; return 4;...
This represents '#pragma omp target teams' directive.
An expression that sends a message to the given Objective-C object or class.
This represents a Microsoft inline-assembly statement extension.
UnaryOperator - This represents the unary-expression's (except sizeof and alignof), the postinc/postdec operators from postfix-expression, and various extensions.
Represents a GCC generic vector type.
A member reference to an MSPropertyDecl.
An lvalue reference type, per C++11 [dcl.ref].
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
Represents a reference to a non-type template parameter that has been substituted with a template arg...
Expr * getDevice()
Return device number.
This represents '#pragma omp cancel' directive.
This represents 'collapse' clause in the '#pragma omp ...' directive.
This represents clause 'firstprivate' in the '#pragma omp ...' directives.
Represents a C++ deduction guide declaration.
Represents a C++ conversion function within a class.
This template specialization was implicitly instantiated from a template.
CStyleCastExpr - An explicit cast in C (C99 6.5.4) or a C-style cast in C++ (C++ [expr.cast]), which uses the syntax (Type)expr.
bool isNull() const
Return true if this QualType doesn't point to a type yet.
A type, stored as a Type*.
return TraverseArrayTypeLocHelper(TL)
T getAsAdjusted() const
Convert to the specified TypeLoc type, returning a null TypeLoc if this TypeLoc is not of the desired...
TypeLoc getReturnLoc() const
This file defines OpenMP AST classes for clauses.
ImaginaryLiteral - We support imaginary integer and floating point literals, like "1...
This represents '#pragma omp flush' directive.
This represents '#pragma omp parallel for simd' directive.
DoStmt - This represents a 'do/while' stmt.
This represents 'seq_cst' clause in the '#pragma omp atomic' directive.
helper_expr_const_range assignment_ops() const
This represents 'untied' clause in the '#pragma omp ...' directive.
This represents 'unified_address' clause in the '#pragma omp requires' directive. ...
This represents '#pragma omp target enter data' directive.
Wrapper for source info for arrays.
Represents a C++ Modules TS module export declaration.
bool WalkUpFromUnqualTypeLoc(UnqualTypeLoc TL)
This represents 'num_teams' clause in the '#pragma omp ...' directive.
A C++ dynamic_cast expression (C++ [expr.dynamic.cast]).
OpaqueValueExpr - An expression referring to an opaque object of a fixed type and value class...
ConvertVectorExpr - Clang builtin function __builtin_convertvector This AST node provides support for...
This captures a statement into a function.
Represents a call to an inherited base class constructor from an inheriting constructor.
PseudoObjectExpr - An expression which accesses a pseudo-object l-value.
bool shouldVisitTemplateInstantiations() const
Return whether this visitor should recurse into template instantiations.
helper_expr_const_range taskgroup_descriptors() const
This represents '#pragma omp single' directive.
FunctionDecl * getTemplatedDecl() const
Get the underlying function declaration of the template.
Sugar for parentheses used when specifying types.
This represents 'hint' clause in the '#pragma omp ...' directive.
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of enums...
This represents '#pragma omp declare reduction ...' directive.
Pseudo declaration for capturing expressions.
Represents typeof(type), a GCC extension.
Interfaces are the core concept in Objective-C for object oriented design.
bool TraverseTypeLoc(TypeLoc TL)
Recursively visit a type with location, by dispatching to Traverse*TypeLoc() based on the argument ty...
This is a basic class for representing single OpenMP executable directive.
private_copies_range private_copies()
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)"...
A call to a literal operator (C++11 [over.literal]) written as a user-defined literal (C++11 [lit...
DeclarationName getName() const
getName - Returns the embedded declaration name.
Represents a C++2a __builtin_bit_cast(T, v) expression.
This represents 'schedule' clause in the '#pragma omp ...' directive.
Represents a call to a member function that may be written either with member call syntax (e...
DeclStmt - Adaptor class for mixing declarations with statements and expressions. ...
Represents the declaration of a label.
This represents clause 'shared' in the '#pragma omp ...' directives.
Represents a vector type where either the type or size is dependent.
Represents a dependent using declaration which was not marked with typename.
bool TraverseNestedNameSpecifierLoc(NestedNameSpecifierLoc NNS)
Recursively visit a C++ nested-name-specifier with location information.
Represents a static or instance method of a struct/union/class.
Expr * getPriority()
Return Priority number.
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
This represents '#pragma omp taskwait' directive.
This file defines OpenMP nodes for declarative directives.
ObjCCategoryDecl - Represents a category declaration.
unsigned pack_size() const
The number of template arguments in the given template argument pack.
This is a basic class for representing single OpenMP clause.
AtomicExpr - Variadic atomic builtins: __atomic_exchange, __atomic_fetch_*, __atomic_load, __atomic_store, and __atomic_compare_exchange_*, for the similarly-named C++11 instructions, and __c11 variants for <stdatomic.h>, and corresponding __opencl_atomic_* for OpenCL 2.0.
Expr * getNoexceptExpr() const
Return the expression inside noexcept(expression), or a null pointer if there is none (because the ex...
ObjCProtocolExpr used for protocol expression in Objective-C.
bool TraverseStmt(Stmt *S, DataRecursionQueue *Queue=nullptr)
Recursively visit a statement or expression, by dispatching to Traverse*() based on the argument's dy...
Represents one property declaration in an Objective-C interface.
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
This represents '#pragma omp target' directive.
Expr * getNumForLoops() const
Return the number of associated for-loops.
TypeClass getTypeClass() const
This template specialization was instantiated from a template due to an explicit instantiation defini...
This template specialization was formed from a template-id but has not yet been declared, defined, or instantiated.
bool isExplicit() const
Determine whether this was an explicit capture (written between the square brackets introducing the l...
An expression trait intrinsic.
DeclarationNameInfo getNameInfo() const
Represents a C++11 static_assert declaration.
This represents '#pragma omp ordered' directive.
StmtExpr - This is the GNU Statement Expression extension: ({int X=4; X;}).
This represents '#pragma omp target update' directive.
ObjCBoxedExpr - used for generalized expression boxing.
bool TraverseType(QualType T)
Recursively visit a type, by dispatching to Traverse*Type() based on the argument's getTypeClass() pr...
TypeSourceInfo * getTypeSourceInfo() const
Retrieves the type and source location of the base class.
std::vector< Decl * > getTraversalScope() const
helper_expr_const_range lhs_exprs() const
DependentTemplateName * getAsDependentTemplateName() const
Retrieve the underlying dependent template name structure, if any.
Representation of a Microsoft __if_exists or __if_not_exists statement with a dependent name...
bool TraverseLambdaCapture(LambdaExpr *LE, const LambdaCapture *C, Expr *Init)
Recursively visit a lambda capture.
Describes a module import declaration, which makes the contents of the named module visible in the cu...
Represents a pointer type decayed from an array or function type.
The injected class name of a C++ class template or class template partial specialization.
A qualified reference to a name whose declaration cannot yet be resolved.
TypeLoc getElementLoc() const
Represents a pack expansion of types.
CompoundAssignOperator - For compound assignments (e.g.
Defines various enumerations that describe declaration and type specifiers.
Represents a C11 generic selection.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier (with source-location information) that qualifies the name of this...
bool shouldVisitImplicitCode() const
Return whether this visitor should recurse into implicit code, e.g., implicit constructors and destru...
AddrLabelExpr - The GNU address of label extension, representing &&label.
An Objective-C "bridged" cast expression, which casts between Objective-C pointers and C pointers...
ast_type_traits::DynTypedNode Node
Represents a reference to a function parameter pack or init-capture pack that has been substituted bu...
Represents a template argument.
Represents a type which was implicitly adjusted by the semantic engine for arbitrary reasons...
Represents a template name that was expressed as a qualified name.
NullStmt - This is the null statement ";": C99 6.8.3p3.
Dataflow Directional Tag Classes.
This represents 'device' clause in the '#pragma omp ...' directive.
NestedNameSpecifier * getNestedNameSpecifier() const
Retrieve the nested-name-specifier to which this instance refers.
const TemplateArgument & getArgument() const
[C99 6.4.2.2] - A predefined identifier such as func.
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Represents a delete expression for memory deallocation and destructor calls, e.g. ...
helper_expr_const_range privates() const
The template argument is a pack expansion of a template name that was provided for a template templat...
This represents '#pragma omp section' directive.
This represents '#pragma omp teams distribute' directive.
#define DEF_TRAVERSE_TMPL_INST(TMPLDECLKIND)
Represents a field injected from an anonymous union/struct into the parent scope. ...
Expr * getSourceExpression() const
const Expr * getInit() const
A runtime availability query.
A decomposition declaration.
This template specialization was instantiated from a template due to an explicit instantiation declar...
A C++ reinterpret_cast expression (C++ [expr.reinterpret.cast]).
This represents '#pragma omp simd' directive.
Represents a 'co_yield' expression.
Represents a dependent using declaration which was marked with typename.
Represents the declaration of an Objective-C type parameter.
ArrayRef< QualType > exceptions() const
Represents a C++11 pack expansion that produces a sequence of expressions.
This represents 'unified_shared_memory' clause in the '#pragma omp requires' directive.
This represents clause 'linear' in the '#pragma omp ...' directives.
A pointer to member type per C++ 8.3.3 - Pointers to members.
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnd...
This represents '#pragma omp atomic' directive.
A type that was preceded by the 'template' keyword, stored as a Type*.
pack_iterator pack_begin() const
Iterator referencing the first argument of a template argument pack.
Represents a __leave statement.
unsigned getNumParams() const
Represents a pointer to an Objective C object.
helper_expr_const_range privates() const
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
SwitchStmt - This represents a 'switch' stmt.
ObjCImplementationDecl - Represents a class definition - this is where method definitions are specifi...
Represents the body of a coroutine.
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of structs/unions/cl...
Complex values, per C99 6.2.5p11.
Location wrapper for a TemplateArgument.
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
This file defines OpenMP AST classes for executable directives and clauses.
Represents Objective-C's collection statement.
bool TraverseTemplateArgument(const TemplateArgument &Arg)
Recursively visit a template argument and dispatch to the appropriate method for the argument type...
Represents a C++ base or member initializer.
This template specialization was declared or defined by an explicit specialization (C++ [temp...
ObjCEncodeExpr, used for @encode in Objective-C.
helper_expr_const_range destination_exprs() const
Represents a call to a CUDA kernel function.
Represents a 'co_await' expression.
TypeSourceInfo * getTypeSourceInfo() const
ExtVectorType - Extended vector type.
Expr * getSizeExpr() const
TypeLocClass getTypeLocClass() const
Represents Objective-C's @finally statement.
The template argument is a type.
bool TraverseNestedNameSpecifier(NestedNameSpecifier *NNS)
Recursively visit a C++ nested-name-specifier.
The template argument is actually a parameter pack.
const DeclarationNameInfo & getNameInfo() const
Gets the name info for specified reduction identifier.
Represents a base class of a C++ class.
This represents 'write' clause in the '#pragma omp atomic' directive.
ObjCIvarRefExpr - A reference to an ObjC instance variable.
UnqualTypeLoc getUnqualifiedLoc() const
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
GotoStmt - This represents a direct goto.
A use of a default initializer in a constructor or in aggregate initialization.
TypeLoc getTypeLoc() const
Return the TypeLoc wrapper for the type source info.
ArgKind getKind() const
Return the kind of stored template argument.
An attributed type is a type to which a type attribute has been applied.
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate.h) and friends (in DeclFriend.h).
QualType getParamType(unsigned i) const
TemplateDecl * getCXXDeductionGuideTemplate() const
If this name is the name of a C++ deduction guide, return the template associated with that name...
const DeclarationNameInfo & getNameInfo() const
Gets the name info for specified reduction identifier.
Represents a type parameter type in Objective C.
Represents a field declaration created by an @defs(...).
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
This represents '#pragma omp target parallel' directive.
This represents 'nowait' clause in the '#pragma omp ...' directive.
Represents a C++ struct/union/class.
Represents a template specialization type whose template cannot be resolved, e.g. ...
ContinueStmt - This represents a continue.
Represents a loop initializing the elements of an array.
This represents 'num_tasks' clause in the '#pragma omp ...' directive.
The template argument is a template name that was provided for a template template parameter...
Represents a C array with an unspecified size.
ChooseExpr - GNU builtin-in function __builtin_choose_expr.
BinaryConditionalOperator - The GNU extension to the conditional operator which allows the middle ope...
CXXCatchStmt - This represents a C++ catch block.
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr.type.conv]).
bool dataTraverseStmtPost(Stmt *S)
Invoked after visiting a statement or expression via data recursion.
The parameter type of a method or function.
ObjCIvarDecl - Represents an ObjC instance variable.
WhileStmt - This represents a 'while' stmt.
helper_expr_const_range reduction_ops() const
Declaration of a class template.
Expr * getThreadLimit()
Return ThreadLimit number.
Stores a list of Objective-C type parameters for a parameterized class or a category/extension thereo...
This class is used for builtin types like 'int'.
TypeLoc getTypeLoc() const
For a nested-name-specifier that refers to a type, retrieve the type with source-location information...
Represents Objective-C's @try ... @catch ... @finally statement.
This represents '#pragma omp declare mapper ...' directive.
This represents '#pragma omp taskloop simd' directive.
StringLiteral - This represents a string literal expression, e.g.
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
bool TraverseTemplateArguments(const TemplateArgument *Args, unsigned NumArgs)
Recursively visit a set of template arguments.
#define DEF_TRAVERSE_STMT(STMT, CODE)
This represents 'dist_schedule' clause in the '#pragma omp ...' directive.
This represents '#pragma omp sections' directive.
Expr * getHint() const
Returns number of threads.
NestedNameSpecifierLoc getQualifierLoc() const
Gets the nested name specifier.
ObjCBoolLiteralExpr - Objective-C Boolean Literal.
The top declaration context.
This represents '#pragma omp target data' directive.
QualType getAsType() const
Retrieve the type for a type template argument.
A reference to a declared variable, function, enum, etc.
Represents an extended address space qualifier where the input address space value is dependent...
Represents a type template specialization; the template must be a class template, a type alias templa...
NestedNameSpecifierLoc getQualifierLoc() const
Gets the nested name specifier.
BreakStmt - This represents a break.
Expr * getChunkSize()
Get chunk size.
Expr * getNumThreads() const
Returns number of threads.
An instance of this class represents the declaration of a property member.
bool TraverseAttr(Attr *At)
Recursively visit an attribute, by dispatching to Traverse*Attr() based on the argument's dynamic typ...
This represents '#pragma omp taskyield' directive.
This represents a decl that may have a name.
This represents '#pragma omp distribute parallel for simd' composite directive.
A boolean literal, per ([C++ lex.bool] Boolean literals).
OffsetOfExpr - [C99 7.17] - This represents an expression of the form offsetof(record-type, member-designator).
Represents a C array with a specified size that is not an integer-constant-expression.
This represents '#pragma omp parallel sections' directive.
Represents a C++ namespace alias.
A Microsoft C++ __uuidof expression, which gets the _GUID that corresponds to the supplied type or ex...
bool VisitUnqualTypeLoc(UnqualTypeLoc TL)
Declaration of a friend template.
Represents C++ using-directive.
Represents a #pragma detect_mismatch line.
const Expr * getPostUpdateExpr() const
Get post-update expression for the clause.
The global specifier '::'. There is no stored value.
TemplateName getAsTemplateOrTemplatePattern() const
Retrieve the template argument as a template name; if the argument is a pack expansion, return the pattern as a template name.
Represents Objective-C's @autoreleasepool Statement.
This represents '#pragma omp threadprivate ...' directive.
ObjCCategoryImplDecl - An object of this class encapsulates a category @implementation declaration...
Represents the canonical version of C arrays with a specified constant size.
InitListExpr * getSyntacticForm() const
Declaration of a template function.
Represents an implicitly-generated value initialization of an object of a given type.
bool TraverseTemplateArgumentLoc(const TemplateArgumentLoc &ArgLoc)
Recursively visit a template argument location and dispatch to the appropriate method for the argumen...
This represents '#pragma omp target parallel for' directive.
Attr - This represents one attribute.
This represents clause 'use_device_ptr' in the '#pragma omp ...' directives.
Represents a shadow declaration introduced into a scope by a (resolved) using declaration.
Represents a pack of using declarations that a single using-declarator pack-expanded into...
InitListExpr * getSemanticForm() const
Defines the LambdaCapture class.
ObjCCompatibleAliasDecl - Represents alias of a class.
#define STMT(CLASS, PARENT)
This represents '#pragma omp taskloop' directive.