21 #include "llvm/ADT/SmallString.h"
22 using namespace clang;
23 using namespace clang::serialization;
33 llvm::BitstreamCursor &DeclsCursor;
38 return Reader.ReadToken(F, R, I);
41 SourceLocation ReadSourceLocation(
const RecordData &R,
unsigned &I) {
42 return Reader.ReadSourceLocation(F, R, I);
45 SourceRange ReadSourceRange(
const RecordData &R,
unsigned &I) {
46 return Reader.ReadSourceRange(F, R, I);
49 std::string ReadString(
const RecordData &R,
unsigned &I) {
50 return Reader.ReadString(R, I);
53 TypeSourceInfo *GetTypeSourceInfo(
const RecordData &R,
unsigned &I) {
54 return Reader.GetTypeSourceInfo(F, R, I);
58 return Reader.ReadDeclID(F, R, I);
61 Decl *ReadDecl(
const RecordData &R,
unsigned &I) {
62 return Reader.ReadDecl(F, R, I);
66 T *ReadDeclAs(
const RecordData &R,
unsigned &I) {
67 return Reader.ReadDeclAs<T>(F, R,
I);
72 Reader.ReadDeclarationNameLoc(F, DNLoc, Name, R, I);
77 Reader.ReadDeclarationNameInfo(F, NameInfo, R, I);
82 llvm::BitstreamCursor &
Cursor,
84 : Reader(Reader), F(F), DeclsCursor(Cursor), Record(Record), Idx(Idx) { }
88 static const unsigned NumStmtFields = 0;
92 static const unsigned NumExprFields = NumStmtFields + 7;
95 void ReadTemplateKWAndArgsInfo(ASTTemplateKWAndArgsInfo &Args,
97 unsigned NumTemplateArgs);
100 unsigned NumTemplateArgs);
102 void VisitStmt(
Stmt *
S);
103 #define STMT(Type, Base) \
104 void Visit##Type(Type *);
105 #include "clang/AST/StmtNodes.inc"
111 unsigned NumTemplateArgs) {
116 for (
unsigned i = 0; i != NumTemplateArgs; ++i)
118 Reader.ReadTemplateArgumentLoc(F, Record, Idx));
119 Args.initializeFrom(TemplateKWLoc, ArgInfo, ArgsLocArray);
123 assert(Idx == NumStmtFields &&
"Incorrect statement field count");
126 void ASTStmtReader::VisitNullStmt(
NullStmt *
S) {
128 S->
setSemiLoc(ReadSourceLocation(Record, Idx));
129 S->HasLeadingEmptyMacro = Record[Idx++];
132 void ASTStmtReader::VisitCompoundStmt(
CompoundStmt *S) {
135 unsigned NumStmts = Record[Idx++];
137 Stmts.push_back(Reader.ReadSubStmt());
138 S->
setStmts(Reader.getContext(), Stmts);
139 S->LBraceLoc = ReadSourceLocation(Record, Idx);
140 S->RBraceLoc = ReadSourceLocation(Record, Idx);
143 void ASTStmtReader::VisitSwitchCase(
SwitchCase *S) {
145 Reader.RecordSwitchCaseID(S, Record[Idx++]);
150 void ASTStmtReader::VisitCaseStmt(
CaseStmt *S) {
152 S->
setLHS(Reader.ReadSubExpr());
153 S->
setRHS(Reader.ReadSubExpr());
158 void ASTStmtReader::VisitDefaultStmt(
DefaultStmt *S) {
163 void ASTStmtReader::VisitLabelStmt(
LabelStmt *S) {
165 LabelDecl *LD = ReadDeclAs<LabelDecl>(Record, Idx);
174 uint64_t NumAttrs = Record[Idx++];
176 Reader.ReadAttributes(F, Attrs, Record, Idx);
178 assert(NumAttrs == S->NumAttrs);
179 assert(NumAttrs == Attrs.size());
180 std::copy(Attrs.begin(), Attrs.end(), S->getAttrArrayPtr());
181 S->SubStmt = Reader.ReadSubStmt();
182 S->AttrLoc = ReadSourceLocation(Record, Idx);
185 void ASTStmtReader::VisitIfStmt(
IfStmt *S) {
188 ReadDeclAs<VarDecl>(Record, Idx));
189 S->
setCond(Reader.ReadSubExpr());
190 S->
setThen(Reader.ReadSubStmt());
191 S->
setElse(Reader.ReadSubStmt());
192 S->
setIfLoc(ReadSourceLocation(Record, Idx));
193 S->
setElseLoc(ReadSourceLocation(Record, Idx));
196 void ASTStmtReader::VisitSwitchStmt(
SwitchStmt *S) {
199 ReadDeclAs<VarDecl>(Record, Idx));
200 S->
setCond(Reader.ReadSubExpr());
201 S->
setBody(Reader.ReadSubStmt());
207 for (
unsigned N = Record.size(); Idx != N; ++Idx) {
208 SwitchCase *SC = Reader.getSwitchCaseWithID(Record[Idx]);
218 void ASTStmtReader::VisitWhileStmt(
WhileStmt *S) {
221 ReadDeclAs<VarDecl>(Record, Idx));
223 S->
setCond(Reader.ReadSubExpr());
224 S->
setBody(Reader.ReadSubStmt());
228 void ASTStmtReader::VisitDoStmt(
DoStmt *S) {
230 S->
setCond(Reader.ReadSubExpr());
231 S->
setBody(Reader.ReadSubStmt());
232 S->
setDoLoc(ReadSourceLocation(Record, Idx));
237 void ASTStmtReader::VisitForStmt(
ForStmt *S) {
239 S->
setInit(Reader.ReadSubStmt());
240 S->
setCond(Reader.ReadSubExpr());
242 ReadDeclAs<VarDecl>(Record, Idx));
243 S->
setInc(Reader.ReadSubExpr());
244 S->
setBody(Reader.ReadSubStmt());
245 S->
setForLoc(ReadSourceLocation(Record, Idx));
250 void ASTStmtReader::VisitGotoStmt(
GotoStmt *S) {
252 S->
setLabel(ReadDeclAs<LabelDecl>(Record, Idx));
253 S->
setGotoLoc(ReadSourceLocation(Record, Idx));
259 S->
setGotoLoc(ReadSourceLocation(Record, Idx));
260 S->
setStarLoc(ReadSourceLocation(Record, Idx));
264 void ASTStmtReader::VisitContinueStmt(
ContinueStmt *S) {
269 void ASTStmtReader::VisitBreakStmt(
BreakStmt *S) {
274 void ASTStmtReader::VisitReturnStmt(
ReturnStmt *S) {
281 void ASTStmtReader::VisitDeclStmt(
DeclStmt *S) {
284 S->
setEndLoc(ReadSourceLocation(Record, Idx));
286 if (Idx + 1 == Record.size()) {
291 Decls.reserve(Record.size() - Idx);
292 for (
unsigned N = Record.size(); Idx != N; )
293 Decls.push_back(ReadDecl(Record, Idx));
300 void ASTStmtReader::VisitAsmStmt(
AsmStmt *S) {
305 S->
setAsmLoc(ReadSourceLocation(Record, Idx));
310 void ASTStmtReader::VisitGCCAsmStmt(
GCCAsmStmt *S) {
313 S->
setAsmString(cast_or_null<StringLiteral>(Reader.ReadSubStmt()));
323 for (
unsigned I = 0, N = NumOutputs + NumInputs; I != N; ++
I) {
324 Names.push_back(Reader.GetIdentifierInfo(F, Record, Idx));
325 Constraints.push_back(cast_or_null<StringLiteral>(Reader.ReadSubStmt()));
326 Exprs.push_back(Reader.ReadSubStmt());
331 for (
unsigned I = 0; I != NumClobbers; ++
I)
332 Clobbers.push_back(cast_or_null<StringLiteral>(Reader.ReadSubStmt()));
334 S->setOutputsAndInputsAndClobbers(Reader.getContext(),
335 Names.data(), Constraints.data(),
336 Exprs.data(), NumOutputs, NumInputs,
337 Clobbers.data(), NumClobbers);
340 void ASTStmtReader::VisitMSAsmStmt(
MSAsmStmt *S) {
342 S->LBraceLoc = ReadSourceLocation(Record, Idx);
343 S->EndLoc = ReadSourceLocation(Record, Idx);
344 S->NumAsmToks = Record[Idx++];
345 std::string AsmStr = ReadString(Record, Idx);
349 AsmToks.reserve(S->NumAsmToks);
350 for (
unsigned i = 0, e = S->NumAsmToks; i != e; ++i) {
351 AsmToks.push_back(ReadToken(Record, Idx));
362 for (
unsigned i = 0, e = S->
NumClobbers; i != e; ++i) {
363 ClobbersData.push_back(ReadString(Record, Idx));
364 Clobbers.push_back(ClobbersData.back());
372 Exprs.reserve(NumOperands);
373 ConstraintsData.reserve(NumOperands);
374 Constraints.reserve(NumOperands);
375 for (
unsigned i = 0; i != NumOperands; ++i) {
376 Exprs.push_back(cast<Expr>(Reader.ReadSubStmt()));
377 ConstraintsData.push_back(ReadString(Record, Idx));
378 Constraints.push_back(ConstraintsData.back());
381 S->initialize(Reader.getContext(), AsmStr, AsmToks,
382 Constraints, Exprs, Clobbers);
387 llvm_unreachable(
"unimplemented");
390 void ASTStmtReader::VisitCoreturnStmt(
CoreturnStmt *S) {
392 llvm_unreachable(
"unimplemented");
395 void ASTStmtReader::VisitCoawaitExpr(
CoawaitExpr *S) {
397 llvm_unreachable(
"unimplemented");
400 void ASTStmtReader::VisitCoyieldExpr(
CoyieldExpr *S) {
402 llvm_unreachable(
"unimplemented");
405 void ASTStmtReader::VisitCapturedStmt(
CapturedStmt *S) {
416 *I = Reader.ReadSubExpr();
419 S->setCapturedStmt(Reader.ReadSubStmt());
424 I.VarAndKind.setPointer(ReadDeclAs<VarDecl>(Record, Idx));
426 .setInt(static_cast<CapturedStmt::VariableCaptureKind>(Record[Idx++]));
427 I.Loc = ReadSourceLocation(Record, Idx);
431 void ASTStmtReader::VisitExpr(
Expr *
E) {
433 E->
setType(Reader.readType(F, Record, Idx));
437 E->ExprBits.ContainsUnexpandedParameterPack = Record[Idx++];
438 E->
setValueKind(static_cast<ExprValueKind>(Record[Idx++]));
439 E->
setObjectKind(static_cast<ExprObjectKind>(Record[Idx++]));
440 assert(Idx == NumExprFields &&
"Incorrect expression field count");
447 E->FnName = cast_or_null<StringLiteral>(Reader.ReadSubExpr());
450 void ASTStmtReader::VisitDeclRefExpr(
DeclRefExpr *E) {
453 E->DeclRefExprBits.HasQualifier = Record[Idx++];
454 E->DeclRefExprBits.HasFoundDecl = Record[Idx++];
455 E->DeclRefExprBits.HasTemplateKWAndArgsInfo = Record[Idx++];
456 E->DeclRefExprBits.HadMultipleCandidates = Record[Idx++];
457 E->DeclRefExprBits.RefersToEnclosingVariableOrCapture = Record[Idx++];
458 unsigned NumTemplateArgs = 0;
460 NumTemplateArgs = Record[Idx++];
465 Reader.ReadNestedNameSpecifierLoc(F, Record, Idx));
467 if (E->hasFoundDecl())
468 *E->getTrailingObjects<
NamedDecl *>() = ReadDeclAs<NamedDecl>(Record, Idx);
471 ReadTemplateKWAndArgsInfo(
472 *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>(),
475 E->
setDecl(ReadDeclAs<ValueDecl>(Record, Idx));
483 E->
setValue(Reader.getContext(), Reader.ReadAPInt(Record, Idx));
488 E->
setRawSemantics(static_cast<Stmt::APFloatSemantics>(Record[Idx++]));
502 unsigned Len = Record[Idx++];
504 "Wrong number of concatenated tokens!");
508 bool isPascal = Record[Idx++];
524 E->
setKind(static_cast<CharacterLiteral::CharacterKind>(Record[Idx++]));
527 void ASTStmtReader::VisitParenExpr(
ParenExpr *E) {
529 E->
setLParen(ReadSourceLocation(Record, Idx));
530 E->
setRParen(ReadSourceLocation(Record, Idx));
536 unsigned NumExprs = Record[Idx++];
537 E->Exprs =
new (Reader.getContext())
Stmt*[NumExprs];
538 for (
unsigned i = 0; i != NumExprs; ++i)
539 E->Exprs[i] = Reader.ReadSubStmt();
540 E->NumExprs = NumExprs;
541 E->LParenLoc = ReadSourceLocation(Record, Idx);
542 E->RParenLoc = ReadSourceLocation(Record, Idx);
552 void ASTStmtReader::VisitOffsetOfExpr(
OffsetOfExpr *E) {
572 I,
OffsetOfNode(Start, ReadDeclAs<FieldDecl>(Record, Idx), End));
583 *Base = Reader.ReadCXXBaseSpecifier(F, Record, Idx);
596 E->
setKind(static_cast<UnaryExprOrTypeTrait>(Record[Idx++]));
597 if (Record[Idx] == 0) {
609 E->
setLHS(Reader.ReadSubExpr());
610 E->
setRHS(Reader.ReadSubExpr());
616 E->
setBase(Reader.ReadSubExpr());
623 void ASTStmtReader::VisitCallExpr(
CallExpr *E) {
625 E->
setNumArgs(Reader.getContext(), Record[Idx++]);
628 for (
unsigned I = 0, N = E->
getNumArgs(); I != N; ++
I)
629 E->
setArg(I, Reader.ReadSubExpr());
636 void ASTStmtReader::VisitMemberExpr(
MemberExpr *E) {
638 assert(E->getStmtClass() == Stmt::MemberExprClass &&
639 "It's a subclass, we must advance Idx!");
642 void ASTStmtReader::VisitObjCIsaExpr(
ObjCIsaExpr *E) {
644 E->
setBase(Reader.ReadSubExpr());
646 E->
setOpLoc(ReadSourceLocation(Record, Idx));
653 E->Operand = Reader.ReadSubExpr();
654 E->setShouldCopy(Record[Idx++]);
658 VisitExplicitCastExpr(E);
659 E->LParenLoc = ReadSourceLocation(Record, Idx);
660 E->BridgeKeywordLoc = ReadSourceLocation(Record, Idx);
661 E->Kind = Record[Idx++];
664 void ASTStmtReader::VisitCastExpr(
CastExpr *E) {
666 unsigned NumBaseSpecs = Record[Idx++];
671 while (NumBaseSpecs--) {
673 *BaseSpec = Reader.ReadCXXBaseSpecifier(F, Record, Idx);
680 E->
setLHS(Reader.ReadSubExpr());
681 E->
setRHS(Reader.ReadSubExpr());
688 VisitBinaryOperator(E);
695 E->SubExprs[ConditionalOperator::COND] = Reader.ReadSubExpr();
696 E->SubExprs[ConditionalOperator::LHS] = Reader.ReadSubExpr();
697 E->SubExprs[ConditionalOperator::RHS] = Reader.ReadSubExpr();
698 E->QuestionLoc = ReadSourceLocation(Record, Idx);
699 E->ColonLoc = ReadSourceLocation(Record, Idx);
705 E->OpaqueValue = cast<OpaqueValueExpr>(Reader.ReadSubExpr());
706 E->SubExprs[BinaryConditionalOperator::COMMON] = Reader.ReadSubExpr();
707 E->SubExprs[BinaryConditionalOperator::COND] = Reader.ReadSubExpr();
708 E->SubExprs[BinaryConditionalOperator::LHS] = Reader.ReadSubExpr();
709 E->SubExprs[BinaryConditionalOperator::RHS] = Reader.ReadSubExpr();
710 E->QuestionLoc = ReadSourceLocation(Record, Idx);
711 E->ColonLoc = ReadSourceLocation(Record, Idx);
724 VisitExplicitCastExpr(E);
739 E->
setBase(Reader.ReadSubExpr());
740 E->
setAccessor(Reader.GetIdentifierInfo(F, Record, Idx));
744 void ASTStmtReader::VisitInitListExpr(
InitListExpr *E) {
746 if (
InitListExpr *SyntForm = cast_or_null<InitListExpr>(Reader.ReadSubStmt()))
750 bool isArrayFiller = Record[Idx++];
751 Expr *filler =
nullptr;
753 filler = Reader.ReadSubExpr();
754 E->ArrayFillerOrUnionFieldInit = filler;
756 E->ArrayFillerOrUnionFieldInit = ReadDeclAs<FieldDecl>(Record, Idx);
758 unsigned NumInits = Record[Idx++];
761 for (
unsigned I = 0; I != NumInits; ++
I) {
762 Expr *init = Reader.ReadSubExpr();
763 E->
updateInit(Reader.getContext(),
I, init ? init : filler);
766 for (
unsigned I = 0; I != NumInits; ++
I)
767 E->
updateInit(Reader.getContext(),
I, Reader.ReadSubExpr());
775 unsigned NumSubExprs = Record[Idx++];
776 assert(NumSubExprs == E->
getNumSubExprs() &&
"Wrong number of subexprs");
777 for (
unsigned I = 0; I != NumSubExprs; ++
I)
783 while (Idx < Record.size()) {
786 FieldDecl *Field = ReadDeclAs<FieldDecl>(Record, Idx);
788 = ReadSourceLocation(Record, Idx);
790 = ReadSourceLocation(Record, Idx);
791 Designators.push_back(Designator(Field->
getIdentifier(), DotLoc,
793 Designators.back().setField(Field);
800 = ReadSourceLocation(Record, Idx);
802 = ReadSourceLocation(Record, Idx);
803 Designators.push_back(Designator(Name, DotLoc, FieldLoc));
808 unsigned Index = Record[Idx++];
810 = ReadSourceLocation(Record, Idx);
812 = ReadSourceLocation(Record, Idx);
813 Designators.push_back(Designator(Index, LBracketLoc, RBracketLoc));
818 unsigned Index = Record[Idx++];
820 = ReadSourceLocation(Record, Idx);
822 = ReadSourceLocation(Record, Idx);
824 = ReadSourceLocation(Record, Idx);
825 Designators.push_back(Designator(Index, LBracketLoc, EllipsisLoc,
832 Designators.data(), Designators.size());
837 E->
setBase(Reader.ReadSubExpr());
841 void ASTStmtReader::VisitNoInitExpr(
NoInitExpr *E) {
849 void ASTStmtReader::VisitVAArgExpr(
VAArgExpr *E) {
862 E->
setLabel(ReadDeclAs<LabelDecl>(Record, Idx));
865 void ASTStmtReader::VisitStmtExpr(
StmtExpr *E) {
869 E->
setSubStmt(cast_or_null<CompoundStmt>(Reader.ReadSubStmt()));
872 void ASTStmtReader::VisitChooseExpr(
ChooseExpr *E) {
874 E->
setCond(Reader.ReadSubExpr());
875 E->
setLHS(Reader.ReadSubExpr());
876 E->
setRHS(Reader.ReadSubExpr());
882 void ASTStmtReader::VisitGNUNullExpr(
GNUNullExpr *E) {
890 unsigned NumExprs = Record[Idx++];
892 Exprs.push_back(Reader.ReadSubExpr());
893 E->
setExprs(Reader.getContext(), Exprs);
900 E->BuiltinLoc = ReadSourceLocation(Record, Idx);
901 E->RParenLoc = ReadSourceLocation(Record, Idx);
902 E->TInfo = GetTypeSourceInfo(Record, Idx);
903 E->SrcExpr = Reader.ReadSubExpr();
906 void ASTStmtReader::VisitBlockExpr(
BlockExpr *E) {
913 E->NumAssocs = Record[Idx++];
914 E->AssocTypes =
new (Reader.getContext())
TypeSourceInfo*[E->NumAssocs];
916 new(Reader.getContext())
Stmt*[GenericSelectionExpr::END_EXPR+E->NumAssocs];
918 E->SubExprs[GenericSelectionExpr::CONTROLLING] = Reader.ReadSubExpr();
920 E->AssocTypes[
I] = GetTypeSourceInfo(Record, Idx);
921 E->SubExprs[GenericSelectionExpr::END_EXPR+
I] = Reader.ReadSubExpr();
923 E->ResultIndex = Record[Idx++];
925 E->GenericLoc = ReadSourceLocation(Record, Idx);
926 E->DefaultLoc = ReadSourceLocation(Record, Idx);
927 E->RParenLoc = ReadSourceLocation(Record, Idx);
932 unsigned numSemanticExprs = Record[Idx++];
933 assert(numSemanticExprs + 1 == E->PseudoObjectExprBits.NumSubExprs);
934 E->PseudoObjectExprBits.ResultIndex = Record[Idx++];
937 E->getSubExprsBuffer()[0] = Reader.ReadSubExpr();
940 for (
unsigned i = 0; i != numSemanticExprs; ++i) {
941 Expr *subExpr = Reader.ReadSubExpr();
942 E->getSubExprsBuffer()[i+1] = subExpr;
946 void ASTStmtReader::VisitAtomicExpr(
AtomicExpr *E) {
950 for (
unsigned I = 0; I != E->NumSubExprs; ++
I)
951 E->SubExprs[I] = Reader.ReadSubExpr();
952 E->BuiltinLoc = ReadSourceLocation(Record, Idx);
953 E->RParenLoc = ReadSourceLocation(Record, Idx);
961 E->
setString(cast<StringLiteral>(Reader.ReadSubStmt()));
962 E->
setAtLoc(ReadSourceLocation(Record, Idx));
968 E->SubExpr = Reader.ReadSubStmt();
969 E->BoxingMethod = ReadDeclAs<ObjCMethodDecl>(Record, Idx);
970 E->Range = ReadSourceRange(Record, Idx);
975 unsigned NumElements = Record[Idx++];
976 assert(NumElements == E->
getNumElements() &&
"Wrong number of elements");
978 for (
unsigned I = 0, N = NumElements; I != N; ++
I)
979 Elements[I] = Reader.ReadSubExpr();
980 E->ArrayWithObjectsMethod = ReadDeclAs<ObjCMethodDecl>(Record, Idx);
981 E->Range = ReadSourceRange(Record, Idx);
986 unsigned NumElements = Record[Idx++];
987 assert(NumElements == E->
getNumElements() &&
"Wrong number of elements");
988 bool HasPackExpansions = Record[Idx++];
989 assert(HasPackExpansions == E->HasPackExpansions &&
"Pack expansion mismatch");
994 for (
unsigned I = 0; I != NumElements; ++
I) {
995 KeyValues[
I].
Key = Reader.ReadSubExpr();
996 KeyValues[
I].
Value = Reader.ReadSubExpr();
997 if (HasPackExpansions) {
998 Expansions[
I].EllipsisLoc = ReadSourceLocation(Record, Idx);
999 Expansions[
I].NumExpansionsPlusOne = Record[Idx++];
1002 E->DictWithObjectsMethod = ReadDeclAs<ObjCMethodDecl>(Record, Idx);
1003 E->Range = ReadSourceRange(Record, Idx);
1009 E->
setAtLoc(ReadSourceLocation(Record, Idx));
1015 E->
setSelector(Reader.ReadSelector(F, Record, Idx));
1016 E->
setAtLoc(ReadSourceLocation(Record, Idx));
1022 E->
setProtocol(ReadDeclAs<ObjCProtocolDecl>(Record, Idx));
1023 E->
setAtLoc(ReadSourceLocation(Record, Idx));
1024 E->ProtoLoc = ReadSourceLocation(Record, Idx);
1030 E->
setDecl(ReadDeclAs<ObjCIvarDecl>(Record, Idx));
1032 E->
setOpLoc(ReadSourceLocation(Record, Idx));
1033 E->
setBase(Reader.ReadSubExpr());
1040 unsigned MethodRefFlags = Record[Idx++];
1041 bool Implicit = Record[Idx++] != 0;
1043 ObjCMethodDecl *Getter = ReadDeclAs<ObjCMethodDecl>(Record, Idx);
1044 ObjCMethodDecl *Setter = ReadDeclAs<ObjCMethodDecl>(Record, Idx);
1045 E->setImplicitProperty(Getter, Setter, MethodRefFlags);
1047 E->setExplicitProperty(ReadDeclAs<ObjCPropertyDecl>(Record, Idx),
1050 E->setLocation(ReadSourceLocation(Record, Idx));
1051 E->setReceiverLocation(ReadSourceLocation(Record, Idx));
1052 switch (Record[Idx++]) {
1054 E->setBase(Reader.ReadSubExpr());
1057 E->setSuperReceiver(Reader.readType(F, Record, Idx));
1060 E->setClassReceiver(ReadDeclAs<ObjCInterfaceDecl>(Record, Idx));
1070 E->GetAtIndexMethodDecl = ReadDeclAs<ObjCMethodDecl>(Record, Idx);
1071 E->SetAtIndexMethodDecl = ReadDeclAs<ObjCMethodDecl>(Record, Idx);
1078 unsigned NumStoredSelLocs = Record[Idx++];
1079 E->SelLocsKind = Record[Idx++];
1081 E->IsImplicit = Record[Idx++];
1095 QualType T = Reader.readType(F, Record, Idx);
1107 E->
setSelector(Reader.ReadSelector(F, Record, Idx));
1109 E->LBracLoc = ReadSourceLocation(Record, Idx);
1110 E->RBracLoc = ReadSourceLocation(Record, Idx);
1112 for (
unsigned I = 0, N = E->
getNumArgs(); I != N; ++
I)
1113 E->
setArg(I, Reader.ReadSubExpr());
1116 for (
unsigned I = 0; I != NumStoredSelLocs; ++
I)
1117 Locs[I] = ReadSourceLocation(Record, Idx);
1124 S->
setBody(Reader.ReadSubStmt());
1125 S->
setForLoc(ReadSourceLocation(Record, Idx));
1146 S->
setAtLoc(ReadSourceLocation(Record, Idx));
1153 bool HasFinally = Record[Idx++];
1156 S->
setCatchStmt(I, cast_or_null<ObjCAtCatchStmt>(Reader.ReadSubStmt()));
1186 void ASTStmtReader::VisitCXXCatchStmt(
CXXCatchStmt *S) {
1188 S->CatchLoc = ReadSourceLocation(Record, Idx);
1189 S->ExceptionDecl = ReadDeclAs<VarDecl>(Record, Idx);
1190 S->HandlerBlock = Reader.ReadSubStmt();
1193 void ASTStmtReader::VisitCXXTryStmt(
CXXTryStmt *S) {
1195 assert(Record[Idx] == S->
getNumHandlers() &&
"NumStmtFields is wrong ?");
1197 S->TryLoc = ReadSourceLocation(Record, Idx);
1198 S->getStmts()[0] = Reader.ReadSubStmt();
1200 S->getStmts()[i + 1] = Reader.ReadSubStmt();
1205 S->ForLoc = ReadSourceLocation(Record, Idx);
1206 S->CoawaitLoc = ReadSourceLocation(Record, Idx);
1207 S->ColonLoc = ReadSourceLocation(Record, Idx);
1208 S->RParenLoc = ReadSourceLocation(Record, Idx);
1211 S->
setCond(Reader.ReadSubExpr());
1212 S->
setInc(Reader.ReadSubExpr());
1214 S->
setBody(Reader.ReadSubStmt());
1219 S->KeywordLoc = ReadSourceLocation(Record, Idx);
1220 S->IsIfExists = Record[Idx++];
1221 S->QualifierLoc = Reader.ReadNestedNameSpecifierLoc(F, Record, Idx);
1222 ReadDeclarationNameInfo(S->NameInfo, Record, Idx);
1223 S->SubStmt = Reader.ReadSubStmt();
1229 E->Range = Reader.ReadSourceRange(F, Record, Idx);
1235 E->NumArgs = Record[Idx++];
1237 E->Args =
new (Reader.getContext())
Stmt*[E->NumArgs];
1239 E->
setArg(I, Reader.ReadSubExpr());
1248 E->ParenOrBraceRange = ReadSourceRange(Record, Idx);
1252 VisitCXXConstructExpr(E);
1253 E->Type = GetTypeSourceInfo(Record, Idx);
1256 void ASTStmtReader::VisitLambdaExpr(
LambdaExpr *E) {
1258 unsigned NumCaptures = Record[Idx++];
1259 assert(NumCaptures == E->NumCaptures);(void)NumCaptures;
1260 unsigned NumArrayIndexVars = Record[Idx++];
1261 E->IntroducerRange = ReadSourceRange(Record, Idx);
1263 E->CaptureDefaultLoc = ReadSourceLocation(Record, Idx);
1264 E->ExplicitParams = Record[Idx++];
1265 E->ExplicitResultType = Record[Idx++];
1266 E->ClosingBrace = ReadSourceLocation(Record, Idx);
1272 *
C = Reader.ReadSubExpr();
1275 if (NumArrayIndexVars > 0) {
1276 unsigned *ArrayIndexStarts = E->getArrayIndexStarts();
1277 for (
unsigned I = 0; I != NumCaptures + 1; ++
I)
1278 ArrayIndexStarts[I] = Record[Idx++];
1280 VarDecl **ArrayIndexVars = E->getArrayIndexVars();
1281 for (
unsigned I = 0; I != NumArrayIndexVars; ++
I)
1282 ArrayIndexVars[I] = ReadDeclAs<VarDecl>(Record, Idx);
1289 E->SubExpr = Reader.ReadSubExpr();
1293 VisitExplicitCastExpr(E);
1296 E->RParenLoc = R.
getEnd();
1297 R = ReadSourceRange(Record, Idx);
1298 E->AngleBrackets = R;
1302 return VisitCXXNamedCastExpr(E);
1306 return VisitCXXNamedCastExpr(E);
1310 return VisitCXXNamedCastExpr(E);
1314 return VisitCXXNamedCastExpr(E);
1318 VisitExplicitCastExpr(E);
1325 E->UDSuffixLoc = ReadSourceLocation(Record, Idx);
1344 GetTypeSourceInfo(Record, Idx));
1352 void ASTStmtReader::VisitCXXThisExpr(
CXXThisExpr *E) {
1358 void ASTStmtReader::VisitCXXThrowExpr(
CXXThrowExpr *E) {
1360 E->ThrowLoc = ReadSourceLocation(Record, Idx);
1361 E->Op = Reader.ReadSubExpr();
1362 E->IsThrownVariableInScope = Record[Idx++];
1367 E->Param = ReadDeclAs<ParmVarDecl>(Record, Idx);
1368 E->Loc = ReadSourceLocation(Record, Idx);
1373 E->Field = ReadDeclAs<FieldDecl>(Record, Idx);
1374 E->Loc = ReadSourceLocation(Record, Idx);
1379 E->
setTemporary(Reader.ReadCXXTemporary(F, Record, Idx));
1385 E->TypeInfo = GetTypeSourceInfo(Record, Idx);
1386 E->RParenLoc = ReadSourceLocation(Record, Idx);
1389 void ASTStmtReader::VisitCXXNewExpr(
CXXNewExpr *E) {
1391 E->GlobalNew = Record[Idx++];
1392 bool isArray = Record[Idx++];
1393 E->UsualArrayDeleteWantsSize = Record[Idx++];
1394 unsigned NumPlacementArgs = Record[Idx++];
1395 E->StoredInitializationStyle = Record[Idx++];
1398 E->AllocatedTypeInfo = GetTypeSourceInfo(Record, Idx);
1399 E->TypeIdParens = ReadSourceRange(Record, Idx);
1400 E->Range = ReadSourceRange(Record, Idx);
1401 E->DirectInitRange = ReadSourceRange(Record, Idx);
1404 E->StoredInitializationStyle != 0);
1409 *I = Reader.ReadSubStmt();
1414 E->GlobalDelete = Record[Idx++];
1415 E->ArrayForm = Record[Idx++];
1416 E->ArrayFormAsWritten = Record[Idx++];
1417 E->UsualArrayDeleteWantsSize = Record[Idx++];
1418 E->OperatorDelete = ReadDeclAs<FunctionDecl>(Record, Idx);
1419 E->Argument = Reader.ReadSubExpr();
1420 E->Loc = ReadSourceLocation(Record, Idx);
1426 E->Base = Reader.ReadSubExpr();
1427 E->IsArrow = Record[Idx++];
1428 E->OperatorLoc = ReadSourceLocation(Record, Idx);
1429 E->QualifierLoc = Reader.ReadNestedNameSpecifierLoc(F, Record, Idx);
1430 E->ScopeType = GetTypeSourceInfo(Record, Idx);
1431 E->ColonColonLoc = ReadSourceLocation(Record, Idx);
1432 E->TildeLoc = ReadSourceLocation(Record, Idx);
1444 unsigned NumObjects = Record[Idx++];
1446 for (
unsigned i = 0; i != NumObjects; ++i)
1447 E->getTrailingObjects<
BlockDecl *>()[i] =
1448 ReadDeclAs<BlockDecl>(Record, Idx);
1450 E->SubExpr = Reader.ReadSubExpr();
1458 ReadTemplateKWAndArgsInfo(
1459 *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>(),
1463 E->Base = Reader.ReadSubExpr();
1464 E->BaseType = Reader.readType(F, Record, Idx);
1465 E->IsArrow = Record[Idx++];
1466 E->OperatorLoc = ReadSourceLocation(Record, Idx);
1467 E->QualifierLoc = Reader.ReadNestedNameSpecifierLoc(F, Record, Idx);
1468 E->FirstQualifierFoundInScope = ReadDeclAs<NamedDecl>(Record, Idx);
1469 ReadDeclarationNameInfo(E->MemberNameInfo, Record, Idx);
1477 ReadTemplateKWAndArgsInfo(
1478 *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>(),
1482 E->QualifierLoc = Reader.ReadNestedNameSpecifierLoc(F, Record, Idx);
1483 ReadDeclarationNameInfo(E->NameInfo, Record, Idx);
1489 assert(Record[Idx] == E->
arg_size() &&
"Read wrong record during creation ?");
1491 for (
unsigned I = 0, N = E->
arg_size(); I != N; ++
I)
1492 E->
setArg(I, Reader.ReadSubExpr());
1493 E->Type = GetTypeSourceInfo(Record, Idx);
1498 void ASTStmtReader::VisitOverloadExpr(
OverloadExpr *E) {
1506 unsigned NumDecls = Record[Idx++];
1508 for (
unsigned i = 0; i != NumDecls; ++i) {
1509 NamedDecl *D = ReadDeclAs<NamedDecl>(Record, Idx);
1515 ReadDeclarationNameInfo(E->NameInfo, Record, Idx);
1516 E->QualifierLoc = Reader.ReadNestedNameSpecifierLoc(F, Record, Idx);
1520 VisitOverloadExpr(E);
1521 E->IsArrow = Record[Idx++];
1522 E->HasUnresolvedUsing = Record[Idx++];
1523 E->Base = Reader.ReadSubExpr();
1524 E->BaseType = Reader.readType(F, Record, Idx);
1525 E->OperatorLoc = ReadSourceLocation(Record, Idx);
1529 VisitOverloadExpr(E);
1530 E->RequiresADL = Record[Idx++];
1531 E->Overloaded = Record[Idx++];
1532 E->NamingClass = ReadDeclAs<CXXRecordDecl>(Record, Idx);
1537 E->TypeTraitExprBits.NumArgs = Record[Idx++];
1538 E->TypeTraitExprBits.Kind = Record[Idx++];
1539 E->TypeTraitExprBits.Value = Record[Idx++];
1542 E->RParenLoc = Range.
getEnd();
1545 for (
unsigned I = 0, N = E->
getNumArgs(); I != N; ++
I)
1546 Args[I] = GetTypeSourceInfo(Record, Idx);
1552 E->Value = (
unsigned int)Record[Idx++];
1555 E->RParen = Range.
getEnd();
1556 E->QueriedType = GetTypeSourceInfo(Record, Idx);
1562 E->Value = (
bool)Record[Idx++];
1564 E->QueriedExpression = Reader.ReadSubExpr();
1566 E->RParen = Range.
getEnd();
1571 E->Value = (
bool)Record[Idx++];
1572 E->Range = ReadSourceRange(Record, Idx);
1573 E->Operand = Reader.ReadSubExpr();
1578 E->EllipsisLoc = ReadSourceLocation(Record, Idx);
1579 E->NumExpansions = Record[Idx++];
1580 E->Pattern = Reader.ReadSubExpr();
1585 unsigned NumPartialArgs = Record[Idx++];
1586 E->OperatorLoc = ReadSourceLocation(Record, Idx);
1587 E->PackLoc = ReadSourceLocation(Record, Idx);
1588 E->RParenLoc = ReadSourceLocation(Record, Idx);
1589 E->Pack = Reader.ReadDeclAs<
NamedDecl>(F, Record, Idx);
1591 assert(E->Length == NumPartialArgs);
1593 *E = I + NumPartialArgs;
1597 E->Length = Record[Idx++];
1601 void ASTStmtReader::VisitSubstNonTypeTemplateParmExpr(
1604 E->Param = ReadDeclAs<NonTypeTemplateParmDecl>(Record, Idx);
1605 E->NameLoc = ReadSourceLocation(Record, Idx);
1606 E->Replacement = Reader.ReadSubExpr();
1609 void ASTStmtReader::VisitSubstNonTypeTemplateParmPackExpr(
1612 E->Param = ReadDeclAs<NonTypeTemplateParmDecl>(Record, Idx);
1618 E->NumArguments = ArgPack.pack_size();
1619 E->NameLoc = ReadSourceLocation(Record, Idx);
1624 E->NumParameters = Record[Idx++];
1625 E->ParamPack = ReadDeclAs<ParmVarDecl>(Record, Idx);
1626 E->NameLoc = ReadSourceLocation(Record, Idx);
1628 for (
unsigned i = 0, n = E->NumParameters; i != n; ++i)
1629 Parms[i] = ReadDeclAs<ParmVarDecl>(Record, Idx);
1634 E->State = Reader.ReadSubExpr();
1635 auto VD = ReadDeclAs<ValueDecl>(Record, Idx);
1636 unsigned ManglingNumber = Record[Idx++];
1640 void ASTStmtReader::VisitCXXFoldExpr(
CXXFoldExpr *E) {
1642 E->LParenLoc = ReadSourceLocation(Record, Idx);
1643 E->EllipsisLoc = ReadSourceLocation(Record, Idx);
1644 E->RParenLoc = ReadSourceLocation(Record, Idx);
1645 E->SubExprs[0] = Reader.ReadSubExpr();
1646 E->SubExprs[1] = Reader.ReadSubExpr();
1652 E->SourceExpr = Reader.ReadSubExpr();
1653 E->Loc = ReadSourceLocation(Record, Idx);
1656 void ASTStmtReader::VisitTypoExpr(
TypoExpr *E) {
1657 llvm_unreachable(
"Cannot read TypoExpr nodes");
1665 E->IsArrow = (Record[Idx++] != 0);
1666 E->BaseExpr = Reader.ReadSubExpr();
1667 E->QualifierLoc = Reader.ReadNestedNameSpecifierLoc(F, Record, Idx);
1668 E->MemberLoc = ReadSourceLocation(Record, Idx);
1669 E->TheDecl = ReadDeclAs<MSPropertyDecl>(Record, Idx);
1674 E->setBase(Reader.ReadSubExpr());
1675 E->setIdx(Reader.ReadSubExpr());
1684 GetTypeSourceInfo(Record, Idx));
1692 void ASTStmtReader::VisitSEHLeaveStmt(
SEHLeaveStmt *S) {
1699 S->Loc = ReadSourceLocation(Record, Idx);
1700 S->Children[SEHExceptStmt::FILTER_EXPR] = Reader.ReadSubStmt();
1706 S->Loc = ReadSourceLocation(Record, Idx);
1707 S->Block = Reader.ReadSubStmt();
1710 void ASTStmtReader::VisitSEHTryStmt(
SEHTryStmt *S) {
1712 S->IsCXXTry = Record[Idx++];
1713 S->TryLoc = ReadSourceLocation(Record, Idx);
1714 S->Children[SEHTryStmt::TRY] = Reader.ReadSubStmt();
1715 S->Children[SEHTryStmt::HANDLER] = Reader.ReadSubStmt();
1724 E->
setConfig(cast<CallExpr>(Reader.ReadSubExpr()));
1730 void ASTStmtReader::VisitAsTypeExpr(
AsTypeExpr *E) {
1732 E->BuiltinLoc = ReadSourceLocation(Record, Idx);
1733 E->RParenLoc = ReadSourceLocation(Record, Idx);
1734 E->SrcExpr = Reader.ReadSubExpr();
1750 : Reader(R),
Context(C), Record(Record), Idx(Idx) { }
1751 #define OPENMP_CLAUSE(Name, Class) \
1752 void Visit##Class(Class *S);
1753 #include "clang/Basic/OpenMPKinds.def"
1760 switch (Record[Idx++]) {
1767 case OMPC_num_threads:
1782 case OMPC_proc_bind:
1797 case OMPC_mergeable:
1827 case OMPC_firstprivate:
1830 case OMPC_lastprivate:
1836 case OMPC_reduction:
1848 case OMPC_copyprivate:
1863 case OMPC_num_teams:
1866 case OMPC_thread_limit:
1872 case OMPC_grainsize:
1875 case OMPC_num_tasks:
1883 C->
setLocStart(Reader->ReadSourceLocation(Record, Idx));
1884 C->
setLocEnd(Reader->ReadSourceLocation(Record, Idx));
1889 void OMPClauseReader::VisitOMPIfClause(
OMPIfClause *
C) {
1890 C->setNameModifier(static_cast<OpenMPDirectiveKind>(Record[Idx++]));
1891 C->setNameModifierLoc(Reader->ReadSourceLocation(Record, Idx));
1892 C->setColonLoc(Reader->ReadSourceLocation(Record, Idx));
1893 C->setCondition(Reader->Reader.ReadSubExpr());
1894 C->
setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
1898 C->setCondition(Reader->Reader.ReadSubExpr());
1899 C->
setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
1903 C->setNumThreads(Reader->Reader.ReadSubExpr());
1904 C->
setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
1908 C->setSafelen(Reader->Reader.ReadSubExpr());
1909 C->
setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
1913 C->setSimdlen(Reader->Reader.ReadSubExpr());
1914 C->
setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
1918 C->setNumForLoops(Reader->Reader.ReadSubExpr());
1919 C->
setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
1924 static_cast<OpenMPDefaultClauseKind>(Record[Idx++]));
1925 C->
setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
1926 C->setDefaultKindKwLoc(Reader->ReadSourceLocation(Record, Idx));
1931 static_cast<OpenMPProcBindClauseKind>(Record[Idx++]));
1932 C->
setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
1933 C->setProcBindKindKwLoc(Reader->ReadSourceLocation(Record, Idx));
1938 static_cast<OpenMPScheduleClauseKind>(Record[Idx++]));
1939 C->setFirstScheduleModifier(
1940 static_cast<OpenMPScheduleClauseModifier>(Record[Idx++]));
1941 C->setSecondScheduleModifier(
1942 static_cast<OpenMPScheduleClauseModifier>(Record[Idx++]));
1943 C->setChunkSize(Reader->Reader.ReadSubExpr());
1944 C->setHelperChunkSize(Reader->Reader.ReadSubExpr());
1945 C->setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
1946 C->setFirstScheduleModifierLoc(Reader->ReadSourceLocation(Record, Idx));
1947 C->setSecondScheduleModifierLoc(Reader->ReadSourceLocation(Record, Idx));
1948 C->setScheduleKindLoc(Reader->ReadSourceLocation(Record, Idx));
1949 C->setCommaLoc(Reader->ReadSourceLocation(Record, Idx));
1953 C->setNumForLoops(Reader->Reader.ReadSubExpr());
1954 C->
setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
1963 void OMPClauseReader::VisitOMPReadClause(
OMPReadClause *) {}
1975 void OMPClauseReader::VisitOMPSIMDClause(
OMPSIMDClause *) {}
1980 C->
setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
1983 Vars.reserve(NumVars);
1984 for (
unsigned i = 0; i != NumVars; ++i)
1985 Vars.push_back(Reader->Reader.ReadSubExpr());
1988 for (
unsigned i = 0; i != NumVars; ++i)
1989 Vars.push_back(Reader->Reader.ReadSubExpr());
1990 C->setPrivateCopies(Vars);
1994 C->
setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
1997 Vars.reserve(NumVars);
1998 for (
unsigned i = 0; i != NumVars; ++i)
1999 Vars.push_back(Reader->Reader.ReadSubExpr());
2002 for (
unsigned i = 0; i != NumVars; ++i)
2003 Vars.push_back(Reader->Reader.ReadSubExpr());
2004 C->setPrivateCopies(Vars);
2006 for (
unsigned i = 0; i != NumVars; ++i)
2007 Vars.push_back(Reader->Reader.ReadSubExpr());
2012 C->
setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
2015 Vars.reserve(NumVars);
2016 for (
unsigned i = 0; i != NumVars; ++i)
2017 Vars.push_back(Reader->Reader.ReadSubExpr());
2020 for (
unsigned i = 0; i != NumVars; ++i)
2021 Vars.push_back(Reader->Reader.ReadSubExpr());
2024 for (
unsigned i = 0; i != NumVars; ++i)
2025 Vars.push_back(Reader->Reader.ReadSubExpr());
2026 C->setSourceExprs(Vars);
2028 for (
unsigned i = 0; i != NumVars; ++i)
2029 Vars.push_back(Reader->Reader.ReadSubExpr());
2030 C->setDestinationExprs(Vars);
2032 for (
unsigned i = 0; i != NumVars; ++i)
2033 Vars.push_back(Reader->Reader.ReadSubExpr());
2034 C->setAssignmentOps(Vars);
2038 C->
setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
2041 Vars.reserve(NumVars);
2042 for (
unsigned i = 0; i != NumVars; ++i)
2043 Vars.push_back(Reader->Reader.ReadSubExpr());
2048 C->
setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
2049 C->setColonLoc(Reader->ReadSourceLocation(Record, Idx));
2051 Reader->Reader.ReadNestedNameSpecifierLoc(Reader->F, Record, Idx);
2053 Reader->ReadDeclarationNameInfo(DNI, Record, Idx);
2054 C->setQualifierLoc(NNSL);
2055 C->setNameInfo(DNI);
2059 Vars.reserve(NumVars);
2060 for (
unsigned i = 0; i != NumVars; ++i)
2061 Vars.push_back(Reader->Reader.ReadSubExpr());
2064 for (
unsigned i = 0; i != NumVars; ++i)
2065 Vars.push_back(Reader->Reader.ReadSubExpr());
2066 C->setPrivates(Vars);
2068 for (
unsigned i = 0; i != NumVars; ++i)
2069 Vars.push_back(Reader->Reader.ReadSubExpr());
2070 C->setLHSExprs(Vars);
2072 for (
unsigned i = 0; i != NumVars; ++i)
2073 Vars.push_back(Reader->Reader.ReadSubExpr());
2074 C->setRHSExprs(Vars);
2076 for (
unsigned i = 0; i != NumVars; ++i)
2077 Vars.push_back(Reader->Reader.ReadSubExpr());
2078 C->setReductionOps(Vars);
2082 C->
setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
2083 C->setColonLoc(Reader->ReadSourceLocation(Record, Idx));
2084 C->setModifier(static_cast<OpenMPLinearClauseKind>(Record[Idx++]));
2085 C->setModifierLoc(Reader->ReadSourceLocation(Record, Idx));
2088 Vars.reserve(NumVars);
2089 for (
unsigned i = 0; i != NumVars; ++i)
2090 Vars.push_back(Reader->Reader.ReadSubExpr());
2093 for (
unsigned i = 0; i != NumVars; ++i)
2094 Vars.push_back(Reader->Reader.ReadSubExpr());
2095 C->setPrivates(Vars);
2097 for (
unsigned i = 0; i != NumVars; ++i)
2098 Vars.push_back(Reader->Reader.ReadSubExpr());
2101 for (
unsigned i = 0; i != NumVars; ++i)
2102 Vars.push_back(Reader->Reader.ReadSubExpr());
2103 C->setUpdates(Vars);
2105 for (
unsigned i = 0; i != NumVars; ++i)
2106 Vars.push_back(Reader->Reader.ReadSubExpr());
2108 C->setStep(Reader->Reader.ReadSubExpr());
2109 C->setCalcStep(Reader->Reader.ReadSubExpr());
2113 C->setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
2114 C->
setColonLoc(Reader->ReadSourceLocation(Record, Idx));
2115 unsigned NumVars = C->varlist_size();
2117 Vars.reserve(NumVars);
2118 for (
unsigned i = 0; i != NumVars; ++i)
2119 Vars.push_back(Reader->Reader.ReadSubExpr());
2120 C->setVarRefs(Vars);
2121 C->setAlignment(Reader->Reader.ReadSubExpr());
2125 C->setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
2126 unsigned NumVars = C->varlist_size();
2128 Exprs.reserve(NumVars);
2129 for (
unsigned i = 0; i != NumVars; ++i)
2130 Exprs.push_back(Reader->Reader.ReadSubExpr());
2131 C->setVarRefs(Exprs);
2133 for (
unsigned i = 0; i != NumVars; ++i)
2134 Exprs.push_back(Reader->Reader.ReadSubExpr());
2135 C->setSourceExprs(Exprs);
2137 for (
unsigned i = 0; i != NumVars; ++i)
2138 Exprs.push_back(Reader->Reader.ReadSubExpr());
2139 C->setDestinationExprs(Exprs);
2141 for (
unsigned i = 0; i != NumVars; ++i)
2142 Exprs.push_back(Reader->Reader.ReadSubExpr());
2143 C->setAssignmentOps(Exprs);
2147 C->setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
2148 unsigned NumVars = C->varlist_size();
2150 Exprs.reserve(NumVars);
2151 for (
unsigned i = 0; i != NumVars; ++i)
2152 Exprs.push_back(Reader->Reader.ReadSubExpr());
2153 C->setVarRefs(Exprs);
2155 for (
unsigned i = 0; i != NumVars; ++i)
2156 Exprs.push_back(Reader->Reader.ReadSubExpr());
2157 C->setSourceExprs(Exprs);
2159 for (
unsigned i = 0; i != NumVars; ++i)
2160 Exprs.push_back(Reader->Reader.ReadSubExpr());
2161 C->setDestinationExprs(Exprs);
2163 for (
unsigned i = 0; i != NumVars; ++i)
2164 Exprs.push_back(Reader->Reader.ReadSubExpr());
2165 C->setAssignmentOps(Exprs);
2169 C->setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
2170 unsigned NumVars = C->varlist_size();
2172 Vars.reserve(NumVars);
2173 for (
unsigned i = 0; i != NumVars; ++i)
2174 Vars.push_back(Reader->Reader.ReadSubExpr());
2175 C->setVarRefs(Vars);
2179 C->setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
2180 C->setDependencyKind(static_cast<OpenMPDependClauseKind>(Record[Idx++]));
2181 C->setDependencyLoc(Reader->ReadSourceLocation(Record, Idx));
2182 C->setColonLoc(Reader->ReadSourceLocation(Record, Idx));
2183 unsigned NumVars = C->varlist_size();
2185 Vars.reserve(NumVars);
2186 for (
unsigned i = 0; i != NumVars; ++i)
2187 Vars.push_back(Reader->Reader.ReadSubExpr());
2188 C->setVarRefs(Vars);
2192 C->setDevice(Reader->Reader.ReadSubExpr());
2193 C->
setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
2196 void OMPClauseReader::VisitOMPMapClause(
OMPMapClause *C) {
2197 C->setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
2198 C->setMapTypeModifier(
2199 static_cast<OpenMPMapClauseKind>(Record[Idx++]));
2201 static_cast<OpenMPMapClauseKind>(Record[Idx++]));
2202 C->setMapLoc(Reader->ReadSourceLocation(Record, Idx));
2203 C->setColonLoc(Reader->ReadSourceLocation(Record, Idx));
2204 auto NumVars = C->varlist_size();
2206 Vars.reserve(NumVars);
2207 for (
unsigned i = 0; i != NumVars; ++i) {
2208 Vars.push_back(Reader->Reader.ReadSubExpr());
2210 C->setVarRefs(Vars);
2214 C->setNumTeams(Reader->Reader.ReadSubExpr());
2215 C->
setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
2219 C->setThreadLimit(Reader->Reader.ReadSubExpr());
2220 C->
setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
2224 C->setPriority(Reader->Reader.ReadSubExpr());
2225 C->
setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
2229 C->setGrainsize(Reader->Reader.ReadSubExpr());
2230 C->
setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
2234 C->setNumTasks(Reader->Reader.ReadSubExpr());
2235 C->
setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
2238 void OMPClauseReader::VisitOMPHintClause(
OMPHintClause *C) {
2239 C->setHint(Reader->Reader.ReadSubExpr());
2240 C->
setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
2248 E->
setLocEnd(ReadSourceLocation(Record, Idx));
2252 Clauses.push_back(ClauseReader.readClause());
2262 VisitOMPExecutableDirective(D);
2267 D->
setCond(Reader.ReadSubExpr());
2268 D->
setInit(Reader.ReadSubExpr());
2269 D->
setInc(Reader.ReadSubExpr());
2281 Sub.reserve(CollapsedNum);
2282 for (
unsigned i = 0; i < CollapsedNum; ++i)
2283 Sub.push_back(Reader.ReadSubExpr());
2286 for (
unsigned i = 0; i < CollapsedNum; ++i)
2287 Sub.push_back(Reader.ReadSubExpr());
2290 for (
unsigned i = 0; i < CollapsedNum; ++i)
2291 Sub.push_back(Reader.ReadSubExpr());
2294 for (
unsigned i = 0; i < CollapsedNum; ++i)
2295 Sub.push_back(Reader.ReadSubExpr());
2298 for (
unsigned i = 0; i < CollapsedNum; ++i)
2299 Sub.push_back(Reader.ReadSubExpr());
2307 VisitOMPExecutableDirective(D);
2308 D->setHasCancel(Record[Idx++]);
2312 VisitOMPLoopDirective(D);
2316 VisitOMPLoopDirective(D);
2317 D->setHasCancel(Record[Idx++]);
2321 VisitOMPLoopDirective(D);
2328 VisitOMPExecutableDirective(D);
2329 D->setHasCancel(Record[Idx++]);
2334 VisitOMPExecutableDirective(D);
2342 VisitOMPExecutableDirective(D);
2347 VisitOMPExecutableDirective(D);
2354 VisitOMPExecutableDirective(D);
2355 ReadDeclarationNameInfo(D->DirName, Record, Idx);
2359 VisitOMPLoopDirective(D);
2360 D->setHasCancel(Record[Idx++]);
2363 void ASTStmtReader::VisitOMPParallelForSimdDirective(
2365 VisitOMPLoopDirective(D);
2368 void ASTStmtReader::VisitOMPParallelSectionsDirective(
2373 VisitOMPExecutableDirective(D);
2374 D->setHasCancel(Record[Idx++]);
2381 VisitOMPExecutableDirective(D);
2382 D->setHasCancel(Record[Idx++]);
2387 VisitOMPExecutableDirective(D);
2392 VisitOMPExecutableDirective(D);
2397 VisitOMPExecutableDirective(D);
2402 VisitOMPExecutableDirective(D);
2409 VisitOMPExecutableDirective(D);
2416 VisitOMPExecutableDirective(D);
2423 VisitOMPExecutableDirective(D);
2424 D->setX(Reader.ReadSubExpr());
2425 D->setV(Reader.ReadSubExpr());
2426 D->setExpr(Reader.ReadSubExpr());
2427 D->setUpdateExpr(Reader.ReadSubExpr());
2428 D->IsXLHSInRHSPart = Record[Idx++] != 0;
2429 D->IsPostfixUpdate = Record[Idx++] != 0;
2436 VisitOMPExecutableDirective(D);
2442 VisitOMPExecutableDirective(D);
2449 VisitOMPExecutableDirective(D);
2452 void ASTStmtReader::VisitOMPCancellationPointDirective(
2455 VisitOMPExecutableDirective(D);
2456 D->setCancelRegion(static_cast<OpenMPDirectiveKind>(Record[Idx++]));
2463 VisitOMPExecutableDirective(D);
2464 D->setCancelRegion(static_cast<OpenMPDirectiveKind>(Record[Idx++]));
2468 VisitOMPLoopDirective(D);
2472 VisitOMPLoopDirective(D);
2476 VisitOMPLoopDirective(D);
2484 switch (ReadingKind) {
2486 llvm_unreachable(
"should not call this when not reading anything");
2489 return ReadStmtFromStream(F);
2491 return ReadSubStmt();
2494 llvm_unreachable(
"ReadingKind not set ?");
2498 return cast_or_null<Expr>(ReadStmt(F));
2502 return cast_or_null<Expr>(ReadSubStmt());
2512 Stmt *ASTReader::ReadStmtFromStream(ModuleFile &F) {
2514 ReadingKindTracker ReadingKind(Read_Stmt, *
this);
2515 llvm::BitstreamCursor &
Cursor = F.DeclsCursor;
2519 llvm::DenseMap<uint64_t, Stmt *> StmtEntries;
2522 unsigned PrevNumStmts = StmtStack.size();
2528 Stmt::EmptyShell Empty;
2531 llvm::BitstreamEntry Entry = Cursor.advanceSkippingSubblocks();
2533 switch (Entry.Kind) {
2534 case llvm::BitstreamEntry::SubBlock:
2536 Error(
"malformed block record in AST file");
2538 case llvm::BitstreamEntry::EndBlock:
2540 case llvm::BitstreamEntry::Record:
2548 bool Finished =
false;
2549 bool IsStmtReference =
false;
2550 switch ((
StmtCode)Cursor.readRecord(Entry.ID, Record)) {
2556 IsStmtReference =
true;
2557 assert(StmtEntries.find(Record[0]) != StmtEntries.end() &&
2558 "No stmt was recorded for this offset reference!");
2559 S = StmtEntries[Record[Idx++]];
2657 Record[ASTStmtReader::NumExprFields + 1],
2658 Record[ASTStmtReader::NumExprFields + 2],
2659 Record[ASTStmtReader::NumExprFields + 2] ?
2660 Record[ASTStmtReader::NumExprFields + 5] : 0);
2699 Record[ASTStmtReader::NumExprFields + 1]);
2725 if (Record[Idx++]) {
2726 QualifierLoc = ReadNestedNameSpecifierLoc(F, Record, Idx);
2731 bool HasTemplateKWAndArgsInfo = Record[Idx++];
2732 if (HasTemplateKWAndArgsInfo) {
2733 TemplateKWLoc = ReadSourceLocation(F, Record, Idx);
2734 unsigned NumTemplateArgs = Record[Idx++];
2735 ArgInfo.
setLAngleLoc(ReadSourceLocation(F, Record, Idx));
2736 ArgInfo.
setRAngleLoc(ReadSourceLocation(F, Record, Idx));
2737 for (
unsigned i = 0; i != NumTemplateArgs; ++i)
2738 ArgInfo.
addArgument(ReadTemplateArgumentLoc(F, Record, Idx));
2741 bool HadMultipleCandidates = Record[Idx++];
2743 NamedDecl *FoundD = ReadDeclAs<NamedDecl>(F, Record, Idx);
2747 QualType T = readType(F, Record, Idx);
2750 Expr *Base = ReadSubExpr();
2751 ValueDecl *MemberD = ReadDeclAs<ValueDecl>(F, Record, Idx);
2754 bool IsArrow = Record[Idx++];
2758 TemplateKWLoc, MemberD, FoundDecl, MemberNameInfo,
2759 HasTemplateKWAndArgsInfo ? &ArgInfo :
nullptr, T,
2761 ReadDeclarationNameLoc(F, cast<MemberExpr>(S)->MemberDNLoc,
2763 if (HadMultipleCandidates)
2764 cast<MemberExpr>(
S)->setHadMultipleCandidates(
true);
2873 Record[ASTStmtReader::NumExprFields + 1]);
2894 llvm_unreachable(
"mismatching AST file");
2898 Record[ASTStmtReader::NumExprFields + 1]);
2921 Record[ASTStmtReader::NumStmtFields + 1]);
2978 CollapsedNum, Empty);
3025 CollapsedNum, Empty);
3033 CollapsedNum, Empty);
3114 CollapsedNum, Empty);
3236 Record[ASTStmtReader::NumExprFields]
3237 ? Record[ASTStmtReader::NumExprFields + 1]
3244 Record[ASTStmtReader::NumExprFields]
3245 ? Record[ASTStmtReader::NumExprFields + 1]
3257 Record[ASTStmtReader::NumExprFields]
3258 ? Record[ASTStmtReader::NumExprFields + 1]
3265 Record[ASTStmtReader::NumExprFields]
3266 ? Record[ASTStmtReader::NumExprFields + 1]
3353 ++NumStatementsRead;
3355 if (S && !IsStmtReference) {
3357 StmtEntries[Cursor.GetCurrentBitNo()] =
S;
3361 assert(Idx == Record.size() &&
"Invalid deserialization of statement");
3362 StmtStack.push_back(S);
3365 assert(StmtStack.size() > PrevNumStmts &&
"Read too many sub-stmts!");
3366 assert(StmtStack.size() == PrevNumStmts + 1 &&
"Extra expressions on stack!");
3367 return StmtStack.pop_back_val();
A CXXConstCastExpr record.
static AttributedStmt * CreateEmpty(const ASTContext &C, unsigned NumAttrs)
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
A call to an overloaded operator written using operator syntax.
ObjCIndirectCopyRestoreExpr - Represents the passing of a function argument by indirect copy-restore ...
The receiver is the instance of the superclass object.
Represents a single C99 designator.
void setConditionVariable(const ASTContext &C, VarDecl *V)
static OMPDependClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with N variables.
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 master' directive.
DesignatorTypes
The kinds of designators that can occur in a DesignatedInitExpr.
SourceLocation getEnd() const
void setRangeStmt(Stmt *S)
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.
unsigned arg_size() const
Retrieve the number of arguments.
void setSubStmt(CompoundStmt *S)
unsigned getNumOutputs() const
This represents 'thread_limit' clause in the '#pragma omp ...' directive.
A UserDefinedLiteral record.
The receiver is an object instance.
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.
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 setStmts(const ASTContext &C, ArrayRef< Stmt * > Stmts)
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)
void setLocation(SourceLocation L)
A CXXStaticCastExpr record.
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
An AttributedStmt record.
IdentifierInfo * getIdentifier() const
getIdentifier - Get the identifier that names this declaration, if there is one.
A CXXReinterpretCastExpr record.
A ObjCBoolLiteralExpr record.
static OMPTaskwaitDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
void setHasCancel(bool Has)
Set cancel state.
Represents a 'co_return' statement in the C++ Coroutines TS.
void setLastIteration(Expr *LI)
IfStmt - This represents an if/then/else.
void setBeginEndStmt(Stmt *S)
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.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
void setRBracket(SourceLocation RB)
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.
ASTStmtReader(ASTReader &Reader, ModuleFile &F, llvm::BitstreamCursor &Cursor, const ASTReader::RecordData &Record, unsigned &Idx)
Represents an attribute applied to a statement.
void setUpperBoundVariable(Expr *UB)
void setComputationResultType(QualType T)
ParenExpr - This represents a parethesized expression, e.g.
A CXXOperatorCallExpr record.
pack_iterator pack_begin() const
Iterator referencing the first argument of a template argument pack.
void setSuper(SourceLocation Loc, QualType T, bool IsInstanceSuper)
This represents 'priority' clause in the '#pragma omp ...' directive.
A CXXTemporaryObjectExpr record.
Represents Objective-C's @throw statement.
uint32_t DeclID
An ID number that refers to a declaration in an AST file.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
void setNextLowerBound(Expr *NLB)
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 setInstanceReceiver(Expr *rec)
Turn this message send into an instance message that computes the receiver object with the given expr...
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 '('.
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 '('.
void setRAngleLoc(SourceLocation Loc)
static OffsetOfExpr * CreateEmpty(const ASTContext &C, unsigned NumComps, unsigned NumExprs)
This represents 'read' clause in the '#pragma omp atomic' directive.
VarDecl - An instance of this class is created to represent a variable declaration or definition...
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.
ObjCIsaExpr - Represent X->isa and X.isa when X is an ObjC 'id' type.
This represents 'num_threads' clause in the '#pragma omp ...' directive.
CompoundLiteralExpr - [C99 6.5.2.5].
void setSubExpr(unsigned Idx, Expr *E)
void setFPContractable(bool FPC)
void setInitializer(Expr *E)
void setLength(Expr *E)
Set length of the array section.
void setOpLoc(SourceLocation L)
static FunctionParmPackExpr * CreateEmpty(const ASTContext &Context, unsigned NumParams)
void setAsmLoc(SourceLocation L)
static DependentScopeDeclRefExpr * CreateEmpty(const ASTContext &C, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
ObjCMethodDecl - Represents an instance or class method declaration.
void setValue(unsigned Val)
A ConditionOperator record.
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.
A CXXConstructExpr record.
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]).
Represents an expression – generally a full-expression – that introduces cleanups to be run at the en...
ParmVarDecl - Represents a parameter to a function.
unsigned path_size() const
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]).
OpenMPDirectiveKind getDirectiveKind() const
LabelStmt - Represents a label, which has a substatement.
void AllocateArgsArray(const ASTContext &C, bool isArray, unsigned numPlaceArgs, bool hasInitializer)
void setStrTokenLoc(unsigned TokNum, SourceLocation L)
void setAtLoc(SourceLocation L)
Represents a C99 designated initializer expression.
void setFinals(ArrayRef< Expr * > A)
One of these records is kept for each identifier that is lexed.
An ObjCAtThrowStmt record.
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.
unsigned getNumInputs() const
ShuffleVectorExpr - clang-specific builtin-in function __builtin_shufflevector.
class LLVM_ALIGNAS(8) DependentTemplateSpecializationType const IdentifierInfo * Name
Represents a template specialization type whose template cannot be resolved, e.g. ...
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.
unsigned getNumAssocs() const
An ObjCProtocolExpr record.
An ObjCSelectorExpr record.
static ObjCMessageExpr * CreateEmpty(const ASTContext &Context, unsigned NumArgs, unsigned NumStoredSelLocs)
Create an empty Objective-C message expression, to be filled in by subsequent calls.
FieldDecl - An instance of this class is created by Sema::ActOnField to represent a member of a struc...
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 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.
void setColonLoc(SourceLocation Loc)
Sets the location of ':'.
Token - This structure provides full information about a lexed token.
void setRParen(SourceLocation Loc)
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...
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
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]];.
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)
static OMPMapClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
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.
Describes an C or C++ initializer list.
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
void setConstructor(CXXConstructorDecl *C)
void setValue(const ASTContext &C, const llvm::APInt &Val)
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)
void setCounters(ArrayRef< Expr * > A)
void setSynchBody(Stmt *S)
A convenient class for passing around template argument information.
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 '('.
bool isValueDependent() const
isValueDependent - Determines whether this expression is value-dependent (C++ [temp.dep.constexpr]).
static CXXTryStmt * Create(const ASTContext &C, SourceLocation tryLoc, Stmt *tryBlock, ArrayRef< Stmt * > handlers)
void setAccessor(IdentifierInfo *II)
CXXForRangeStmt - This represents C++0x [stmt.ranged]'s ranged for statement, represented as 'for (ra...
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 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.
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...
void setRParenLoc(SourceLocation Loc)
detail::InMemoryDirectory::const_iterator I
void setRParenLoc(SourceLocation R)
A default argument (C++ [dcl.fct.default]).
void setStmt(LabelStmt *T)
void setSourceRange(SourceRange R)
void setRParenLoc(SourceLocation L)
Represents the this expression in C++.
void setCastKind(CastKind K)
static OMPTargetDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
void setEqualOrColonLoc(SourceLocation L)
void setArgument(Expr *E)
OpenMP 4.0 [2.4, Array Sections].
void setTypeSourceInfo(TypeSourceInfo *tsi)
ConditionalOperator - The ?: ternary operator.
static LambdaExpr * CreateDeserialized(const ASTContext &C, unsigned NumCaptures, unsigned NumArrayIndexVars)
Construct a new lambda expression that will be deserialized from an external source.
Represents a C++ pseudo-destructor (C++ [expr.pseudo]).
void setAmpAmpLoc(SourceLocation L)
static OMPTaskgroupDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
void setBreakLoc(SourceLocation L)
ASTTemplateKWAndArgsInfo * getTrailingASTTemplateKWAndArgsInfo()
Return the optional template keyword and arguments info.
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.
unsigned getNumArgs() const
Determine the number of arguments to this type trait.
static OMPSingleDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
unsigned getNumObjects() const
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)
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.
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 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)
BlockDecl - This represents 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.
ValueDecl - Represent the declaration of a variable (in which case it is an lvalue) a function (in wh...
Expr - This represents one expression.
void setDesignators(const ASTContext &C, const Designator *Desigs, unsigned NumDesigs)
void setRBraceLoc(SourceLocation Loc)
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]).
unsigned getNumExpressions() const
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.
An ObjCSubscriptRefExpr record.
raw_arg_iterator raw_arg_end()
static CXXReinterpretCastExpr * CreateEmpty(const ASTContext &Context, unsigned pathSize)
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.
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.
static FloatingLiteral * Create(const ASTContext &C, const llvm::APFloat &V, bool isexact, QualType Type, SourceLocation L)
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
Information about a module that has been loaded by the ASTReader.
This represents 'ordered' clause in the '#pragma omp ...' directive.
static OMPFlushClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with N variables.
A PseudoObjectExpr record.
void setColonLoc(SourceLocation L)
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c array literal.
void setFinallyStmt(Stmt *S)
An ObjCIndirectCopyRestoreExpr record.
This represents '#pragma omp for' directive.
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;...
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.
unsigned getNumComponents() const
This represents a Microsoft inline-assembly statement extension.
void setColonLoc(SourceLocation L)
void setPrivateCopies(ArrayRef< Expr * > PrivateCopies)
Set list of helper expressions, required for generation of private copies of original lastprivate var...
void setRParenLoc(SourceLocation L)
A DesignatedInitUpdateExpr record.
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.
A member reference to an MSPropertyDecl.
DeclarationName getDeclName() const
getDeclName - Get the actual, stored name of the declaration, which may be a special name...
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 setRParenLoc(SourceLocation L)
unsigned getNumClauses() const
Get number of clauses.
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.
An ObjCPropertyRefExpr record.
ImaginaryLiteral - We support imaginary integer and floating point literals, like "1...
An ObjCForCollectionStmt record.
This represents '#pragma omp flush' directive.
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.
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.
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.
void setSynchExpr(Stmt *S)
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...
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.
PseudoObjectExpr - An expression which accesses a pseudo-object l-value.
void setLParenLoc(SourceLocation L)
OMPClauseReader(ASTStmtReader *R, ASTContext &C, const ASTReader::RecordData &Record, unsigned &Idx)
void setAccessorLoc(SourceLocation L)
void setGotoLoc(SourceLocation L)
static CXXDynamicCastExpr * CreateEmpty(const ASTContext &Context, unsigned pathSize)
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 setIterationVariable(Expr *IV)
This represents 'hint' clause in the '#pragma omp ...' directive.
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)
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 setAtCatchLoc(SourceLocation Loc)
void setVarRefs(ArrayRef< Expr * > VL)
Sets the list of variables for this clause.
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)
Represents a call to a member function that may be written either with member call syntax (e...
unsigned getCollapsedNumber() const
Get number of collapsed loops.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
void setIdentLoc(SourceLocation L)
DeclStmt - Adaptor class for mixing declarations with statements and expressions. ...
LabelDecl - Represents the declaration of a label.
This represents clause 'shared' in the '#pragma omp ...' directives.
void setLabelLoc(SourceLocation L)
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 ...
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 setConfig(CallExpr *E)
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>.
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.
void addDecl(NamedDecl *D)
ObjCProtocolExpr used for protocol expression in Objective-C.
void setDecl(ValueDecl *NewD)
void setThrowLoc(SourceLocation Loc)
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.
SourceLocation getBegin() const
void setClauses(ArrayRef< OMPClause * > Clauses)
Sets the list of variables for this clause.
static DesignatedInitExpr * CreateEmpty(const ASTContext &C, unsigned NumIndexExprs)
static DeclGroup * Create(ASTContext &C, Decl **Decls, unsigned NumDecls)
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)
ObjCBoxedExpr - used for generalized expression boxing.
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)
void setPrivateCounters(ArrayRef< Expr * > A)
A qualified reference to a name whose declaration cannot yet be resolved.
void setRBracketLoc(SourceLocation L)
CompoundAssignOperator - For compound assignments (e.g.
bool isPartiallySubstituted() const
Determine whether this represents a partially-substituted sizeof...
Expr ** getElements()
Retrieve elements of array of literals.
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)
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 setExtendingDecl(const ValueDecl *ExtendedBy, unsigned ManglingNumber)
This represents 'device' clause in the '#pragma omp ...' directive.
An IntegerLiteral record.
void setExprs(const ASTContext &C, ArrayRef< Expr * > Exprs)
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 setRParenLoc(SourceLocation L)
static CapturedStmt * CreateDeserialized(const ASTContext &Context, unsigned NumCaptures)
An ExtVectorElementExpr record.
void setLabel(LabelDecl *L)
void setTypeInfoAsWritten(TypeSourceInfo *writtenTy)
This represents '#pragma omp section' directive.
void setAtLoc(SourceLocation L)
Reads an AST files chain containing the contents of a translation unit.
Expr * ReadExpr(ModuleFile &F)
Reads an expression.
void setCollection(Expr *E)
An ObjCIvarRefExpr record.
void setDecl(ObjCIvarDecl *d)
void setFileScope(bool FS)
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.
unsigned getNumHandlers() const
A CharacterLiteral record.
Represents a C++11 pack expansion that produces a sequence of expressions.
An ObjCStringLiteral record.
A CXXDynamicCastExpr record.
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.
bool isTypeOperand() const
detail::InMemoryDirectory::const_iterator E
for(auto typeArg:T->getTypeArgsAsWritten())
unsigned getNumArgs() const
getNumArgs - Return the number of actual arguments to this call.
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...
unsigned getNumArgs() const
unsigned getNumConcatenated() const
getNumConcatenated - Get the number of string literal tokens that were concatenated in translation ph...
void setMethodDecl(ObjCMethodDecl *MD)
This represents '#pragma omp atomic' directive.
void setLocStart(SourceLocation Loc)
Sets the starting location of the clause.
static PseudoObjectExpr * Create(const ASTContext &Context, Expr *syntactic, ArrayRef< Expr * > semantic, unsigned resultIndex)
static OMPSharedClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with N variables.
An ObjCAtFinallyStmt record.
Represents a __leave statement.
void setRBracketLoc(SourceLocation L)
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
bool hasQualifier() const
Determine whether this declaration reference was preceded by a C++ nested-name-specifier, e.g., N::foo.
SwitchStmt - This represents a 'switch' stmt.
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)
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.
static OMPBarrierDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Represents Objective-C's collection statement.
An ObjCAtSynchronizedStmt record.
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.
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)
void setLParenLoc(SourceLocation L)
unsigned getNumArgs() const
Return the number of actual arguments in this message, not counting the receiver. ...
The template argument is actually a parameter pack.
void setFPContractable(bool FPC)
Represents a base class of a C++ class.
This represents 'write' clause in the '#pragma omp atomic' directive.
void setRParenLoc(SourceLocation L)
unsigned getNumCatchStmts() const
Retrieve the number of @catch statements in this try-catch-finally block.
ObjCIvarRefExpr - A reference to an ObjC instance variable.
void setAtSynchronizedLoc(SourceLocation Loc)
void setOperatorLoc(SourceLocation L)
void setLocation(SourceLocation Location)
A ConvertVectorExpr record.
void setStarLoc(SourceLocation L)
bool hasAssociatedStmt() const
Returns true if directive has associated statement.
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.
A GCC-style AsmStmt record.
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)
This represents 'num_tasks' clause in the '#pragma omp ...' directive.
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]).
void setUpdates(ArrayRef< Expr * > A)
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 setIfLoc(SourceLocation L)
Field designator where the field has been resolved to a declaration.
void setIsaMemberLoc(SourceLocation L)
unsigned kind
All of the diagnostics that can be emitted by the frontend.
void setExprOperand(Expr *E)
unsigned getNumSubExprs()
Represents Objective-C's @try ... @catch ... @finally statement.
This represents '#pragma omp taskloop simd' directive.
bool hasTemplateKWAndArgsInfo() const
void setTokenLocation(SourceLocation L)
static OMPSectionsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
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 setOpLoc(SourceLocation L)
void setLoopVarStmt(Stmt *S)
Internal struct to describes an element that is a pack expansion, used if any of the elements in the ...
void setPreCond(Expr *PC)
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.
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.
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)
BreakStmt - This represents a break.
void setSubStmt(Stmt *SS)
static ObjCArrayLiteral * CreateEmpty(const ASTContext &C, unsigned NumElements)
unsigned getNumClobbers() const
A trivial tuple used to represent a source range.
This represents '#pragma omp taskyield' directive.
NamedDecl - This represents a decl with a name.
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)
void setStdInitListInitialization(bool V)
bool isTypeOperand() const
The receiver is a superclass.
static OMPLastprivateClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
capture_init_iterator capture_init_end()
Retrieve the iterator pointing one past the last initialization argument.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
ReceiverKind getReceiverKind() const
Determine the kind of receiver that this message is being sent to.
Represents Objective-C's @autoreleasepool Statement.
void setWhileLoc(SourceLocation L)
unsigned varlist_size() const
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.
Represents an implicitly-generated value initialization of an object of a given type.
void setInits(ArrayRef< Expr * > A)
void setKeywordLoc(SourceLocation L)
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c dictionary literal.
void setCapturedRegionKind(CapturedRegionKind Kind)
Set the captured region kind.
A GenericSelectionExpr record.
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.