52 #include "llvm/ADT/DenseMap.h" 53 #include "llvm/ADT/SmallString.h" 54 #include "llvm/ADT/SmallVector.h" 55 #include "llvm/ADT/StringRef.h" 56 #include "llvm/Bitcode/BitstreamReader.h" 57 #include "llvm/Support/Casting.h" 58 #include "llvm/Support/ErrorHandling.h" 64 using namespace clang;
65 using namespace serialization;
73 llvm::BitstreamCursor &DeclsCursor;
83 std::string ReadString() {
111 : Record(Record), DeclsCursor(Cursor) {}
115 static const unsigned NumStmtFields = 0;
119 static const unsigned NumExprFields = NumStmtFields + 7;
124 unsigned NumTemplateArgs);
128 unsigned NumTemplateArgs);
130 void VisitStmt(
Stmt *S);
131 #define STMT(Type, Base) \ 132 void Visit##Type(Type *); 133 #include "clang/AST/StmtNodes.inc" 140 unsigned NumTemplateArgs) {
145 for (
unsigned i = 0; i != NumTemplateArgs; ++i)
151 assert(Record.
getIdx() == NumStmtFields &&
"Incorrect statement field count");
154 void ASTStmtReader::VisitNullStmt(
NullStmt *S) {
157 S->HasLeadingEmptyMacro = Record.
readInt();
160 void ASTStmtReader::VisitCompoundStmt(
CompoundStmt *S) {
163 unsigned NumStmts = Record.
readInt();
167 S->LBraceLoc = ReadSourceLocation();
168 S->RBraceLoc = ReadSourceLocation();
171 void ASTStmtReader::VisitSwitchCase(
SwitchCase *S) {
178 void ASTStmtReader::VisitCaseStmt(
CaseStmt *S) {
186 void ASTStmtReader::VisitDefaultStmt(
DefaultStmt *S) {
191 void ASTStmtReader::VisitLabelStmt(
LabelStmt *S) {
193 auto *LD = ReadDeclAs<LabelDecl>();
202 uint64_t NumAttrs = Record.
readInt();
206 assert(NumAttrs == S->NumAttrs);
207 assert(NumAttrs == Attrs.size());
208 std::copy(Attrs.begin(), Attrs.end(), S->getAttrArrayPtr());
210 S->AttrLoc = ReadSourceLocation();
213 void ASTStmtReader::VisitIfStmt(
IfStmt *S) {
225 void ASTStmtReader::VisitSwitchStmt(
SwitchStmt *S) {
236 for (
auto E = Record.
size(); Record.
getIdx() != E; ) {
247 void ASTStmtReader::VisitWhileStmt(
WhileStmt *S) {
256 void ASTStmtReader::VisitDoStmt(
DoStmt *S) {
265 void ASTStmtReader::VisitForStmt(
ForStmt *S) {
277 void ASTStmtReader::VisitGotoStmt(
GotoStmt *S) {
279 S->
setLabel(ReadDeclAs<LabelDecl>());
291 void ASTStmtReader::VisitContinueStmt(
ContinueStmt *S) {
296 void ASTStmtReader::VisitBreakStmt(
BreakStmt *S) {
301 void ASTStmtReader::VisitReturnStmt(
ReturnStmt *S) {
308 void ASTStmtReader::VisitDeclStmt(
DeclStmt *S) {
320 for (
int I = 0; I < N; ++I)
321 Decls.push_back(ReadDecl());
328 void ASTStmtReader::VisitAsmStmt(
AsmStmt *S) {
338 void ASTStmtReader::VisitGCCAsmStmt(
GCCAsmStmt *S) {
351 for (
unsigned I = 0, N = NumOutputs + NumInputs; I != N; ++I) {
353 Constraints.push_back(cast_or_null<StringLiteral>(Record.
readSubStmt()));
359 for (
unsigned I = 0; I != NumClobbers; ++I)
360 Clobbers.push_back(cast_or_null<StringLiteral>(Record.
readSubStmt()));
362 S->setOutputsAndInputsAndClobbers(Record.
getContext(),
363 Names.data(), Constraints.data(),
364 Exprs.data(), NumOutputs, NumInputs,
365 Clobbers.data(), NumClobbers);
368 void ASTStmtReader::VisitMSAsmStmt(
MSAsmStmt *S) {
370 S->LBraceLoc = ReadSourceLocation();
371 S->EndLoc = ReadSourceLocation();
372 S->NumAsmToks = Record.
readInt();
373 std::string AsmStr = ReadString();
377 AsmToks.reserve(S->NumAsmToks);
378 for (
unsigned i = 0, e = S->NumAsmToks; i != e; ++i) {
390 for (
unsigned i = 0, e = S->
NumClobbers; i != e; ++i) {
391 ClobbersData.push_back(ReadString());
392 Clobbers.push_back(ClobbersData.back());
400 Exprs.reserve(NumOperands);
401 ConstraintsData.reserve(NumOperands);
402 Constraints.reserve(NumOperands);
403 for (
unsigned i = 0; i != NumOperands; ++i) {
405 ConstraintsData.push_back(ReadString());
406 Constraints.push_back(ConstraintsData.back());
409 S->initialize(Record.
getContext(), AsmStr, AsmToks,
410 Constraints, Exprs, Clobbers);
415 assert(Record.
peekInt() == S->NumParams);
417 auto *StoredStmts = S->getStoredStmts();
419 i < CoroutineBodyStmt::SubStmt::FirstParamMove + S->NumParams; ++i)
423 void ASTStmtReader::VisitCoreturnStmt(
CoreturnStmt *S) {
426 for (
auto &SubStmt: S->SubStmts)
428 S->IsImplicit = Record.
readInt() != 0;
431 void ASTStmtReader::VisitCoawaitExpr(
CoawaitExpr *E) {
433 E->KeywordLoc = ReadSourceLocation();
434 for (
auto &SubExpr: E->SubExprs)
436 E->OpaqueValue = cast_or_null<OpaqueValueExpr>(Record.
readSubStmt());
440 void ASTStmtReader::VisitCoyieldExpr(
CoyieldExpr *E) {
442 E->KeywordLoc = ReadSourceLocation();
443 for (
auto &SubExpr: E->SubExprs)
445 E->OpaqueValue = cast_or_null<OpaqueValueExpr>(Record.
readSubStmt());
450 E->KeywordLoc = ReadSourceLocation();
451 for (
auto &SubExpr: E->SubExprs)
455 void ASTStmtReader::VisitCapturedStmt(
CapturedStmt *S) {
474 I.VarAndKind.setPointer(ReadDeclAs<VarDecl>());
476 static_cast<CapturedStmt::VariableCaptureKind>(Record.
readInt()));
477 I.Loc = ReadSourceLocation();
481 void ASTStmtReader::VisitExpr(
Expr *E) {
490 assert(Record.
getIdx() == NumExprFields &&
491 "Incorrect expression field count");
498 E->FnName = cast_or_null<StringLiteral>(Record.
readSubExpr());
501 void ASTStmtReader::VisitDeclRefExpr(
DeclRefExpr *E) {
509 unsigned NumTemplateArgs = 0;
511 NumTemplateArgs = Record.
readInt();
517 if (E->hasFoundDecl())
518 *E->getTrailingObjects<
NamedDecl *>() = ReadDeclAs<NamedDecl>();
521 ReadTemplateKWAndArgsInfo(
525 E->
setDecl(ReadDeclAs<ValueDecl>());
557 unsigned Len = Record.
readInt();
559 "Wrong number of concatenated tokens!");
562 bool isPascal = Record.
readInt();
579 E->
setKind(static_cast<CharacterLiteral::CharacterKind>(Record.
readInt()));
582 void ASTStmtReader::VisitParenExpr(
ParenExpr *E) {
591 unsigned NumExprs = Record.
readInt();
593 for (
unsigned i = 0; i != NumExprs; ++i)
595 E->NumExprs = NumExprs;
596 E->LParenLoc = ReadSourceLocation();
597 E->RParenLoc = ReadSourceLocation();
608 void ASTStmtReader::VisitOffsetOfExpr(
OffsetOfExpr *E) {
679 void ASTStmtReader::VisitCallExpr(
CallExpr *E) {
684 for (
unsigned I = 0, N = E->
getNumArgs(); I != N; ++I)
692 void ASTStmtReader::VisitMemberExpr(
MemberExpr *E) {
695 "It's a subclass, we must advance Idx!");
698 void ASTStmtReader::VisitObjCIsaExpr(
ObjCIsaExpr *E) {
710 E->setShouldCopy(Record.
readInt());
714 VisitExplicitCastExpr(E);
715 E->LParenLoc = ReadSourceLocation();
716 E->BridgeKeywordLoc = ReadSourceLocation();
720 void ASTStmtReader::VisitCastExpr(
CastExpr *E) {
722 unsigned NumBaseSpecs = Record.
readInt();
727 while (NumBaseSpecs--) {
744 VisitBinaryOperator(E);
751 E->SubExprs[ConditionalOperator::COND] = Record.
readSubExpr();
752 E->SubExprs[ConditionalOperator::LHS] = Record.
readSubExpr();
753 E->SubExprs[ConditionalOperator::RHS] = Record.
readSubExpr();
754 E->QuestionLoc = ReadSourceLocation();
755 E->ColonLoc = ReadSourceLocation();
761 E->OpaqueValue = cast<OpaqueValueExpr>(Record.
readSubExpr());
762 E->SubExprs[BinaryConditionalOperator::COMMON] = Record.
readSubExpr();
763 E->SubExprs[BinaryConditionalOperator::COND] = Record.
readSubExpr();
764 E->SubExprs[BinaryConditionalOperator::LHS] = Record.
readSubExpr();
765 E->SubExprs[BinaryConditionalOperator::RHS] = Record.
readSubExpr();
766 E->QuestionLoc = ReadSourceLocation();
767 E->ColonLoc = ReadSourceLocation();
781 VisitExplicitCastExpr(E);
801 void ASTStmtReader::VisitInitListExpr(
InitListExpr *E) {
803 if (
auto *SyntForm = cast_or_null<InitListExpr>(Record.
readSubStmt()))
807 bool isArrayFiller = Record.
readInt();
808 Expr *filler =
nullptr;
811 E->ArrayFillerOrUnionFieldInit = filler;
813 E->ArrayFillerOrUnionFieldInit = ReadDeclAs<FieldDecl>();
815 unsigned NumInits = Record.
readInt();
818 for (
unsigned I = 0; I != NumInits; ++I) {
823 for (
unsigned I = 0; I != NumInits; ++I)
832 unsigned NumSubExprs = Record.
readInt();
833 assert(NumSubExprs == E->
getNumSubExprs() &&
"Wrong number of subexprs");
834 for (
unsigned I = 0; I != NumSubExprs; ++I)
843 auto *Field = ReadDeclAs<FieldDecl>();
846 Designators.push_back(
Designator(Field->getIdentifier(), DotLoc,
848 Designators.back().setField(Field);
856 Designators.push_back(
Designator(Name, DotLoc, FieldLoc));
861 unsigned Index = Record.
readInt();
864 Designators.push_back(
Designator(Index, LBracketLoc, RBracketLoc));
869 unsigned Index = Record.
readInt();
873 Designators.push_back(
Designator(Index, LBracketLoc, EllipsisLoc,
880 Designators.data(), Designators.size());
889 void ASTStmtReader::VisitNoInitExpr(
NoInitExpr *E) {
907 void ASTStmtReader::VisitVAArgExpr(
VAArgExpr *E) {
920 E->
setLabel(ReadDeclAs<LabelDecl>());
923 void ASTStmtReader::VisitStmtExpr(
StmtExpr *E) {
930 void ASTStmtReader::VisitChooseExpr(
ChooseExpr *E) {
940 void ASTStmtReader::VisitGNUNullExpr(
GNUNullExpr *E) {
948 unsigned NumExprs = Record.
readInt();
958 E->BuiltinLoc = ReadSourceLocation();
959 E->RParenLoc = ReadSourceLocation();
960 E->TInfo = GetTypeSourceInfo();
964 void ASTStmtReader::VisitBlockExpr(
BlockExpr *E) {
971 E->NumAssocs = Record.
readInt();
974 new(Record.
getContext())
Stmt*[GenericSelectionExpr::END_EXPR+E->NumAssocs];
976 E->SubExprs[GenericSelectionExpr::CONTROLLING] = Record.
readSubExpr();
977 for (
unsigned I = 0, N = E->
getNumAssocs(); I != N; ++I) {
978 E->AssocTypes[I] = GetTypeSourceInfo();
979 E->SubExprs[GenericSelectionExpr::END_EXPR+I] = Record.
readSubExpr();
981 E->ResultIndex = Record.
readInt();
983 E->GenericLoc = ReadSourceLocation();
984 E->DefaultLoc = ReadSourceLocation();
985 E->RParenLoc = ReadSourceLocation();
990 unsigned numSemanticExprs = Record.
readInt();
998 for (
unsigned i = 0; i != numSemanticExprs; ++i) {
1000 E->getSubExprsBuffer()[i+1] = subExpr;
1004 void ASTStmtReader::VisitAtomicExpr(
AtomicExpr *E) {
1008 for (
unsigned I = 0; I != E->NumSubExprs; ++I)
1010 E->BuiltinLoc = ReadSourceLocation();
1011 E->RParenLoc = ReadSourceLocation();
1027 E->BoxingMethod = ReadDeclAs<ObjCMethodDecl>();
1028 E->Range = ReadSourceRange();
1033 unsigned NumElements = Record.
readInt();
1034 assert(NumElements == E->
getNumElements() &&
"Wrong number of elements");
1036 for (
unsigned I = 0, N = NumElements; I != N; ++I)
1038 E->ArrayWithObjectsMethod = ReadDeclAs<ObjCMethodDecl>();
1039 E->Range = ReadSourceRange();
1044 unsigned NumElements = Record.
readInt();
1045 assert(NumElements == E->
getNumElements() &&
"Wrong number of elements");
1046 bool HasPackExpansions = Record.
readInt();
1047 assert(HasPackExpansions == E->HasPackExpansions &&
"Pack expansion mismatch");
1052 for (
unsigned I = 0; I != NumElements; ++I) {
1055 if (HasPackExpansions) {
1056 Expansions[I].EllipsisLoc = ReadSourceLocation();
1057 Expansions[I].NumExpansionsPlusOne = Record.
readInt();
1060 E->DictWithObjectsMethod = ReadDeclAs<ObjCMethodDecl>();
1061 E->Range = ReadSourceRange();
1082 E->ProtoLoc = ReadSourceLocation();
1088 E->
setDecl(ReadDeclAs<ObjCIvarDecl>());
1098 unsigned MethodRefFlags = Record.
readInt();
1099 bool Implicit = Record.
readInt() != 0;
1101 auto *Getter = ReadDeclAs<ObjCMethodDecl>();
1102 auto *Setter = ReadDeclAs<ObjCMethodDecl>();
1103 E->setImplicitProperty(Getter, Setter, MethodRefFlags);
1105 E->setExplicitProperty(ReadDeclAs<ObjCPropertyDecl>(), MethodRefFlags);
1107 E->setLocation(ReadSourceLocation());
1108 E->setReceiverLocation(ReadSourceLocation());
1114 E->setSuperReceiver(Record.
readType());
1117 E->setClassReceiver(ReadDeclAs<ObjCInterfaceDecl>());
1127 E->GetAtIndexMethodDecl = ReadDeclAs<ObjCMethodDecl>();
1128 E->SetAtIndexMethodDecl = ReadDeclAs<ObjCMethodDecl>();
1135 unsigned NumStoredSelLocs = Record.
readInt();
1136 E->SelLocsKind = Record.
readInt();
1138 E->IsImplicit = Record.
readInt();
1165 E->LBracLoc = ReadSourceLocation();
1166 E->RBracLoc = ReadSourceLocation();
1168 for (
unsigned I = 0, N = E->
getNumArgs(); I != N; ++I)
1172 for (
unsigned I = 0; I != NumStoredSelLocs; ++I)
1173 Locs[I] = ReadSourceLocation();
1209 bool HasFinally = Record.
readInt();
1250 void ASTStmtReader::VisitCXXCatchStmt(
CXXCatchStmt *S) {
1252 S->CatchLoc = ReadSourceLocation();
1253 S->ExceptionDecl = ReadDeclAs<VarDecl>();
1257 void ASTStmtReader::VisitCXXTryStmt(
CXXTryStmt *S) {
1261 S->TryLoc = ReadSourceLocation();
1269 S->ForLoc = ReadSourceLocation();
1270 S->CoawaitLoc = ReadSourceLocation();
1271 S->ColonLoc = ReadSourceLocation();
1272 S->RParenLoc = ReadSourceLocation();
1284 S->KeywordLoc = ReadSourceLocation();
1285 S->IsIfExists = Record.
readInt();
1287 ReadDeclarationNameInfo(S->NameInfo);
1300 E->NumArgs = Record.
readInt();
1305 E->setConstructor(ReadDeclAs<CXXConstructorDecl>());
1313 E->ParenOrBraceRange = ReadSourceRange();
1318 E->Constructor = ReadDeclAs<CXXConstructorDecl>();
1319 E->Loc = ReadSourceLocation();
1320 E->ConstructsVirtualBase = Record.
readInt();
1321 E->InheritedFromVirtualBase = Record.
readInt();
1325 VisitCXXConstructExpr(E);
1326 E->Type = GetTypeSourceInfo();
1329 void ASTStmtReader::VisitLambdaExpr(
LambdaExpr *E) {
1331 unsigned NumCaptures = Record.
readInt();
1332 assert(NumCaptures == E->NumCaptures);(void)NumCaptures;
1333 E->IntroducerRange = ReadSourceRange();
1335 E->CaptureDefaultLoc = ReadSourceLocation();
1336 E->ExplicitParams = Record.
readInt();
1337 E->ExplicitResultType = Record.
readInt();
1338 E->ClosingBrace = ReadSourceLocation();
1354 VisitExplicitCastExpr(E);
1357 E->RParenLoc = R.
getEnd();
1358 R = ReadSourceRange();
1359 E->AngleBrackets = R;
1363 return VisitCXXNamedCastExpr(E);
1367 return VisitCXXNamedCastExpr(E);
1371 return VisitCXXNamedCastExpr(E);
1375 return VisitCXXNamedCastExpr(E);
1379 VisitExplicitCastExpr(E);
1386 E->UDSuffixLoc = ReadSourceLocation();
1405 GetTypeSourceInfo());
1413 void ASTStmtReader::VisitCXXThisExpr(
CXXThisExpr *E) {
1419 void ASTStmtReader::VisitCXXThrowExpr(
CXXThrowExpr *E) {
1421 E->ThrowLoc = ReadSourceLocation();
1423 E->IsThrownVariableInScope = Record.
readInt();
1428 E->Param = ReadDeclAs<ParmVarDecl>();
1429 E->Loc = ReadSourceLocation();
1434 E->Field = ReadDeclAs<FieldDecl>();
1435 E->Loc = ReadSourceLocation();
1446 E->TypeInfo = GetTypeSourceInfo();
1447 E->RParenLoc = ReadSourceLocation();
1450 void ASTStmtReader::VisitCXXNewExpr(
CXXNewExpr *E) {
1452 E->GlobalNew = Record.
readInt();
1453 bool isArray = Record.
readInt();
1454 E->PassAlignment = Record.
readInt();
1455 E->UsualArrayDeleteWantsSize = Record.
readInt();
1456 unsigned NumPlacementArgs = Record.
readInt();
1457 E->StoredInitializationStyle = Record.
readInt();
1460 E->AllocatedTypeInfo = GetTypeSourceInfo();
1461 E->TypeIdParens = ReadSourceRange();
1462 E->Range = ReadSourceRange();
1463 E->DirectInitRange = ReadSourceRange();
1466 E->StoredInitializationStyle != 0);
1476 E->GlobalDelete = Record.
readInt();
1477 E->ArrayForm = Record.
readInt();
1478 E->ArrayFormAsWritten = Record.
readInt();
1479 E->UsualArrayDeleteWantsSize = Record.
readInt();
1480 E->OperatorDelete = ReadDeclAs<FunctionDecl>();
1482 E->Loc = ReadSourceLocation();
1489 E->IsArrow = Record.
readInt();
1490 E->OperatorLoc = ReadSourceLocation();
1492 E->ScopeType = GetTypeSourceInfo();
1493 E->ColonColonLoc = ReadSourceLocation();
1494 E->TildeLoc = ReadSourceLocation();
1506 unsigned NumObjects = Record.
readInt();
1508 for (
unsigned i = 0; i != NumObjects; ++i)
1509 E->getTrailingObjects<
BlockDecl *>()[i] =
1510 ReadDeclAs<BlockDecl>();
1521 ReadTemplateKWAndArgsInfo(
1528 E->IsArrow = Record.
readInt();
1529 E->OperatorLoc = ReadSourceLocation();
1531 E->FirstQualifierFoundInScope = ReadDeclAs<NamedDecl>();
1532 ReadDeclarationNameInfo(E->MemberNameInfo);
1540 ReadTemplateKWAndArgsInfo(
1546 ReadDeclarationNameInfo(E->NameInfo);
1553 "Read wrong record during creation ?");
1555 for (
unsigned I = 0, N = E->
arg_size(); I != N; ++I)
1557 E->Type = GetTypeSourceInfo();
1562 void ASTStmtReader::VisitOverloadExpr(
OverloadExpr *E) {
1570 unsigned NumDecls = Record.
readInt();
1572 for (
unsigned i = 0; i != NumDecls; ++i) {
1573 auto *D = ReadDeclAs<NamedDecl>();
1579 ReadDeclarationNameInfo(E->NameInfo);
1584 VisitOverloadExpr(E);
1585 E->IsArrow = Record.
readInt();
1586 E->HasUnresolvedUsing = Record.
readInt();
1589 E->OperatorLoc = ReadSourceLocation();
1593 VisitOverloadExpr(E);
1594 E->RequiresADL = Record.
readInt();
1595 E->Overloaded = Record.
readInt();
1596 E->NamingClass = ReadDeclAs<CXXRecordDecl>();
1606 E->RParenLoc = Range.
getEnd();
1609 for (
unsigned I = 0, N = E->
getNumArgs(); I != N; ++I)
1610 Args[I] = GetTypeSourceInfo();
1616 E->Value = (
unsigned int)Record.
readInt();
1619 E->RParen = Range.
getEnd();
1620 E->QueriedType = GetTypeSourceInfo();
1631 E->RParen = Range.
getEnd();
1637 E->Range = ReadSourceRange();
1643 E->EllipsisLoc = ReadSourceLocation();
1644 E->NumExpansions = Record.
readInt();
1650 unsigned NumPartialArgs = Record.
readInt();
1651 E->OperatorLoc = ReadSourceLocation();
1652 E->PackLoc = ReadSourceLocation();
1653 E->RParenLoc = ReadSourceLocation();
1656 assert(E->Length == NumPartialArgs);
1658 *E = I + NumPartialArgs;
1666 void ASTStmtReader::VisitSubstNonTypeTemplateParmExpr(
1669 E->Param = ReadDeclAs<NonTypeTemplateParmDecl>();
1670 E->NameLoc = ReadSourceLocation();
1674 void ASTStmtReader::VisitSubstNonTypeTemplateParmPackExpr(
1677 E->Param = ReadDeclAs<NonTypeTemplateParmDecl>();
1683 E->NumArguments = ArgPack.pack_size();
1684 E->NameLoc = ReadSourceLocation();
1689 E->NumParameters = Record.
readInt();
1690 E->ParamPack = ReadDeclAs<ParmVarDecl>();
1691 E->NameLoc = ReadSourceLocation();
1692 auto **Parms = E->getTrailingObjects<
ParmVarDecl *>();
1693 for (
unsigned i = 0, n = E->NumParameters; i != n; ++i)
1694 Parms[i] = ReadDeclAs<ParmVarDecl>();
1700 auto *VD = ReadDeclAs<ValueDecl>();
1701 unsigned ManglingNumber = Record.
readInt();
1705 void ASTStmtReader::VisitCXXFoldExpr(
CXXFoldExpr *E) {
1707 E->LParenLoc = ReadSourceLocation();
1708 E->EllipsisLoc = ReadSourceLocation();
1709 E->RParenLoc = ReadSourceLocation();
1718 E->Loc = ReadSourceLocation();
1722 void ASTStmtReader::VisitTypoExpr(
TypoExpr *E) {
1723 llvm_unreachable(
"Cannot read TypoExpr nodes");
1731 E->IsArrow = (Record.
readInt() != 0);
1734 E->MemberLoc = ReadSourceLocation();
1735 E->TheDecl = ReadDeclAs<MSPropertyDecl>();
1748 std::string UuidStr = ReadString();
1752 GetTypeSourceInfo());
1760 void ASTStmtReader::VisitSEHLeaveStmt(
SEHLeaveStmt *S) {
1767 S->Loc = ReadSourceLocation();
1768 S->Children[SEHExceptStmt::FILTER_EXPR] = Record.
readSubStmt();
1774 S->Loc = ReadSourceLocation();
1778 void ASTStmtReader::VisitSEHTryStmt(
SEHTryStmt *S) {
1780 S->IsCXXTry = Record.
readInt();
1781 S->TryLoc = ReadSourceLocation();
1782 S->Children[SEHTryStmt::TRY] = Record.
readSubStmt();
1783 S->Children[SEHTryStmt::HANDLER] = Record.
readSubStmt();
1798 void ASTStmtReader::VisitAsTypeExpr(
AsTypeExpr *E) {
1800 E->BuiltinLoc = ReadSourceLocation();
1801 E->RParenLoc = ReadSourceLocation();
1817 : Reader(R), Context(Record.getContext()) {}
1819 #define OPENMP_CLAUSE(Name, Class) void Visit##Class(Class *C); 1820 #include "clang/Basic/OpenMPKinds.def" 1830 switch (Reader->Record.readInt()) {
1837 case OMPC_num_threads:
1852 case OMPC_proc_bind:
1867 case OMPC_mergeable:
1897 case OMPC_firstprivate:
1900 case OMPC_lastprivate:
1906 case OMPC_reduction:
1909 case OMPC_task_reduction:
1912 case OMPC_in_reduction:
1924 case OMPC_copyprivate:
1931 unsigned NumVars = Reader->Record.readInt();
1932 unsigned NumLoops = Reader->Record.readInt();
1940 unsigned NumVars = Reader->Record.readInt();
1941 unsigned NumDeclarations = Reader->Record.readInt();
1942 unsigned NumLists = Reader->Record.readInt();
1943 unsigned NumComponents = Reader->Record.readInt();
1948 case OMPC_num_teams:
1951 case OMPC_thread_limit:
1957 case OMPC_grainsize:
1960 case OMPC_num_tasks:
1966 case OMPC_dist_schedule:
1969 case OMPC_defaultmap:
1973 unsigned NumVars = Reader->Record.readInt();
1974 unsigned NumDeclarations = Reader->Record.readInt();
1975 unsigned NumLists = Reader->Record.readInt();
1976 unsigned NumComponents = Reader->Record.readInt();
1982 unsigned NumVars = Reader->Record.readInt();
1983 unsigned NumDeclarations = Reader->Record.readInt();
1984 unsigned NumLists = Reader->Record.readInt();
1985 unsigned NumComponents = Reader->Record.readInt();
1990 case OMPC_use_device_ptr: {
1991 unsigned NumVars = Reader->Record.readInt();
1992 unsigned NumDeclarations = Reader->Record.readInt();
1993 unsigned NumLists = Reader->Record.readInt();
1994 unsigned NumComponents = Reader->Record.readInt();
1996 NumLists, NumComponents);
1999 case OMPC_is_device_ptr: {
2000 unsigned NumVars = Reader->Record.readInt();
2001 unsigned NumDeclarations = Reader->Record.readInt();
2002 unsigned NumLists = Reader->Record.readInt();
2003 unsigned NumComponents = Reader->Record.readInt();
2005 NumLists, NumComponents);
2011 C->
setLocEnd(Reader->ReadSourceLocation());
2022 VisitOMPClauseWithPreInit(C);
2026 void OMPClauseReader::VisitOMPIfClause(
OMPIfClause *C) {
2027 VisitOMPClauseWithPreInit(C);
2028 C->setNameModifier(static_cast<OpenMPDirectiveKind>(Reader->Record.readInt()));
2029 C->setNameModifierLoc(Reader->ReadSourceLocation());
2030 C->setColonLoc(Reader->ReadSourceLocation());
2031 C->setCondition(Reader->Record.readSubExpr());
2036 C->setCondition(Reader->Record.readSubExpr());
2041 VisitOMPClauseWithPreInit(C);
2042 C->setNumThreads(Reader->Record.readSubExpr());
2047 C->setSafelen(Reader->Record.readSubExpr());
2052 C->setSimdlen(Reader->Record.readSubExpr());
2057 C->setNumForLoops(Reader->Record.readSubExpr());
2063 static_cast<OpenMPDefaultClauseKind>(Reader->Record.readInt()));
2065 C->setDefaultKindKwLoc(Reader->ReadSourceLocation());
2070 static_cast<OpenMPProcBindClauseKind>(Reader->Record.readInt()));
2072 C->setProcBindKindKwLoc(Reader->ReadSourceLocation());
2076 VisitOMPClauseWithPreInit(C);
2078 static_cast<OpenMPScheduleClauseKind>(Reader->Record.readInt()));
2079 C->setFirstScheduleModifier(
2080 static_cast<OpenMPScheduleClauseModifier>(Reader->Record.readInt()));
2081 C->setSecondScheduleModifier(
2082 static_cast<OpenMPScheduleClauseModifier>(Reader->Record.readInt()));
2083 C->setChunkSize(Reader->Record.readSubExpr());
2084 C->setLParenLoc(Reader->ReadSourceLocation());
2085 C->setFirstScheduleModifierLoc(Reader->ReadSourceLocation());
2086 C->setSecondScheduleModifierLoc(Reader->ReadSourceLocation());
2087 C->setScheduleKindLoc(Reader->ReadSourceLocation());
2088 C->setCommaLoc(Reader->ReadSourceLocation());
2092 C->setNumForLoops(Reader->Record.readSubExpr());
2093 for (
unsigned I = 0, E = C->NumberOfLoops; I < E; ++I)
2095 for (
unsigned I = 0, E = C->NumberOfLoops; I < E; ++I)
2106 void OMPClauseReader::VisitOMPReadClause(
OMPReadClause *) {}
2118 void OMPClauseReader::VisitOMPSIMDClause(
OMPSIMDClause *) {}
2126 Vars.reserve(NumVars);
2127 for (
unsigned i = 0; i != NumVars; ++i)
2128 Vars.push_back(Reader->Record.readSubExpr());
2131 for (
unsigned i = 0; i != NumVars; ++i)
2132 Vars.push_back(Reader->Record.readSubExpr());
2133 C->setPrivateCopies(Vars);
2137 VisitOMPClauseWithPreInit(C);
2141 Vars.reserve(NumVars);
2142 for (
unsigned i = 0; i != NumVars; ++i)
2143 Vars.push_back(Reader->Record.readSubExpr());
2146 for (
unsigned i = 0; i != NumVars; ++i)
2147 Vars.push_back(Reader->Record.readSubExpr());
2148 C->setPrivateCopies(Vars);
2150 for (
unsigned i = 0; i != NumVars; ++i)
2151 Vars.push_back(Reader->Record.readSubExpr());
2156 VisitOMPClauseWithPostUpdate(C);
2160 Vars.reserve(NumVars);
2161 for (
unsigned i = 0; i != NumVars; ++i)
2162 Vars.push_back(Reader->Record.readSubExpr());
2165 for (
unsigned i = 0; i != NumVars; ++i)
2166 Vars.push_back(Reader->Record.readSubExpr());
2169 for (
unsigned i = 0; i != NumVars; ++i)
2170 Vars.push_back(Reader->Record.readSubExpr());
2171 C->setSourceExprs(Vars);
2173 for (
unsigned i = 0; i != NumVars; ++i)
2174 Vars.push_back(Reader->Record.readSubExpr());
2175 C->setDestinationExprs(Vars);
2177 for (
unsigned i = 0; i != NumVars; ++i)
2178 Vars.push_back(Reader->Record.readSubExpr());
2179 C->setAssignmentOps(Vars);
2186 Vars.reserve(NumVars);
2187 for (
unsigned i = 0; i != NumVars; ++i)
2188 Vars.push_back(Reader->Record.readSubExpr());
2193 VisitOMPClauseWithPostUpdate(C);
2195 C->setColonLoc(Reader->ReadSourceLocation());
2198 Reader->ReadDeclarationNameInfo(DNI);
2199 C->setQualifierLoc(NNSL);
2200 C->setNameInfo(DNI);
2204 Vars.reserve(NumVars);
2205 for (
unsigned i = 0; i != NumVars; ++i)
2206 Vars.push_back(Reader->Record.readSubExpr());
2209 for (
unsigned i = 0; i != NumVars; ++i)
2210 Vars.push_back(Reader->Record.readSubExpr());
2211 C->setPrivates(Vars);
2213 for (
unsigned i = 0; i != NumVars; ++i)
2214 Vars.push_back(Reader->Record.readSubExpr());
2215 C->setLHSExprs(Vars);
2217 for (
unsigned i = 0; i != NumVars; ++i)
2218 Vars.push_back(Reader->Record.readSubExpr());
2219 C->setRHSExprs(Vars);
2221 for (
unsigned i = 0; i != NumVars; ++i)
2222 Vars.push_back(Reader->Record.readSubExpr());
2223 C->setReductionOps(Vars);
2227 VisitOMPClauseWithPostUpdate(C);
2229 C->setColonLoc(Reader->ReadSourceLocation());
2232 Reader->ReadDeclarationNameInfo(DNI);
2233 C->setQualifierLoc(NNSL);
2234 C->setNameInfo(DNI);
2238 Vars.reserve(NumVars);
2239 for (
unsigned I = 0; I != NumVars; ++I)
2240 Vars.push_back(Reader->Record.readSubExpr());
2243 for (
unsigned I = 0; I != NumVars; ++I)
2244 Vars.push_back(Reader->Record.readSubExpr());
2245 C->setPrivates(Vars);
2247 for (
unsigned I = 0; I != NumVars; ++I)
2248 Vars.push_back(Reader->Record.readSubExpr());
2249 C->setLHSExprs(Vars);
2251 for (
unsigned I = 0; I != NumVars; ++I)
2252 Vars.push_back(Reader->Record.readSubExpr());
2253 C->setRHSExprs(Vars);
2255 for (
unsigned I = 0; I != NumVars; ++I)
2256 Vars.push_back(Reader->Record.readSubExpr());
2257 C->setReductionOps(Vars);
2261 VisitOMPClauseWithPostUpdate(C);
2263 C->setColonLoc(Reader->ReadSourceLocation());
2266 Reader->ReadDeclarationNameInfo(DNI);
2267 C->setQualifierLoc(NNSL);
2268 C->setNameInfo(DNI);
2272 Vars.reserve(NumVars);
2273 for (
unsigned I = 0; I != NumVars; ++I)
2274 Vars.push_back(Reader->Record.readSubExpr());
2277 for (
unsigned I = 0; I != NumVars; ++I)
2278 Vars.push_back(Reader->Record.readSubExpr());
2279 C->setPrivates(Vars);
2281 for (
unsigned I = 0; I != NumVars; ++I)
2282 Vars.push_back(Reader->Record.readSubExpr());
2283 C->setLHSExprs(Vars);
2285 for (
unsigned I = 0; I != NumVars; ++I)
2286 Vars.push_back(Reader->Record.readSubExpr());
2287 C->setRHSExprs(Vars);
2289 for (
unsigned I = 0; I != NumVars; ++I)
2290 Vars.push_back(Reader->Record.readSubExpr());
2291 C->setReductionOps(Vars);
2293 for (
unsigned I = 0; I != NumVars; ++I)
2294 Vars.push_back(Reader->Record.readSubExpr());
2295 C->setTaskgroupDescriptors(Vars);
2299 VisitOMPClauseWithPostUpdate(C);
2301 C->setColonLoc(Reader->ReadSourceLocation());
2302 C->setModifier(static_cast<OpenMPLinearClauseKind>(Reader->Record.readInt()));
2303 C->setModifierLoc(Reader->ReadSourceLocation());
2306 Vars.reserve(NumVars);
2307 for (
unsigned i = 0; i != NumVars; ++i)
2308 Vars.push_back(Reader->Record.readSubExpr());
2311 for (
unsigned i = 0; i != NumVars; ++i)
2312 Vars.push_back(Reader->Record.readSubExpr());
2313 C->setPrivates(Vars);
2315 for (
unsigned i = 0; i != NumVars; ++i)
2316 Vars.push_back(Reader->Record.readSubExpr());
2319 for (
unsigned i = 0; i != NumVars; ++i)
2320 Vars.push_back(Reader->Record.readSubExpr());
2321 C->setUpdates(Vars);
2323 for (
unsigned i = 0; i != NumVars; ++i)
2324 Vars.push_back(Reader->Record.readSubExpr());
2326 C->setStep(Reader->Record.readSubExpr());
2327 C->setCalcStep(Reader->Record.readSubExpr());
2331 C->setLParenLoc(Reader->ReadSourceLocation());
2333 unsigned NumVars = C->varlist_size();
2335 Vars.reserve(NumVars);
2336 for (
unsigned i = 0; i != NumVars; ++i)
2337 Vars.push_back(Reader->Record.readSubExpr());
2338 C->setVarRefs(Vars);
2339 C->setAlignment(Reader->Record.readSubExpr());
2343 C->setLParenLoc(Reader->ReadSourceLocation());
2344 unsigned NumVars = C->varlist_size();
2346 Exprs.reserve(NumVars);
2347 for (
unsigned i = 0; i != NumVars; ++i)
2348 Exprs.push_back(Reader->Record.readSubExpr());
2349 C->setVarRefs(Exprs);
2351 for (
unsigned i = 0; i != NumVars; ++i)
2352 Exprs.push_back(Reader->Record.readSubExpr());
2353 C->setSourceExprs(Exprs);
2355 for (
unsigned i = 0; i != NumVars; ++i)
2356 Exprs.push_back(Reader->Record.readSubExpr());
2357 C->setDestinationExprs(Exprs);
2359 for (
unsigned i = 0; i != NumVars; ++i)
2360 Exprs.push_back(Reader->Record.readSubExpr());
2361 C->setAssignmentOps(Exprs);
2365 C->setLParenLoc(Reader->ReadSourceLocation());
2366 unsigned NumVars = C->varlist_size();
2368 Exprs.reserve(NumVars);
2369 for (
unsigned i = 0; i != NumVars; ++i)
2370 Exprs.push_back(Reader->Record.readSubExpr());
2371 C->setVarRefs(Exprs);
2373 for (
unsigned i = 0; i != NumVars; ++i)
2374 Exprs.push_back(Reader->Record.readSubExpr());
2375 C->setSourceExprs(Exprs);
2377 for (
unsigned i = 0; i != NumVars; ++i)
2378 Exprs.push_back(Reader->Record.readSubExpr());
2379 C->setDestinationExprs(Exprs);
2381 for (
unsigned i = 0; i != NumVars; ++i)
2382 Exprs.push_back(Reader->Record.readSubExpr());
2383 C->setAssignmentOps(Exprs);
2387 C->setLParenLoc(Reader->ReadSourceLocation());
2388 unsigned NumVars = C->varlist_size();
2390 Vars.reserve(NumVars);
2391 for (
unsigned i = 0; i != NumVars; ++i)
2392 Vars.push_back(Reader->Record.readSubExpr());
2393 C->setVarRefs(Vars);
2397 C->setLParenLoc(Reader->ReadSourceLocation());
2398 C->setDependencyKind(
2399 static_cast<OpenMPDependClauseKind>(Reader->Record.readInt()));
2400 C->setDependencyLoc(Reader->ReadSourceLocation());
2401 C->setColonLoc(Reader->ReadSourceLocation());
2402 unsigned NumVars = C->varlist_size();
2404 Vars.reserve(NumVars);
2405 for (
unsigned I = 0; I != NumVars; ++I)
2406 Vars.push_back(Reader->Record.readSubExpr());
2407 C->setVarRefs(Vars);
2408 for (
unsigned I = 0, E = C->
getNumLoops(); I < E; ++I)
2413 VisitOMPClauseWithPreInit(C);
2414 C->setDevice(Reader->Record.readSubExpr());
2418 void OMPClauseReader::VisitOMPMapClause(
OMPMapClause *C) {
2419 C->setLParenLoc(Reader->ReadSourceLocation());
2420 C->setMapTypeModifier(
2421 static_cast<OpenMPMapClauseKind>(Reader->Record.readInt()));
2423 static_cast<OpenMPMapClauseKind>(Reader->Record.readInt()));
2424 C->setMapLoc(Reader->ReadSourceLocation());
2425 C->setColonLoc(Reader->ReadSourceLocation());
2426 auto NumVars = C->varlist_size();
2432 Vars.reserve(NumVars);
2433 for (
unsigned i = 0; i != NumVars; ++i)
2434 Vars.push_back(Reader->Record.readSubExpr());
2435 C->setVarRefs(Vars);
2438 Decls.reserve(UniqueDecls);
2439 for (
unsigned i = 0; i < UniqueDecls; ++i)
2440 Decls.push_back(Reader->Record.readDeclAs<
ValueDecl>());
2444 ListsPerDecl.reserve(UniqueDecls);
2445 for (
unsigned i = 0; i < UniqueDecls; ++i)
2446 ListsPerDecl.push_back(Reader->Record.readInt());
2450 ListSizes.reserve(TotalLists);
2451 for (
unsigned i = 0; i < TotalLists; ++i)
2452 ListSizes.push_back(Reader->Record.readInt());
2456 Components.reserve(TotalComponents);
2457 for (
unsigned i = 0; i < TotalComponents; ++i) {
2458 Expr *AssociatedExpr = Reader->Record.readSubExpr();
2459 auto *AssociatedDecl = Reader->Record.readDeclAs<
ValueDecl>();
2461 AssociatedExpr, AssociatedDecl));
2467 VisitOMPClauseWithPreInit(C);
2468 C->setNumTeams(Reader->Record.readSubExpr());
2473 VisitOMPClauseWithPreInit(C);
2474 C->setThreadLimit(Reader->Record.readSubExpr());
2479 C->setPriority(Reader->Record.readSubExpr());
2484 C->setGrainsize(Reader->Record.readSubExpr());
2489 C->setNumTasks(Reader->Record.readSubExpr());
2493 void OMPClauseReader::VisitOMPHintClause(
OMPHintClause *C) {
2494 C->setHint(Reader->Record.readSubExpr());
2499 VisitOMPClauseWithPreInit(C);
2500 C->setDistScheduleKind(
2501 static_cast<OpenMPDistScheduleClauseKind>(Reader->Record.readInt()));
2502 C->setChunkSize(Reader->Record.readSubExpr());
2503 C->setLParenLoc(Reader->ReadSourceLocation());
2504 C->setDistScheduleKindLoc(Reader->ReadSourceLocation());
2505 C->setCommaLoc(Reader->ReadSourceLocation());
2509 C->setDefaultmapKind(
2510 static_cast<OpenMPDefaultmapClauseKind>(Reader->Record.readInt()));
2511 C->setDefaultmapModifier(
2512 static_cast<OpenMPDefaultmapClauseModifier>(Reader->Record.readInt()));
2513 C->setLParenLoc(Reader->ReadSourceLocation());
2514 C->setDefaultmapModifierLoc(Reader->ReadSourceLocation());
2515 C->setDefaultmapKindLoc(Reader->ReadSourceLocation());
2518 void OMPClauseReader::VisitOMPToClause(
OMPToClause *C) {
2519 C->setLParenLoc(Reader->ReadSourceLocation());
2520 auto NumVars = C->varlist_size();
2526 Vars.reserve(NumVars);
2527 for (
unsigned i = 0; i != NumVars; ++i)
2528 Vars.push_back(Reader->Record.readSubExpr());
2529 C->setVarRefs(Vars);
2532 Decls.reserve(UniqueDecls);
2533 for (
unsigned i = 0; i < UniqueDecls; ++i)
2534 Decls.push_back(Reader->Record.readDeclAs<
ValueDecl>());
2538 ListsPerDecl.reserve(UniqueDecls);
2539 for (
unsigned i = 0; i < UniqueDecls; ++i)
2540 ListsPerDecl.push_back(Reader->Record.readInt());
2544 ListSizes.reserve(TotalLists);
2545 for (
unsigned i = 0; i < TotalLists; ++i)
2546 ListSizes.push_back(Reader->Record.readInt());
2550 Components.reserve(TotalComponents);
2551 for (
unsigned i = 0; i < TotalComponents; ++i) {
2552 Expr *AssociatedExpr = Reader->Record.readSubExpr();
2553 auto *AssociatedDecl = Reader->Record.readDeclAs<
ValueDecl>();
2555 AssociatedExpr, AssociatedDecl));
2560 void OMPClauseReader::VisitOMPFromClause(
OMPFromClause *C) {
2561 C->setLParenLoc(Reader->ReadSourceLocation());
2562 auto NumVars = C->varlist_size();
2568 Vars.reserve(NumVars);
2569 for (
unsigned i = 0; i != NumVars; ++i)
2570 Vars.push_back(Reader->Record.readSubExpr());
2571 C->setVarRefs(Vars);
2574 Decls.reserve(UniqueDecls);
2575 for (
unsigned i = 0; i < UniqueDecls; ++i)
2576 Decls.push_back(Reader->Record.readDeclAs<
ValueDecl>());
2580 ListsPerDecl.reserve(UniqueDecls);
2581 for (
unsigned i = 0; i < UniqueDecls; ++i)
2582 ListsPerDecl.push_back(Reader->Record.readInt());
2586 ListSizes.reserve(TotalLists);
2587 for (
unsigned i = 0; i < TotalLists; ++i)
2588 ListSizes.push_back(Reader->Record.readInt());
2592 Components.reserve(TotalComponents);
2593 for (
unsigned i = 0; i < TotalComponents; ++i) {
2594 Expr *AssociatedExpr = Reader->Record.readSubExpr();
2595 auto *AssociatedDecl = Reader->Record.readDeclAs<
ValueDecl>();
2597 AssociatedExpr, AssociatedDecl));
2603 C->setLParenLoc(Reader->ReadSourceLocation());
2604 auto NumVars = C->varlist_size();
2610 Vars.reserve(NumVars);
2611 for (
unsigned i = 0; i != NumVars; ++i)
2612 Vars.push_back(Reader->Record.readSubExpr());
2613 C->setVarRefs(Vars);
2615 for (
unsigned i = 0; i != NumVars; ++i)
2616 Vars.push_back(Reader->Record.readSubExpr());
2617 C->setPrivateCopies(Vars);
2619 for (
unsigned i = 0; i != NumVars; ++i)
2620 Vars.push_back(Reader->Record.readSubExpr());
2624 Decls.reserve(UniqueDecls);
2625 for (
unsigned i = 0; i < UniqueDecls; ++i)
2626 Decls.push_back(Reader->Record.readDeclAs<
ValueDecl>());
2630 ListsPerDecl.reserve(UniqueDecls);
2631 for (
unsigned i = 0; i < UniqueDecls; ++i)
2632 ListsPerDecl.push_back(Reader->Record.readInt());
2636 ListSizes.reserve(TotalLists);
2637 for (
unsigned i = 0; i < TotalLists; ++i)
2638 ListSizes.push_back(Reader->Record.readInt());
2642 Components.reserve(TotalComponents);
2643 for (
unsigned i = 0; i < TotalComponents; ++i) {
2644 Expr *AssociatedExpr = Reader->Record.readSubExpr();
2645 auto *AssociatedDecl = Reader->Record.readDeclAs<
ValueDecl>();
2647 AssociatedExpr, AssociatedDecl));
2653 C->setLParenLoc(Reader->ReadSourceLocation());
2654 auto NumVars = C->varlist_size();
2660 Vars.reserve(NumVars);
2661 for (
unsigned i = 0; i != NumVars; ++i)
2662 Vars.push_back(Reader->Record.readSubExpr());
2663 C->setVarRefs(Vars);
2667 Decls.reserve(UniqueDecls);
2668 for (
unsigned i = 0; i < UniqueDecls; ++i)
2669 Decls.push_back(Reader->Record.readDeclAs<
ValueDecl>());
2673 ListsPerDecl.reserve(UniqueDecls);
2674 for (
unsigned i = 0; i < UniqueDecls; ++i)
2675 ListsPerDecl.push_back(Reader->Record.readInt());
2679 ListSizes.reserve(TotalLists);
2680 for (
unsigned i = 0; i < TotalLists; ++i)
2681 ListSizes.push_back(Reader->Record.readInt());
2685 Components.reserve(TotalComponents);
2686 for (
unsigned i = 0; i < TotalComponents; ++i) {
2687 Expr *AssociatedExpr = Reader->Record.readSubExpr();
2688 auto *AssociatedDecl = Reader->Record.readDeclAs<
ValueDecl>();
2690 AssociatedExpr, AssociatedDecl));
2705 Clauses.push_back(ClauseReader.
readClause());
2715 VisitOMPExecutableDirective(D);
2751 Sub.reserve(CollapsedNum);
2752 for (
unsigned i = 0; i < CollapsedNum; ++i)
2756 for (
unsigned i = 0; i < CollapsedNum; ++i)
2760 for (
unsigned i = 0; i < CollapsedNum; ++i)
2764 for (
unsigned i = 0; i < CollapsedNum; ++i)
2768 for (
unsigned i = 0; i < CollapsedNum; ++i)
2777 VisitOMPExecutableDirective(D);
2778 D->setHasCancel(Record.
readInt());
2782 VisitOMPLoopDirective(D);
2786 VisitOMPLoopDirective(D);
2787 D->setHasCancel(Record.
readInt());
2791 VisitOMPLoopDirective(D);
2798 VisitOMPExecutableDirective(D);
2799 D->setHasCancel(Record.
readInt());
2804 VisitOMPExecutableDirective(D);
2812 VisitOMPExecutableDirective(D);
2817 VisitOMPExecutableDirective(D);
2824 VisitOMPExecutableDirective(D);
2825 ReadDeclarationNameInfo(D->DirName);
2829 VisitOMPLoopDirective(D);
2830 D->setHasCancel(Record.
readInt());
2833 void ASTStmtReader::VisitOMPParallelForSimdDirective(
2835 VisitOMPLoopDirective(D);
2838 void ASTStmtReader::VisitOMPParallelSectionsDirective(
2843 VisitOMPExecutableDirective(D);
2844 D->setHasCancel(Record.
readInt());
2851 VisitOMPExecutableDirective(D);
2852 D->setHasCancel(Record.
readInt());
2857 VisitOMPExecutableDirective(D);
2862 VisitOMPExecutableDirective(D);
2867 VisitOMPExecutableDirective(D);
2874 VisitOMPExecutableDirective(D);
2882 VisitOMPExecutableDirective(D);
2889 VisitOMPExecutableDirective(D);
2896 VisitOMPExecutableDirective(D);
2901 D->IsXLHSInRHSPart = Record.
readInt() != 0;
2902 D->IsPostfixUpdate = Record.
readInt() != 0;
2909 VisitOMPExecutableDirective(D);
2915 VisitOMPExecutableDirective(D);
2918 void ASTStmtReader::VisitOMPTargetEnterDataDirective(
2922 VisitOMPExecutableDirective(D);
2925 void ASTStmtReader::VisitOMPTargetExitDataDirective(
2929 VisitOMPExecutableDirective(D);
2932 void ASTStmtReader::VisitOMPTargetParallelDirective(
2936 VisitOMPExecutableDirective(D);
2939 void ASTStmtReader::VisitOMPTargetParallelForDirective(
2941 VisitOMPLoopDirective(D);
2942 D->setHasCancel(Record.
readInt());
2949 VisitOMPExecutableDirective(D);
2952 void ASTStmtReader::VisitOMPCancellationPointDirective(
2955 VisitOMPExecutableDirective(D);
2956 D->setCancelRegion(static_cast<OpenMPDirectiveKind>(Record.
readInt()));
2963 VisitOMPExecutableDirective(D);
2964 D->setCancelRegion(static_cast<OpenMPDirectiveKind>(Record.
readInt()));
2968 VisitOMPLoopDirective(D);
2972 VisitOMPLoopDirective(D);
2976 VisitOMPLoopDirective(D);
2982 VisitOMPExecutableDirective(D);
2985 void ASTStmtReader::VisitOMPDistributeParallelForDirective(
2987 VisitOMPLoopDirective(D);
2988 D->setHasCancel(Record.
readInt());
2991 void ASTStmtReader::VisitOMPDistributeParallelForSimdDirective(
2993 VisitOMPLoopDirective(D);
2996 void ASTStmtReader::VisitOMPDistributeSimdDirective(
2998 VisitOMPLoopDirective(D);
3001 void ASTStmtReader::VisitOMPTargetParallelForSimdDirective(
3003 VisitOMPLoopDirective(D);
3007 VisitOMPLoopDirective(D);
3010 void ASTStmtReader::VisitOMPTeamsDistributeDirective(
3012 VisitOMPLoopDirective(D);
3015 void ASTStmtReader::VisitOMPTeamsDistributeSimdDirective(
3017 VisitOMPLoopDirective(D);
3020 void ASTStmtReader::VisitOMPTeamsDistributeParallelForSimdDirective(
3022 VisitOMPLoopDirective(D);
3025 void ASTStmtReader::VisitOMPTeamsDistributeParallelForDirective(
3027 VisitOMPLoopDirective(D);
3028 D->setHasCancel(Record.
readInt());
3035 VisitOMPExecutableDirective(D);
3038 void ASTStmtReader::VisitOMPTargetTeamsDistributeDirective(
3040 VisitOMPLoopDirective(D);
3043 void ASTStmtReader::VisitOMPTargetTeamsDistributeParallelForDirective(
3045 VisitOMPLoopDirective(D);
3046 D->setHasCancel(Record.
readInt());
3049 void ASTStmtReader::VisitOMPTargetTeamsDistributeParallelForSimdDirective(
3051 VisitOMPLoopDirective(D);
3054 void ASTStmtReader::VisitOMPTargetTeamsDistributeSimdDirective(
3056 VisitOMPLoopDirective(D);
3064 switch (ReadingKind) {
3066 llvm_unreachable(
"should not call this when not reading anything");
3069 return ReadStmtFromStream(F);
3071 return ReadSubStmt();
3074 llvm_unreachable(
"ReadingKind not set ?");
3078 return cast_or_null<Expr>(ReadStmt(F));
3082 return cast_or_null<Expr>(ReadSubStmt());
3093 ReadingKindTracker ReadingKind(Read_Stmt, *
this);
3098 llvm::DenseMap<uint64_t, Stmt *> StmtEntries;
3101 unsigned PrevNumStmts = StmtStack.size();
3109 llvm::BitstreamEntry Entry = Cursor.advanceSkippingSubblocks();
3111 switch (Entry.Kind) {
3112 case llvm::BitstreamEntry::SubBlock:
3114 Error(
"malformed block record in AST file");
3116 case llvm::BitstreamEntry::EndBlock:
3118 case llvm::BitstreamEntry::Record:
3125 bool Finished =
false;
3126 bool IsStmtReference =
false;
3133 IsStmtReference =
true;
3134 assert(StmtEntries.find(Record[0]) != StmtEntries.end() &&
3135 "No stmt was recorded for this offset reference!");
3136 S = StmtEntries[Record.
readInt()];
3167 Record[ASTStmtReader::NumStmtFields]);
3171 S =
new (Context)
IfStmt(Empty);
3183 S =
new (Context)
DoStmt(Empty);
3187 S =
new (Context)
ForStmt(Empty);
3224 Record[ASTStmtReader::NumStmtFields]);
3235 Record[ASTStmtReader::NumExprFields + 1],
3236 Record[ASTStmtReader::NumExprFields + 2],
3237 Record[ASTStmtReader::NumExprFields + 2] ?
3238 Record[ASTStmtReader::NumExprFields + 5] : 0);
3255 Record[ASTStmtReader::NumExprFields + 1]);
3276 Record[ASTStmtReader::NumExprFields],
3277 Record[ASTStmtReader::NumExprFields + 1]);
3293 S =
new (Context)
CallExpr(Context, Stmt::CallExprClass, Empty);
3301 assert(Record.
getIdx() == 0);
3309 bool HasTemplateKWAndArgsInfo = Record.
readInt();
3310 if (HasTemplateKWAndArgsInfo) {
3312 unsigned NumTemplateArgs = Record.
readInt();
3315 for (
unsigned i = 0; i != NumTemplateArgs; ++i)
3319 bool HadMultipleCandidates = Record.
readInt();
3332 bool IsArrow = Record.
readInt();
3336 TemplateKWLoc, MemberD, FoundDecl, MemberNameInfo,
3337 HasTemplateKWAndArgsInfo ? &ArgInfo :
nullptr, T,
3340 MemberD->getDeclName());
3341 if (HadMultipleCandidates)
3342 cast<MemberExpr>(S)->setHadMultipleCandidates(
true);
3364 Record[ASTStmtReader::NumExprFields]);
3369 Record[ASTStmtReader::NumExprFields]);
3386 Record[ASTStmtReader::NumExprFields] - 1);
3456 Record[ASTStmtReader::NumExprFields]);
3461 Record[ASTStmtReader::NumExprFields],
3462 Record[ASTStmtReader::NumExprFields + 1]);
3490 llvm_unreachable(
"mismatching AST file");
3494 Record[ASTStmtReader::NumExprFields],
3495 Record[ASTStmtReader::NumExprFields + 1]);
3524 Record[ASTStmtReader::NumStmtFields],
3525 Record[ASTStmtReader::NumStmtFields + 1]);
3570 Record[ASTStmtReader::NumStmtFields]);
3587 Record[ASTStmtReader::NumStmtFields],
3593 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3595 CollapsedNum, Empty);
3601 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3609 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3617 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3626 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3635 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3640 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3642 CollapsedNum, Empty);
3648 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3650 CollapsedNum, Empty);
3656 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3661 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3678 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3683 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3688 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3693 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3698 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3703 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3708 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3713 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3718 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3723 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3725 CollapsedNum, Empty);
3731 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3736 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3745 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3750 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3758 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3760 CollapsedNum, Empty);
3766 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3774 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3776 CollapsedNum, Empty);
3782 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3791 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3793 CollapsedNum, Empty);
3799 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3801 CollapsedNum, Empty);
3807 auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3815 auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3817 CollapsedNum, Empty);
3823 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3825 CollapsedNum, Empty);
3831 auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3833 Context, NumClauses, CollapsedNum, Empty);
3839 auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3841 Context, NumClauses, CollapsedNum, Empty);
3847 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3852 auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3854 CollapsedNum, Empty);
3860 auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3862 Context, NumClauses, CollapsedNum, Empty);
3868 auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3870 Context, NumClauses, CollapsedNum, Empty);
3876 auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3878 Context, NumClauses, CollapsedNum, Empty);
3904 Record[ASTStmtReader::NumExprFields]);
3909 Record[ASTStmtReader::NumExprFields]);
3914 Record[ASTStmtReader::NumExprFields]);
3923 Record[ASTStmtReader::NumExprFields]);
4004 Record[ASTStmtReader::NumExprFields]);
4009 Record[ASTStmtReader::NumExprFields],
4010 Record[ASTStmtReader::NumExprFields]
4011 ? Record[ASTStmtReader::NumExprFields + 1]
4017 Record[ASTStmtReader::NumExprFields],
4018 Record[ASTStmtReader::NumExprFields]
4019 ? Record[ASTStmtReader::NumExprFields + 1]
4025 Record[ASTStmtReader::NumExprFields]);
4030 Record[ASTStmtReader::NumExprFields],
4031 Record[ASTStmtReader::NumExprFields]
4032 ? Record[ASTStmtReader::NumExprFields + 1]
4038 Record[ASTStmtReader::NumExprFields],
4039 Record[ASTStmtReader::NumExprFields]
4040 ? Record[ASTStmtReader::NumExprFields + 1]
4046 Record[ASTStmtReader::NumExprFields]);
4068 Record[ASTStmtReader::NumExprFields]);
4081 Record[ASTStmtReader::NumExprFields]);
4147 ++NumStatementsRead;
4149 if (S && !IsStmtReference) {
4151 StmtEntries[Cursor.GetCurrentBitNo()] = S;
4155 "Invalid deserialization of statement");
4156 StmtStack.push_back(S);
4159 assert(StmtStack.size() > PrevNumStmts &&
"Read too many sub-stmts!");
4160 assert(StmtStack.size() == PrevNumStmts + 1 &&
"Extra expressions on stack!");
4161 return StmtStack.pop_back_val();
void setPreInits(Stmt *PreInits)
A CXXConstCastExpr record.
static AttributedStmt * CreateEmpty(const ASTContext &C, unsigned NumAttrs)
void setFPFeatures(FPOptions F)
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
const uint64_t & readInt()
Returns the current value in this record, and advances to the next value.
A call to an overloaded operator written using operator syntax.
ObjCIndirectCopyRestoreExpr - Represents the passing of a function argument by indirect copy-restore ...
The receiver is the instance of the superclass object.
Represents a single C99 designator.
void setConditionVariable(const ASTContext &C, VarDecl *V)
void setValueDependent(bool VD)
Set whether this expression is value-dependent or not.
Defines the clang::ASTContext interface.
void setRParenLoc(SourceLocation L)
A CompoundLiteralExpr record.
This represents '#pragma omp distribute simd' composite directive.
This represents '#pragma omp master' directive.
DesignatorTypes
The kinds of designators that can occur in a DesignatedInitExpr.
void setRangeStmt(Stmt *S)
SourceLocation readSourceLocation()
Read a source location, advancing Idx.
The null pointer literal (C++11 [lex.nullptr])
This represents '#pragma omp task' directive.
void setEnsureUpperBound(Expr *EUB)
This represents a GCC inline-assembly statement extension.
Represents a 'co_await' expression while the type of the promise is dependent.
void setSubStmt(CompoundStmt *S)
This represents 'thread_limit' clause in the '#pragma omp ...' directive.
A UserDefinedLiteral record.
The receiver is an object instance.
unsigned getNumInputs() const
static OMPMasterDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
static OMPCopyinClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with N variables.
An IndirectGotoStmt record.
This represents clause 'copyin' in the '#pragma omp ...' directives.
A (possibly-)qualified type.
static OMPUseDevicePtrClause * CreateEmpty(const ASTContext &C, unsigned NumVars, unsigned NumUniqueDeclarations, unsigned NumComponentLists, unsigned NumComponents)
Creates an empty clause with the place for NumVars variables.
capture_init_iterator capture_init_begin()
Retrieve the first initialization argument.
void setOperatorLoc(SourceLocation L)
static StringLiteral * CreateEmpty(const ASTContext &C, unsigned NumStrs)
Construct an empty string literal.
void setRawSemantics(APFloatSemantics Sem)
Set the raw enumeration value representing the floating-point semantics of this literal (32-bit IEEE...
void setNRVOCandidate(const VarDecl *Var)
Defines enumerations for the type traits support.
void setLocation(SourceLocation L)
A CXXStaticCastExpr record.
ASTStmtReader(ASTRecordReader &Record, llvm::BitstreamCursor &Cursor)
void setCombinedCond(Expr *CombCond)
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
An AttributedStmt record.
A CXXReinterpretCastExpr record.
An ObjCBoolLiteralExpr record.
void setCombinedLowerBoundVariable(Expr *CombLB)
static OMPTaskwaitDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
static OMPTargetParallelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setHasCancel(bool Has)
Set cancel state.
void setUniqueDecls(ArrayRef< ValueDecl *> UDs)
Set the unique declarations that are in the trailing objects of the class.
Represents a 'co_return' statement in the C++ Coroutines TS.
Stmt - This represents one statement.
static OMPTaskgroupDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
void setLastIteration(Expr *LI)
This represents clause 'in_reduction' in the '#pragma omp task' directives.
unsigned getNumArgs() const
getNumArgs - Return the number of actual arguments to this call.
IfStmt - This represents an if/then/else.
Class that handles pre-initialization statement for some clauses, like 'shedule', 'firstprivate' etc...
void setPrivateCounters(ArrayRef< Expr *> A)
C Language Family Type Representation.
unsigned getNumOutputs() const
This represents '#pragma omp for simd' directive.
void setRParenLoc(SourceLocation L)
void setContinueLoc(SourceLocation L)
void setThrowExpr(Stmt *S)
void setAtLoc(SourceLocation L)
An ImplicitValueInitExpr record.
static OMPFirstprivateClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
Decl - This represents one declaration (or definition), e.g.
void setDeclGroup(DeclGroupRef DGR)
This represents 'grainsize' clause in the '#pragma omp ...' directive.
An ImplicitCastExpr record.
This represents '#pragma omp teams distribute parallel for' composite directive.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
void setRBracket(SourceLocation RB)
Represents the index of the current element of an array being initialized by an ArrayInitLoopExpr.
LambdaCaptureDefault
The default, if any, capture method for a lambda expression.
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
This represents 'if' clause in the '#pragma omp ...' directive.
Defines the C++ template declaration subclasses.
void setPrevEnsureUpperBound(Expr *PrevEUB)
unsigned getNumSubExprs() const
Retrieve the total number of subexpressions in this designated initializer expression, including the actual initialized value and any expressions that occur within array and array-range designators.
Represents an attribute applied to a statement.
void setUpperBoundVariable(Expr *UB)
void setComputationResultType(QualType T)
llvm::APFloat readAPFloat(const llvm::fltSemantics &Sem)
Read a floating-point value, advancing Idx.
void setNumIterations(Expr *NI)
static OMPMapClause * CreateEmpty(const ASTContext &C, unsigned NumVars, unsigned NumUniqueDeclarations, unsigned NumComponentLists, unsigned NumComponents)
Creates an empty clause with the place for NumVars original expressions, NumUniqueDeclarations declar...
ParenExpr - This represents a parethesized expression, e.g.
A CXXOperatorCallExpr record.
void setSuper(SourceLocation Loc, QualType T, bool IsInstanceSuper)
This represents 'priority' clause in the '#pragma omp ...' directive.
This represents '#pragma omp target teams distribute' combined directive.
A CXXTemporaryObjectExpr record.
Represents Objective-C's @throw statement.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
void setNextLowerBound(Expr *NLB)
DeclRefExprBitfields DeclRefExprBits
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...
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
A container of type source information.
This represents 'update' clause in the '#pragma omp atomic' directive.
void setSwitchCaseList(SwitchCase *SC)
Set the case list for this switch statement.
void setComponents(ArrayRef< MappableComponent > Components, ArrayRef< unsigned > CLSs)
Set the components that are in the trailing objects of the class.
void setCanOverflow(bool C)
void setInstanceReceiver(Expr *rec)
Turn this message send into an instance message that computes the receiver object with the given expr...
Floating point control options.
This represents '#pragma omp parallel for' directive.
MS property subscript expression.
void setStartLoc(SourceLocation L)
void setForLoc(SourceLocation L)
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
This represents '#pragma omp target teams distribute parallel for' combined directive.
void setLocation(SourceLocation Loc)
static ObjCDictionaryLiteral * CreateEmpty(const ASTContext &C, unsigned NumElements, bool HasPackExpansions)
void setConditionVariable(const ASTContext &C, VarDecl *V)
Represents a prvalue temporary that is written into memory so that a reference can bind to it...
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
void setLocation(SourceLocation L)
void setDelegateInitCall(bool isDelegate)
void setProtocol(ObjCProtocolDecl *P)
void setRParenLoc(SourceLocation L)
static OMPReductionClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
void setIsLastIterVariable(Expr *IL)
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
This represents '#pragma omp target exit data' directive.
void setRAngleLoc(SourceLocation Loc)
static OffsetOfExpr * CreateEmpty(const ASTContext &C, unsigned NumComps, unsigned NumExprs)
This represents 'read' clause in the '#pragma omp atomic' directive.
static OMPTargetTeamsDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents clause 'private' in the '#pragma omp ...' directives.
static OMPParallelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for N clauses.
bool hasTemplateKWAndArgsInfo() const
ObjCIsaExpr - Represent X->isa and X.isa when X is an ObjC 'id' type.
void setIsPartOfExplicitCast(bool PartOfExplicitCast)
This represents 'num_threads' clause in the '#pragma omp ...' directive.
CompoundLiteralExpr - [C99 6.5.2.5].
void setSubExpr(unsigned Idx, Expr *E)
void setInitializer(Expr *E)
void setLength(Expr *E)
Set length of the array section.
void setOpLoc(SourceLocation L)
void recordSwitchCaseID(SwitchCase *SC, unsigned ID)
unsigned getNumArgs() const
Determine the number of arguments to this type trait.
This represents 'defaultmap' clause in the '#pragma omp ...' directive.
static FunctionParmPackExpr * CreateEmpty(const ASTContext &Context, unsigned NumParams)
void setAsmLoc(SourceLocation L)
static DependentScopeDeclRefExpr * CreateEmpty(const ASTContext &C, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
QualType readType()
Read a type from the current position in the record.
void setValue(unsigned Val)
A ConditionOperator record.
void setLocation(SourceLocation Location)
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>".
Implicit construction of a std::initializer_list<T> object from an array temporary within list-initia...
static DeclRefExpr * CreateEmpty(const ASTContext &Context, bool HasQualifier, bool HasFoundDecl, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
Construct an empty declaration reference expression.
void setGNUSyntax(bool GNU)
This represents implicit clause 'flush' for the '#pragma omp flush' directive.
Defines the Objective-C statement AST node classes.
A CXXConstructExpr record.
unsigned getNumExpressions() const
void setBeginStmt(Stmt *S)
void setBase(Expr *E)
Set base of the array section.
ReceiverKind
The kind of receiver this message is sending to.
raw_arg_iterator raw_arg_begin()
void initializeResults(const ASTContext &C, UnresolvedSetIterator Begin, UnresolvedSetIterator End)
A C++ throw-expression (C++ [except.throw]).
unsigned getTotalComponentsNum() const
Return the total number of components in all lists derived from the clause.
Represents an expression – generally a full-expression – that introduces cleanups to be run at the ...
Represents a parameter to a function.
Defines the clang::Expr interface and subclasses for C++ expressions.
static OMPTaskReductionClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
This represents 'nogroup' clause in the '#pragma omp ...' directive.
A ShuffleVectorExpr record.
This represents 'safelen' clause in the '#pragma omp ...' directive.
A C++ static_cast expression (C++ [expr.static.cast]).
static OMPOrderedClause * CreateEmpty(const ASTContext &C, unsigned NumLoops)
Build an empty clause.
LabelStmt - Represents a label, which has a substatement.
void AllocateArgsArray(const ASTContext &C, bool isArray, unsigned numPlaceArgs, bool hasInitializer)
static OMPTargetExitDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
void setStrTokenLoc(unsigned TokNum, SourceLocation L)
void setAtLoc(SourceLocation L)
Represents a C99 designated initializer expression.
unsigned varlist_size() const
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
NestedNameSpecifierLoc readNestedNameSpecifierLoc()
static OMPTargetTeamsDistributeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
One of these records is kept for each identifier that is lexed.
An ObjCAtThrowStmt record.
T * readDeclAs()
Reads a declaration from the given position in the record, advancing Idx.
static OMPTargetDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
A DesignatedInitExpr record.
This represents '#pragma omp parallel' directive.
ShuffleVectorExpr - clang-specific builtin-in function __builtin_shufflevector.
void setExprOperand(Expr *E)
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.
This represents 'simd' clause in the '#pragma omp ...' directive.
static OMPTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Internal struct for storing Key/value pair.
An ObjCProtocolExpr record.
An ObjCSelectorExpr record.
static OMPTargetParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static ObjCMessageExpr * CreateEmpty(const ASTContext &Context, unsigned NumArgs, unsigned NumStoredSelLocs)
Create an empty Objective-C message expression, to be filled in by subsequent calls.
This represents clause 'lastprivate' in the '#pragma omp ...' directives.
void setIsMicrosoftABI(bool IsMS)
Represents a place-holder for an object not to be initialized by anything.
void setNumArgs(const ASTContext &C, unsigned NumArgs)
setNumArgs - This changes the number of arguments present in this call.
void setLoopNumIterations(unsigned NumLoop, Expr *NumIterations)
Set number of iterations for the specified loop.
void setRequiresZeroInitialization(bool ZeroInit)
static OMPFlushDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
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.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
void setArg(unsigned I, Expr *E)
void setArg(unsigned Arg, Expr *ArgExpr)
setArg - Set the specified argument.
This represents clause 'to' in the '#pragma omp ...' directives.
void setColonLoc(SourceLocation Loc)
Sets the location of ':'.
void setRParen(SourceLocation Loc)
TemplateArgument readTemplateArgument(bool Canonicalize=false)
Read a template argument, advancing Idx.
This represents '#pragma omp target simd' directive.
void setCapturedDecl(CapturedDecl *D)
Set the outlined function declaration.
void setReturnLoc(SourceLocation L)
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 ...
OpenMPDirectiveKind getDirectiveKind() const
void VisitOMPClauseWithPostUpdate(OMPClauseWithPostUpdate *C)
This represents '#pragma omp barrier' directive.
void setComponent(unsigned Idx, OffsetOfNode ON)
ObjCArrayLiteral - used for objective-c array containers; as in: @["Hello", NSApp, [NSNumber numberWithInt:42]];.
TypeSourceInfo * getTypeSourceInfo()
Reads a declarator info from the given record, advancing Idx.
This is a common base class for loop directives ('omp simd', 'omp for', 'omp for simd' etc...
Represents a reference to a non-type template parameter pack that has been substituted with a non-tem...
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
This represents '#pragma omp critical' directive.
static OMPCriticalDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
void setRParenLoc(SourceLocation L)
size_t size() const
The length of this record.
Represents Objective-C's @catch statement.
void setLBraceLoc(SourceLocation Loc)
This represents clause 'copyprivate' in the '#pragma omp ...' directives.
static OMPTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
IndirectGotoStmt - This represents an indirect goto.
void setLoopCounter(unsigned NumLoop, Expr *Counter)
Set loop counter for the specified loop.
Describes an C or C++ initializer list.
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
This represents '#pragma omp distribute parallel for' composite directive.
void setValue(const ASTContext &C, const llvm::APInt &Val)
This represents '#pragma omp teams distribute parallel for simd' composite directive.
void setBuiltinLoc(SourceLocation L)
ForStmt - This represents a 'for (init;cond;inc)' stmt.
void setOperatorNew(FunctionDecl *D)
static DeclAccessPair make(NamedDecl *D, AccessSpecifier AS)
void setLocation(SourceLocation L)
static OMPDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setSynchBody(Stmt *S)
static OMPIsDevicePtrClause * CreateEmpty(const ASTContext &C, unsigned NumVars, unsigned NumUniqueDeclarations, unsigned NumComponentLists, unsigned NumComponents)
Creates an empty clause with the place for NumVars variables.
A convenient class for passing around template argument information.
static OMPInReductionClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
void setSelector(Selector S)
A reference to a previously [de]serialized Stmt record.
void setEndLoc(SourceLocation L)
capture_init_iterator capture_init_begin()
Retrieve the first initialization argument for this lambda expression (which initializes the first ca...
path_iterator path_begin()
void setLocation(SourceLocation L)
A builtin binary operation expression such as "x + y" or "x <= y".
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
static OMPTargetTeamsDistributeParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setAccessor(IdentifierInfo *II)
static OMPToClause * CreateEmpty(const ASTContext &C, unsigned NumVars, unsigned NumUniqueDeclarations, unsigned NumComponentLists, unsigned NumComponents)
Creates an empty clause with the place for NumVars variables.
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...
SourceRange readSourceRange()
Read a source range, advancing Idx.
static const unsigned NumStmtFields
The number of record fields required for the Stmt class itself.
This represents '#pragma omp cancellation point' directive.
void setString(StringLiteral *S)
void setAsmString(StringLiteral *E)
This represents 'default' clause in the '#pragma omp ...' directive.
ObjCStringLiteral, used for Objective-C string literals i.e.
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.
void setCombinedInit(Expr *CombInit)
void setListInitialization(bool V)
This represents '#pragma omp teams' directive.
void setOperatorLoc(SourceLocation L)
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
This represents clause 'reduction' in the '#pragma omp ...' directives.
Helper class for OffsetOfExpr.
A marker record that indicates that we are at the end of an expression.
This represents '#pragma omp teams distribute simd' combined directive.
static OMPTargetParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Represents binding an expression to a temporary.
void setDestroyedType(IdentifierInfo *II, SourceLocation Loc)
Set the name of destroyed type for a dependent pseudo-destructor expression.
ArrayTypeTrait
Names for the array type traits.
bool isOpenMPWorksharingDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a worksharing directive.
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
static OMPTaskyieldDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
static IntegerLiteral * Create(const ASTContext &C, const llvm::APInt &V, QualType type, SourceLocation l)
Returns a new integer literal with value 'V' and type 'type'.
void ReadTemplateKWAndArgsInfo(ASTTemplateKWAndArgsInfo &Args, TemplateArgumentLoc *ArgsLocArray, unsigned NumTemplateArgs)
Read and initialize a ExplicitTemplateArgumentList structure.
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.
void setRParenLoc(SourceLocation Loc)
CXXBaseSpecifier readCXXBaseSpecifier()
Read a C++ base specifier, advancing Idx.
unsigned getUniqueDeclarationsNum() const
Return the number of unique base declarations in this clause.
void setRParenLoc(SourceLocation R)
A default argument (C++ [dcl.fct.default]).
bool isTypeOperand() const
const uint64_t & peekInt()
Returns the current value in this record, without advancing.
void setSourceRange(SourceRange R)
void setRParenLoc(SourceLocation L)
This represents clause 'from' in the '#pragma omp ...' directives.
Represents the this expression in C++.
void setCastKind(CastKind K)
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>".
static OMPTargetDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
static OMPTeamsDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setEqualOrColonLoc(SourceLocation L)
This represents '#pragma omp target parallel for simd' directive.
void setArgument(Expr *E)
OpenMP 4.0 [2.4, Array Sections].
void setTypeSourceInfo(TypeSourceInfo *tsi)
ConditionalOperator - The ?: ternary operator.
static OMPTargetSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Represents a C++ pseudo-destructor (C++ [expr.pseudo]).
void setAmpAmpLoc(SourceLocation L)
void setBreakLoc(SourceLocation L)
ASTTemplateKWAndArgsInfo * getTrailingASTTemplateKWAndArgsInfo()
Return the optional template keyword and arguments info.
void setFPFeatures(FPOptions F)
CompoundStmt - This represents a group of statements like { stmt stmt }.
void setBlockDecl(BlockDecl *BD)
This represents 'threads' clause in the '#pragma omp ...' directive.
This represents '#pragma omp taskgroup' directive.
static OMPSingleDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
CastKind
CastKind - The kind of operation required for a conversion.
void setSemiLoc(SourceLocation L)
This represents clause 'aligned' in the '#pragma omp ...' directives.
static OMPAlignedClause * CreateEmpty(const ASTContext &C, unsigned NumVars)
Creates an empty clause with the place for NumVars variables.
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand...
void setLocEnd(SourceLocation Loc)
Sets the ending location of the clause.
void setLParen(SourceLocation Loc)
This represents clause 'task_reduction' in the '#pragma omp taskgroup' directives.
for(unsigned I=0, E=TL.getNumArgs();I !=E;++I)
Represents a call to the builtin function __builtin_va_arg.
static OMPTeamsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
unsigned getNumLoops() const
Get number of loops associated with the clause.
void setLeaveLoc(SourceLocation L)
This represents '#pragma omp distribute' directive.
This represents implicit clause 'depend' for the '#pragma omp task' directive.
void setString(const ASTContext &C, StringRef Str, StringKind Kind, bool IsPascal)
Sets the string data to the given string data.
void setInits(ArrayRef< Expr *> A)
void setOperatorDelete(FunctionDecl *D)
void setRParenLoc(SourceLocation L)
An expression "T()" which creates a value-initialized rvalue of type T, which is a non-class type...
void setLocation(SourceLocation Location)
void setRParenLoc(SourceLocation Loc)
Pepresents a block literal declaration, which is like an unnamed FunctionDecl.
This represents 'proc_bind' clause in the '#pragma omp ...' directive.
static OMPSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents 'capture' clause in the '#pragma omp atomic' directive.
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
Expr - This represents one expression.
Defines the clang::LangOptions interface.
void setDesignators(const ASTContext &C, const Designator *Desigs, unsigned NumDesigs)
void setRBraceLoc(SourceLocation Loc)
void setIsImplicit(bool value=true)
void setWhileLoc(SourceLocation L)
ExprValueKind
The categorization of expression values, currently following the C++11 scheme.
void setRParenLoc(SourceLocation L)
This represents 'simdlen' clause in the '#pragma omp ...' directive.
void setLParenLoc(SourceLocation L)
Stmt * ReadStmt(ModuleFile &F)
Reads a statement.
void setSyntacticForm(InitListExpr *Init)
Represents a C++ functional cast expression that builds a temporary object.
void setRBracketLoc(SourceLocation L)
A C++ const_cast expression (C++ [expr.const.cast]).
void setTypeDependent(bool TD)
Set whether this expression is type-dependent or not.
void setTypeOperandSourceInfo(TypeSourceInfo *TSI)
BlockExpr - Adaptor class for mixing a BlockDecl with expressions.
Field designator where only the field name is known.
static OMPDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
An ObjCSubscriptRefExpr record.
static OMPDependClause * CreateEmpty(const ASTContext &C, unsigned N, unsigned NumLoops)
Creates an empty clause with N variables.
Defines an enumeration for C++ overloaded operators.
This represents '#pragma omp target teams distribute parallel for simd' combined directive.
raw_arg_iterator raw_arg_end()
static CXXReinterpretCastExpr * CreateEmpty(const ASTContext &Context, unsigned pathSize)
void setUuidStr(StringRef US)
void setWrittenTypeInfo(TypeSourceInfo *TI)
void setRetValue(Expr *E)
ObjCDictionaryLiteral - AST node to represent objective-c dictionary literals; as in:"name" : NSUserN...
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
void setObjectKind(ExprObjectKind Cat)
setObjectKind - Set the object kind produced by this expression.
bool hasQualifier() const
Determine whether this declaration reference was preceded by a C++ nested-name-specifier, e.g., N::foo.
Represents Objective-C's @synchronized statement.
ObjCSelectorExpr used for @selector in Objective-C.
A CXXStdInitializerListExpr record.
void setFinallyBody(Stmt *S)
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 ...
An ArraySubscriptExpr record.
Decl * readDecl()
Reads a declaration from the given position in a record in the given module, advancing Idx...
static FloatingLiteral * Create(const ASTContext &C, const llvm::APFloat &V, bool isexact, QualType Type, SourceLocation L)
This represents '#pragma omp target teams distribute simd' combined directive.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
Information about a module that has been loaded by the ASTReader.
void setDeclNumLists(ArrayRef< unsigned > DNLs)
Set the number of lists per declaration that are in the trailing objects of the class.
This represents 'ordered' clause in the '#pragma omp ...' directive.
ExprWithCleanupsBitfields ExprWithCleanupsBits
static OMPFlushClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with N variables.
An ArrayInitLoopExpr record.
unsigned getNumClauses() const
Get number of clauses.
A PseudoObjectExpr record.
void setColonLoc(SourceLocation L)
void setFinallyStmt(Stmt *S)
An ObjCIndirectCopyRestoreExpr record.
This represents '#pragma omp for' directive.
IdentifierInfo * getIdentifierInfo()
static OMPTargetEnterDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
void setValueKind(ExprValueKind Cat)
setValueKind - Set the value kind produced by this expression.
static OMPLinearClause * CreateEmpty(const ASTContext &C, unsigned NumVars)
Creates an empty clause with the place for NumVars variables.
void setRParenLoc(SourceLocation L)
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.
void setAssociatedStmt(Stmt *S)
Set the associated statement for the directive.
static OMPDistributeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
An expression that sends a message to the given Objective-C object or class.
This represents a Microsoft inline-assembly statement extension.
void setColonLoc(SourceLocation L)
void setRParenLoc(SourceLocation L)
A DesignatedInitUpdateExpr record.
SourceLocation getEnd() const
void setAtLoc(SourceLocation L)
UnaryOperator - This represents the unary-expression's (except sizeof and alignof), the postinc/postdec operators from postfix-expression, and various extensions.
bool isOpenMPTaskLoopDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a taskloop directive.
ReceiverKind getReceiverKind() const
Determine the kind of receiver that this message is being sent to.
A member reference to an MSPropertyDecl.
static OMPParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Represents a reference to a non-type template parameter that has been substituted with a template arg...
static OMPPrivateClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
void setForLoc(SourceLocation Loc)
This represents '#pragma omp cancel' directive.
This represents 'collapse' clause in the '#pragma omp ...' directive.
This represents clause 'firstprivate' in the '#pragma omp ...' directives.
void setDistInc(Expr *DistInc)
An ObjCAvailabilityCheckExpr record.
void setRParenLoc(SourceLocation L)
std::string readString()
Read a string, advancing Idx.
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.
static OMPDistributeParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setClauses(ArrayRef< OMPClause *> Clauses)
Sets the list of variables for this clause.
An ObjCPropertyRefExpr record.
void skipInts(unsigned N)
Skips the specified number of values.
This file defines OpenMP AST classes for clauses.
ImaginaryLiteral - We support imaginary integer and floating point literals, like "1...
An ObjCForCollectionStmt record.
This represents '#pragma omp flush' directive.
This represents '#pragma omp parallel for simd' directive.
void setRParenLoc(SourceLocation L)
void setAtTryLoc(SourceLocation Loc)
DoStmt - This represents a 'do/while' stmt.
AsmStmt is the base class for GCCAsmStmt and MSAsmStmt.
This represents 'seq_cst' clause in the '#pragma omp atomic' directive.
This represents 'untied' clause in the '#pragma omp ...' directive.
void setTypeOperandSourceInfo(TypeSourceInfo *TSI)
A MS-style AsmStmt record.
unsigned readRecord(llvm::BitstreamCursor &Cursor, unsigned AbbrevID)
Reads a record with id AbbrevID from Cursor, resetting the internal state.
void setLocStart(SourceLocation Loc)
Set starting location of directive kind.
static OMPParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static CoroutineBodyStmt * Create(const ASTContext &C, CtorArgs const &Args)
void setSynchExpr(Stmt *S)
This represents '#pragma omp target enter data' directive.
void setPostUpdateExpr(Expr *S)
Set pre-initialization statement for the clause.
void setUpdates(ArrayRef< Expr *> A)
const llvm::fltSemantics & getSemantics() const
Return the APFloat semantics this literal uses.
void setLowerBoundVariable(Expr *LB)
void setLParenLoc(SourceLocation L)
This represents 'num_teams' clause in the '#pragma omp ...' directive.
void setTypeSourceInfo(TypeSourceInfo *tinfo)
A C++ dynamic_cast expression (C++ [expr.dynamic.cast]).
OpaqueValueExpr - An expression referring to an opaque object of a fixed type and value class...
void setComputationLHSType(QualType T)
ConvertVectorExpr - Clang builtin function __builtin_convertvector This AST node provides support for...
unsigned getNumArgs() const
Return the number of actual arguments in this message, not counting the receiver. ...
static OMPSectionDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
void setDecl(LabelDecl *D)
A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr...
A field in a dependent type, known only by its name.
This captures a statement into a function.
Represents a call to an inherited base class constructor from an inheriting constructor.
unsigned path_size() const
PseudoObjectExpr - An expression which accesses a pseudo-object l-value.
void setLParenLoc(SourceLocation L)
void setAccessorLoc(SourceLocation L)
void setGotoLoc(SourceLocation L)
static CXXDynamicCastExpr * CreateEmpty(const ASTContext &Context, unsigned pathSize)
unsigned getTotalComponentListNum() const
Return the number of lists derived from the clause expressions.
CXXTemporary * readCXXTemporary()
void setHadMultipleCandidates(bool V)
void setLocation(SourceLocation L)
This represents '#pragma omp single' directive.
Encodes a location in the source.
void setLocation(SourceLocation L)
void setPrevLowerBoundVariable(Expr *PrevLB)
void setIterationVariable(Expr *IV)
This represents 'hint' clause in the '#pragma omp ...' directive.
Defines enumerations for expression traits intrinsics.
PseudoObjectExprBitfields PseudoObjectExprBits
Stmt * readSubStmt()
Reads a sub-statement operand during statement reading.
unsigned getNumHandlers() const
void setUpdater(Expr *Updater)
static OMPTaskDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This is a basic class for representing single OpenMP executable directive.
static CXXDependentScopeMemberExpr * CreateEmpty(const ASTContext &C, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
static OMPTargetUpdateDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setDoLoc(SourceLocation L)
static CXXConstCastExpr * CreateEmpty(const ASTContext &Context)
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)"...
void setCombinedNextLowerBound(Expr *CombNLB)
void setAtCatchLoc(SourceLocation Loc)
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c dictionary literal.
A call to a literal operator (C++11 [over.literal]) written as a user-defined literal (C++11 [lit...
void setSourceRange(SourceRange R)
This represents 'schedule' clause in the '#pragma omp ...' directive.
static ObjCAtTryStmt * CreateEmpty(const ASTContext &Context, unsigned NumCatchStmts, bool HasFinally)
void setConstexpr(bool C)
Represents a call to a member function that may be written either with member call syntax (e...
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
void setIdentLoc(SourceLocation L)
Defines several types used to describe C++ lambda expressions that are shared between the parser and ...
DeclStmt - Adaptor class for mixing declarations with statements and expressions. ...
OpenMPDirectiveKind
OpenMP directives.
This represents clause 'shared' in the '#pragma omp ...' directives.
void setLabelLoc(SourceLocation L)
void readDeclarationNameInfo(DeclarationNameInfo &NameInfo)
ExprObjectKind
A further classification of the kind of object referenced by an l-value or x-value.
A CXXFunctionalCastExpr record.
void setTemporary(CXXTemporary *T)
A FloatingLiteral record.
static ExprWithCleanups * Create(const ASTContext &C, EmptyShell empty, unsigned numObjects)
void setAllEnumCasesCovered()
Set a flag in the SwitchStmt indicating that if the 'switch (X)' is a switch over an enum value then ...
Expr * readSubExpr()
Reads a sub-expression operand during statement reading.
StmtVisitor - This class implements a simple visitor for Stmt subclasses.
void setClassReceiver(TypeSourceInfo *TSInfo)
void setCatchParamDecl(VarDecl *D)
An ObjCEncodeExpr record.
static OMPAtomicDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp taskwait' directive.
An ImaginaryLiteral record.
void setPrivateCopies(ArrayRef< Expr *> PrivateCopies)
Set list of helper expressions, required for generation of private copies of original lastprivate var...
void setConfig(CallExpr *E)
Sets the kernel configuration expression.
void setConditionVariable(const ASTContext &C, VarDecl *V)
This is a basic class for representing single OpenMP clause.
void setIsFreeIvar(bool A)
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.
void readDeclarationNameLoc(DeclarationNameLoc &DNLoc, DeclarationName Name)
Expr * updateInit(const ASTContext &C, unsigned Init, Expr *expr)
Updates the initializer at index Init with the new expression expr, and returns the old expression at...
static OMPOrderedDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
bool isOpenMPLoopBoundSharingDirective(OpenMPDirectiveKind Kind)
Checks if the specified directive kind is one of the composite or combined directives that need loop ...
void addDecl(NamedDecl *D)
ObjCProtocolExpr used for protocol expression in Objective-C.
bool isValueDependent() const
isValueDependent - Determines whether this expression is value-dependent (C++ [temp.dep.constexpr]).
void setDecl(ValueDecl *NewD)
void setThrowLoc(SourceLocation Loc)
unsigned getIdx() const
The current position in this record.
void setVarRefs(ArrayRef< Expr *> VL)
Sets the list of variables for this clause.
ASTContext & getContext()
Retrieve the AST context that this AST reader supplements.
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
Stmt * getCapturedStmt()
Retrieve the statement being captured.
This represents '#pragma omp target' directive.
static OMPTeamsDistributeParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static DesignatedInitExpr * CreateEmpty(const ASTContext &C, unsigned NumIndexExprs)
static DeclGroup * Create(ASTContext &C, Decl **Decls, unsigned NumDecls)
static OMPTeamsDistributeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setBaseExpr(Stmt *S)
An expression trait intrinsic.
void setEncodedTypeSourceInfo(TypeSourceInfo *EncType)
This represents '#pragma omp ordered' directive.
StmtExpr - This is the GNU Statement Expression extension: ({int X=4; X;}).
static SizeOfPackExpr * CreateDeserialized(ASTContext &Context, unsigned NumPartialArgs)
This represents '#pragma omp target update' directive.
ObjCBoxedExpr - used for generalized expression boxing.
void VisitOMPClauseWithPreInit(OMPClauseWithPreInit *C)
void setLAngleLoc(SourceLocation Loc)
void sawArrayRangeDesignator(bool ARD=true)
void addArgument(const TemplateArgumentLoc &Loc)
void setCapturedRecordDecl(RecordDecl *D)
Set the record declaration for captured variables.
Representation of a Microsoft __if_exists or __if_not_exists statement with a dependent name...
static MemberExpr * Create(const ASTContext &C, Expr *base, bool isarrow, SourceLocation OperatorLoc, NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, ValueDecl *memberdecl, DeclAccessPair founddecl, DeclarationNameInfo MemberNameInfo, const TemplateArgumentListInfo *targs, QualType ty, ExprValueKind VK, ExprObjectKind OK)
A placeholder type used to construct an empty shell of a type, that will be filled in later (e...
A qualified reference to a name whose declaration cannot yet be resolved.
void setRBracketLoc(SourceLocation L)
void readAttributes(AttrVec &Attrs)
Reads attributes from the current stream position, advancing Idx.
CompoundAssignOperator - For compound assignments (e.g.
Expr ** getElements()
Retrieve elements of array of literals.
Defines various enumerations that describe declaration and type specifiers.
A POD class for pairing a NamedDecl* with an access specifier.
DeclarationNameLoc - Additional source/type location info for a declaration name. ...
Represents a C11 generic selection.
AddrLabelExpr - The GNU address of label extension, representing &&label.
An Objective-C "bridged" cast expression, which casts between Objective-C pointers and C pointers...
Represents a reference to a function parameter pack that has been substituted but not yet expanded...
Represents a template argument.
void setGotoLoc(SourceLocation L)
void setPrevUpperBoundVariable(Expr *PrevUB)
void setCombinedEnsureUpperBound(Expr *CombEUB)
static OMPForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setLocation(SourceLocation L)
NullStmt - This is the null statement ";": C99 6.8.3p3.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
void setCounters(ArrayRef< Expr *> A)
bool isTypeOperand() const
unsigned getNumAssocs() const
Dataflow Directional Tag Classes.
void setExtendingDecl(const ValueDecl *ExtendedBy, unsigned ManglingNumber)
This represents 'device' clause in the '#pragma omp ...' directive.
An IntegerLiteral record.
OMPClauseReader(ASTStmtReader *R, ASTRecordReader &Record)
llvm::BitstreamCursor DeclsCursor
DeclsCursor - This is a cursor to the start of the DECLS_BLOCK block.
void setBuiltinLoc(SourceLocation L)
[C99 6.4.2.2] - A predefined identifier such as func.
A CXXBoolLiteralExpr record.
Represents a delete expression for memory deallocation and destructor calls, e.g. ...
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
OverloadedOperatorKind
Enumeration specifying the different kinds of C++ overloaded operators.
void setCombinedUpperBoundVariable(Expr *CombUB)
void setRParenLoc(SourceLocation L)
static CapturedStmt * CreateDeserialized(const ASTContext &Context, unsigned NumCaptures)
An ExtVectorElementExpr record.
void setLabel(LabelDecl *L)
static OMPTargetTeamsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setTypeInfoAsWritten(TypeSourceInfo *writtenTy)
This represents '#pragma omp section' directive.
void setAtLoc(SourceLocation L)
This represents '#pragma omp teams distribute' directive.
Selector readSelector()
Read a selector from the Record, advancing Idx.
Expr * ReadExpr(ModuleFile &F)
Reads an expression.
void setExprs(const ASTContext &C, ArrayRef< Expr *> Exprs)
void setCollection(Expr *E)
An ObjCIvarRefExpr record.
void setDecl(ObjCIvarDecl *d)
void setFileScope(bool FS)
A runtime availability query.
A C++ reinterpret_cast expression (C++ [expr.reinterpret.cast]).
This represents '#pragma omp simd' directive.
void setConstructionKind(ConstructionKind CK)
Represents a 'co_yield' expression.
An ObjCAutoreleasePoolStmt record.
DeclarationName - The name of a declaration.
StmtClass getStmtClass() const
A CharacterLiteral record.
Represents a C++11 pack expansion that produces a sequence of expressions.
An ObjCStringLiteral record.
A CXXDynamicCastExpr record.
static LambdaExpr * CreateDeserialized(const ASTContext &C, unsigned NumCaptures)
Construct a new lambda expression that will be deserialized from an external source.
static PseudoObjectExpr * Create(const ASTContext &Context, Expr *syntactic, ArrayRef< Expr *> semantic, unsigned resultIndex)
This represents clause 'linear' in the '#pragma omp ...' directives.
void setInstantiationDependent(bool ID)
Set whether this expression is instantiation-dependent or not.
void setEllipsisLoc(SourceLocation L)
A CXXForRangeStmt record.
Kind
The kind of offsetof node we have.
TemplateArgumentLoc readTemplateArgumentLoc()
Reads a TemplateArgumentLoc, advancing Idx.
void setLParenLoc(SourceLocation L)
void setSelector(Selector S)
ExplicitCastExpr - An explicit cast written in the source code.
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnd...
void setMethodDecl(ObjCMethodDecl *MD)
This represents '#pragma omp atomic' directive.
void setLocStart(SourceLocation Loc)
Sets the starting location of the clause.
static CompoundStmt * CreateEmpty(const ASTContext &C, unsigned NumStmts)
pack_iterator pack_begin() const
Iterator referencing the first argument of a template argument pack.
static OMPSharedClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with N variables.
An ObjCAtFinallyStmt record.
VersionTuple readVersionTuple()
Read a version tuple, advancing Idx.
Represents a __leave statement.
unsigned getCollapsedNumber() const
Get number of collapsed loops.
unsigned getNumSubExprs() const
void setRBracketLoc(SourceLocation L)
void setComponentListSizes(ArrayRef< unsigned > CLSs)
Set the cumulative component lists sizes that are in the trailing objects of the class.
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
SwitchStmt - This represents a 'switch' stmt.
Class that represents a component of a mappable expression.
static OMPForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Represents the body of a coroutine.
TemplateArgumentLoc * getTrailingTemplateArgumentLoc()
Return the optional template arguments.
Location wrapper for a TemplateArgument.
void setConditionVariable(const ASTContext &C, VarDecl *V)
bool isOpenMPDistributeDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a distribute directive.
static const unsigned NumExprFields
The number of record fields required for the Expr class itself.
void setCatchStmt(unsigned I, ObjCAtCatchStmt *S)
Set a particular catch statement.
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c array literal.
static OMPBarrierDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
This file defines OpenMP AST classes for executable directives and clauses.
Represents Objective-C's collection statement.
An ObjCAtSynchronizedStmt record.
unsigned getNumObjects() const
void setIndexExpr(unsigned Idx, Expr *E)
ObjCEncodeExpr, used for @encode in Objective-C.
static OMPCopyprivateClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with N variables.
void setLowerBound(Expr *E)
Set lower bound of the array section.
An implicit indirection through a C++ base class, when the field found is in a base class...
static UnresolvedMemberExpr * CreateEmpty(const ASTContext &C, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
A SizefAlignOfExpr record.
Represents a call to a CUDA kernel function.
Represents a 'co_await' expression.
TypeTraitExprBitfields TypeTraitExprBits
static ImplicitCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize)
void setSwitchLoc(SourceLocation L)
A CXXMemberCallExpr record.
void setAtFinallyLoc(SourceLocation Loc)
void setArg(unsigned Arg, Expr *ArgExpr)
Set the specified argument.
void setKind(UnaryExprOrTypeTrait K)
void setRParenLoc(SourceLocation L)
void setOperatorLoc(SourceLocation L)
void setValue(const ASTContext &C, const llvm::APFloat &Val)
Represents Objective-C's @finally statement.
void setCatchBody(Stmt *S)
static CXXFunctionalCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize)
bool hasAssociatedStmt() const
Returns true if directive has associated statement.
void setLParenLoc(SourceLocation L)
The template argument is actually a parameter pack.
Represents a base class of a C++ class.
This represents 'write' clause in the '#pragma omp atomic' directive.
void setRParenLoc(SourceLocation L)
void setLoopData(unsigned NumLoop, Expr *Cnt)
Set the loop data for the depend clauses with 'sink|source' kind of dependency.
unsigned getNumClobbers() const
static OMPTargetTeamsDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
ObjCIvarRefExpr - A reference to an ObjC instance variable.
void setAtSynchronizedLoc(SourceLocation Loc)
bool isPartiallySubstituted() const
Determine whether this represents a partially-substituted sizeof...
void setOperatorLoc(SourceLocation L)
void setLocation(SourceLocation Location)
A ConvertVectorExpr record.
unsigned arg_size() const
Retrieve the number of arguments.
void setStarLoc(SourceLocation L)
void setLParenLoc(SourceLocation L)
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.
static CStyleCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize)
void setLocation(SourceLocation L)
static UnresolvedLookupExpr * CreateEmpty(const ASTContext &C, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
CapturedDecl * getCapturedDecl()
Retrieve the outlined function declaration.
void setBuiltinLoc(SourceLocation L)
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate.h) and friends (in DeclFriend.h).
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
GNU array range designator.
Defines the clang::SourceLocation class and associated facilities.
An ArrayInitIndexExpr record.
A GCC-style AsmStmt record.
This represents '#pragma omp target parallel' directive.
This represents 'nowait' clause in the '#pragma omp ...' directive.
void setStrideVariable(Expr *ST)
ContinueStmt - This represents a continue.
static CXXStaticCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize)
Represents a loop initializing the elements of an array.
This represents 'num_tasks' clause in the '#pragma omp ...' directive.
static CXXTryStmt * Create(const ASTContext &C, SourceLocation tryLoc, Stmt *tryBlock, ArrayRef< Stmt *> handlers)
ChooseExpr - GNU builtin-in function __builtin_choose_expr.
static OMPParallelSectionsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setElseLoc(SourceLocation L)
BinaryConditionalOperator - The GNU extension to the conditional operator which allows the middle ope...
CXXCatchStmt - This represents a C++ catch block.
static CXXUnresolvedConstructExpr * CreateEmpty(const ASTContext &C, unsigned NumArgs)
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr.type.conv]).
An ObjCAtCatchStmt record.
static TypeTraitExpr * CreateDeserialized(const ASTContext &C, unsigned NumArgs)
Expr * ReadSubExpr()
Reads a sub-expression operand during statement reading.
WhileStmt - This represents a 'while' stmt.
void initializeFrom(SourceLocation TemplateKWLoc, const TemplateArgumentListInfo &List, TemplateArgumentLoc *OutArgArray)
void setIfLoc(SourceLocation L)
Field designator where the field has been resolved to a declaration.
void setIsaMemberLoc(SourceLocation L)
unsigned getNumConcatenated() const
getNumConcatenated - Get the number of string literal tokens that were concatenated in translation ph...
A CXXInheritedCtorInitExpr record.
unsigned kind
All of the diagnostics that can be emitted by the frontend.
void setExprOperand(Expr *E)
Represents Objective-C's @try ... @catch ... @finally statement.
This represents '#pragma omp taskloop simd' directive.
void setTokenLocation(SourceLocation L)
static OMPSectionsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
unsigned getNumCatchStmts() const
Retrieve the number of @catch statements in this try-catch-finally block.
StringLiteral - This represents a string literal expression, e.g.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
void setPreInitStmt(Stmt *S, OpenMPDirectiveKind ThisRegion=OMPD_unknown)
Set pre-initialization statement for the clause.
llvm::APInt readAPInt()
Read an integral value, advancing Idx.
void setOpLoc(SourceLocation L)
void setLoopVarStmt(Stmt *S)
An object for streaming information from a record.
Internal struct to describes an element that is a pack expansion, used if any of the elements in the ...
void setPreCond(Expr *PC)
RetTy Visit(PTR(Stmt) S, ParamTys... P)
This represents 'dist_schedule' clause in the '#pragma omp ...' directive.
void setRParenLoc(SourceLocation L)
void reserveInits(const ASTContext &C, unsigned NumInits)
Reserve space for some number of initializers.
static OMPCancelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
An ObjCMessageExpr record.
static OMPFromClause * CreateEmpty(const ASTContext &C, unsigned NumVars, unsigned NumUniqueDeclarations, unsigned NumComponentLists, unsigned NumComponents)
Creates an empty clause with the place for NumVars variables.
Abstract class common to all of the C++ "named"/"keyword" casts.
This represents '#pragma omp sections' directive.
void setNextSwitchCase(SwitchCase *SC)
ObjCBoolLiteralExpr - Objective-C Boolean Literal.
A CompoundAssignOperator record.
unsigned getNumComponents() const
This represents '#pragma omp target data' directive.
void setNextUpperBound(Expr *NUB)
capture_init_iterator capture_init_end()
Retrieve the iterator pointing one past the last initialization argument for this lambda expression...
void setKind(CharacterKind kind)
A reference to a declared variable, function, enum, etc.
Designator - A designator in a C99 designated initializer.
void setLabel(LabelDecl *D)
Token readToken()
Reads a token out of a record, advancing Idx.
BreakStmt - This represents a break.
void setSubStmt(Stmt *SS)
static ObjCArrayLiteral * CreateEmpty(const ASTContext &C, unsigned NumElements)
unsigned getNumArgs() const
A trivial tuple used to represent a source range.
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).
This represents '#pragma omp parallel sections' directive.
A Microsoft C++ __uuidof expression, which gets the _GUID that corresponds to the supplied type or ex...
void setCalcLastIteration(Expr *CLI)
SwitchCase * getSwitchCaseWithID(unsigned ID)
Retrieve the switch-case statement with the given ID.
void setStdInitListInitialization(bool V)
The receiver is a superclass.
static OMPLastprivateClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
void setCombinedNextUpperBound(Expr *CombNUB)
SourceLocation getBegin() const
capture_init_iterator capture_init_end()
Retrieve the iterator pointing one past the last initialization argument.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
Represents Objective-C's @autoreleasepool Statement.
void setWhileLoc(SourceLocation L)
StmtCode
Record codes for each kind of statement or expression.
void setLocEnd(SourceLocation Loc)
Set ending location of directive.
void setArg(unsigned Arg, Expr *ArgExpr)
setArg - Set the specified argument.
void setFinals(ArrayRef< Expr *> A)
static OMPTeamsDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Represents an implicitly-generated value initialization of an object of a given type.
void setKeywordLoc(SourceLocation L)
void setCapturedRegionKind(CapturedRegionKind Kind)
Set the captured region kind.
A GenericSelectionExpr record.
This represents '#pragma omp target parallel for' directive.
This represents clause 'use_device_ptr' in the '#pragma omp ...' directives.
static OMPCancellationPointDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
void setLabelLoc(SourceLocation L)
#define BLOCK(DERIVED, BASE)
void setAtLoc(SourceLocation Loc)
void setIsConditionTrue(bool isTrue)
This represents '#pragma omp taskloop' directive.