13 #ifndef LLVM_CLANG_AST_RECURSIVEASTVISITOR_H 14 #define LLVM_CLANG_AST_RECURSIVEASTVISITOR_H 44 #include "llvm/ADT/PointerIntPair.h" 45 #include "llvm/ADT/SmallVector.h" 46 #include "llvm/Support/Casting.h" 49 #include <type_traits> 55 #define UNARYOP_LIST() \ 56 OPERATOR(PostInc) OPERATOR(PostDec) OPERATOR(PreInc) OPERATOR(PreDec) \ 57 OPERATOR(AddrOf) OPERATOR(Deref) OPERATOR(Plus) OPERATOR(Minus) \ 58 OPERATOR(Not) OPERATOR(LNot) OPERATOR(Real) OPERATOR(Imag) \ 59 OPERATOR(Extension) OPERATOR(Coawait) 62 #define BINOP_LIST() \ 63 OPERATOR(PtrMemD) OPERATOR(PtrMemI) OPERATOR(Mul) OPERATOR(Div) \ 64 OPERATOR(Rem) OPERATOR(Add) OPERATOR(Sub) OPERATOR(Shl) OPERATOR(Shr) \ 65 OPERATOR(LT) OPERATOR(GT) OPERATOR(LE) OPERATOR(GE) OPERATOR(EQ) \ 66 OPERATOR(NE) OPERATOR(Cmp) OPERATOR(And) OPERATOR(Xor) OPERATOR(Or) \ 67 OPERATOR(LAnd) OPERATOR(LOr) OPERATOR(Assign) OPERATOR(Comma) 71 OPERATOR(Mul) OPERATOR(Div) OPERATOR(Rem) OPERATOR(Add) OPERATOR(Sub) \ 72 OPERATOR(Shl) OPERATOR(Shr) OPERATOR(And) OPERATOR(Or) OPERATOR(Xor) 80 #define TRY_TO(CALL_EXPR) \ 82 if (!getDerived().CALL_EXPR) \ 162 Derived &
getDerived() {
return *
static_cast<Derived *
>(
this); }
319 #define ATTR_VISITOR_DECLS_ONLY 320 #include "clang/AST/AttrVisitor.inc" 321 #undef ATTR_VISITOR_DECLS_ONLY 328 template<
typename T,
typename U>
329 struct has_same_member_pointer_type : std::false_type {};
330 template<
typename T,
typename U,
typename R,
typename...
P>
331 struct has_same_member_pointer_type<R (T::*)(P...), R (U::*)(P...)>
339 #define TRAVERSE_STMT_BASE(NAME, CLASS, VAR, QUEUE) \ 340 (has_same_member_pointer_type<decltype( \ 341 &RecursiveASTVisitor::Traverse##NAME), \ 342 decltype(&Derived::Traverse##NAME)>::value \ 343 ? static_cast<typename std::conditional< \ 344 has_same_member_pointer_type< \ 345 decltype(&RecursiveASTVisitor::Traverse##NAME), \ 346 decltype(&Derived::Traverse##NAME)>::value, \ 347 Derived &, RecursiveASTVisitor &>::type>(*this) \ 348 .Traverse##NAME(static_cast<CLASS *>(VAR), QUEUE) \ 349 : getDerived().Traverse##NAME(static_cast<CLASS *>(VAR))) 354 #define TRY_TO_TRAVERSE_OR_ENQUEUE_STMT(S) \ 356 if (!TRAVERSE_STMT_BASE(Stmt, Stmt, S, Queue)) \ 362 #define ABSTRACT_STMT(STMT) 363 #define STMT(CLASS, PARENT) \ 364 bool Traverse##CLASS(CLASS *S, DataRecursionQueue *Queue = nullptr); 365 #include "clang/AST/StmtNodes.inc" 371 #define STMT(CLASS, PARENT) \ 372 bool WalkUpFrom##CLASS(CLASS *S) { \ 373 TRY_TO(WalkUpFrom##PARENT(S)); \ 374 TRY_TO(Visit##CLASS(S)); \ 377 bool Visit##CLASS(CLASS *S) { return true; } 378 #include "clang/AST/StmtNodes.inc" 383 #define OPERATOR(NAME) \ 384 bool TraverseUnary##NAME(UnaryOperator *S, \ 385 DataRecursionQueue *Queue = nullptr) { \ 386 if (!getDerived().shouldTraversePostOrder()) \ 387 TRY_TO(WalkUpFromUnary##NAME(S)); \ 388 TRY_TO_TRAVERSE_OR_ENQUEUE_STMT(S->getSubExpr()); \ 391 bool WalkUpFromUnary##NAME(UnaryOperator *S) { \ 392 TRY_TO(WalkUpFromUnaryOperator(S)); \ 393 TRY_TO(VisitUnary##NAME(S)); \ 396 bool VisitUnary##NAME(UnaryOperator *S) { return true; } 404 #define GENERAL_BINOP_FALLBACK(NAME, BINOP_TYPE) \ 405 bool TraverseBin##NAME(BINOP_TYPE *S, DataRecursionQueue *Queue = nullptr) { \ 406 if (!getDerived().shouldTraversePostOrder()) \ 407 TRY_TO(WalkUpFromBin##NAME(S)); \ 408 TRY_TO_TRAVERSE_OR_ENQUEUE_STMT(S->getLHS()); \ 409 TRY_TO_TRAVERSE_OR_ENQUEUE_STMT(S->getRHS()); \ 412 bool WalkUpFromBin##NAME(BINOP_TYPE *S) { \ 413 TRY_TO(WalkUpFrom##BINOP_TYPE(S)); \ 414 TRY_TO(VisitBin##NAME(S)); \ 417 bool VisitBin##NAME(BINOP_TYPE *S) { return true; } 419 #define OPERATOR(NAME) GENERAL_BINOP_FALLBACK(NAME, BinaryOperator) 427 #define OPERATOR(NAME) \ 428 GENERAL_BINOP_FALLBACK(NAME##Assign, CompoundAssignOperator) 432 #undef GENERAL_BINOP_FALLBACK 438 #define ABSTRACT_TYPE(CLASS, BASE) 439 #define TYPE(CLASS, BASE) bool Traverse##CLASS##Type(CLASS##Type *T); 440 #include "clang/AST/TypeNodes.inc" 446 #define TYPE(CLASS, BASE) \ 447 bool WalkUpFrom##CLASS##Type(CLASS##Type *T) { \ 448 TRY_TO(WalkUpFrom##BASE(T)); \ 449 TRY_TO(Visit##CLASS##Type(T)); \ 452 bool Visit##CLASS##Type(CLASS##Type *T) { return true; } 453 #include "clang/AST/TypeNodes.inc" 459 #define ABSTRACT_TYPELOC(CLASS, BASE) 460 #define TYPELOC(CLASS, BASE) bool Traverse##CLASS##TypeLoc(CLASS##TypeLoc TL); 461 #include "clang/AST/TypeLocNodes.def" 480 #define TYPE(CLASS, BASE) \ 481 bool WalkUpFrom##CLASS##TypeLoc(CLASS##TypeLoc TL) { \ 482 TRY_TO(WalkUpFrom##BASE##Loc(TL)); \ 483 TRY_TO(Visit##CLASS##TypeLoc(TL)); \ 486 bool Visit##CLASS##TypeLoc(CLASS##TypeLoc TL) { return true; } 487 #include "clang/AST/TypeNodes.inc" 492 #define ABSTRACT_DECL(DECL) 493 #define DECL(CLASS, BASE) bool Traverse##CLASS##Decl(CLASS##Decl *D); 494 #include "clang/AST/DeclNodes.inc" 500 #define DECL(CLASS, BASE) \ 501 bool WalkUpFrom##CLASS##Decl(CLASS##Decl *D) { \ 502 TRY_TO(WalkUpFrom##BASE(D)); \ 503 TRY_TO(Visit##CLASS##Decl(D)); \ 506 bool Visit##CLASS##Decl(CLASS##Decl *D) { return true; } 507 #include "clang/AST/DeclNodes.inc" 513 bool TraverseTemplateParameterListHelper(TemplateParameterList *TPL);
516 template <
typename T>
517 bool TraverseDeclTemplateParameterLists(T *D);
519 #define DEF_TRAVERSE_TMPL_INST(TMPLDECLKIND) \ 520 bool TraverseTemplateInstantiations(TMPLDECLKIND##TemplateDecl *D); 524 #undef DEF_TRAVERSE_TMPL_INST 525 bool TraverseTemplateArgumentLocsHelper(
const TemplateArgumentLoc *TAL,
527 bool TraverseArrayTypeLocHelper(ArrayTypeLoc TL);
528 bool TraverseRecordHelper(RecordDecl *D);
529 bool TraverseCXXRecordHelper(CXXRecordDecl *D);
530 bool TraverseDeclaratorHelper(DeclaratorDecl *D);
531 bool TraverseDeclContextHelper(DeclContext *DC);
532 bool TraverseFunctionHelper(FunctionDecl *D);
533 bool TraverseVarHelper(VarDecl *D);
534 bool TraverseOMPExecutableDirective(OMPExecutableDirective *S);
535 bool TraverseOMPLoopDirective(OMPLoopDirective *S);
537 #define OPENMP_CLAUSE(Name, Class) bool Visit##Class(Class *C); 538 #include "clang/Basic/OpenMPKinds.def" 540 template <
typename T>
bool VisitOMPClauseList(T *
Node);
543 bool VisitOMPClauseWithPostUpdate(OMPClauseWithPostUpdate *
Node);
546 bool PostVisitStmt(Stmt *S);
549 template <
typename Derived>
550 bool RecursiveASTVisitor<Derived>::dataTraverseNode(Stmt *S,
552 #define DISPATCH_STMT(NAME, CLASS, VAR) \ 553 return TRAVERSE_STMT_BASE(NAME, CLASS, VAR, Queue); 558 if (BinaryOperator *BinOp = dyn_cast<BinaryOperator>(S)) {
559 switch (BinOp->getOpcode()) {
560 #define OPERATOR(NAME) \ 562 DISPATCH_STMT(Bin##NAME, BinaryOperator, S); 568 #define OPERATOR(NAME) \ 569 case BO_##NAME##Assign: \ 570 DISPATCH_STMT(Bin##NAME##Assign, CompoundAssignOperator, S); 576 }
else if (UnaryOperator *UnOp = dyn_cast<UnaryOperator>(S)) {
577 switch (UnOp->getOpcode()) {
578 #define OPERATOR(NAME) \ 580 DISPATCH_STMT(Unary##NAME, UnaryOperator, S); 589 switch (S->getStmtClass()) {
592 #define ABSTRACT_STMT(STMT) 593 #define STMT(CLASS, PARENT) \ 594 case Stmt::CLASS##Class: \ 595 DISPATCH_STMT(CLASS, CLASS, S); 596 #include "clang/AST/StmtNodes.inc" 604 template <
typename Derived>
605 bool RecursiveASTVisitor<Derived>::PostVisitStmt(Stmt *S) {
606 switch (S->getStmtClass()) {
609 #define ABSTRACT_STMT(STMT) 610 #define STMT(CLASS, PARENT) \ 611 case Stmt::CLASS##Class: \ 612 TRY_TO(WalkUpFrom##CLASS(static_cast<CLASS *>(S))); break; 613 #define INITLISTEXPR(CLASS, PARENT) \ 614 case Stmt::CLASS##Class: \ 616 auto ILE = static_cast<CLASS *>(S); \ 617 if (auto Syn = ILE->isSemanticForm() ? ILE->getSyntacticForm() : ILE) \ 618 TRY_TO(WalkUpFrom##CLASS(Syn)); \ 619 if (auto Sem = ILE->isSemanticForm() ? ILE : ILE->getSemanticForm()) \ 620 TRY_TO(WalkUpFrom##CLASS(Sem)); \ 623 #include "clang/AST/StmtNodes.inc" 631 template <
typename Derived>
638 Queue->push_back({S,
false});
643 LocalQueue.push_back({S,
false});
645 while (!LocalQueue.empty()) {
646 auto &CurrSAndVisited = LocalQueue.back();
647 Stmt *CurrS = CurrSAndVisited.getPointer();
648 bool Visited = CurrSAndVisited.getInt();
650 LocalQueue.pop_back();
653 TRY_TO(PostVisitStmt(CurrS));
659 CurrSAndVisited.setInt(
true);
660 size_t N = LocalQueue.size();
661 TRY_TO(dataTraverseNode(CurrS, &LocalQueue));
663 std::reverse(LocalQueue.begin() + N, LocalQueue.end());
665 LocalQueue.pop_back();
672 #define DISPATCH(NAME, CLASS, VAR) \ 673 return getDerived().Traverse##NAME(static_cast<CLASS *>(VAR)) 675 template <
typename Derived>
681 #define ABSTRACT_TYPE(CLASS, BASE) 682 #define TYPE(CLASS, BASE) \ 684 DISPATCH(CLASS##Type, CLASS##Type, const_cast<Type *>(T.getTypePtr())); 685 #include "clang/AST/TypeNodes.inc" 691 template <
typename Derived>
697 #define ABSTRACT_TYPELOC(CLASS, BASE) 698 #define TYPELOC(CLASS, BASE) \ 699 case TypeLoc::CLASS: \ 700 return getDerived().Traverse##CLASS##TypeLoc(TL.castAs<CLASS##TypeLoc>()); 701 #include "clang/AST/TypeLocNodes.def" 708 #define VISITORCLASS RecursiveASTVisitor 709 #include "clang/AST/AttrVisitor.inc" 712 template <
typename Derived>
723 #define ABSTRACT_DECL(DECL) 724 #define DECL(CLASS, BASE) \ 726 if (!getDerived().Traverse##CLASS##Decl(static_cast<CLASS##Decl *>(D))) \ 729 #include "clang/AST/DeclNodes.inc" 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)); \ 970 if (T->getSizeExpr())
984 if (T->getSizeExpr())
994 if (T->getSizeExpr())
1000 if (T->getSizeExpr())
1015 for (
const auto &A : T->param_types()) {
1019 for (
const auto &E : T->exceptions()) {
1023 if (Expr *
NE = T->getNoexceptExpr())
1045 if (T->isConstrained()) {
1081 if (T->getQualifier()) {
1104 if (T->getBaseType().getTypePtr() != T)
1106 for (
auto typeArg : T->getTypeArgsAsWritten()) {
1128 template <typename Derived> \
1131 TRY_TO(WalkUpFrom##
TYPE(const_cast<TYPE *>(TL.getTypePtr()))); \
1132 TRY_TO(WalkUpFrom##
TYPE##Loc(TL)); \
1137 template <
typename Derived>
1180 if (
auto *TSI = TL.getClassTInfo())
1193 template <typename Derived>
1259 for (
unsigned I = 0, E = TL.getNumParams(); I != E; ++I) {
1260 if (TL.getParam(I)) {
1262 }
else if (I < T->getNumParams()) {
1296 if (TL.isConstrained()) {
1299 for (
unsigned I = 0, E = TL.getNumArgs(); I != E; ++I)
1322 for (
unsigned I = 0, E = TL.getNumArgs(); I != E; ++I) {
1338 if (TL.getQualifierLoc()) {
1349 if (TL.getQualifierLoc()) {
1353 for (
unsigned I = 0, E = TL.getNumArgs(); I != E; ++I) {
1370 for (
unsigned i = 0, n = TL.getNumTypeArgs(); i != n; ++i)
1390 template <typename Derived>
1392 const Decl *Child) {
1395 if (isa<BlockDecl>(Child) || isa<CapturedDecl>(Child))
1398 if (
const CXXRecordDecl* Cls = dyn_cast<CXXRecordDecl>(Child))
1399 return Cls->isLambda();
1403 template <
typename Derived>
1408 for (
auto *Child : DC->
decls()) {
1417 #define DEF_TRAVERSE_DECL(DECL, CODE) \ 1418 template <typename Derived> \ 1419 bool RecursiveASTVisitor<Derived>::Traverse##DECL(DECL *D) { \ 1420 bool ShouldVisitChildren = true; \ 1421 bool ReturnValue = true; \ 1422 if (!getDerived().shouldTraversePostOrder()) \ 1423 TRY_TO(WalkUpFrom##DECL(D)); \ 1425 if (ReturnValue && ShouldVisitChildren) \ 1426 TRY_TO(TraverseDeclContextHelper(dyn_cast<DeclContext>(D))); \ 1427 if (ReturnValue) { \ 1429 for (auto *I : D->attrs()) \ 1430 TRY_TO(getDerived().TraverseAttr(I)); \ 1432 if (ReturnValue && getDerived().shouldTraversePostOrder()) \ 1433 TRY_TO(WalkUpFrom##DECL(D)); \ 1434 return ReturnValue; \ 1443 for (
const auto &I : D->captures()) {
1444 if (I.hasCopyExpr()) {
1448 ShouldVisitChildren =
false;
1453 ShouldVisitChildren =
false;
1469 if (D->getFriendType())
1476 if (D->getFriendType())
1480 for (
unsigned I = 0, E = D->getNumTemplateParameters(); I < E; ++I) {
1483 ITPL != ETPL; ++ITPL) {
1492 if (D->hasExplicitTemplateArgs()) {
1493 TRY_TO(TraverseTemplateArgumentLocsHelper(
1494 D->getTemplateArgsAsWritten()->getTemplateArgs(),
1495 D->getTemplateArgsAsWritten()->NumTemplateArgs));
1529 ShouldVisitChildren =
false;
1547 for (
auto typeParam : *typeParamList) {
1548 TRY_TO(TraverseObjCTypeParamDecl(typeParam));
1561 for (
auto typeParam : *typeParamList) {
1562 TRY_TO(TraverseObjCTypeParamDecl(typeParam));
1575 if (D->getReturnTypeSourceInfo()) {
1581 if (D->isThisDeclarationADefinition()) {
1584 ShouldVisitChildren =
false;
1588 if (D->hasExplicitBound()) {
1597 if (D->getTypeSourceInfo())
1601 ShouldVisitChildren =
false;
1620 for (
auto *I : D->varlists()) {
1626 for (
auto *C : D->clauselists()) {
1627 TRY_TO(TraverseOMPClause(C));
1640 for (
auto *C : D->clauselists())
1641 TRY_TO(TraverseOMPClause(C));
1649 for (
auto *I : D->varlists())
1651 for (
auto *C : D->clauselists())
1652 TRY_TO(TraverseOMPClause(C));
1656 template <typename Derived>
1663 if (
Expr *RequiresClause = TPL->getRequiresClause()) {
1670 template <
typename Derived>
1671 template <
typename T>
1673 for (
unsigned i = 0; i < D->getNumTemplateParameterLists(); i++) {
1675 TraverseTemplateParameterListHelper(TPL);
1680 template <
typename Derived>
1684 for (
auto *RD : SD->redecls()) {
1686 if (cast<CXXRecordDecl>(RD)->isInjectedClassName())
1690 cast<ClassTemplateSpecializationDecl>(RD)->getSpecializationKind()) {
1711 template <
typename Derived>
1715 for (
auto *RD : SD->redecls()) {
1717 cast<VarTemplateSpecializationDecl>(RD)->getSpecializationKind()) {
1736 template <
typename Derived>
1740 for (
auto *RD : FD->redecls()) {
1741 switch (RD->getTemplateSpecializationKind()) {
1766 #define DEF_TRAVERSE_TMPL_DECL(TMPLDECLKIND) \ 1767 DEF_TRAVERSE_DECL(TMPLDECLKIND##TemplateDecl, { \ 1768 TRY_TO(TraverseTemplateParameterListHelper(D->getTemplateParameters())); \ 1769 TRY_TO(TraverseDecl(D->getTemplatedDecl())); \ 1777 if (getDerived().shouldVisitTemplateInstantiations() && \ 1778 D == D->getCanonicalDecl()) \ 1779 TRY_TO(TraverseTemplateInstantiations(D)); \ 1794 if (D->hasDefaultArgument() && !D->defaultArgumentWasInherited())
1805 if (D->getTypeForDecl())
1807 if (
const auto *TC = D->getTypeConstraint())
1809 if (D->hasDefaultArgument() && !D->defaultArgumentWasInherited())
1847 TRY_TO(TraverseDeclTemplateParameterLists(D));
1849 if (D->getTypeForDecl())
1858 template <typename Derived>
1863 TRY_TO(TraverseDeclTemplateParameterLists(D));
1868 template <
typename Derived>
1875 template <
typename Derived>
1877 if (!TraverseRecordHelper(D))
1880 for (
const auto &I : D->
bases()) {
1894 DEF_TRAVERSE_DECL(TMPLDECLKIND##TemplateSpecializationDecl, { \
1919 template <
typename Derived>
1922 for (
unsigned I = 0; I < Count; ++I) {
1928 #define DEF_TRAVERSE_TMPL_PART_SPEC_DECL(TMPLDECLKIND, DECLKIND) \ 1929 DEF_TRAVERSE_DECL(TMPLDECLKIND##TemplatePartialSpecializationDecl, { \ 1931 if (TemplateParameterList *TPL = D->getTemplateParameters()) { \ 1932 for (TemplateParameterList::iterator I = TPL->begin(), E = TPL->end(); \ 1934 TRY_TO(TraverseDecl(*I)); \ 1938 TRY_TO(TraverseTemplateArgumentLocsHelper( \ 1939 D->getTemplateArgsAsWritten()->getTemplateArgs(), \ 1940 D->getTemplateArgsAsWritten()->NumTemplateArgs)); \ 1945 TRY_TO(Traverse##DECLKIND##Helper(D)); \ 1964 template <typename Derived>
1966 TRY_TO(TraverseDeclTemplateParameterLists(D));
1976 TRY_TO(TraverseVarHelper(D));
1977 for (
auto *Binding : D->bindings()) {
1990 TRY_TO(TraverseDeclaratorHelper(D));
1991 if (D->isBitField())
1993 else if (D->hasInClassInitializer())
1998 TRY_TO(TraverseDeclaratorHelper(D));
1999 if (D->isBitField())
2005 TRY_TO(TraverseDeclaratorHelper(D));
2006 if (D->isBitField())
2011 template <typename Derived>
2013 TRY_TO(TraverseDeclTemplateParameterLists(D));
2029 FTSI->TemplateArgumentsAsWritten) {
2030 TRY_TO(TraverseTemplateArgumentLocsHelper(TALI->getTemplateArgs(),
2031 TALI->NumTemplateArgs));
2059 for (
auto *I : Ctor->inits()) {
2060 if (I->isWritten() ||
getDerived().shouldVisitImplicitCode())
2068 if (
const auto *MD = dyn_cast<CXXMethodDecl>(D))
2069 VisitBody &= !MD->isDefaulted() ||
getDerived().shouldVisitImplicitCode();
2080 ShouldVisitChildren =
false;
2087 ShouldVisitChildren =
false;
2094 ShouldVisitChildren =
false;
2101 ShouldVisitChildren =
false;
2110 ShouldVisitChildren =
false;
2117 ShouldVisitChildren =
false;
2121 template <typename Derived>
2123 TRY_TO(TraverseDeclaratorHelper(D));
2125 if (!isa<ParmVarDecl>(D) &&
2137 TRY_TO(TraverseDeclaratorHelper(D));
2138 if (D->hasDefaultArgument() && !D->defaultArgumentWasInherited())
2143 TRY_TO(TraverseVarHelper(D));
2145 if (D->hasDefaultArg() && D->hasUninstantiatedDefaultArg() &&
2146 !D->hasUnparsedDefaultArg())
2149 if (D->hasDefaultArg() && !D->hasUninstantiatedDefaultArg() &&
2150 !D->hasUnparsedDefaultArg())
2169 template <typename Derived> \
2172 bool ShouldVisitChildren =
true; \
2175 TRY_TO(WalkUpFrom##
STMT(S)); \
2177 if (ShouldVisitChildren) { \
2179 TRY_TO_TRAVERSE_OR_ENQUEUE_STMT(SubStmt); \
2183 TRY_TO(WalkUpFrom##
STMT(S)); \
2189 for (
unsigned I = 0, E = S->getNumInputs(); I < E; ++I) {
2192 for (
unsigned I = 0, E = S->getNumOutputs(); I < E; ++I) {
2195 for (
unsigned I = 0, E = S->getNumClobbers(); I < E; ++I) {
2213 for (
auto *I : S->decls()) {
2221 ShouldVisitChildren =
false;
2256 ShouldVisitChildren =
false;
2274 if (S->hasExplicitTemplateArgs()) {
2275 TRY_TO(TraverseTemplateArgumentLocsHelper(S->getTemplateArgs(),
2276 S->getNumTemplateArgs()));
2283 TRY_TO(TraverseTemplateArgumentLocsHelper(S->getTemplateArgs(),
2284 S->getNumTemplateArgs()));
2290 if (S->hasExplicitTemplateArgs()) {
2291 TRY_TO(TraverseTemplateArgumentLocsHelper(S->getTemplateArgs(),
2292 S->getNumTemplateArgs()));
2299 TRY_TO(TraverseTemplateArgumentLocsHelper(S->getTemplateArgs(),
2300 S->getNumTemplateArgs()));
2337 template <typename Derived>
2344 TRY_TO(WalkUpFromInitListExpr(S));
2354 template<
typename Derived>
2360 TRY_TO(TraverseTemplateArgumentLocsHelper(
2374 template <
typename Derived>
2403 ShouldVisitChildren =
false;
2411 e = S->semantics_end();
2415 sub = OVE->getSourceExpr();
2418 ShouldVisitChildren =
false;
2443 if (S->isArgumentType())
2450 if (S->isTypeOperand())
2463 if (S->isTypeOperand())
2468 for (
unsigned I = 0, N = S->getNumArgs(); I != N; ++I)
2492 for (
unsigned I = 0, N = S->capture_size(); I != N; ++I) {
2504 TypeLoc TL = S->getCallOperator()->getTypeSourceInfo()->getTypeLoc();
2507 for (
Decl *D : S->getExplicitTemplateParameters()) {
2511 if (S->hasExplicitParameters()) {
2513 for (
unsigned I = 0, N = Proto.
getNumParams(); I != N; ++I)
2516 if (S->hasExplicitResultType())
2520 for (
const auto &E : T->exceptions())
2523 if (
Expr *
NE = T->getNoexceptExpr())
2528 ShouldVisitChildren =
false;
2576 if (
TypeSourceInfo *DestroyedTypeInfo = S->getDestroyedTypeInfo())
2632 if (S->hasExplicitTemplateArgs()) {
2633 TRY_TO(TraverseTemplateArgumentLocsHelper(S->getTemplateArgs(),
2634 S->getNumTemplateArgs()));
2640 if (S->hasExplicitTemplateArgs()) {
2641 TRY_TO(TraverseTemplateArgumentLocsHelper(S->getTemplateArgs(),
2642 S->getNumTemplateArgs()));
2656 S->getDecomposedForm();
2659 ShouldVisitChildren =
false;
2683 if (S->getLifetimeExtendedTemporaryDecl()) {
2684 TRY_TO(TraverseLifetimeExtendedTemporaryDecl(
2685 S->getLifetimeExtendedTemporaryDecl()));
2686 ShouldVisitChildren =
false;
2695 ShouldVisitChildren =
false;
2699 if (!
getDerived().shouldVisitImplicitCode()) {
2701 ShouldVisitChildren =
false;
2705 if (!
getDerived().shouldVisitImplicitCode()) {
2707 ShouldVisitChildren =
false;
2711 if (!
getDerived().shouldVisitImplicitCode()) {
2713 ShouldVisitChildren =
false;
2717 if (!
getDerived().shouldVisitImplicitCode()) {
2719 ShouldVisitChildren =
false;
2732 if (
auto *TypeReq = dyn_cast<concepts::TypeRequirement>(Req)) {
2733 if (!TypeReq->isSubstitutionFailure())
2735 }
else if (
auto *ExprReq = dyn_cast<concepts::ExprRequirement>(Req)) {
2736 if (!ExprReq->isExprSubstitutionFailure())
2738 auto &RetReq = ExprReq->getReturnTypeRequirement();
2739 if (RetReq.isTypeConstraint())
2740 TRY_TO(TraverseTemplateParameterListHelper(
2741 RetReq.getTypeConstraintTemplateParameterList()));
2743 auto *NestedReq = cast<concepts::NestedRequirement>(Req);
2744 if (!NestedReq->isSubstitutionFailure())
2765 template <typename Derived>
2768 for (
auto *C : S->
clauses()) {
2769 TRY_TO(TraverseOMPClause(C));
2774 template <
typename Derived>
2777 return 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)); })
2806 TRY_TO(TraverseOMPExecutableDirective(S));
2810 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2813 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2816 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2819 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2822 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2825 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2828 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2831 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2834 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2837 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2840 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2843 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2846 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2849 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2852 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2855 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2858 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2861 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2864 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2867 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2870 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2873 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2876 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2879 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2882 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2885 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2888 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2891 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2894 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2897 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2900 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2903 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2906 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2909 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2912 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2915 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2918 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2921 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2924 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2927 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2930 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2933 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2936 {
TRY_TO(TraverseOMPExecutableDirective(S)); })
2939 template <typename Derived>
2944 #define OPENMP_CLAUSE(Name, Class) \ 2946 TRY_TO(Visit##Class(static_cast<Class *>(C))); \ 2948 #include "clang/Basic/OpenMPKinds.def" 2959 template <
typename Derived>
2966 template <
typename Derived>
2969 TRY_TO(VisitOMPClauseWithPreInit(Node));
2974 template <
typename Derived>
2981 template <
typename Derived>
2984 TRY_TO(VisitOMPClauseList(C));
2988 template <
typename Derived>
2990 TRY_TO(VisitOMPClauseWithPreInit(C));
2995 template <
typename Derived>
2997 TRY_TO(VisitOMPClauseWithPreInit(C));
3002 template <
typename Derived>
3005 TRY_TO(VisitOMPClauseWithPreInit(C));
3010 template <
typename Derived>
3016 template <
typename Derived>
3022 template <
typename Derived>
3029 template <
typename Derived>
3034 template <
typename Derived>
3039 template <
typename Derived>
3045 template <
typename Derived>
3051 template <
typename Derived>
3057 template <
typename Derived>
3063 template <
typename Derived>
3069 template <
typename Derived>
3072 TRY_TO(VisitOMPClauseWithPreInit(C));
3077 template <
typename Derived>
3083 template <
typename Derived>
3088 template <
typename Derived>
3093 template <
typename Derived>
3099 template <
typename Derived>
3104 template <
typename Derived>
3109 template <
typename Derived>
3114 template <
typename Derived>
3119 template <
typename Derived>
3124 template <
typename Derived>
3129 template <
typename Derived>
3134 template <
typename Derived>
3139 template <
typename Derived>
3140 template <
typename T>
3142 for (
auto *E : Node->varlists()) {
3148 template <
typename Derived>
3150 TRY_TO(VisitOMPClauseList(C));
3157 template <
typename Derived>
3160 TRY_TO(VisitOMPClauseList(C));
3161 TRY_TO(VisitOMPClauseWithPreInit(C));
3165 for (
auto *E : C->
inits()) {
3171 template <
typename Derived>
3174 TRY_TO(VisitOMPClauseList(C));
3175 TRY_TO(VisitOMPClauseWithPostUpdate(C));
3191 template <
typename Derived>
3193 TRY_TO(VisitOMPClauseList(C));
3197 template <
typename Derived>
3201 TRY_TO(VisitOMPClauseList(C));
3202 TRY_TO(VisitOMPClauseWithPostUpdate(C));
3203 for (
auto *E : C->privates()) {
3206 for (
auto *E : C->inits()) {
3209 for (
auto *E : C->updates()) {
3212 for (
auto *E : C->finals()) {
3218 template <
typename Derived>
3221 TRY_TO(VisitOMPClauseList(C));
3225 template <
typename Derived>
3227 TRY_TO(VisitOMPClauseList(C));
3240 template <
typename Derived>
3243 TRY_TO(VisitOMPClauseList(C));
3256 template <
typename Derived>
3261 TRY_TO(VisitOMPClauseList(C));
3262 TRY_TO(VisitOMPClauseWithPostUpdate(C));
3278 template <
typename Derived>
3283 TRY_TO(VisitOMPClauseList(C));
3284 TRY_TO(VisitOMPClauseWithPostUpdate(C));
3300 template <
typename Derived>
3305 TRY_TO(VisitOMPClauseList(C));
3306 TRY_TO(VisitOMPClauseWithPostUpdate(C));
3324 template <
typename Derived>
3326 TRY_TO(VisitOMPClauseList(C));
3330 template <
typename Derived>
3332 TRY_TO(VisitOMPClauseList(C));
3336 template <
typename Derived>
3338 TRY_TO(VisitOMPClauseWithPreInit(C));
3343 template <
typename Derived>
3345 TRY_TO(VisitOMPClauseList(C));
3349 template <
typename Derived>
3352 TRY_TO(VisitOMPClauseWithPreInit(C));
3357 template <
typename Derived>
3360 TRY_TO(VisitOMPClauseWithPreInit(C));
3365 template <
typename Derived>
3368 TRY_TO(VisitOMPClauseWithPreInit(C));
3373 template <
typename Derived>
3376 TRY_TO(VisitOMPClauseWithPreInit(C));
3381 template <
typename Derived>
3384 TRY_TO(VisitOMPClauseWithPreInit(C));
3389 template <
typename Derived>
3395 template <
typename Derived>
3398 TRY_TO(VisitOMPClauseWithPreInit(C));
3403 template <
typename Derived>
3409 template <
typename Derived>
3411 TRY_TO(VisitOMPClauseList(C));
3415 template <
typename Derived>
3417 TRY_TO(VisitOMPClauseList(C));
3421 template <
typename Derived>
3424 TRY_TO(VisitOMPClauseList(C));
3428 template <
typename Derived>
3431 TRY_TO(VisitOMPClauseList(C));
3435 template <
typename Derived>
3438 TRY_TO(VisitOMPClauseList(C));
3462 #undef DEF_TRAVERSE_STMT 3463 #undef TRAVERSE_STMT 3464 #undef TRAVERSE_STMT_BASE 3470 #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.
This represents '#pragma omp parallel master' directive.
Represents a C++11 auto or C++14 decltype(auto) type, possibly constrained by a type-constraint.
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()))
bool ReturnValue(const T &V, APValue &R)
Convers a value to an APValue.
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().
C++2a [expr.prim.req]: A requires-expression provides a concise way to express requirements on templa...
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
bool TraverseConceptReference(const ConceptReference &C)
Recursively visit a reference to a concept with potential arguments.
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.
bool hasExplicitTemplateArgs() const
Whether or not template arguments were explicitly specified in the concept reference (they might not ...
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.
Represents the body of a requires-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)
This represents '#pragma omp master taskloop' directive.
unsigned NumTemplateArgs
The number of template arguments in TemplateArgs.
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.
const DeclarationNameInfo & getConceptNameInfo() const
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)
const ASTTemplateArgumentListInfo * getTemplateArgsAsWritten() const
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 '#pragma omp parallel master taskloop' directive.
This represents 'unified_address' clause in the '#pragma omp requires' directive. ...
This represents '#pragma omp target enter data' directive.
Expr * getTrailingRequiresClause()
Get the constraint-expression introduced by the trailing requires-clause in the function/member decla...
Wrapper for source info for arrays.
Represents a C++ Modules TS module export declaration.
This represents '#pragma omp master taskloop simd' directive.
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...
Common data class for constructs that reference concepts with template arguments. ...
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.
A static requirement that can be used in a requires-expression to check properties of types and expre...
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.
This represents '#pragma omp parallel master taskloop simd' directive.
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...
const TemplateArgumentLoc * getTemplateArgs() const
Retrieve the template arguments.
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...
bool NE(InterpState &S, CodePtr OpPC)
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.
const NestedNameSpecifierLoc & getNestedNameSpecifierLoc() const
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.
child_range private_refs()
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.
Defines Expressions and AST nodes for C++2a concepts.
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.
bool isSyntacticForm() const
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.
bool LE(InterpState &S, CodePtr OpPC)
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.
Represents the specialization of a concept - evaluates to a prvalue of type bool. ...
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]).
Implicit declaration of a temporary that was materialized by a MaterializeTemporaryExpr and lifetime-...
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 rewritten comparison expression that was originally written using operator syntax.
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.
This represents clause 'nontemporal' in the '#pragma omp ...' directives.
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.