A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://clang.llvm.org/doxygen/RecursiveASTVisitor_8h_source.html below:

clang: include/clang/AST/RecursiveASTVisitor.h Source File

13#ifndef LLVM_CLANG_AST_RECURSIVEASTVISITOR_H 14#define LLVM_CLANG_AST_RECURSIVEASTVISITOR_H 48#include "llvm/ADT/PointerIntPair.h" 49#include "llvm/ADT/SmallVector.h" 50#include "llvm/Support/Casting.h" 61#define TRY_TO(CALL_EXPR) \ 63 if (!getDerived().CALL_EXPR) \ 69template

<

typename

T,

typename

U>

71template

<

typename T

,

typename U

,

typename

R,

typename

...

P

>

77template

<

typename

FirstMethodPtrTy,

typename

SecondMethodPtrTy>

78

LLVM_ATTRIBUTE_ALWAYS_INLINE LLVM_ATTRIBUTE_NODEBUG

auto 80

[[maybe_unused]] SecondMethodPtrTy SecondMethodPtr)

83

SecondMethodPtrTy>::value)

84 return

FirstMethodPtr == SecondMethodPtr;

166

Derived &

getDerived

() {

return

*

static_cast<

Derived *

>

(

this

); }

331#define ATTR_VISITOR_DECLS_ONLY 332#include "clang/AST/AttrVisitor.inc" 333#undef ATTR_VISITOR_DECLS_ONLY 345#define TRAVERSE_STMT_BASE(NAME, CLASS, VAR, QUEUE) \ 346 (::clang::detail::has_same_member_pointer_type< \ 347 decltype(&RecursiveASTVisitor::Traverse##NAME), \ 348 decltype(&Derived::Traverse##NAME)>::value \ 349 ? static_cast<std::conditional_t< \ 350 ::clang::detail::has_same_member_pointer_type< \ 351 decltype(&RecursiveASTVisitor::Traverse##NAME), \ 352 decltype(&Derived::Traverse##NAME)>::value, \ 353 Derived &, RecursiveASTVisitor &>>(*this) \ 354 .Traverse##NAME(static_cast<CLASS *>(VAR), QUEUE) \ 355 : getDerived().Traverse##NAME(static_cast<CLASS *>(VAR))) 360#define TRY_TO_TRAVERSE_OR_ENQUEUE_STMT(S) \ 362 if (!TRAVERSE_STMT_BASE(Stmt, Stmt, S, Queue)) \ 368#define ABSTRACT_STMT(STMT) 369#define STMT(CLASS, PARENT) \ 370 bool Traverse##CLASS(CLASS *S, DataRecursionQueue *Queue = nullptr); 371#include "clang/AST/StmtNodes.inc" 377#define STMT(CLASS, PARENT) \ 378 bool WalkUpFrom##CLASS(CLASS *S) { \ 379 TRY_TO(WalkUpFrom##PARENT(S)); \ 380 TRY_TO(Visit##CLASS(S)); \ 383 bool Visit##CLASS(CLASS *S) { return true; } 384#include "clang/AST/StmtNodes.inc" 390#define ABSTRACT_TYPE(CLASS, BASE) 391#define TYPE(CLASS, BASE) bool Traverse##CLASS##Type(CLASS##Type *T); 392#include "clang/AST/TypeNodes.inc" 398#define TYPE(CLASS, BASE) \ 399 bool WalkUpFrom##CLASS##Type(CLASS##Type *T) { \ 400 TRY_TO(WalkUpFrom##BASE(T)); \ 401 TRY_TO(Visit##CLASS##Type(T)); \ 404 bool Visit##CLASS##Type(CLASS##Type *T) { return true; } 405#include "clang/AST/TypeNodes.inc" 411#define ABSTRACT_TYPELOC(CLASS, BASE) 412#define TYPELOC(CLASS, BASE) bool Traverse##CLASS##TypeLoc(CLASS##TypeLoc TL); 413#include "clang/AST/TypeLocNodes.def" 432#define TYPE(CLASS, BASE) \ 433 bool WalkUpFrom##CLASS##TypeLoc(CLASS##TypeLoc TL) { \ 434 TRY_TO(WalkUpFrom##BASE##Loc(TL)); \ 435 TRY_TO(Visit##CLASS##TypeLoc(TL)); \ 438 bool Visit##CLASS##TypeLoc(CLASS##TypeLoc TL) { return true; } 439#include "clang/AST/TypeNodes.inc" 444#define ABSTRACT_DECL(DECL) 445#define DECL(CLASS, BASE) bool Traverse##CLASS##Decl(CLASS##Decl *D); 446#include "clang/AST/DeclNodes.inc" 452#define DECL(CLASS, BASE) \ 453 bool WalkUpFrom##CLASS##Decl(CLASS##Decl *D) { \ 454 TRY_TO(WalkUpFrom##BASE(D)); \ 455 TRY_TO(Visit##CLASS##Decl(D)); \ 458 bool Visit##CLASS##Decl(CLASS##Decl *D) { return true; } 459#include "clang/AST/DeclNodes.inc" 463#define DEF_TRAVERSE_TMPL_INST(TMPLDECLKIND) \ 464 bool TraverseTemplateInstantiations(TMPLDECLKIND##TemplateDecl *D); 468#undef DEF_TRAVERSE_TMPL_INST 484 template

<

typename

T>

485 bool

TraverseDeclTemplateParameterLists(

T

*

D

);

497 bool

TraverseVarHelper(

VarDecl

*

D

);

501#define GEN_CLANG_CLAUSE_CLASS 502#define CLAUSE_CLASS(Enum, Str, Class) bool Visit##Class(Class *C); 503#include "llvm/Frontend/OpenMP/OMP.inc" 505 template

<

typename

T>

bool

VisitOMPClauseList(

T

*

Node

);

507 bool

VisitOMPClauseWithPreInit(OMPClauseWithPreInit *

Node

);

508 bool

VisitOMPClauseWithPostUpdate(OMPClauseWithPostUpdate *

Node

);

510 bool

PostVisitStmt(Stmt *S);

511 bool

TraverseOpenACCConstructStmt(OpenACCConstructStmt *S);

513

TraverseOpenACCAssociatedStmtConstruct(OpenACCAssociatedStmtConstruct *S);

514 bool

VisitOpenACCClauseList(ArrayRef<const OpenACCClause *>);

515 bool

VisitOpenACCClause(

const

OpenACCClause *);

518template

<

typename

Derived>

521 if

(!getDerived().shouldVisitImplicitCode()) {

522 TRY_TO

(TraverseConceptReference(

C

->getConceptReference()));

525 if

(

Expr

*IDC =

C

->getImmediatelyDeclaredConstraint()) {

526 TRY_TO

(TraverseStmt(IDC));

532 TRY_TO

(TraverseConceptReference(

C

->getConceptReference()));

537template

<

typename

Derived>

542 return

getDerived().TraverseConceptTypeRequirement(

543

cast<concepts::TypeRequirement>(R));

546 return

getDerived().TraverseConceptExprRequirement(

547

cast<concepts::ExprRequirement>(R));

549 return

getDerived().TraverseConceptNestedRequirement(

550

cast<concepts::NestedRequirement>(R));

552

llvm_unreachable(

"unexpected case"

);

555template

<

typename

Derived>

559 switch

(S->getStmtClass()) {

562#define ABSTRACT_STMT(STMT) 563#define STMT(CLASS, PARENT) \ 564 case Stmt::CLASS##Class: \ 565 return TRAVERSE_STMT_BASE(CLASS, CLASS, S, Queue); 566#include "clang/AST/StmtNodes.inc" 574template

<

typename

Derived>

582template

<

typename

Derived>

588 if

(RetReq.isTypeConstraint()) {

589 if

(getDerived().shouldVisitImplicitCode()) {

590 TRY_TO

(TraverseTemplateParameterListHelper(

591

RetReq.getTypeConstraintTemplateParameterList()));

594 TRY_TO

(TraverseTypeConstraint(RetReq.getTypeConstraint()));

600template

<

typename

Derived>

608template

<

typename

Derived>

626 switch

(S->getStmtClass()) {

629#define ABSTRACT_STMT(STMT) 630#define STMT(CLASS, PARENT) \ 631 case Stmt::CLASS##Class: \ 632 if (::clang::detail::isSameMethod(&RecursiveASTVisitor::Traverse##CLASS, \ 633 &Derived::Traverse##CLASS)) { \ 634 TRY_TO(WalkUpFrom##CLASS(static_cast<CLASS *>(S))); \ 637#define INITLISTEXPR(CLASS, PARENT) \ 638 case Stmt::CLASS##Class: \ 639 if (::clang::detail::isSameMethod(&RecursiveASTVisitor::Traverse##CLASS, \ 640 &Derived::Traverse##CLASS)) { \ 641 auto ILE = static_cast<CLASS *>(S); \ 642 if (auto Syn = ILE->isSemanticForm() ? ILE->getSyntacticForm() : ILE) \ 643 TRY_TO(WalkUpFrom##CLASS(Syn)); \ 644 if (auto Sem = ILE->isSemanticForm() ? ILE : ILE->getSemanticForm()) \ 645 TRY_TO(WalkUpFrom##CLASS(Sem)); \ 648#include "clang/AST/StmtNodes.inc" 658template

<

typename

Derived>

659

LLVM_ATTRIBUTE_NOINLINE

bool 665

Queue->push_back({S,

false

});

670

LocalQueue.push_back({S,

false

});

672 while

(!LocalQueue.empty()) {

673 auto

&CurrSAndVisited = LocalQueue.back();

674 Stmt

*CurrS = CurrSAndVisited.getPointer();

675 bool Visited

= CurrSAndVisited.getInt();

677

LocalQueue.pop_back();

678 TRY_TO

(dataTraverseStmtPost(CurrS));

679 if

(getDerived().shouldTraversePostOrder()) {

680 TRY_TO

(PostVisitStmt(CurrS));

685 if

(getDerived().dataTraverseStmtPre(CurrS)) {

686

CurrSAndVisited.setInt(

true

);

687 size_t

N = LocalQueue.size();

688 TRY_TO

(dataTraverseNode(CurrS, &LocalQueue));

690

std::reverse(LocalQueue.begin() + N, LocalQueue.end());

692

LocalQueue.pop_back();

699template

<

typename

Derived>

705#define ABSTRACT_TYPE(CLASS, BASE) 706#define TYPE(CLASS, BASE) \ 708 return getDerived().Traverse##CLASS##Type( \ 709 static_cast<CLASS##Type *>(const_cast<Type *>(T.getTypePtr()))); 710#include "clang/AST/TypeNodes.inc" 716template

<

typename

Derived>

722#define ABSTRACT_TYPELOC(CLASS, BASE) 723#define TYPELOC(CLASS, BASE) \ 724 case TypeLoc::CLASS: \ 725 return getDerived().Traverse##CLASS##TypeLoc(TL.castAs<CLASS##TypeLoc>()); 726#include "clang/AST/TypeLocNodes.def" 733#define VISITORCLASS RecursiveASTVisitor 734#include "clang/AST/AttrVisitor.inc" 737template

<

typename

Derived>

744 if

(!getDerived().shouldVisitImplicitCode()) {

749 if

(

auto

*TTPD = dyn_cast<TemplateTypeParmDecl>(

D

))

750 return

TraverseTemplateTypeParamDeclConstraints(TTPD);

761 if

(

auto

*FTD = dyn_cast<FunctionTemplateDecl>(

D

))

762 if

(llvm::isa_and_present<TypeAliasTemplateDecl>(

763

FTD->getDeclName().getCXXDeductionGuideTemplate()))

768#define ABSTRACT_DECL(DECL) 769#define DECL(CLASS, BASE) \ 771 if (!getDerived().Traverse##CLASS##Decl(static_cast<CLASS##Decl *>(D))) \ 774#include "clang/AST/DeclNodes.inc" 779template

<

typename

Derived>

804template

<

typename

Derived>

811 TRY_TO

(TraverseNestedNameSpecifierLoc(Prefix));

830template

<

typename

Derived>

838 TRY_TO

(TraverseTypeLoc(TSInfo->getTypeLoc()));

842 TRY_TO

(TraverseTemplateName(

859template

<

typename

Derived>

862 TRY_TO

(TraverseNestedNameSpecifier(DTN->getQualifier()));

865 if

(QTN->getQualifier()) {

866 TRY_TO

(TraverseNestedNameSpecifier(QTN->getQualifier()));

873template

<

typename

Derived>

885 return

getDerived().TraverseType(Arg.

getAsType

());

889 return

getDerived().TraverseTemplateName(

893 return

getDerived().TraverseStmt(Arg.

getAsExpr

());

896 return

getDerived().TraverseTemplateArguments(Arg.

pack_elements

());

904template

<

typename

Derived>

920 return

getDerived().TraverseTypeLoc(TSI->getTypeLoc());

922 return

getDerived().TraverseType(Arg.

getAsType

());

928 TRY_TO

(getDerived().TraverseNestedNameSpecifierLoc(

930 return

getDerived().TraverseTemplateName(

937 return

getDerived().TraverseTemplateArguments(Arg.

pack_elements

());

943template

<

typename

Derived>

947 TRY_TO

(TraverseTemplateArgument(Arg));

952template

<

typename

Derived>

956 TRY_TO

(TraverseTypeLoc(TInfo->getTypeLoc()));

958 if

(

Init

->isWritten() || getDerived().shouldVisitImplicitCode())

964template

<

typename

Derived>

969 if

(LE->isInitCapture(

C

))

970 TRY_TO

(TraverseDecl(

C

->getCapturedVar()));

979#define DEF_TRAVERSE_TYPE(TYPE, CODE) \ 980 template <typename Derived> \ 981 bool RecursiveASTVisitor<Derived>::Traverse##TYPE(TYPE *T) { \ 982 if (!getDerived().shouldTraversePostOrder()) \ 983 TRY_TO(WalkUpFrom##TYPE(T)); \ 985 if (getDerived().shouldTraversePostOrder()) \ 986 TRY_TO(WalkUpFrom##TYPE(T)); \ 1006 TRY_TO

(TraverseType(QualType(

T

->getClass(), 0)));

1015 TRY_TO

(TraverseType(

T

->getElementType()));

1016 if

(

T

->getSizeExpr())

1017 TRY_TO

(TraverseStmt(

const_cast<Expr

*

>

(

T

->getSizeExpr())));

1021 TRY_TO

(TraverseType(

T

->getElementType()));

1022 if

(

T

->getSizeExpr())

1023 TRY_TO

(TraverseStmt(

const_cast<

Expr *

>

(

T

->getSizeExpr())));

1027

{

TRY_TO

(TraverseType(

T

->getElementType())); })

1030 TRY_TO

(TraverseType(

T

->getElementType()));

1035 TRY_TO

(TraverseType(

T

->getElementType()));

1036 if

(

T

->getSizeExpr())

1037 TRY_TO

(TraverseStmt(

T

->getSizeExpr()));

1041 TRY_TO

(TraverseStmt(

T

->getAddrSpaceExpr()));

1046 if

(

T

->getSizeExpr())

1047 TRY_TO

(TraverseStmt(

T

->getSizeExpr()));

1048 TRY_TO

(TraverseType(

T

->getElementType()));

1052 if

(

T

->getSizeExpr())

1053 TRY_TO

(TraverseStmt(

T

->getSizeExpr()));

1062

{

TRY_TO

(TraverseType(

T

->getElementType())); })

1065 if

(

T

->getRowExpr())

1066 TRY_TO

(TraverseStmt(

T

->getRowExpr()));

1067 if

(

T

->getColumnExpr())

1068 TRY_TO

(TraverseStmt(

T

->getColumnExpr()));

1069 TRY_TO

(TraverseType(

T

->getElementType()));

1079 TRY_TO

(TraverseType(A));

1087 TRY_TO

(TraverseStmt(NE));

1095

{

TRY_TO

(TraverseStmt(

T

->getUnderlyingExpr())); })

1100

{

TRY_TO

(TraverseStmt(

T

->getUnderlyingExpr())); })

1103 TRY_TO

(TraverseType(

T

->getPattern()));

1108 TRY_TO

(TraverseType(

T

->getBaseType()));

1109 TRY_TO

(TraverseType(

T

->getUnderlyingType()));

1113 TRY_TO

(TraverseType(

T

->getDeducedType()));

1114 if

(

T

->isConstrained()) {

1115 TRY_TO

(TraverseTemplateArguments(

T

->getTypeConstraintArguments()));

1119 TRY_TO

(TraverseTemplateName(

T

->getTemplateName()));

1120 TRY_TO

(TraverseType(

T

->getDeducedType()));

1127 TRY_TO

(TraverseType(

T

->getReplacementType()));

1130 TRY_TO

(TraverseTemplateArgument(

T

->getArgumentPack()));

1134 TRY_TO

(TraverseTemplateName(

T

->getTemplateName()));

1135 TRY_TO

(TraverseTemplateArguments(

T

->template_arguments()));

1141

{

TRY_TO

(TraverseType(

T

->getModifiedType())); })

1144 if

(

T

->getCountExpr())

1145 TRY_TO

(TraverseStmt(

T

->getCountExpr()));

1150

{

TRY_TO

(TraverseType(

T

->getWrappedType())); })

1153

{

TRY_TO

(TraverseType(

T

->getWrappedType())); })

1158

{

TRY_TO

(TraverseType(

T

->getUnderlyingType())); })

1161 if

(

T

->getQualifier()) {

1162 TRY_TO

(TraverseNestedNameSpecifier(

T

->getQualifier()));

1164 TRY_TO

(TraverseType(

T

->getNamedType()));

1168

{

TRY_TO

(TraverseNestedNameSpecifier(

T

->getQualifier())); })

1171 TRY_TO

(TraverseNestedNameSpecifier(

T

->getQualifier()));

1172 TRY_TO

(TraverseTemplateArguments(

T

->template_arguments()));

1184 if

(

T

->getBaseType().getTypePtr() !=

T

)

1185 TRY_TO

(TraverseType(

T

->getBaseType()));

1186 for

(

auto

typeArg :

T

->getTypeArgsAsWritten()) {

1187 TRY_TO

(TraverseType(typeArg));

1200

{

TRY_TO

(TraverseStmt(

T

->getNumBitsExpr())); })

1212 template

<

typename

Derived> \

1213 bool

RecursiveASTVisitor<Derived>::Traverse##

TYPE

##

Loc

(

TYPE

##

Loc

TL) { \

1214

if (!getDerived().shouldTraversePostOrder()) { \

1215

TRY_TO(WalkUpFrom##

TYPE

##

Loc

(TL)); \

1216

if (getDerived().shouldWalkTypesOfTypeLocs()) \

1217

TRY_TO(WalkUpFrom##

TYPE

(

const_cast<TYPE

*

>

(TL.getTypePtr()))); \

1220

if (getDerived().shouldTraversePostOrder()) { \

1221

TRY_TO(WalkUpFrom##

TYPE

##

Loc

(TL)); \

1222

if (getDerived().shouldWalkTypesOfTypeLocs()) \

1223

TRY_TO(WalkUpFrom##

TYPE

(

const_cast<TYPE

*

>

(TL.getTypePtr()))); \

1228template

<

typename

Derived>

1230

RecursiveASTVisitor<Derived>::TraverseQualifiedTypeLoc(QualifiedTypeLoc TL) {

1246 return

TraverseTypeLoc(TL.getUnqualifiedLoc());

1253 TRY_TO

(TraverseType(TL.getTypePtr()->getElementType()));

1257

{

TRY_TO

(TraverseTypeLoc(TL.getPointeeLoc())); })

1260

{

TRY_TO

(TraverseTypeLoc(TL.getPointeeLoc())); })

1263

{

TRY_TO

(TraverseTypeLoc(TL.getPointeeLoc())); })

1266

{

TRY_TO

(TraverseTypeLoc(TL.getPointeeLoc())); })

1271 if

(

auto

*TSI = TL.getClassTInfo())

1272 TRY_TO

(TraverseTypeLoc(TSI->getTypeLoc()));

1275 TRY_TO

(TraverseTypeLoc(TL.getPointeeLoc()));

1279

{

TRY_TO

(TraverseTypeLoc(TL.getOriginalLoc())); })

1282

{

TRY_TO

(TraverseTypeLoc(TL.getOriginalLoc())); })

1284

template <typename Derived>

1285bool

RecursiveASTVisitor<Derived>::TraverseArrayTypeLocHelper(ArrayTypeLoc TL) {

1287 TRY_TO

(TraverseStmt(TL.getSizeExpr()));

1292 TRY_TO

(TraverseTypeLoc(TL.getElementLoc()));

1293 TRY_TO

(TraverseArrayTypeLocHelper(TL));

1297 TRY_TO

(TraverseTypeLoc(TL.getElementLoc()));

1302 TRY_TO

(TraverseTypeLoc(TL.getElementLoc()));

1303 TRY_TO

(TraverseArrayTypeLocHelper(TL));

1307 TRY_TO

(TraverseTypeLoc(TL.getElementLoc()));

1308 TRY_TO

(TraverseArrayTypeLocHelper(TL));

1312 TRY_TO

(TraverseTypeLoc(TL.getElementLoc()));

1313 TRY_TO

(TraverseArrayTypeLocHelper(TL));

1317 TRY_TO

(TraverseStmt(TL.getTypePtr()->getAddrSpaceExpr()));

1318 TRY_TO

(TraverseType(TL.getTypePtr()->getPointeeType()));

1324 if

(TL.getTypePtr()->getSizeExpr())

1325 TRY_TO

(TraverseStmt(TL.getTypePtr()->getSizeExpr()));

1326 TRY_TO

(TraverseType(TL.getTypePtr()->getElementType()));

1331 TRY_TO

(TraverseType(TL.getTypePtr()->getElementType()));

1335 if

(TL.getTypePtr()->getSizeExpr())

1336 TRY_TO

(TraverseStmt(TL.getTypePtr()->getSizeExpr()));

1337 TRY_TO

(TraverseType(TL.getTypePtr()->getElementType()));

1343 TRY_TO

(TraverseType(TL.getTypePtr()->getElementType()));

1347 TRY_TO

(TraverseStmt(TL.getAttrRowOperand()));

1348 TRY_TO

(TraverseStmt(TL.getAttrColumnOperand()));

1349 TRY_TO

(TraverseType(TL.getTypePtr()->getElementType()));

1353 TRY_TO

(TraverseStmt(TL.getAttrRowOperand()));

1354 TRY_TO

(TraverseStmt(TL.getAttrColumnOperand()));

1355 TRY_TO

(TraverseType(TL.getTypePtr()->getElementType()));

1359

{

TRY_TO

(TraverseTypeLoc(TL.getReturnLoc())); })

1363 TRY_TO

(TraverseTypeLoc(TL.getReturnLoc()));

1367 for

(

unsigned

I = 0,

E

= TL.getNumParams(); I !=

E

; ++I) {

1368 if

(TL.getParam(I)) {

1369 TRY_TO

(TraverseDecl(TL.getParam(I)));

1370

}

else if

(I < T->getNumParams()) {

1380 TRY_TO

(TraverseStmt(NE));

1388

{

TRY_TO

(TraverseStmt(TL.getUnderlyingExpr())); })

1391 TRY_TO

(TraverseTypeLoc(TL.getUnmodifiedTInfo()->getTypeLoc()));

1396 TRY_TO

(TraverseStmt(TL.getTypePtr()->getUnderlyingExpr()));

1400 TRY_TO

(TraverseType(TL.getPattern()));

1401 TRY_TO

(TraverseStmt(TL.getTypePtr()->getIndexExpr()));

1405 TRY_TO

(TraverseTypeLoc(TL.getUnderlyingTInfo()->getTypeLoc()));

1409 TRY_TO

(TraverseType(TL.getTypePtr()->getDeducedType()));

1410 if

(TL.isConstrained()) {

1411 TRY_TO

(TraverseConceptReference(TL.getConceptReference()));

1416 TRY_TO

(TraverseTemplateName(TL.getTypePtr()->getTemplateName()));

1417 TRY_TO

(TraverseType(TL.getTypePtr()->getDeducedType()));

1424 TRY_TO

(TraverseType(TL.getTypePtr()->getReplacementType()));

1427 TRY_TO

(TraverseTemplateArgument(TL.getTypePtr()->getArgumentPack()));

1432 TRY_TO

(TraverseTemplateName(TL.getTypePtr()->getTemplateName()));

1433 for

(

unsigned

I = 0,

E

= TL.getNumArgs(); I !=

E

; ++I) {

1434 TRY_TO

(TraverseTemplateArgumentLoc(TL.getArgLoc(I)));

1443

{

TRY_TO

(TraverseTypeLoc(TL.getInnerLoc())); })

1446

{

TRY_TO

(TraverseTypeLoc(TL.getModifiedLoc())); })

1449

{

TRY_TO

(TraverseTypeLoc(TL.getInnerLoc())); })

1452

{

TRY_TO

(TraverseTypeLoc(TL.getWrappedLoc())); })

1455

{

TRY_TO

(TraverseTypeLoc(TL.getWrappedLoc())); })

1458 if

(TL.getQualifierLoc()) {

1459 TRY_TO

(TraverseNestedNameSpecifierLoc(TL.getQualifierLoc()));

1461 TRY_TO

(TraverseTypeLoc(TL.getNamedTypeLoc()));

1465 TRY_TO

(TraverseNestedNameSpecifierLoc(TL.getQualifierLoc()));

1469 if

(TL.getQualifierLoc()) {

1470 TRY_TO

(TraverseNestedNameSpecifierLoc(TL.getQualifierLoc()));

1473 for

(

unsigned

I = 0,

E

= TL.getNumArgs(); I !=

E

; ++I) {

1474 TRY_TO

(TraverseTemplateArgumentLoc(TL.getArgLoc(I)));

1479

{

TRY_TO

(TraverseTypeLoc(TL.getPatternLoc())); })

1482 for

(

unsigned

I = 0, N = TL.getNumProtocols(); I != N; ++I) {

1484 TRY_TO

(TraverseObjCProtocolLoc(ProtocolLoc));

1493 if

(TL.getTypePtr()->getBaseType().getTypePtr() != TL.getTypePtr())

1494 TRY_TO

(TraverseTypeLoc(TL.getBaseLoc()));

1495 for

(

unsigned

i = 0, n = TL.getNumTypeArgs(); i != n; ++i)

1496 TRY_TO

(TraverseTypeLoc(TL.getTypeArgTInfo(i)->getTypeLoc()));

1497 for

(

unsigned

I = 0, N = TL.getNumProtocols(); I != N; ++I) {

1499 TRY_TO

(TraverseObjCProtocolLoc(ProtocolLoc));

1504

{

TRY_TO

(TraverseTypeLoc(TL.getPointeeLoc())); })

1512 TRY_TO

(TraverseStmt(TL.getTypePtr()->getNumBitsExpr()));

1524

template <typename Derived>

1526 const Decl

*Child) {

1529 if

(isa<BlockDecl>(Child) || isa<CapturedDecl>(Child))

1532 if

(

const CXXRecordDecl

* Cls = dyn_cast<CXXRecordDecl>(Child))

1533 return

Cls->isLambda();

1537template

<

typename

Derived>

1542 for

(

auto

*Child : DC->

decls

()) {

1543 if

(!canIgnoreChildDeclWhileTraversingDeclContext(Child))

1544 TRY_TO

(TraverseDecl(Child));

1551#define DEF_TRAVERSE_DECL(DECL, CODE) \ 1552 template <typename Derived> \ 1553 bool RecursiveASTVisitor<Derived>::Traverse##DECL(DECL *D) { \ 1554 bool ShouldVisitChildren = true; \ 1555 bool ReturnValue = true; \ 1556 if (!getDerived().shouldTraversePostOrder()) \ 1557 TRY_TO(WalkUpFrom##DECL(D)); \ 1559 if (ReturnValue && ShouldVisitChildren) \ 1560 TRY_TO(TraverseDeclContextHelper(dyn_cast<DeclContext>(D))); \ 1561 if (ReturnValue) { \ 1563 for (auto *I : D->attrs()) \ 1564 TRY_TO(getDerived().TraverseAttr(I)); \ 1566 if (ReturnValue && getDerived().shouldTraversePostOrder()) \ 1567 TRY_TO(WalkUpFrom##DECL(D)); \ 1568 return ReturnValue; \ 1575 TRY_TO

(TraverseTypeLoc(TInfo->getTypeLoc()));

1577 for

(

const auto

&I :

D

->captures()) {

1578

if (I.hasCopyExpr()) {

1579

TRY_TO(TraverseStmt(I.getCopyExpr()));

1586 TRY_TO

(TraverseStmt(

D

->getBody()));

1591 TRY_TO

(TraverseStmt(

D

->getBody()));

1600 TRY_TO

(TraverseStmt(

D

->getTemporaryExpr()));

1604

{

TRY_TO

(TraverseStmt(

D

->getAsmString())); })

1612 if

(

D

->getFriendType()) {

1613 TRY_TO

(TraverseTypeLoc(

D

->getFriendType()->getTypeLoc()));

1616 if

(

auto

*ET =

D

->getFriendType()->getType()->getAs<

ElaboratedType

>())

1617 TRY_TO

(TraverseDecl(ET->getOwnedTagDecl()));

1619 TRY_TO

(TraverseDecl(

D

->getFriendDecl()));

1624 if

(

D

->getFriendType())

1625 TRY_TO

(TraverseTypeLoc(

D

->getFriendType()->getTypeLoc()));

1628 for

(

unsigned

I = 0,

E

=

D

->getNumTemplateParameters(); I <

E

; ++I) {

1631

ITPL != ETPL; ++ITPL) {

1632 TRY_TO

(TraverseDecl(*ITPL));

1645 TRY_TO

(TraverseStmt(

D

->getAssertExpr()));

1656 auto Scope

=

D

->getASTContext().getTraversalScope();

1657 bool

HasLimitedScope =

1658 Scope

.size() != 1 || !isa<TranslationUnitDecl>(

Scope

.front());

1659 if

(HasLimitedScope) {

1661 for

(

auto

*Child :

Scope

) {

1662 if

(!canIgnoreChildDeclWhileTraversingDeclContext(Child))

1663 TRY_TO

(TraverseDecl(Child));

1675 TRY_TO

(TraverseNestedNameSpecifierLoc(

D

->getQualifierLoc()));

1696 if

(ObjCTypeParamList *typeParamList =

D

->getTypeParamList()) {

1697 for

(

auto

typeParam : *typeParamList) {

1698 TRY_TO

(TraverseObjCTypeParamDecl(typeParam));

1701 for

(

auto

It : llvm::zip(

D

->protocols(),

D

->protocol_locs())) {

1702

ObjCProtocolLoc ProtocolLoc(std::get<0>(It), std::get<1>(It));

1703 TRY_TO

(TraverseObjCProtocolLoc(ProtocolLoc));

1714 if

(ObjCTypeParamList *typeParamList =

D

->getTypeParamListAsWritten()) {

1715 for

(

auto

typeParam : *typeParamList) {

1716 TRY_TO

(TraverseObjCTypeParamDecl(typeParam));

1720 if

(TypeSourceInfo *superTInfo =

D

->getSuperClassTInfo()) {

1721 TRY_TO

(TraverseTypeLoc(superTInfo->getTypeLoc()));

1723 if

(

D

->isThisDeclarationADefinition()) {

1724 for

(

auto

It : llvm::zip(

D

->protocols(),

D

->protocol_locs())) {

1725

ObjCProtocolLoc ProtocolLoc(std::get<0>(It), std::get<1>(It));

1726 TRY_TO

(TraverseObjCProtocolLoc(ProtocolLoc));

1732 if

(

D

->isThisDeclarationADefinition()) {

1733 for

(

auto

It : llvm::zip(

D

->protocols(),

D

->protocol_locs())) {

1734

ObjCProtocolLoc ProtocolLoc(std::get<0>(It), std::get<1>(It));

1735 TRY_TO

(TraverseObjCProtocolLoc(ProtocolLoc));

1741 if

(

D

->getReturnTypeSourceInfo()) {

1742 TRY_TO

(TraverseTypeLoc(

D

->getReturnTypeSourceInfo()->getTypeLoc()));

1744 for

(ParmVarDecl *Parameter :

D

->parameters()) {

1745 TRY_TO

(TraverseDecl(Parameter));

1747 if

(

D

->isThisDeclarationADefinition()) {

1748 TRY_TO

(TraverseStmt(

D

->getBody()));

1754 if

(

D

->hasExplicitBound()) {

1755 TRY_TO

(TraverseTypeLoc(

D

->getTypeSourceInfo()->getTypeLoc()));

1763 if

(

D

->getTypeSourceInfo())

1764 TRY_TO

(TraverseTypeLoc(

D

->getTypeSourceInfo()->getTypeLoc()));

1766 TRY_TO

(TraverseType(

D

->getType()));

1771 TRY_TO

(TraverseNestedNameSpecifierLoc(

D

->getQualifierLoc()));

1772 TRY_TO

(TraverseDeclarationNameInfo(

D

->getNameInfo()));

1776

{

TRY_TO

(TraverseTypeLoc(

D

->getEnumTypeLoc())); })

1781 TRY_TO

(TraverseNestedNameSpecifierLoc(

D

->getQualifierLoc()));

1789 for

(

auto

*I :

D

->varlist()) {

1790 TRY_TO

(TraverseStmt(I));

1795 for

(

auto

*C :

D

->clauselists()) {

1796 TRY_TO

(TraverseOMPClause(C));

1801 TRY_TO

(TraverseStmt(

D

->getCombiner()));

1802 if

(

auto

*Initializer =

D

->getInitializer())

1803 TRY_TO

(TraverseStmt(Initializer));

1804 TRY_TO

(TraverseType(

D

->getType()));

1809 for

(

auto

*C :

D

->clauselists())

1810 TRY_TO

(TraverseOMPClause(C));

1811 TRY_TO

(TraverseType(

D

->getType()));

1818 for

(

auto

*I :

D

->varlist())

1819 TRY_TO

(TraverseStmt(I));

1820 for

(

auto

*C :

D

->clauselists())

1821 TRY_TO

(TraverseOMPClause(C));

1825

template <typename Derived>

1826bool

RecursiveASTVisitor<Derived>::TraverseTemplateParameterListHelper(

1827

TemplateParameterList *TPL) {

1829 for

(NamedDecl *

D

: *TPL) {

1832 if

(Expr *RequiresClause = TPL->getRequiresClause()) {

1833 TRY_TO

(TraverseStmt(RequiresClause));

1839template

<

typename

Derived>

1840template

<

typename

T>

1841bool

RecursiveASTVisitor<Derived>::TraverseDeclTemplateParameterLists(T *

D

) {

1842 for

(

unsigned

i = 0; i <

D

->getNumTemplateParameterLists(); i++) {

1843

TemplateParameterList *TPL =

D

->getTemplateParameterList(i);

1844

TraverseTemplateParameterListHelper(TPL);

1849template

<

typename

Derived>

1850bool

RecursiveASTVisitor<Derived>::TraverseTemplateInstantiations(

1851

ClassTemplateDecl *

D

) {

1852 for

(

auto

*SD :

D

->specializations()) {

1853 for

(

auto

*RD : SD->redecls()) {

1854

assert(!cast<CXXRecordDecl>(RD)->isInjectedClassName());

1856

cast<ClassTemplateSpecializationDecl>(RD)->getSpecializationKind()) {

1860 TRY_TO

(TraverseDecl(RD));

1877template

<

typename

Derived>

1878bool

RecursiveASTVisitor<Derived>::TraverseTemplateInstantiations(

1879

VarTemplateDecl *

D

) {

1880 for

(

auto

*SD :

D

->specializations()) {

1881 for

(

auto

*RD : SD->redecls()) {

1883

cast<VarTemplateSpecializationDecl>(RD)->getSpecializationKind()) {

1886 TRY_TO

(TraverseDecl(RD));

1902template

<

typename

Derived>

1903bool

RecursiveASTVisitor<Derived>::TraverseTemplateInstantiations(

1904

FunctionTemplateDecl *

D

) {

1905 for

(

auto

*FD :

D

->specializations()) {

1906 for

(

auto

*RD : FD->redecls()) {

1907 switch

(RD->getTemplateSpecializationKind()) {

1911 TRY_TO

(TraverseDecl(RD));

1918 TRY_TO

(TraverseDecl(RD));

1932#define DEF_TRAVERSE_TMPL_DECL(TMPLDECLKIND) \ 1933 DEF_TRAVERSE_DECL(TMPLDECLKIND##TemplateDecl, { \ 1934 TRY_TO(TraverseTemplateParameterListHelper(D->getTemplateParameters())); \ 1935 TRY_TO(TraverseDecl(D->getTemplatedDecl())); \ 1943 if (getDerived().shouldVisitTemplateInstantiations() && \ 1944 D == D->getCanonicalDecl()) \ 1945 TRY_TO(TraverseTemplateInstantiations(D)); \ 1959 TRY_TO

(TraverseDecl(

D

->getTemplatedDecl()));

1960 if

(

D

->hasDefaultArgument() && !

D

->defaultArgumentWasInherited())

1961 TRY_TO

(TraverseTemplateArgumentLoc(

D

->getDefaultArgument()));

1962 TRY_TO

(TraverseTemplateParameterListHelper(

D

->getTemplateParameters()));

1966 TRY_TO

(TraverseTemplateParameterListHelper(

D

->getTemplateParameters()));

1969

template <typename Derived>

1970bool

RecursiveASTVisitor<Derived>::TraverseTemplateTypeParamDeclConstraints(

1971 const

TemplateTypeParmDecl *

D

) {

1972 if

(

const auto

*TC =

D

->getTypeConstraint())

1973 TRY_TO

(TraverseTypeConstraint(TC));

1979 if

(

D

->getTypeForDecl())

1980 TRY_TO

(TraverseType(QualType(

D

->getTypeForDecl(), 0)));

1981 TRY_TO

(TraverseTemplateTypeParamDeclConstraints(

D

));

1982 if

(

D

->hasDefaultArgument() && !

D

->defaultArgumentWasInherited())

1983 TRY_TO

(TraverseTemplateArgumentLoc(

D

->getDefaultArgument()));

1987 TRY_TO

(TraverseTypeLoc(

D

->getTypeSourceInfo()->getTypeLoc()));

1994 TRY_TO

(TraverseTypeLoc(

D

->getTypeSourceInfo()->getTypeLoc()));

2001 TRY_TO

(TraverseDecl(

D

->getTemplatedDecl()));

2002 TRY_TO

(TraverseTemplateParameterListHelper(

D

->getTemplateParameters()));

2006 TRY_TO

(TraverseTemplateParameterListHelper(

D

->getTemplateParameters()));

2007 TRY_TO

(TraverseStmt(

D

->getConstraintExpr()));

2013 TRY_TO

(TraverseNestedNameSpecifierLoc(

D

->getQualifierLoc()));

2022 TRY_TO

(TraverseDeclTemplateParameterLists(

D

));

2024 TRY_TO

(TraverseNestedNameSpecifierLoc(

D

->getQualifierLoc()));

2025 if

(

auto

*TSI =

D

->getIntegerTypeSourceInfo())

2026 TRY_TO

(TraverseTypeLoc(TSI->getTypeLoc()));

2032

template <typename Derived>

2033bool

RecursiveASTVisitor<Derived>::TraverseRecordHelper(RecordDecl *

D

) {

2037 TRY_TO

(TraverseDeclTemplateParameterLists(

D

));

2038 TRY_TO

(TraverseNestedNameSpecifierLoc(

D

->getQualifierLoc()));

2042template

<

typename

Derived>

2043bool

RecursiveASTVisitor<Derived>::TraverseCXXBaseSpecifier(

2044 const

CXXBaseSpecifier &

Base

) {

2045 TRY_TO

(TraverseTypeLoc(

Base

.getTypeSourceInfo()->getTypeLoc()));

2049template

<

typename

Derived>

2050bool

RecursiveASTVisitor<Derived>::TraverseCXXRecordHelper(CXXRecordDecl *

D

) {

2051 if

(!TraverseRecordHelper(

D

))

2053 if

(

D

->isCompleteDefinition()) {

2054 for

(

const auto

&I :

D

->bases()) {

2055 TRY_TO

(TraverseCXXBaseSpecifier(I));

2067

template <typename Derived>

2068bool

RecursiveASTVisitor<Derived>::TraverseTemplateArgumentLocsHelper(

2069 const

TemplateArgumentLoc *TAL,

unsigned

Count) {

2070 for

(

unsigned

I = 0; I < Count; ++I) {

2071 TRY_TO

(TraverseTemplateArgumentLoc(TAL[I]));

2076#define DEF_TRAVERSE_TMPL_SPEC_DECL(TMPLDECLKIND, DECLKIND) \ 2077 DEF_TRAVERSE_DECL(TMPLDECLKIND##TemplateSpecializationDecl, { \ 2086 if (const auto *ArgsWritten = D->getTemplateArgsAsWritten()) { \ 2088 TRY_TO(TraverseTemplateArgumentLocsHelper( \ 2089 ArgsWritten->getTemplateArgs(), ArgsWritten->NumTemplateArgs)); \ 2092 if (getDerived().shouldVisitTemplateInstantiations() || \ 2093 D->getTemplateSpecializationKind() == TSK_ExplicitSpecialization) { \ 2095 TRY_TO(Traverse##DECLKIND##Helper(D)); \ 2097 TRY_TO(TraverseNestedNameSpecifierLoc(D->getQualifierLoc())); \ 2110#define DEF_TRAVERSE_TMPL_PART_SPEC_DECL(TMPLDECLKIND, DECLKIND) \ 2111 DEF_TRAVERSE_DECL(TMPLDECLKIND##TemplatePartialSpecializationDecl, { \ 2113 TRY_TO(TraverseTemplateParameterListHelper(D->getTemplateParameters())); \ 2115 TRY_TO(TraverseTemplateArgumentLocsHelper( \ 2116 D->getTemplateArgsAsWritten()->getTemplateArgs(), \ 2117 D->getTemplateArgsAsWritten()->NumTemplateArgs)); \ 2122 TRY_TO(Traverse##DECLKIND##Helper(D)); \ 2135 TRY_TO

(TraverseNestedNameSpecifierLoc(

D

->getQualifierLoc()));

2136 TRY_TO

(TraverseDeclarationNameInfo(

D

->getNameInfo()));

2141

template <typename Derived>

2142bool

RecursiveASTVisitor<Derived>::TraverseDeclaratorHelper(DeclaratorDecl *

D

) {

2143 TRY_TO

(TraverseDeclTemplateParameterLists(

D

));

2144 TRY_TO

(TraverseNestedNameSpecifierLoc(

D

->getQualifierLoc()));

2145 if

(

D

->getTypeSourceInfo())

2146 TRY_TO

(TraverseTypeLoc(

D

->getTypeSourceInfo()->getTypeLoc()));

2148 TRY_TO

(TraverseType(

D

->getType()));

2153 TRY_TO

(TraverseVarHelper(

D

));

2154 for

(

auto

*Binding :

D

->bindings()) {

2155 TRY_TO

(TraverseDecl(Binding));

2160 if

(getDerived().shouldVisitImplicitCode()) {

2161 TRY_TO

(TraverseStmt(

D

->getBinding()));

2162 if

(

const auto

HoldingVar =

D

->getHoldingVar())

2163 TRY_TO

(TraverseDecl(HoldingVar));

2175 TRY_TO

(TraverseDeclaratorHelper(

D

));

2176 if

(

D

->isBitField())

2177 TRY_TO

(TraverseStmt(

D

->getBitWidth()));

2178 if

(

D

->hasInClassInitializer())

2179 TRY_TO

(TraverseStmt(

D

->getInClassInitializer()));

2183 TRY_TO

(TraverseDeclaratorHelper(

D

));

2184 if

(

D

->isBitField())

2185 TRY_TO

(TraverseStmt(

D

->getBitWidth()));

2190 TRY_TO

(TraverseDeclaratorHelper(

D

));

2191 if

(

D

->isBitField())

2192 TRY_TO

(TraverseStmt(

D

->getBitWidth()));

2196

template <typename Derived>

2197bool

RecursiveASTVisitor<Derived>::TraverseFunctionHelper(FunctionDecl *

D

) {

2198 TRY_TO

(TraverseDeclTemplateParameterLists(

D

));

2199 TRY_TO

(TraverseNestedNameSpecifierLoc(

D

->getQualifierLoc()));

2200 TRY_TO

(TraverseDeclarationNameInfo(

D

->getNameInfo()));

2207 if

(

const

FunctionTemplateSpecializationInfo *FTSI =

2208 D

->getTemplateSpecializationInfo()) {

2209 if

(FTSI->getTemplateSpecializationKind() != TSK_Undeclared &&

2210

FTSI->getTemplateSpecializationKind() != TSK_ImplicitInstantiation) {

2213 if

(

const

ASTTemplateArgumentListInfo *TALI =

2214

FTSI->TemplateArgumentsAsWritten) {

2215 TRY_TO

(TraverseTemplateArgumentLocsHelper(TALI->getTemplateArgs(),

2216

TALI->NumTemplateArgs));

2219

}

else if

(

const

DependentFunctionTemplateSpecializationInfo *DFSI =

2220 D

->getDependentSpecializationInfo()) {

2221 if

(

const

ASTTemplateArgumentListInfo *TALI =

2222

DFSI->TemplateArgumentsAsWritten) {

2223 TRY_TO

(TraverseTemplateArgumentLocsHelper(TALI->getTemplateArgs(),

2224

TALI->NumTemplateArgs));

2232 if

(TypeSourceInfo *TSI =

D

->getTypeSourceInfo()) {

2233 TRY_TO

(TraverseTypeLoc(TSI->getTypeLoc()));

2234

}

else if

(getDerived().shouldVisitImplicitCode()) {

2239 for

(ParmVarDecl *Parameter :

D

->parameters()) {

2240 TRY_TO

(TraverseDecl(Parameter));

2245 if

(Expr *TrailingRequiresClause =

D

->getTrailingRequiresClause()) {

2246 TRY_TO

(TraverseStmt(TrailingRequiresClause));

2249 if

(CXXConstructorDecl *Ctor = dyn_cast<CXXConstructorDecl>(

D

)) {

2251 for

(

auto

*I : Ctor->inits()) {

2252 if

(I->isWritten() || getDerived().shouldVisitImplicitCode())

2253 TRY_TO

(TraverseConstructorInitializer(I));

2258 D

->isThisDeclarationADefinition() &&

2261

(!

D

->isDefaulted() || getDerived().shouldVisitImplicitCode());

2263 if

(

const auto

*MD = dyn_cast<CXXMethodDecl>(

D

)) {

2264 if

(

const

CXXRecordDecl *RD = MD->getParent()) {

2265 if

(RD->isLambda() &&

2267

VisitBody = VisitBody && getDerived().shouldVisitLambdaBody();

2273 TRY_TO

(TraverseStmt(

D

->getBody()));

2276 for

(

auto

*Child :

D

->decls()) {

2277 if

(isa<UsingShadowDecl>(Child))

2278 TRY_TO

(TraverseDecl(Child));

2328

template <typename Derived>

2329bool

RecursiveASTVisitor<Derived>::TraverseVarHelper(VarDecl *

D

) {

2330 TRY_TO

(TraverseDeclaratorHelper(

D

));

2332 if

(!isa<ParmVarDecl>(

D

) &&

2333

(!

D

->isCXXForRangeDecl() || getDerived().shouldVisitImplicitCode()))

2334 TRY_TO

(TraverseStmt(

D

->getInit()));

2344 TRY_TO

(TraverseDeclaratorHelper(

D

));

2345 if

(

D

->hasDefaultArgument() && !

D

->defaultArgumentWasInherited())

2346 TRY_TO

(TraverseTemplateArgumentLoc(

D

->getDefaultArgument()));

2350 TRY_TO

(TraverseVarHelper(

D

));

2352 if

(

D

->hasDefaultArg() &&

D

->hasUninstantiatedDefaultArg() &&

2353

!

D

->hasUnparsedDefaultArg())

2354 TRY_TO

(TraverseStmt(

D

->getUninstantiatedDefaultArg()));

2356 if

(

D

->hasDefaultArg() && !

D

->hasUninstantiatedDefaultArg() &&

2357

!

D

->hasUnparsedDefaultArg())

2358 TRY_TO

(TraverseStmt(

D

->getDefaultArg()));

2364 TRY_TO

(TraverseTemplateArguments(

D

->getTemplateArguments()));

2380 template

<

typename

Derived> \

2381 bool

RecursiveASTVisitor<Derived>::Traverse##

STMT

( \

2382 STMT

*S, DataRecursionQueue *Queue) { \

2385

if (!getDerived().shouldTraversePostOrder()) \

2386

TRY_TO(WalkUpFrom##

STMT

(S)); \

2388

if (ShouldVisitChildren) { \

2389

for (Stmt * SubStmt : getDerived().getStmtChildren(S)) { \

2390

TRY_TO_TRAVERSE_OR_ENQUEUE_STMT(SubStmt); \

2397

if (!Queue && ReturnValue && getDerived().shouldTraversePostOrder()) { \

2398

TRY_TO(WalkUpFrom##

STMT

(S)); \

2405 for

(

unsigned

I = 0,

E

= S->getNumInputs(); I <

E

; ++I) {

2408 for

(

unsigned

I = 0,

E

= S->getNumOutputs(); I <

E

; ++I) {

2411 for

(

unsigned

I = 0,

E

= S->getNumClobbers(); I <

E

; ++I) {

2424 TRY_TO

(TraverseDecl(S->getExceptionDecl()));

2429 for

(

auto

*I : S->decls()) {

2430 TRY_TO

(TraverseDecl(I));

2465 if

(!getDerived().shouldVisitImplicitCode()) {

2477 TRY_TO

(TraverseNestedNameSpecifierLoc(S->getQualifierLoc()));

2478 TRY_TO

(TraverseDeclarationNameInfo(S->getNameInfo()));

2488 TRY_TO

(TraverseNestedNameSpecifierLoc(S->getQualifierLoc()));

2489 TRY_TO

(TraverseDeclarationNameInfo(S->getMemberNameInfo()));

2490 if

(S->hasExplicitTemplateArgs()) {

2491 TRY_TO

(TraverseTemplateArgumentLocsHelper(S->getTemplateArgs(),

2492

S->getNumTemplateArgs()));

2497 TRY_TO

(TraverseNestedNameSpecifierLoc(S->getQualifierLoc()));

2498 TRY_TO

(TraverseDeclarationNameInfo(S->getNameInfo()));

2499 TRY_TO

(TraverseTemplateArgumentLocsHelper(S->getTemplateArgs(),

2500

S->getNumTemplateArgs()));

2504 TRY_TO

(TraverseNestedNameSpecifierLoc(S->getQualifierLoc()));

2505 TRY_TO

(TraverseDeclarationNameInfo(S->getNameInfo()));

2506 if

(S->hasExplicitTemplateArgs()) {

2507 TRY_TO

(TraverseTemplateArgumentLocsHelper(S->getTemplateArgs(),

2508

S->getNumTemplateArgs()));

2513 TRY_TO

(TraverseNestedNameSpecifierLoc(S->getQualifierLoc()));

2514 TRY_TO

(TraverseDeclarationNameInfo(S->getMemberNameInfo()));

2515 TRY_TO

(TraverseTemplateArgumentLocsHelper(S->getTemplateArgs(),

2516

S->getNumTemplateArgs()));

2526 TRY_TO

(TraverseTypeLoc(S->getTypeInfoAsWritten()->getTypeLoc()));

2530 TRY_TO

(TraverseTypeLoc(S->getTypeInfoAsWritten()->getTypeLoc()));

2534 TRY_TO

(TraverseTypeLoc(S->getTypeInfoAsWritten()->getTypeLoc()));

2538 TRY_TO

(TraverseTypeLoc(S->getTypeInfoAsWritten()->getTypeLoc()));

2542 TRY_TO

(TraverseTypeLoc(S->getTypeInfoAsWritten()->getTypeLoc()));

2546 TRY_TO

(TraverseTypeLoc(S->getTypeInfoAsWritten()->getTypeLoc()));

2550 TRY_TO

(TraverseTypeLoc(S->getTypeInfoAsWritten()->getTypeLoc()));

2554 TRY_TO

(TraverseTypeLoc(S->getTypeInfoAsWritten()->getTypeLoc()));

2557

template <typename Derived>

2558bool

RecursiveASTVisitor<Derived>::TraverseSynOrSemInitListExpr(

2559

InitListExpr *S, DataRecursionQueue *Queue) {

2563 if

(!getDerived().shouldTraversePostOrder())

2564 TRY_TO

(WalkUpFromInitListExpr(S));

2567 for

(Stmt *SubStmt : S->children()) {

2571 if

(!Queue && getDerived().shouldTraversePostOrder())

2572 TRY_TO

(WalkUpFromInitListExpr(S));

2577template

<

typename

Derived>

2578bool

RecursiveASTVisitor<Derived>::TraverseObjCProtocolLoc(

2579

ObjCProtocolLoc ProtocolLoc) {

2583template

<

typename

Derived>

2584bool

RecursiveASTVisitor<Derived>::TraverseConceptReference(

2585

ConceptReference *CR) {

2586 if

(!getDerived().shouldTraversePostOrder())

2587 TRY_TO

(VisitConceptReference(CR));

2588 TRY_TO

(TraverseNestedNameSpecifierLoc(CR->getNestedNameSpecifierLoc()));

2589 TRY_TO

(TraverseDeclarationNameInfo(CR->getConceptNameInfo()));

2590 if

(CR->hasExplicitTemplateArgs())

2591 TRY_TO

(TraverseTemplateArgumentLocsHelper(

2592

CR->getTemplateArgsAsWritten()->getTemplateArgs(),

2593

CR->getTemplateArgsAsWritten()->NumTemplateArgs));

2594 if

(getDerived().shouldTraversePostOrder())

2595 TRY_TO

(VisitConceptReference(CR));

2607template

<

typename

Derived>

2608bool

RecursiveASTVisitor<Derived>::TraverseInitListExpr(

2609

InitListExpr *S, DataRecursionQueue *Queue) {

2610 if

(S->isSemanticForm() && S->isSyntacticForm()) {

2612 TRY_TO

(TraverseSynOrSemInitListExpr(S, Queue));

2615 TRY_TO

(TraverseSynOrSemInitListExpr(

2616

S->isSemanticForm() ? S->getSyntacticForm() : S, Queue));

2617 if

(getDerived().shouldVisitImplicitCode()) {

2620 TRY_TO

(TraverseSynOrSemInitListExpr(

2621

S->isSemanticForm() ? S : S->getSemanticForm(), Queue));

2630 if

(S->isExprPredicate())

2631 TRY_TO

(TraverseStmt(S->getControllingExpr()));

2633 TRY_TO

(TraverseTypeLoc(S->getControllingType()->getTypeLoc()));

2635 for

(

const

GenericSelectionExpr::Association Assoc : S->associations()) {

2636

if (TypeSourceInfo *TSI = Assoc.getTypeSourceInfo())

2637

TRY_TO(TraverseTypeLoc(TSI->getTypeLoc()));

2638

TRY_TO_TRAVERSE_OR_ENQUEUE_STMT(Assoc.getAssociationExpr());

2640

ShouldVisitChildren =

false

;

2647 for

(PseudoObjectExpr::semantics_iterator i = S->semantics_begin(),

2648

e = S->semantics_end();

2651 if

(OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(sub))

2652

sub = OVE->getSourceExpr();

2661 TRY_TO

(TraverseTypeLoc(S->getTypeSourceInfo()->getTypeLoc()));

2666 TRY_TO

(TraverseTypeLoc(S->getAllocatedTypeSourceInfo()->getTypeLoc()));

2674 TRY_TO

(TraverseTypeLoc(S->getTypeSourceInfo()->getTypeLoc()));

2680 if

(S->isArgumentType())

2681 TRY_TO

(TraverseTypeLoc(S->getArgumentTypeInfo()->getTypeLoc()));

2687 if

(S->isTypeOperand())

2688 TRY_TO

(TraverseTypeLoc(S->getTypeOperandSourceInfo()->getTypeLoc()));

2692 TRY_TO

(TraverseNestedNameSpecifierLoc(S->getQualifierLoc()));

2700 if

(S->isTypeOperand())

2701 TRY_TO

(TraverseTypeLoc(S->getTypeOperandSourceInfo()->getTypeLoc()));

2705 for

(

unsigned

I = 0, N = S->getNumArgs(); I != N; ++I)

2706 TRY_TO

(TraverseTypeLoc(S->getArg(I)->getTypeLoc()));

2710 TRY_TO

(TraverseTypeLoc(S->getQueriedTypeSourceInfo()->getTypeLoc()));

2718 TRY_TO

(TraverseTypeLoc(S->getWrittenTypeInfo()->getTypeLoc()));

2723 TRY_TO

(TraverseTypeLoc(S->getTypeSourceInfo()->getTypeLoc()));

2729 for

(

unsigned

I = 0, N = S->capture_size(); I != N; ++I) {

2730 const

LambdaCapture *

C

= S->capture_begin() + I;

2731 if

(

C

->isExplicit() || getDerived().shouldVisitImplicitCode()) {

2732 TRY_TO

(TraverseLambdaCapture(S, C, S->capture_init_begin()[I]));

2736 if

(getDerived().shouldVisitImplicitCode()) {

2738 TRY_TO

(TraverseDecl(S->getLambdaClass()));

2741

TypeLoc TL = S->getCallOperator()->getTypeSourceInfo()->getTypeLoc();

2742

FunctionProtoTypeLoc Proto = TL.getAsAdjusted<FunctionProtoTypeLoc>();

2744 TRY_TO

(TraverseTemplateParameterListHelper(S->getTemplateParameterList()));

2745 if

(S->hasExplicitParameters()) {

2747 for

(

unsigned

I = 0, N = Proto.getNumParams(); I != N; ++I)

2748 TRY_TO

(TraverseDecl(Proto.getParam(I)));

2751 auto

*

T

= Proto.getTypePtr();

2758 if

(S->hasExplicitResultType())

2759 TRY_TO

(TraverseTypeLoc(Proto.getReturnLoc()));

2769 TRY_TO

(TraverseTypeLoc(S->getTypeSourceInfo()->getTypeLoc()));

2788 TRY_TO

(TraverseDecl(S->getBlockDecl()));

2794 TRY_TO

(TraverseTypeLoc(S->getTypeSourceInfo()->getTypeLoc()));

2800 if

(getDerived().shouldVisitImplicitCode())

2801 TRY_TO

(TraverseStmt(S->getExpr()));

2805 if

(getDerived().shouldVisitImplicitCode())

2806 TRY_TO

(TraverseStmt(S->getExpr()));

2816 TRY_TO

(TraverseNestedNameSpecifierLoc(S->getQualifierLoc()));

2817 if

(TypeSourceInfo *ScopeInfo = S->getScopeTypeInfo())

2818 TRY_TO

(TraverseTypeLoc(ScopeInfo->getTypeLoc()));

2819 if

(TypeSourceInfo *DestroyedTypeInfo = S->getDestroyedTypeInfo())

2820 TRY_TO

(TraverseTypeLoc(DestroyedTypeInfo->getTypeLoc()));

2835 if

(OpaqueValueExpr *OVE = S->getCommonExpr())

2842 if

(TypeSourceInfo *TInfo = S->getEncodedTypeSourceInfo())

2843 TRY_TO

(TraverseTypeLoc(TInfo->getTypeLoc()));

2850 if

(TypeSourceInfo *TInfo = S->getClassReceiverTypeInfo())

2851 TRY_TO

(TraverseTypeLoc(TInfo->getTypeLoc()));

2855 if

(S->isClassReceiver()) {

2856

ObjCInterfaceDecl *IDecl = S->getClassReceiver();

2857

QualType

Type

= IDecl->getASTContext().getObjCInterfaceType(IDecl);

2858

ObjCInterfaceLocInfo

Data

;

2859 Data

.NameLoc = S->getReceiverLocation();

2870 TRY_TO

(TraverseTypeLoc(S->getTypeInfoAsWritten()->getTypeLoc()));

2877 TRY_TO

(TraverseTypeLoc(S->getTypeSourceInfo()->getTypeLoc()));

2886 for

(IntegerLiteral *IL : S->underlying_data_elements()) {

2892 TRY_TO

(TraverseNestedNameSpecifierLoc(S->getQualifierLoc()));

2893 if

(S->hasExplicitTemplateArgs()) {

2894 TRY_TO

(TraverseTemplateArgumentLocsHelper(S->getTemplateArgs(),

2895

S->getNumTemplateArgs()));

2900 TRY_TO

(TraverseNestedNameSpecifierLoc(S->getQualifierLoc()));

2901 if

(S->hasExplicitTemplateArgs()) {

2902 TRY_TO

(TraverseTemplateArgumentLocsHelper(S->getTemplateArgs(),

2903

S->getNumTemplateArgs()));

2914 if

(getDerived().shouldVisitImplicitCode()) {

2915 TRY_TO

(TraverseStmt(S->getOriginalStmt()));

2916 TRY_TO

(TraverseDecl(S->getOutlinedFunctionDecl()));

2923 if

(!getDerived().shouldVisitImplicitCode()) {

2924

CXXRewrittenBinaryOperator::DecomposedForm Decomposed =

2925

S->getDecomposedForm();

2926 TRY_TO

(TraverseStmt(

const_cast<

Expr*

>

(Decomposed.LHS)));

2927 TRY_TO

(TraverseStmt(

const_cast<

Expr*

>

(Decomposed.RHS)));

2956 if

(S->getLifetimeExtendedTemporaryDecl()) {

2957 TRY_TO

(TraverseLifetimeExtendedTemporaryDecl(

2958

S->getLifetimeExtendedTemporaryDecl()));

2966 if

(!getDerived().shouldVisitImplicitCode()) {

2972 if

(!getDerived().shouldVisitImplicitCode()) {

2978 if

(!getDerived().shouldVisitImplicitCode()) {

2984 if

(!getDerived().shouldVisitImplicitCode()) {

2990 if

(!getDerived().shouldVisitImplicitCode()) {

2997 TRY_TO

(TraverseConceptReference(S->getConceptReference()));

3001 TRY_TO

(TraverseDecl(S->getBody()));

3002 for

(ParmVarDecl *Parm : S->getLocalParameters())

3003 TRY_TO

(TraverseDecl(Parm));

3004 for

(concepts::Requirement *Req : S->getRequirements())

3005 TRY_TO

(TraverseConceptRequirement(Req));

3024

template <typename Derived>

3025bool

RecursiveASTVisitor<Derived>::TraverseOMPExecutableDirective(

3026

OMPExecutableDirective *S) {

3027 for

(

auto

*C : S->clauses()) {

3028 TRY_TO

(TraverseOMPClause(C));

3034 if

(!getDerived().shouldVisitImplicitCode()) {

3036 TRY_TO

(TraverseStmt(S->getLoopStmt()));

3041

template <typename Derived>

3043

RecursiveASTVisitor<Derived>::TraverseOMPLoopDirective(OMPLoopDirective *S) {

3044 return

TraverseOMPExecutableDirective(S);

3048

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3051

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3054

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3057

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3060

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3063

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3066

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3069

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3072

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3075

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3078

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3081

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3084

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3087

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3090 TRY_TO

(TraverseDeclarationNameInfo(S->getDirectiveName()));

3091 TRY_TO

(TraverseOMPExecutableDirective(S));

3095

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3098

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3101

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3104

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3107

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3110

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3113

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3116

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3119

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3122

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3125

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3128

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3131

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3134

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3137

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3140

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3143

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3146

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3149

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3152

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3155

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3158

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3161

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3164

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3167

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3170

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3173

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3176

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3179

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3182

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3185

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3188

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3191

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3194

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3197

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3200

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3203

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3206

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3209

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3212

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3215

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3218

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3221

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3224

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3227

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3230

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3233

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3236

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3239

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3242

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3245

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3248

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3251

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3254

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3257

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3260

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3263

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3266

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3269

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3272

{

TRY_TO

(TraverseOMPExecutableDirective(S)); })

3275

template <typename Derived>

3276bool

RecursiveASTVisitor<Derived>::TraverseOMPClause(OMPClause *C) {

3279 switch

(

C

->getClauseKind()) {

3280#define GEN_CLANG_CLAUSE_CLASS 3281#define CLAUSE_CLASS(Enum, Str, Class) \ 3282 case llvm::omp::Clause::Enum: \ 3283 TRY_TO(Visit##Class(static_cast<Class *>(C))); \ 3285#define CLAUSE_NO_CLASS(Enum, Str) \ 3286 case llvm::omp::Clause::Enum: \ 3288#include "llvm/Frontend/OpenMP/OMP.inc" 3293template

<

typename

Derived>

3294bool

RecursiveASTVisitor<Derived>::VisitOMPClauseWithPreInit(

3295

OMPClauseWithPreInit *

Node

) {

3296 TRY_TO

(TraverseStmt(

Node

->getPreInitStmt()));

3300template

<

typename

Derived>

3301bool

RecursiveASTVisitor<Derived>::VisitOMPClauseWithPostUpdate(

3302

OMPClauseWithPostUpdate *

Node

) {

3304 TRY_TO

(TraverseStmt(

Node

->getPostUpdateExpr()));

3308template

<

typename

Derived>

3309bool

RecursiveASTVisitor<Derived>::VisitOMPAllocatorClause(

3310

OMPAllocatorClause *C) {

3311 TRY_TO

(TraverseStmt(

C

->getAllocator()));

3315template

<

typename

Derived>

3316bool

RecursiveASTVisitor<Derived>::VisitOMPAllocateClause(OMPAllocateClause *C) {

3317 TRY_TO

(TraverseStmt(

C

->getAllocator()));

3318 TRY_TO

(VisitOMPClauseList(C));

3322template

<

typename

Derived>

3323bool

RecursiveASTVisitor<Derived>::VisitOMPIfClause(OMPIfClause *C) {

3324 TRY_TO

(VisitOMPClauseWithPreInit(C));

3325 TRY_TO

(TraverseStmt(

C

->getCondition()));

3329template

<

typename

Derived>

3330bool

RecursiveASTVisitor<Derived>::VisitOMPFinalClause(OMPFinalClause *C) {

3331 TRY_TO

(VisitOMPClauseWithPreInit(C));

3332 TRY_TO

(TraverseStmt(

C

->getCondition()));

3336template

<

typename

Derived>

3338

RecursiveASTVisitor<Derived>::VisitOMPNumThreadsClause(OMPNumThreadsClause *C) {

3339 TRY_TO

(VisitOMPClauseWithPreInit(C));

3340 TRY_TO

(TraverseStmt(

C

->getNumThreads()));

3344template

<

typename

Derived>

3345bool

RecursiveASTVisitor<Derived>::VisitOMPAlignClause(OMPAlignClause *C) {

3346 TRY_TO

(TraverseStmt(

C

->getAlignment()));

3350template

<

typename

Derived>

3351bool

RecursiveASTVisitor<Derived>::VisitOMPSafelenClause(OMPSafelenClause *C) {

3352 TRY_TO

(TraverseStmt(

C

->getSafelen()));

3356template

<

typename

Derived>

3357bool

RecursiveASTVisitor<Derived>::VisitOMPSimdlenClause(OMPSimdlenClause *C) {

3358 TRY_TO

(TraverseStmt(

C

->getSimdlen()));

3362template

<

typename

Derived>

3363bool

RecursiveASTVisitor<Derived>::VisitOMPSizesClause(OMPSizesClause *C) {

3364 for

(Expr *

E

:

C

->getSizesRefs())

3369template

<

typename

Derived>

3370bool

RecursiveASTVisitor<Derived>::VisitOMPPermutationClause(

3371

OMPPermutationClause *C) {

3372 for

(Expr *

E

:

C

->getArgsRefs())

3377template

<

typename

Derived>

3378bool

RecursiveASTVisitor<Derived>::VisitOMPFullClause(OMPFullClause *C) {

3382template

<

typename

Derived>

3383bool

RecursiveASTVisitor<Derived>::VisitOMPPartialClause(OMPPartialClause *C) {

3384 TRY_TO

(TraverseStmt(

C

->getFactor()));

3388template

<

typename

Derived>

3390

RecursiveASTVisitor<Derived>::VisitOMPCollapseClause(OMPCollapseClause *C) {

3391 TRY_TO

(TraverseStmt(

C

->getNumForLoops()));

3395template

<

typename

Derived>

3396bool

RecursiveASTVisitor<Derived>::VisitOMPDefaultClause(OMPDefaultClause *) {

3400template

<

typename

Derived>

3401bool

RecursiveASTVisitor<Derived>::VisitOMPProcBindClause(OMPProcBindClause *) {

3405template

<

typename

Derived>

3406bool

RecursiveASTVisitor<Derived>::VisitOMPUnifiedAddressClause(

3407

OMPUnifiedAddressClause *) {

3411template

<

typename

Derived>

3412bool

RecursiveASTVisitor<Derived>::VisitOMPUnifiedSharedMemoryClause(

3413

OMPUnifiedSharedMemoryClause *) {

3417template

<

typename

Derived>

3418bool

RecursiveASTVisitor<Derived>::VisitOMPReverseOffloadClause(

3419

OMPReverseOffloadClause *) {

3423template

<

typename

Derived>

3424bool

RecursiveASTVisitor<Derived>::VisitOMPDynamicAllocatorsClause(

3425

OMPDynamicAllocatorsClause *) {

3429template

<

typename

Derived>

3430bool

RecursiveASTVisitor<Derived>::VisitOMPAtomicDefaultMemOrderClause(

3431

OMPAtomicDefaultMemOrderClause *) {

3435template

<

typename

Derived>

3436bool

RecursiveASTVisitor<Derived>::VisitOMPAtClause(OMPAtClause *) {

3440template

<

typename

Derived>

3441bool

RecursiveASTVisitor<Derived>::VisitOMPSeverityClause(OMPSeverityClause *) {

3445template

<

typename

Derived>

3446bool

RecursiveASTVisitor<Derived>::VisitOMPMessageClause(OMPMessageClause *C) {

3447 TRY_TO

(TraverseStmt(

C

->getMessageString()));

3451template

<

typename

Derived>

3453

RecursiveASTVisitor<Derived>::VisitOMPScheduleClause(OMPScheduleClause *C) {

3454 TRY_TO

(VisitOMPClauseWithPreInit(C));

3455 TRY_TO

(TraverseStmt(

C

->getChunkSize()));

3459template

<

typename

Derived>

3460bool

RecursiveASTVisitor<Derived>::VisitOMPOrderedClause(OMPOrderedClause *C) {

3461 TRY_TO

(TraverseStmt(

C

->getNumForLoops()));

3465template

<

typename

Derived>

3466bool

RecursiveASTVisitor<Derived>::VisitOMPNowaitClause(OMPNowaitClause *) {

3470template

<

typename

Derived>

3471bool

RecursiveASTVisitor<Derived>::VisitOMPUntiedClause(OMPUntiedClause *) {

3475template

<

typename

Derived>

3477

RecursiveASTVisitor<Derived>::VisitOMPMergeableClause(OMPMergeableClause *) {

3481template

<

typename

Derived>

3482bool

RecursiveASTVisitor<Derived>::VisitOMPReadClause(OMPReadClause *) {

3486template

<

typename

Derived>

3487bool

RecursiveASTVisitor<Derived>::VisitOMPWriteClause(OMPWriteClause *) {

3491template

<

typename

Derived>

3492bool

RecursiveASTVisitor<Derived>::VisitOMPUpdateClause(OMPUpdateClause *) {

3496template

<

typename

Derived>

3497bool

RecursiveASTVisitor<Derived>::VisitOMPCaptureClause(OMPCaptureClause *) {

3501template

<

typename

Derived>

3502bool

RecursiveASTVisitor<Derived>::VisitOMPCompareClause(OMPCompareClause *) {

3506template

<

typename

Derived>

3507bool

RecursiveASTVisitor<Derived>::VisitOMPFailClause(OMPFailClause *) {

3511template

<

typename

Derived>

3512bool

RecursiveASTVisitor<Derived>::VisitOMPSeqCstClause(OMPSeqCstClause *) {

3516template

<

typename

Derived>

3517bool

RecursiveASTVisitor<Derived>::VisitOMPAcqRelClause(OMPAcqRelClause *) {

3521template

<

typename

Derived>

3522bool

RecursiveASTVisitor<Derived>::VisitOMPAbsentClause(OMPAbsentClause *) {

3526template

<

typename

Derived>

3527bool

RecursiveASTVisitor<Derived>::VisitOMPHoldsClause(OMPHoldsClause *) {

3531template

<

typename

Derived>

3532bool

RecursiveASTVisitor<Derived>::VisitOMPContainsClause(OMPContainsClause *) {

3536template

<

typename

Derived>

3537bool

RecursiveASTVisitor<Derived>::VisitOMPNoOpenMPClause(OMPNoOpenMPClause *) {

3541template

<

typename

Derived>

3542bool

RecursiveASTVisitor<Derived>::VisitOMPNoOpenMPRoutinesClause(

3543

OMPNoOpenMPRoutinesClause *) {

3547template

<

typename

Derived>

3548bool

RecursiveASTVisitor<Derived>::VisitOMPNoParallelismClause(

3549

OMPNoParallelismClause *) {

3553template

<

typename

Derived>

3554bool

RecursiveASTVisitor<Derived>::VisitOMPAcquireClause(OMPAcquireClause *) {

3558template

<

typename

Derived>

3559bool

RecursiveASTVisitor<Derived>::VisitOMPReleaseClause(OMPReleaseClause *) {

3563template

<

typename

Derived>

3564bool

RecursiveASTVisitor<Derived>::VisitOMPRelaxedClause(OMPRelaxedClause *) {

3568template

<

typename

Derived>

3569bool

RecursiveASTVisitor<Derived>::VisitOMPWeakClause(OMPWeakClause *) {

3573template

<

typename

Derived>

3574bool

RecursiveASTVisitor<Derived>::VisitOMPThreadsClause(OMPThreadsClause *) {

3578template

<

typename

Derived>

3579bool

RecursiveASTVisitor<Derived>::VisitOMPSIMDClause(OMPSIMDClause *) {

3583template

<

typename

Derived>

3584bool

RecursiveASTVisitor<Derived>::VisitOMPNogroupClause(OMPNogroupClause *) {

3588template

<

typename

Derived>

3589bool

RecursiveASTVisitor<Derived>::VisitOMPInitClause(OMPInitClause *C) {

3590 TRY_TO

(VisitOMPClauseList(C));

3594template

<

typename

Derived>

3595bool

RecursiveASTVisitor<Derived>::VisitOMPUseClause(OMPUseClause *C) {

3596 TRY_TO

(TraverseStmt(

C

->getInteropVar()));

3600template

<

typename

Derived>

3601bool

RecursiveASTVisitor<Derived>::VisitOMPDestroyClause(OMPDestroyClause *C) {

3602 TRY_TO

(TraverseStmt(

C

->getInteropVar()));

3606template

<

typename

Derived>

3607bool

RecursiveASTVisitor<Derived>::VisitOMPNovariantsClause(

3608

OMPNovariantsClause *C) {

3609 TRY_TO

(VisitOMPClauseWithPreInit(C));

3610 TRY_TO

(TraverseStmt(

C

->getCondition()));

3614template

<

typename

Derived>

3615bool

RecursiveASTVisitor<Derived>::VisitOMPNocontextClause(

3616

OMPNocontextClause *C) {

3617 TRY_TO

(VisitOMPClauseWithPreInit(C));

3618 TRY_TO

(TraverseStmt(

C

->getCondition()));

3622template

<

typename

Derived>

3623template

<

typename

T>

3624bool

RecursiveASTVisitor<Derived>::VisitOMPClauseList(T *

Node

) {

3625 for

(

auto

*

E

:

Node

->varlist()) {

3631template

<

typename

Derived>

3632bool

RecursiveASTVisitor<Derived>::VisitOMPInclusiveClause(

3633

OMPInclusiveClause *C) {

3634 TRY_TO

(VisitOMPClauseList(C));

3638template

<

typename

Derived>

3639bool

RecursiveASTVisitor<Derived>::VisitOMPExclusiveClause(

3640

OMPExclusiveClause *C) {

3641 TRY_TO

(VisitOMPClauseList(C));

3645template

<

typename

Derived>

3646bool

RecursiveASTVisitor<Derived>::VisitOMPPrivateClause(OMPPrivateClause *C) {

3647 TRY_TO

(VisitOMPClauseList(C));

3648 for

(

auto

*

E

:

C

->private_copies()) {

3654template

<

typename

Derived>

3655bool

RecursiveASTVisitor<Derived>::VisitOMPFirstprivateClause(

3656

OMPFirstprivateClause *C) {

3657 TRY_TO

(VisitOMPClauseList(C));

3658 TRY_TO

(VisitOMPClauseWithPreInit(C));

3659 for

(

auto

*

E

:

C

->private_copies()) {

3662 for

(

auto

*

E

:

C

->inits()) {

3668template

<

typename

Derived>

3669bool

RecursiveASTVisitor<Derived>::VisitOMPLastprivateClause(

3670

OMPLastprivateClause *C) {

3671 TRY_TO

(VisitOMPClauseList(C));

3672 TRY_TO

(VisitOMPClauseWithPostUpdate(C));

3673 for

(

auto

*

E

:

C

->private_copies()) {

3676 for

(

auto

*

E

:

C

->source_exprs()) {

3679 for

(

auto

*

E

:

C

->destination_exprs()) {

3682 for

(

auto

*

E

:

C

->assignment_ops()) {

3688template

<

typename

Derived>

3689bool

RecursiveASTVisitor<Derived>::VisitOMPSharedClause(OMPSharedClause *C) {

3690 TRY_TO

(VisitOMPClauseList(C));

3694template

<

typename

Derived>

3695bool

RecursiveASTVisitor<Derived>::VisitOMPLinearClause(OMPLinearClause *C) {

3696 TRY_TO

(TraverseStmt(

C

->getStep()));

3697 TRY_TO

(TraverseStmt(

C

->getCalcStep()));

3698 TRY_TO

(VisitOMPClauseList(C));

3699 TRY_TO

(VisitOMPClauseWithPostUpdate(C));

3700 for

(

auto

*

E

:

C

->privates()) {

3703 for

(

auto

*

E

:

C

->inits()) {

3706 for

(

auto

*

E

:

C

->updates()) {

3709 for

(

auto

*

E

:

C

->finals()) {

3715template

<

typename

Derived>

3716bool

RecursiveASTVisitor<Derived>::VisitOMPAlignedClause(OMPAlignedClause *C) {

3717 TRY_TO

(TraverseStmt(

C

->getAlignment()));

3718 TRY_TO

(VisitOMPClauseList(C));

3722template

<

typename

Derived>

3723bool

RecursiveASTVisitor<Derived>::VisitOMPCopyinClause(OMPCopyinClause *C) {

3724 TRY_TO

(VisitOMPClauseList(C));

3725 for

(

auto

*

E

:

C

->source_exprs()) {

3728 for

(

auto

*

E

:

C

->destination_exprs()) {

3731 for

(

auto

*

E

:

C

->assignment_ops()) {

3737template

<

typename

Derived>

3738bool

RecursiveASTVisitor<Derived>::VisitOMPCopyprivateClause(

3739

OMPCopyprivateClause *C) {

3740 TRY_TO

(VisitOMPClauseList(C));

3741 for

(

auto

*

E

:

C

->source_exprs()) {

3744 for

(

auto

*

E

:

C

->destination_exprs()) {

3747 for

(

auto

*

E

:

C

->assignment_ops()) {

3753template

<

typename

Derived>

3755

RecursiveASTVisitor<Derived>::VisitOMPReductionClause(OMPReductionClause *C) {

3756 TRY_TO

(TraverseNestedNameSpecifierLoc(

C

->getQualifierLoc()));

3757 TRY_TO

(TraverseDeclarationNameInfo(

C

->getNameInfo()));

3758 TRY_TO

(VisitOMPClauseList(C));

3759 TRY_TO

(VisitOMPClauseWithPostUpdate(C));

3760 for

(

auto

*

E

:

C

->privates()) {

3763 for

(

auto

*

E

:

C

->lhs_exprs()) {

3766 for

(

auto

*

E

:

C

->rhs_exprs()) {

3769 for

(

auto

*

E

:

C

->reduction_ops()) {

3772 if

(

C

->getModifier() == OMPC_REDUCTION_inscan) {

3773 for

(

auto

*

E

:

C

->copy_ops()) {

3776 for

(

auto

*

E

:

C

->copy_array_temps()) {

3779 for

(

auto

*

E

:

C

->copy_array_elems()) {

3786template

<

typename

Derived>

3787bool

RecursiveASTVisitor<Derived>::VisitOMPTaskReductionClause(

3788

OMPTaskReductionClause *C) {

3789 TRY_TO

(TraverseNestedNameSpecifierLoc(

C

->getQualifierLoc()));

3790 TRY_TO

(TraverseDeclarationNameInfo(

C

->getNameInfo()));

3791 TRY_TO

(VisitOMPClauseList(C));

3792 TRY_TO

(VisitOMPClauseWithPostUpdate(C));

3793 for

(

auto

*

E

:

C

->privates()) {

3796 for

(

auto

*

E

:

C

->lhs_exprs()) {

3799 for

(

auto

*

E

:

C

->rhs_exprs()) {

3802 for

(

auto

*

E

:

C

->reduction_ops()) {

3808template

<

typename

Derived>

3809bool

RecursiveASTVisitor<Derived>::VisitOMPInReductionClause(

3810

OMPInReductionClause *C) {

3811 TRY_TO

(TraverseNestedNameSpecifierLoc(

C

->getQualifierLoc()));

3812 TRY_TO

(TraverseDeclarationNameInfo(

C

->getNameInfo()));

3813 TRY_TO

(VisitOMPClauseList(C));

3814 TRY_TO

(VisitOMPClauseWithPostUpdate(C));

3815 for

(

auto

*

E

:

C

->privates()) {

3818 for

(

auto

*

E

:

C

->lhs_exprs()) {

3821 for

(

auto

*

E

:

C

->rhs_exprs()) {

3824 for

(

auto

*

E

:

C

->reduction_ops()) {

3827 for

(

auto

*

E

:

C

->taskgroup_descriptors())

3832template

<

typename

Derived>

3833bool

RecursiveASTVisitor<Derived>::VisitOMPFlushClause(OMPFlushClause *C) {

3834 TRY_TO

(VisitOMPClauseList(C));

3838template

<

typename

Derived>

3839bool

RecursiveASTVisitor<Derived>::VisitOMPDepobjClause(OMPDepobjClause *C) {

3840 TRY_TO

(TraverseStmt(

C

->getDepobj()));

3844template

<

typename

Derived>

3845bool

RecursiveASTVisitor<Derived>::VisitOMPDependClause(OMPDependClause *C) {

3846 TRY_TO

(VisitOMPClauseList(C));

3850template

<

typename

Derived>

3851bool

RecursiveASTVisitor<Derived>::VisitOMPDeviceClause(OMPDeviceClause *C) {

3852 TRY_TO

(VisitOMPClauseWithPreInit(C));

3853 TRY_TO

(TraverseStmt(

C

->getDevice()));

3857template

<

typename

Derived>

3858bool

RecursiveASTVisitor<Derived>::VisitOMPMapClause(OMPMapClause *C) {

3859 TRY_TO

(VisitOMPClauseList(C));

3863template

<

typename

Derived>

3864bool

RecursiveASTVisitor<Derived>::VisitOMPNumTeamsClause(

3865

OMPNumTeamsClause *C) {

3866 TRY_TO

(VisitOMPClauseList(C));

3867 TRY_TO

(VisitOMPClauseWithPreInit(C));

3871template

<

typename

Derived>

3872bool

RecursiveASTVisitor<Derived>::VisitOMPThreadLimitClause(

3873

OMPThreadLimitClause *C) {

3874 TRY_TO

(VisitOMPClauseList(C));

3875 TRY_TO

(VisitOMPClauseWithPreInit(C));

3879template

<

typename

Derived>

3880bool

RecursiveASTVisitor<Derived>::VisitOMPPriorityClause(

3881

OMPPriorityClause *C) {

3882 TRY_TO

(VisitOMPClauseWithPreInit(C));

3883 TRY_TO

(TraverseStmt(

C

->getPriority()));

3887template

<

typename

Derived>

3888bool

RecursiveASTVisitor<Derived>::VisitOMPGrainsizeClause(

3889

OMPGrainsizeClause *C) {

3890 TRY_TO

(VisitOMPClauseWithPreInit(C));

3891 TRY_TO

(TraverseStmt(

C

->getGrainsize()));

3895template

<

typename

Derived>

3896bool

RecursiveASTVisitor<Derived>::VisitOMPNumTasksClause(

3897

OMPNumTasksClause *C) {

3898 TRY_TO

(VisitOMPClauseWithPreInit(C));

3899 TRY_TO

(TraverseStmt(

C

->getNumTasks()));

3903template

<

typename

Derived>

3904bool

RecursiveASTVisitor<Derived>::VisitOMPHintClause(OMPHintClause *C) {

3905 TRY_TO

(TraverseStmt(

C

->getHint()));

3909template

<

typename

Derived>

3910bool

RecursiveASTVisitor<Derived>::VisitOMPDistScheduleClause(

3911

OMPDistScheduleClause *C) {

3912 TRY_TO

(VisitOMPClauseWithPreInit(C));

3913 TRY_TO

(TraverseStmt(

C

->getChunkSize()));

3917template

<

typename

Derived>

3919

RecursiveASTVisitor<Derived>::VisitOMPDefaultmapClause(OMPDefaultmapClause *C) {

3923template

<

typename

Derived>

3924bool

RecursiveASTVisitor<Derived>::VisitOMPToClause(OMPToClause *C) {

3925 TRY_TO

(VisitOMPClauseList(C));

3929template

<

typename

Derived>

3930bool

RecursiveASTVisitor<Derived>::VisitOMPFromClause(OMPFromClause *C) {

3931 TRY_TO

(VisitOMPClauseList(C));

3935template

<

typename

Derived>

3936bool

RecursiveASTVisitor<Derived>::VisitOMPUseDevicePtrClause(

3937

OMPUseDevicePtrClause *C) {

3938 TRY_TO

(VisitOMPClauseList(C));

3942template

<

typename

Derived>

3943bool

RecursiveASTVisitor<Derived>::VisitOMPUseDeviceAddrClause(

3944

OMPUseDeviceAddrClause *C) {

3945 TRY_TO

(VisitOMPClauseList(C));

3949template

<

typename

Derived>

3950bool

RecursiveASTVisitor<Derived>::VisitOMPIsDevicePtrClause(

3951

OMPIsDevicePtrClause *C) {

3952 TRY_TO

(VisitOMPClauseList(C));

3956template

<

typename

Derived>

3957bool

RecursiveASTVisitor<Derived>::VisitOMPHasDeviceAddrClause(

3958

OMPHasDeviceAddrClause *C) {

3959 TRY_TO

(VisitOMPClauseList(C));

3963template

<

typename

Derived>

3964bool

RecursiveASTVisitor<Derived>::VisitOMPNontemporalClause(

3965

OMPNontemporalClause *C) {

3966 TRY_TO

(VisitOMPClauseList(C));

3967 for

(

auto

*

E

:

C

->private_refs()) {

3973template

<

typename

Derived>

3974bool

RecursiveASTVisitor<Derived>::VisitOMPOrderClause(OMPOrderClause *) {

3978template

<

typename

Derived>

3979bool

RecursiveASTVisitor<Derived>::VisitOMPDetachClause(OMPDetachClause *C) {

3980 TRY_TO

(TraverseStmt(

C

->getEventHandler()));

3984template

<

typename

Derived>

3985bool

RecursiveASTVisitor<Derived>::VisitOMPUsesAllocatorsClause(

3986

OMPUsesAllocatorsClause *C) {

3987 for

(

unsigned

I = 0,

E

=

C

->getNumberOfAllocators(); I <

E

; ++I) {

3988 const

OMPUsesAllocatorsClause::Data

Data

=

C

->getAllocatorData(I);

3990 TRY_TO

(TraverseStmt(

Data

.AllocatorTraits));

3995template

<

typename

Derived>

3996bool

RecursiveASTVisitor<Derived>::VisitOMPAffinityClause(

3997

OMPAffinityClause *C) {

3998 TRY_TO

(TraverseStmt(

C

->getModifier()));

3999 for

(Expr *

E

:

C

->varlist())

4004template

<

typename

Derived>

4005bool

RecursiveASTVisitor<Derived>::VisitOMPFilterClause(OMPFilterClause *C) {

4006 TRY_TO

(VisitOMPClauseWithPreInit(C));

4007 TRY_TO

(TraverseStmt(

C

->getThreadID()));

4011template

<

typename

Derived>

4012bool

RecursiveASTVisitor<Derived>::VisitOMPBindClause(OMPBindClause *C) {

4016template

<

typename

Derived>

4017bool

RecursiveASTVisitor<Derived>::VisitOMPXDynCGroupMemClause(

4018

OMPXDynCGroupMemClause *C) {

4019 TRY_TO

(VisitOMPClauseWithPreInit(C));

4020 TRY_TO

(TraverseStmt(

C

->getSize()));

4024template

<

typename

Derived>

4025bool

RecursiveASTVisitor<Derived>::VisitOMPDoacrossClause(

4026

OMPDoacrossClause *C) {

4027 TRY_TO

(VisitOMPClauseList(C));

4031template

<

typename

Derived>

4032bool

RecursiveASTVisitor<Derived>::VisitOMPXAttributeClause(

4033

OMPXAttributeClause *C) {

4037template

<

typename

Derived>

4038bool

RecursiveASTVisitor<Derived>::VisitOMPXBareClause(OMPXBareClause *C) {

4042template

<

typename

Derived>

4043bool

RecursiveASTVisitor<Derived>::TraverseOpenACCConstructStmt(

4044

OpenACCConstructStmt *C) {

4045 TRY_TO

(VisitOpenACCClauseList(

C

->clauses()));

4049template

<

typename

Derived>

4050bool

RecursiveASTVisitor<Derived>::TraverseOpenACCAssociatedStmtConstruct(

4051

OpenACCAssociatedStmtConstruct *S) {

4052 TRY_TO

(TraverseOpenACCConstructStmt(S));

4053 TRY_TO

(TraverseStmt(S->getAssociatedStmt()));

4057template

<

typename

Derived>

4058bool

RecursiveASTVisitor<Derived>::VisitOpenACCClause(

const

OpenACCClause *C) {

4059 for

(

const

Stmt *Child :

C

->children())

4060 TRY_TO

(TraverseStmt(

const_cast<

Stmt *

>

(Child)));

4064template

<

typename

Derived>

4065bool

RecursiveASTVisitor<Derived>::VisitOpenACCClauseList(

4066

ArrayRef<const OpenACCClause *> Clauses) {

4068 for

(

const auto

*C : Clauses)

4069 TRY_TO

(VisitOpenACCClause(C));

4074

{

TRY_TO

(TraverseOpenACCAssociatedStmtConstruct(S)); })

4076

{

TRY_TO

(TraverseOpenACCAssociatedStmtConstruct(S)); })

4078

{

TRY_TO

(TraverseOpenACCAssociatedStmtConstruct(S)); })

4080

{

TRY_TO

(TraverseOpenACCAssociatedStmtConstruct(S)); })

4082

{

TRY_TO

(VisitOpenACCClauseList(S->clauses())); })

4084

{

TRY_TO

(VisitOpenACCClauseList(S->clauses())); })

4086

{

TRY_TO

(TraverseOpenACCAssociatedStmtConstruct(S)); })

4088 if

(S->hasDevNumExpr())

4089 TRY_TO

(TraverseStmt(S->getDevNumExpr()));

4090 for

(

auto

*

E

: S->getQueueIdExprs())

4092 TRY_TO

(VisitOpenACCClauseList(S->clauses()));

4095

{

TRY_TO

(VisitOpenACCClauseList(S->clauses())); })

4097

{

TRY_TO

(VisitOpenACCClauseList(S->clauses())); })

4099

{

TRY_TO

(VisitOpenACCClauseList(S->clauses())); })

4101

{

TRY_TO

(VisitOpenACCClauseList(S->clauses())); })

4124

#undef TRAVERSE_STMT

This file provides AST data structures related to concepts.

#define TYPE(DERIVED, BASE)

Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate....

This file defines OpenMP nodes for declarative directives.

Defines the C++ template declaration subclasses.

#define DEF_TRAVERSE_TMPL_INST(kind)

Defines the clang::Expr interface and subclasses for C++ expressions.

Defines Expressions and AST nodes for C++2a concepts.

llvm::DenseSet< const void * > Visited

Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.

Defines the LambdaCapture class.

This file defines OpenMP AST classes for clauses.

Defines some OpenMP-specific enums and functions.

#define DEF_TRAVERSE_TMPL_PART_SPEC_DECL(TMPLDECLKIND, DECLKIND)

#define TRAVERSE_STMT_BASE(NAME, CLASS, VAR, QUEUE)

#define DEF_TRAVERSE_TYPE(TYPE, CODE)

#define DEF_TRAVERSE_TYPELOC(TYPE, CODE)

#define TRY_TO_TRAVERSE_OR_ENQUEUE_STMT(S)

#define STMT(CLASS, PARENT)

#define DEF_TRAVERSE_TMPL_SPEC_DECL(TMPLDECLKIND, DECLKIND)

#define DEF_TRAVERSE_DECL(DECL, CODE)

#define DEF_TRAVERSE_STMT(STMT, CODE)

#define DEF_TRAVERSE_TMPL_DECL(TMPLDECLKIND)

#define TRY_TO(CALL_EXPR)

Defines various enumerations that describe declaration and type specifiers.

Defines the Objective-C statement AST node classes.

This file defines OpenACC AST classes for statement-level contructs.

This file defines OpenMP AST classes for executable directives and clauses.

This file defines SYCL AST classes used to represent calls to SYCL kernels.

Defines the clang::TypeLoc interface and its subclasses.

C Language Family Type Representation.

Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...

TranslationUnitDecl * getTranslationUnitDecl() const

Represents a type which was implicitly adjusted by the semantic engine for arbitrary reasons.

Wrapper for source info for arrays.

Attr - This represents one attribute.

An attributed type is a type to which a type attribute has been applied.

Represents a block literal declaration, which is like an unnamed FunctionDecl.

Represents a base class of a C++ class.

Represents a C++ base or member initializer.

Represents a C++ struct/union/class.

Represents the body of a CapturedStmt, and serves as its DeclContext.

Complex values, per C99 6.2.5p11.

A reference to a concept and its template args, as it appears in the code.

Represents the canonical version of C arrays with a specified constant size.

Represents a concrete matrix type with constant number of rows and columns.

DeclContext - This is used only as base class of specific decl types that can act as declaration cont...

decl_range decls() const

decls_begin/decls_end - Iterate over the declarations stored in this context.

Decl - This represents one declaration (or definition), e.g.

bool isImplicit() const

isImplicit - Indicates whether the declaration was implicitly generated by the implementation.

virtual Stmt * getBody() const

getBody - If this Decl represents a declaration for a body of code, such as a function or method defi...

TemplateDecl * getCXXDeductionGuideTemplate() const

If this name is the name of a C++ deduction guide, return the template associated with that name.

@ CXXConversionFunctionName

NameKind getNameKind() const

Determine what kind of name this is.

Represents a ValueDecl that came out of a declarator.

Represents the type decltype(expr) (C++11).

Represents a C++17 deduced template specialization type.

Represents an array type in C++ whose size is a value-dependent expression.

Represents an extended vector type where either the type or size is dependent.

Represents a dependent template name that cannot be resolved prior to template instantiation.

Represents a template specialization type whose template cannot be resolved, e.g.

Represents a vector type where either the type or size is dependent.

Represents a type that was referred to using an elaborated type keyword, e.g., struct S,...

This represents one expression.

FriendDecl - Represents the declaration of a friend entity, which can be a function,...

Represents a function declaration or definition.

Represents a K&R-style 'int foo()' function, which has no information available about its arguments.

Represents a prototype with parameter type info, e.g.

QualType getParamType(unsigned i) const

Expr * getNoexceptExpr() const

Return the expression inside noexcept(expression), or a null pointer if there is none (because the ex...

ArrayRef< QualType > exceptions() const

ArrayRef< QualType > param_types() const

QualType getReturnType() const

Represents a C array with an unspecified size.

Describes an C or C++ initializer list.

Represents the declaration of a label.

Describes the capture of a variable or of this, or of a C++1y init-capture.

A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...

This represents a decl that may have a name.

A C++ nested-name-specifier augmented with source location information.

TypeLoc getTypeLoc() const

For a nested-name-specifier that refers to a type, retrieve the type with source-location information...

NestedNameSpecifierLoc getPrefix() const

Return the prefix of this nested-name-specifier.

NestedNameSpecifier * getNestedNameSpecifier() const

Retrieve the nested-name-specifier to which this instance refers.

Represents a C++ nested name specifier, such as "\::std::vector<int>::".

SpecifierKind getKind() const

Determine what kind of nested name specifier is stored.

NestedNameSpecifier * getPrefix() const

Return the prefix of this nested name specifier.

@ NamespaceAlias

A namespace alias, stored as a NamespaceAliasDecl*.

@ TypeSpec

A type, stored as a Type*.

@ TypeSpecWithTemplate

A type that was preceded by the 'template' keyword, stored as a Type*.

@ Super

Microsoft's '__super' specifier, stored as a CXXRecordDecl* of the class it appeared in.

@ Identifier

An identifier, stored as an IdentifierInfo*.

@ Global

The global specifier '::'. There is no stored value.

@ Namespace

A namespace, stored as a NamespaceDecl*.

const Type * getAsType() const

Retrieve the type stored in this nested name specifier.

This is a basic class for representing single OpenMP clause.

This is a basic class for representing single OpenMP executable directive.

This is a common base class for loop directives ('omp simd', 'omp for', 'omp for simd' etc....

Represents a pointer to an Objective C object.

Represents a class type in Objective C.

ObjCPropertyImplDecl - Represents implementation declaration of a property in a class or category imp...

Represents a type parameter type in Objective C.

Sugar for parentheses used when specifying types.

A (possibly-)qualified type.

Represents a template name as written in source code.

Wrapper of type source information for a type with non-trivial direct qualifiers.

UnqualTypeLoc getUnqualifiedLoc() const

An rvalue reference type, per C++11 [dcl.ref].

Represents a struct/union/class.

A class that does preorder or postorder depth-first traversal on the entire Clang AST and visits each...

bool TraverseStmt(Stmt *S, DataRecursionQueue *Queue=nullptr)

Recursively visit a statement or expression, by dispatching to Traverse*() based on the argument's dy...

bool TraverseTemplateArgument(const TemplateArgument &Arg)

Recursively visit a template argument and dispatch to the appropriate method for the argument type.

bool WalkUpFromDecl(Decl *D)

bool TraverseConceptRequirement(concepts::Requirement *R)

bool TraverseType(QualType T)

Recursively visit a type, by dispatching to Traverse*Type() based on the argument's getTypeClass() pr...

bool dataTraverseStmtPre(Stmt *S)

Invoked before visiting a statement or expression via data recursion.

bool TraverseObjCProtocolLoc(ObjCProtocolLoc ProtocolLoc)

Recursively visit an Objective-C protocol reference with location information.

bool VisitUnqualTypeLoc(UnqualTypeLoc TL)

bool TraverseConceptExprRequirement(concepts::ExprRequirement *R)

bool TraverseAST(ASTContext &AST)

Recursively visits an entire AST, starting from the TranslationUnitDecl.

bool shouldVisitTemplateInstantiations() const

Return whether this visitor should recurse into template instantiations.

bool TraverseTemplateArgumentLoc(const TemplateArgumentLoc &ArgLoc)

Recursively visit a template argument location and dispatch to the appropriate method for the argumen...

bool canIgnoreChildDeclWhileTraversingDeclContext(const Decl *Child)

bool WalkUpFromType(Type *T)

bool dataTraverseStmtPost(Stmt *S)

Invoked after visiting a statement or expression via data recursion.

bool WalkUpFromTypeLoc(TypeLoc TL)

bool TraverseNestedNameSpecifierLoc(NestedNameSpecifierLoc NNS)

Recursively visit a C++ nested-name-specifier with location information.

bool TraverseTemplateName(TemplateName Template)

Recursively visit a template name and dispatch to the appropriate method.

Stmt::child_range getStmtChildren(Stmt *S)

bool TraverseNestedNameSpecifier(NestedNameSpecifier *NNS)

Recursively visit a C++ nested-name-specifier.

bool shouldVisitImplicitCode() const

Return whether this visitor should recurse into implicit code, e.g., implicit constructors and destru...

bool TraverseConceptReference(ConceptReference *CR)

Recursively visit concept reference with location information.

bool TraverseTemplateArguments(ArrayRef< TemplateArgument > Args)

Recursively visit a set of template arguments.

bool WalkUpFromUnqualTypeLoc(UnqualTypeLoc TL)

bool dataTraverseNode(Stmt *S, DataRecursionQueue *Queue)

bool TraverseDecl(Decl *D)

Recursively visit a declaration, by dispatching to Traverse*Decl() based on the argument's dynamic ty...

bool WalkUpFromStmt(Stmt *S)

bool TraverseTypeLoc(TypeLoc TL)

Recursively visit a type with location, by dispatching to Traverse*TypeLoc() based on the argument ty...

bool TraverseTypeConstraint(const TypeConstraint *C)

bool WalkUpFromQualifiedTypeLoc(QualifiedTypeLoc TL)

bool VisitTypeLoc(TypeLoc TL)

bool TraverseLambdaCapture(LambdaExpr *LE, const LambdaCapture *C, Expr *Init)

Recursively visit a lambda capture.

bool VisitConceptReference(ConceptReference *CR)

bool shouldTraversePostOrder() const

Return whether this visitor should traverse post-order.

SmallVectorImpl< llvm::PointerIntPair< Stmt *, 1, bool > > DataRecursionQueue

A queue used for performing data recursion over statements.

bool shouldVisitLambdaBody() const

Return whether this visitor should recurse into lambda body.

bool TraverseSynOrSemInitListExpr(InitListExpr *S, DataRecursionQueue *Queue=nullptr)

Recursively visit the syntactic or semantic form of an initialization list.

bool TraverseAttr(Attr *At)

Recursively visit an attribute, by dispatching to Traverse*Attr() based on the argument's dynamic typ...

bool TraverseConceptNestedRequirement(concepts::NestedRequirement *R)

bool VisitQualifiedTypeLoc(QualifiedTypeLoc TL)

bool shouldWalkTypesOfTypeLocs() const

Return whether this visitor should recurse into the types of TypeLocs.

bool TraverseDeclarationNameInfo(DeclarationNameInfo NameInfo)

Recursively visit a name with its location information.

bool TraverseCXXBaseSpecifier(const CXXBaseSpecifier &Base)

Recursively visit a base specifier.

Derived & getDerived()

Return a reference to the derived class.

bool TraverseConceptTypeRequirement(concepts::TypeRequirement *R)

bool TraverseConstructorInitializer(CXXCtorInitializer *Init)

Recursively visit a constructor initializer.

Scope - A scope is a transient data structure that is used while parsing the program.

Stmt - This represents one statement.

llvm::iterator_range< child_iterator > child_range

Represents the result of substituting a set of types for a template type parameter pack.

Location wrapper for a TemplateArgument.

const TemplateArgument & getArgument() const

TypeSourceInfo * getTypeSourceInfo() const

NestedNameSpecifierLoc getTemplateQualifierLoc() const

Expr * getSourceExpression() const

Represents a template argument.

Expr * getAsExpr() const

Retrieve the template argument as an expression.

QualType getAsType() const

Retrieve the type for a type template argument.

ArrayRef< TemplateArgument > pack_elements() const

Iterator range referencing all of the elements of a template argument pack.

@ Declaration

The template argument is a declaration that was provided for a pointer, reference,...

@ Template

The template argument is a template name that was provided for a template template parameter.

@ StructuralValue

The template argument is a non-type template argument that can't be represented by the special-case D...

@ Pack

The template argument is actually a parameter pack.

@ TemplateExpansion

The template argument is a pack expansion of a template name that was provided for a template templat...

@ NullPtr

The template argument is a null pointer or null pointer to member that was provided for a non-type te...

@ Type

The template argument is a type.

@ Null

Represents an empty template argument, e.g., one that has not been deduced.

@ Integral

The template argument is an integral value stored in an llvm::APSInt that was provided for an integra...

@ Expression

The template argument is an expression, and we've not resolved it to one of the other forms yet,...

ArgKind getKind() const

Return the kind of stored template argument.

TemplateName getAsTemplateOrTemplatePattern() const

Retrieve the template argument as a template name; if the argument is a pack expansion,...

Represents a C++ template name within the type system.

DependentTemplateName * getAsDependentTemplateName() const

Retrieve the underlying dependent template name structure, if any.

QualifiedTemplateName * getAsQualifiedTemplateName() const

Retrieve the underlying qualified template name structure, if any.

Stores a list of template parameters for a TemplateDecl and its derived classes.

Declaration of a template type parameter.

The top declaration context.

Models the abbreviated syntax to constrain a template type parameter: template <convertible_to<string...

Base wrapper for a particular "section" of type source info.

UnqualTypeLoc getUnqualifiedLoc() const

Skips past any qualifiers, if this is qualified.

TypeLocClass getTypeLocClass() const

Represents a typeof (or typeof) expression (a C23 feature and GCC extension) or a typeof_unqual expre...

A container of type source information.

TypeLoc getTypeLoc() const

Return the TypeLoc wrapper for the type source info.

The base class of the type hierarchy.

QualType getPointeeType() const

If this is a pointer, ObjC object pointer, or block pointer, this returns the respective pointee.

TypeClass getTypeClass() const

A unary type transform, which is a type constructed from another.

Wrapper of type source information for a type with no direct qualifiers.

Represents a variable declaration or definition.

Represents a GCC generic vector type.

A requires-expression requirement which queries the validity and properties of an expression ('simple...

bool isExprSubstitutionFailure() const

const ReturnTypeRequirement & getReturnTypeRequirement() const

A requires-expression requirement which is satisfied when a general constraint expression is satisfie...

bool hasInvalidConstraint() const

Expr * getConstraintExpr() const

A static requirement that can be used in a requires-expression to check properties of types and expre...

RequirementKind getKind() const

A requires-expression requirement which queries the existence of a type name or type template special...

bool isSubstitutionFailure() const

TypeSourceInfo * getType() const

LLVM_ATTRIBUTE_ALWAYS_INLINE LLVM_ATTRIBUTE_NODEBUG auto isSameMethod(FirstMethodPtrTy FirstMethodPtr, SecondMethodPtrTy SecondMethodPtr) -> bool

Returns true if and only if FirstMethodPtr and SecondMethodPtr are pointers to the same non-static me...

The JSON file list parser is used to communicate input to InstallAPI.

for(const auto &A :T->param_types())

const FunctionProtoType * T

bool declaresSameEntity(const Decl *D1, const Decl *D2)

Determine whether two declarations declare the same entity.

@ TSK_ExplicitInstantiationDefinition

This template specialization was instantiated from a template due to an explicit instantiation defini...

@ TSK_ExplicitInstantiationDeclaration

This template specialization was instantiated from a template due to an explicit instantiation declar...

@ TSK_ExplicitSpecialization

This template specialization was declared or defined by an explicit specialization (C++ [temp....

@ TSK_ImplicitInstantiation

This template specialization was implicitly instantiated from a template.

@ TSK_Undeclared

This template specialization was formed from a template-id but has not yet been declared,...

@ Class

The "class" keyword introduces the elaborated-type-specifier.

DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspon...

DeclarationName getName() const

getName - Returns the embedded declaration name.

TypeSourceInfo * getNamedTypeInfo() const

getNamedTypeInfo - Returns the source type info associated to the name.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4