clang  8.0.0svn
ASTReaderStmt.cpp
Go to the documentation of this file.
1 //===- ASTReaderStmt.cpp - Stmt/Expr Deserialization ----------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // Statement/expression deserialization. This implements the
11 // ASTReader::ReadStmt method.
12 //
13 //===----------------------------------------------------------------------===//
14 
16 #include "clang/AST/ASTContext.h"
17 #include "clang/AST/AttrIterator.h"
18 #include "clang/AST/Decl.h"
20 #include "clang/AST/DeclCXX.h"
21 #include "clang/AST/DeclGroup.h"
22 #include "clang/AST/DeclObjC.h"
23 #include "clang/AST/DeclTemplate.h"
25 #include "clang/AST/Expr.h"
26 #include "clang/AST/ExprCXX.h"
27 #include "clang/AST/ExprObjC.h"
28 #include "clang/AST/ExprOpenMP.h"
30 #include "clang/AST/OpenMPClause.h"
32 #include "clang/AST/Stmt.h"
33 #include "clang/AST/StmtCXX.h"
34 #include "clang/AST/StmtObjC.h"
35 #include "clang/AST/StmtOpenMP.h"
36 #include "clang/AST/StmtVisitor.h"
37 #include "clang/AST/TemplateBase.h"
38 #include "clang/AST/Type.h"
42 #include "clang/Basic/LLVM.h"
43 #include "clang/Basic/Lambda.h"
48 #include "clang/Basic/Specifiers.h"
49 #include "clang/Basic/TypeTraits.h"
50 #include "clang/Lex/Token.h"
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"
59 #include <algorithm>
60 #include <cassert>
61 #include <cstdint>
62 #include <string>
63 
64 using namespace clang;
65 using namespace serialization;
66 
67 namespace clang {
68 
69  class ASTStmtReader : public StmtVisitor<ASTStmtReader> {
70  friend class OMPClauseReader;
71 
72  ASTRecordReader &Record;
73  llvm::BitstreamCursor &DeclsCursor;
74 
75  SourceLocation ReadSourceLocation() {
76  return Record.readSourceLocation();
77  }
78 
79  SourceRange ReadSourceRange() {
80  return Record.readSourceRange();
81  }
82 
83  std::string ReadString() {
84  return Record.readString();
85  }
86 
87  TypeSourceInfo *GetTypeSourceInfo() {
88  return Record.getTypeSourceInfo();
89  }
90 
91  Decl *ReadDecl() {
92  return Record.readDecl();
93  }
94 
95  template<typename T>
96  T *ReadDeclAs() {
97  return Record.readDeclAs<T>();
98  }
99 
100  void ReadDeclarationNameLoc(DeclarationNameLoc &DNLoc,
101  DeclarationName Name) {
102  Record.readDeclarationNameLoc(DNLoc, Name);
103  }
104 
105  void ReadDeclarationNameInfo(DeclarationNameInfo &NameInfo) {
106  Record.readDeclarationNameInfo(NameInfo);
107  }
108 
109  public:
110  ASTStmtReader(ASTRecordReader &Record, llvm::BitstreamCursor &Cursor)
111  : Record(Record), DeclsCursor(Cursor) {}
112 
113  /// The number of record fields required for the Stmt class
114  /// itself.
115  static const unsigned NumStmtFields = 0;
116 
117  /// The number of record fields required for the Expr class
118  /// itself.
119  static const unsigned NumExprFields = NumStmtFields + 7;
120 
121  /// Read and initialize a ExplicitTemplateArgumentList structure.
122  void ReadTemplateKWAndArgsInfo(ASTTemplateKWAndArgsInfo &Args,
123  TemplateArgumentLoc *ArgsLocArray,
124  unsigned NumTemplateArgs);
125 
126  /// Read and initialize a ExplicitTemplateArgumentList structure.
127  void ReadExplicitTemplateArgumentList(ASTTemplateArgumentListInfo &ArgList,
128  unsigned NumTemplateArgs);
129 
130  void VisitStmt(Stmt *S);
131 #define STMT(Type, Base) \
132  void Visit##Type(Type *);
133 #include "clang/AST/StmtNodes.inc"
134  };
135 
136 } // namespace clang
137 
139  TemplateArgumentLoc *ArgsLocArray,
140  unsigned NumTemplateArgs) {
141  SourceLocation TemplateKWLoc = ReadSourceLocation();
142  TemplateArgumentListInfo ArgInfo;
143  ArgInfo.setLAngleLoc(ReadSourceLocation());
144  ArgInfo.setRAngleLoc(ReadSourceLocation());
145  for (unsigned i = 0; i != NumTemplateArgs; ++i)
146  ArgInfo.addArgument(Record.readTemplateArgumentLoc());
147  Args.initializeFrom(TemplateKWLoc, ArgInfo, ArgsLocArray);
148 }
149 
151  assert(Record.getIdx() == NumStmtFields && "Incorrect statement field count");
152 }
153 
154 void ASTStmtReader::VisitNullStmt(NullStmt *S) {
155  VisitStmt(S);
156  S->setSemiLoc(ReadSourceLocation());
157  S->NullStmtBits.HasLeadingEmptyMacro = Record.readInt();
158 }
159 
160 void ASTStmtReader::VisitCompoundStmt(CompoundStmt *S) {
161  VisitStmt(S);
163  unsigned NumStmts = Record.readInt();
164  while (NumStmts--)
165  Stmts.push_back(Record.readSubStmt());
166  S->setStmts(Stmts);
167  S->CompoundStmtBits.LBraceLoc = ReadSourceLocation();
168  S->RBraceLoc = ReadSourceLocation();
169 }
170 
171 void ASTStmtReader::VisitSwitchCase(SwitchCase *S) {
172  VisitStmt(S);
173  Record.recordSwitchCaseID(S, Record.readInt());
174  S->setKeywordLoc(ReadSourceLocation());
175  S->setColonLoc(ReadSourceLocation());
176 }
177 
178 void ASTStmtReader::VisitCaseStmt(CaseStmt *S) {
179  VisitSwitchCase(S);
180  bool CaseStmtIsGNURange = Record.readInt();
181  S->setLHS(Record.readSubExpr());
182  S->setSubStmt(Record.readSubStmt());
183  if (CaseStmtIsGNURange) {
184  S->setRHS(Record.readSubExpr());
185  S->setEllipsisLoc(ReadSourceLocation());
186  }
187 }
188 
189 void ASTStmtReader::VisitDefaultStmt(DefaultStmt *S) {
190  VisitSwitchCase(S);
191  S->setSubStmt(Record.readSubStmt());
192 }
193 
194 void ASTStmtReader::VisitLabelStmt(LabelStmt *S) {
195  VisitStmt(S);
196  auto *LD = ReadDeclAs<LabelDecl>();
197  LD->setStmt(S);
198  S->setDecl(LD);
199  S->setSubStmt(Record.readSubStmt());
200  S->setIdentLoc(ReadSourceLocation());
201 }
202 
203 void ASTStmtReader::VisitAttributedStmt(AttributedStmt *S) {
204  VisitStmt(S);
205  // NumAttrs in AttributedStmt is set when creating an empty
206  // AttributedStmt in AttributedStmt::CreateEmpty, since it is needed
207  // to allocate the right amount of space for the trailing Attr *.
208  uint64_t NumAttrs = Record.readInt();
209  AttrVec Attrs;
210  Record.readAttributes(Attrs);
211  (void)NumAttrs;
212  assert(NumAttrs == S->AttributedStmtBits.NumAttrs);
213  assert(NumAttrs == Attrs.size());
214  std::copy(Attrs.begin(), Attrs.end(), S->getAttrArrayPtr());
215  S->SubStmt = Record.readSubStmt();
216  S->AttributedStmtBits.AttrLoc = ReadSourceLocation();
217 }
218 
219 void ASTStmtReader::VisitIfStmt(IfStmt *S) {
220  VisitStmt(S);
221 
222  S->setConstexpr(Record.readInt());
223  bool HasElse = Record.readInt();
224  bool HasVar = Record.readInt();
225  bool HasInit = Record.readInt();
226 
227  S->setCond(Record.readSubExpr());
228  S->setThen(Record.readSubStmt());
229  if (HasElse)
230  S->setElse(Record.readSubStmt());
231  if (HasVar)
232  S->setConditionVariable(Record.getContext(), ReadDeclAs<VarDecl>());
233  if (HasInit)
234  S->setInit(Record.readSubStmt());
235 
236  S->setIfLoc(ReadSourceLocation());
237  if (HasElse)
238  S->setElseLoc(ReadSourceLocation());
239 }
240 
241 void ASTStmtReader::VisitSwitchStmt(SwitchStmt *S) {
242  VisitStmt(S);
243 
244  bool HasInit = Record.readInt();
245  bool HasVar = Record.readInt();
246  bool AllEnumCasesCovered = Record.readInt();
247  if (AllEnumCasesCovered)
249 
250  S->setCond(Record.readSubExpr());
251  S->setBody(Record.readSubStmt());
252  if (HasInit)
253  S->setInit(Record.readSubStmt());
254  if (HasVar)
255  S->setConditionVariable(Record.getContext(), ReadDeclAs<VarDecl>());
256 
257  S->setSwitchLoc(ReadSourceLocation());
258 
259  SwitchCase *PrevSC = nullptr;
260  for (auto E = Record.size(); Record.getIdx() != E; ) {
261  SwitchCase *SC = Record.getSwitchCaseWithID(Record.readInt());
262  if (PrevSC)
263  PrevSC->setNextSwitchCase(SC);
264  else
265  S->setSwitchCaseList(SC);
266 
267  PrevSC = SC;
268  }
269 }
270 
271 void ASTStmtReader::VisitWhileStmt(WhileStmt *S) {
272  VisitStmt(S);
273 
274  bool HasVar = Record.readInt();
275 
276  S->setCond(Record.readSubExpr());
277  S->setBody(Record.readSubStmt());
278  if (HasVar)
279  S->setConditionVariable(Record.getContext(), ReadDeclAs<VarDecl>());
280 
281  S->setWhileLoc(ReadSourceLocation());
282 }
283 
284 void ASTStmtReader::VisitDoStmt(DoStmt *S) {
285  VisitStmt(S);
286  S->setCond(Record.readSubExpr());
287  S->setBody(Record.readSubStmt());
288  S->setDoLoc(ReadSourceLocation());
289  S->setWhileLoc(ReadSourceLocation());
290  S->setRParenLoc(ReadSourceLocation());
291 }
292 
293 void ASTStmtReader::VisitForStmt(ForStmt *S) {
294  VisitStmt(S);
295  S->setInit(Record.readSubStmt());
296  S->setCond(Record.readSubExpr());
297  S->setConditionVariable(Record.getContext(), ReadDeclAs<VarDecl>());
298  S->setInc(Record.readSubExpr());
299  S->setBody(Record.readSubStmt());
300  S->setForLoc(ReadSourceLocation());
301  S->setLParenLoc(ReadSourceLocation());
302  S->setRParenLoc(ReadSourceLocation());
303 }
304 
305 void ASTStmtReader::VisitGotoStmt(GotoStmt *S) {
306  VisitStmt(S);
307  S->setLabel(ReadDeclAs<LabelDecl>());
308  S->setGotoLoc(ReadSourceLocation());
309  S->setLabelLoc(ReadSourceLocation());
310 }
311 
312 void ASTStmtReader::VisitIndirectGotoStmt(IndirectGotoStmt *S) {
313  VisitStmt(S);
314  S->setGotoLoc(ReadSourceLocation());
315  S->setStarLoc(ReadSourceLocation());
316  S->setTarget(Record.readSubExpr());
317 }
318 
319 void ASTStmtReader::VisitContinueStmt(ContinueStmt *S) {
320  VisitStmt(S);
321  S->setContinueLoc(ReadSourceLocation());
322 }
323 
324 void ASTStmtReader::VisitBreakStmt(BreakStmt *S) {
325  VisitStmt(S);
326  S->setBreakLoc(ReadSourceLocation());
327 }
328 
329 void ASTStmtReader::VisitReturnStmt(ReturnStmt *S) {
330  VisitStmt(S);
331 
332  bool HasNRVOCandidate = Record.readInt();
333 
334  S->setRetValue(Record.readSubExpr());
335  if (HasNRVOCandidate)
336  S->setNRVOCandidate(ReadDeclAs<VarDecl>());
337 
338  S->setReturnLoc(ReadSourceLocation());
339 }
340 
341 void ASTStmtReader::VisitDeclStmt(DeclStmt *S) {
342  VisitStmt(S);
343  S->setStartLoc(ReadSourceLocation());
344  S->setEndLoc(ReadSourceLocation());
345 
346  if (Record.size() - Record.getIdx() == 1) {
347  // Single declaration
348  S->setDeclGroup(DeclGroupRef(ReadDecl()));
349  } else {
351  int N = Record.size() - Record.getIdx();
352  Decls.reserve(N);
353  for (int I = 0; I < N; ++I)
354  Decls.push_back(ReadDecl());
356  Decls.data(),
357  Decls.size())));
358  }
359 }
360 
361 void ASTStmtReader::VisitAsmStmt(AsmStmt *S) {
362  VisitStmt(S);
363  S->NumOutputs = Record.readInt();
364  S->NumInputs = Record.readInt();
365  S->NumClobbers = Record.readInt();
366  S->setAsmLoc(ReadSourceLocation());
367  S->setVolatile(Record.readInt());
368  S->setSimple(Record.readInt());
369 }
370 
371 void ASTStmtReader::VisitGCCAsmStmt(GCCAsmStmt *S) {
372  VisitAsmStmt(S);
373  S->setRParenLoc(ReadSourceLocation());
374  S->setAsmString(cast_or_null<StringLiteral>(Record.readSubStmt()));
375 
376  unsigned NumOutputs = S->getNumOutputs();
377  unsigned NumInputs = S->getNumInputs();
378  unsigned NumClobbers = S->getNumClobbers();
379 
380  // Outputs and inputs
384  for (unsigned I = 0, N = NumOutputs + NumInputs; I != N; ++I) {
385  Names.push_back(Record.getIdentifierInfo());
386  Constraints.push_back(cast_or_null<StringLiteral>(Record.readSubStmt()));
387  Exprs.push_back(Record.readSubStmt());
388  }
389 
390  // Constraints
392  for (unsigned I = 0; I != NumClobbers; ++I)
393  Clobbers.push_back(cast_or_null<StringLiteral>(Record.readSubStmt()));
394 
395  S->setOutputsAndInputsAndClobbers(Record.getContext(),
396  Names.data(), Constraints.data(),
397  Exprs.data(), NumOutputs, NumInputs,
398  Clobbers.data(), NumClobbers);
399 }
400 
401 void ASTStmtReader::VisitMSAsmStmt(MSAsmStmt *S) {
402  VisitAsmStmt(S);
403  S->LBraceLoc = ReadSourceLocation();
404  S->EndLoc = ReadSourceLocation();
405  S->NumAsmToks = Record.readInt();
406  std::string AsmStr = ReadString();
407 
408  // Read the tokens.
409  SmallVector<Token, 16> AsmToks;
410  AsmToks.reserve(S->NumAsmToks);
411  for (unsigned i = 0, e = S->NumAsmToks; i != e; ++i) {
412  AsmToks.push_back(Record.readToken());
413  }
414 
415  // The calls to reserve() for the FooData vectors are mandatory to
416  // prevent dead StringRefs in the Foo vectors.
417 
418  // Read the clobbers.
419  SmallVector<std::string, 16> ClobbersData;
421  ClobbersData.reserve(S->NumClobbers);
422  Clobbers.reserve(S->NumClobbers);
423  for (unsigned i = 0, e = S->NumClobbers; i != e; ++i) {
424  ClobbersData.push_back(ReadString());
425  Clobbers.push_back(ClobbersData.back());
426  }
427 
428  // Read the operands.
429  unsigned NumOperands = S->NumOutputs + S->NumInputs;
431  SmallVector<std::string, 16> ConstraintsData;
432  SmallVector<StringRef, 16> Constraints;
433  Exprs.reserve(NumOperands);
434  ConstraintsData.reserve(NumOperands);
435  Constraints.reserve(NumOperands);
436  for (unsigned i = 0; i != NumOperands; ++i) {
437  Exprs.push_back(cast<Expr>(Record.readSubStmt()));
438  ConstraintsData.push_back(ReadString());
439  Constraints.push_back(ConstraintsData.back());
440  }
441 
442  S->initialize(Record.getContext(), AsmStr, AsmToks,
443  Constraints, Exprs, Clobbers);
444 }
445 
446 void ASTStmtReader::VisitCoroutineBodyStmt(CoroutineBodyStmt *S) {
447  VisitStmt(S);
448  assert(Record.peekInt() == S->NumParams);
449  Record.skipInts(1);
450  auto *StoredStmts = S->getStoredStmts();
451  for (unsigned i = 0;
452  i < CoroutineBodyStmt::SubStmt::FirstParamMove + S->NumParams; ++i)
453  StoredStmts[i] = Record.readSubStmt();
454 }
455 
456 void ASTStmtReader::VisitCoreturnStmt(CoreturnStmt *S) {
457  VisitStmt(S);
458  S->CoreturnLoc = Record.readSourceLocation();
459  for (auto &SubStmt: S->SubStmts)
460  SubStmt = Record.readSubStmt();
461  S->IsImplicit = Record.readInt() != 0;
462 }
463 
464 void ASTStmtReader::VisitCoawaitExpr(CoawaitExpr *E) {
465  VisitExpr(E);
466  E->KeywordLoc = ReadSourceLocation();
467  for (auto &SubExpr: E->SubExprs)
468  SubExpr = Record.readSubStmt();
469  E->OpaqueValue = cast_or_null<OpaqueValueExpr>(Record.readSubStmt());
470  E->setIsImplicit(Record.readInt() != 0);
471 }
472 
473 void ASTStmtReader::VisitCoyieldExpr(CoyieldExpr *E) {
474  VisitExpr(E);
475  E->KeywordLoc = ReadSourceLocation();
476  for (auto &SubExpr: E->SubExprs)
477  SubExpr = Record.readSubStmt();
478  E->OpaqueValue = cast_or_null<OpaqueValueExpr>(Record.readSubStmt());
479 }
480 
481 void ASTStmtReader::VisitDependentCoawaitExpr(DependentCoawaitExpr *E) {
482  VisitExpr(E);
483  E->KeywordLoc = ReadSourceLocation();
484  for (auto &SubExpr: E->SubExprs)
485  SubExpr = Record.readSubStmt();
486 }
487 
488 void ASTStmtReader::VisitCapturedStmt(CapturedStmt *S) {
489  VisitStmt(S);
490  Record.skipInts(1);
491  S->setCapturedDecl(ReadDeclAs<CapturedDecl>());
492  S->setCapturedRegionKind(static_cast<CapturedRegionKind>(Record.readInt()));
493  S->setCapturedRecordDecl(ReadDeclAs<RecordDecl>());
494 
495  // Capture inits
497  E = S->capture_init_end();
498  I != E; ++I)
499  *I = Record.readSubExpr();
500 
501  // Body
502  S->setCapturedStmt(Record.readSubStmt());
504 
505  // Captures
506  for (auto &I : S->captures()) {
507  I.VarAndKind.setPointer(ReadDeclAs<VarDecl>());
508  I.VarAndKind.setInt(
509  static_cast<CapturedStmt::VariableCaptureKind>(Record.readInt()));
510  I.Loc = ReadSourceLocation();
511  }
512 }
513 
514 void ASTStmtReader::VisitExpr(Expr *E) {
515  VisitStmt(E);
516  E->setType(Record.readType());
517  E->setTypeDependent(Record.readInt());
518  E->setValueDependent(Record.readInt());
519  E->setInstantiationDependent(Record.readInt());
520  E->ExprBits.ContainsUnexpandedParameterPack = Record.readInt();
521  E->setValueKind(static_cast<ExprValueKind>(Record.readInt()));
522  E->setObjectKind(static_cast<ExprObjectKind>(Record.readInt()));
523  assert(Record.getIdx() == NumExprFields &&
524  "Incorrect expression field count");
525 }
526 
527 void ASTStmtReader::VisitConstantExpr(ConstantExpr *E) {
528  VisitExpr(E);
529  E->setSubExpr(Record.readSubExpr());
530 }
531 
532 void ASTStmtReader::VisitPredefinedExpr(PredefinedExpr *E) {
533  VisitExpr(E);
534  bool HasFunctionName = Record.readInt();
535  E->PredefinedExprBits.HasFunctionName = HasFunctionName;
536  E->PredefinedExprBits.Kind = Record.readInt();
537  E->setLocation(ReadSourceLocation());
538  if (HasFunctionName)
539  E->setFunctionName(cast<StringLiteral>(Record.readSubExpr()));
540 }
541 
542 void ASTStmtReader::VisitDeclRefExpr(DeclRefExpr *E) {
543  VisitExpr(E);
544 
545  E->DeclRefExprBits.HasQualifier = Record.readInt();
546  E->DeclRefExprBits.HasFoundDecl = Record.readInt();
547  E->DeclRefExprBits.HasTemplateKWAndArgsInfo = Record.readInt();
548  E->DeclRefExprBits.HadMultipleCandidates = Record.readInt();
549  E->DeclRefExprBits.RefersToEnclosingVariableOrCapture = Record.readInt();
550  unsigned NumTemplateArgs = 0;
551  if (E->hasTemplateKWAndArgsInfo())
552  NumTemplateArgs = Record.readInt();
553 
554  if (E->hasQualifier())
555  new (E->getTrailingObjects<NestedNameSpecifierLoc>())
557 
558  if (E->hasFoundDecl())
559  *E->getTrailingObjects<NamedDecl *>() = ReadDeclAs<NamedDecl>();
560 
561  if (E->hasTemplateKWAndArgsInfo())
562  ReadTemplateKWAndArgsInfo(
563  *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>(),
564  E->getTrailingObjects<TemplateArgumentLoc>(), NumTemplateArgs);
565 
566  E->setDecl(ReadDeclAs<ValueDecl>());
567  E->setLocation(ReadSourceLocation());
568  ReadDeclarationNameLoc(E->DNLoc, E->getDecl()->getDeclName());
569 }
570 
571 void ASTStmtReader::VisitIntegerLiteral(IntegerLiteral *E) {
572  VisitExpr(E);
573  E->setLocation(ReadSourceLocation());
574  E->setValue(Record.getContext(), Record.readAPInt());
575 }
576 
577 void ASTStmtReader::VisitFixedPointLiteral(FixedPointLiteral *E) {
578  VisitExpr(E);
579  E->setLocation(ReadSourceLocation());
580  E->setValue(Record.getContext(), Record.readAPInt());
581 }
582 
583 void ASTStmtReader::VisitFloatingLiteral(FloatingLiteral *E) {
584  VisitExpr(E);
585  E->setRawSemantics(static_cast<Stmt::APFloatSemantics>(Record.readInt()));
586  E->setExact(Record.readInt());
587  E->setValue(Record.getContext(), Record.readAPFloat(E->getSemantics()));
588  E->setLocation(ReadSourceLocation());
589 }
590 
591 void ASTStmtReader::VisitImaginaryLiteral(ImaginaryLiteral *E) {
592  VisitExpr(E);
593  E->setSubExpr(Record.readSubExpr());
594 }
595 
596 void ASTStmtReader::VisitStringLiteral(StringLiteral *E) {
597  VisitExpr(E);
598 
599  // NumConcatenated, Length and CharByteWidth are set by the empty
600  // ctor since they are needed to allocate storage for the trailing objects.
601  unsigned NumConcatenated = Record.readInt();
602  unsigned Length = Record.readInt();
603  unsigned CharByteWidth = Record.readInt();
604  assert((NumConcatenated == E->getNumConcatenated()) &&
605  "Wrong number of concatenated tokens!");
606  assert((Length == E->getLength()) && "Wrong Length!");
607  assert((CharByteWidth == E->getCharByteWidth()) && "Wrong character width!");
608  E->StringLiteralBits.Kind = Record.readInt();
609  E->StringLiteralBits.IsPascal = Record.readInt();
610 
611  // The character width is originally computed via mapCharByteWidth.
612  // Check that the deserialized character width is consistant with the result
613  // of calling mapCharByteWidth.
614  assert((CharByteWidth ==
615  StringLiteral::mapCharByteWidth(Record.getContext().getTargetInfo(),
616  E->getKind())) &&
617  "Wrong character width!");
618 
619  // Deserialize the trailing array of SourceLocation.
620  for (unsigned I = 0; I < NumConcatenated; ++I)
621  E->setStrTokenLoc(I, ReadSourceLocation());
622 
623  // Deserialize the trailing array of char holding the string data.
624  char *StrData = E->getStrDataAsChar();
625  for (unsigned I = 0; I < Length * CharByteWidth; ++I)
626  StrData[I] = Record.readInt();
627 }
628 
629 void ASTStmtReader::VisitCharacterLiteral(CharacterLiteral *E) {
630  VisitExpr(E);
631  E->setValue(Record.readInt());
632  E->setLocation(ReadSourceLocation());
633  E->setKind(static_cast<CharacterLiteral::CharacterKind>(Record.readInt()));
634 }
635 
636 void ASTStmtReader::VisitParenExpr(ParenExpr *E) {
637  VisitExpr(E);
638  E->setLParen(ReadSourceLocation());
639  E->setRParen(ReadSourceLocation());
640  E->setSubExpr(Record.readSubExpr());
641 }
642 
643 void ASTStmtReader::VisitParenListExpr(ParenListExpr *E) {
644  VisitExpr(E);
645  unsigned NumExprs = Record.readInt();
646  assert((NumExprs == E->getNumExprs()) && "Wrong NumExprs!");
647  for (unsigned I = 0; I != NumExprs; ++I)
648  E->getTrailingObjects<Stmt *>()[I] = Record.readSubStmt();
649  E->LParenLoc = ReadSourceLocation();
650  E->RParenLoc = ReadSourceLocation();
651 }
652 
653 void ASTStmtReader::VisitUnaryOperator(UnaryOperator *E) {
654  VisitExpr(E);
655  E->setSubExpr(Record.readSubExpr());
657  E->setOperatorLoc(ReadSourceLocation());
658  E->setCanOverflow(Record.readInt());
659 }
660 
661 void ASTStmtReader::VisitOffsetOfExpr(OffsetOfExpr *E) {
662  VisitExpr(E);
663  assert(E->getNumComponents() == Record.peekInt());
664  Record.skipInts(1);
665  assert(E->getNumExpressions() == Record.peekInt());
666  Record.skipInts(1);
667  E->setOperatorLoc(ReadSourceLocation());
668  E->setRParenLoc(ReadSourceLocation());
669  E->setTypeSourceInfo(GetTypeSourceInfo());
670  for (unsigned I = 0, N = E->getNumComponents(); I != N; ++I) {
671  auto Kind = static_cast<OffsetOfNode::Kind>(Record.readInt());
672  SourceLocation Start = ReadSourceLocation();
673  SourceLocation End = ReadSourceLocation();
674  switch (Kind) {
675  case OffsetOfNode::Array:
676  E->setComponent(I, OffsetOfNode(Start, Record.readInt(), End));
677  break;
678 
679  case OffsetOfNode::Field:
680  E->setComponent(
681  I, OffsetOfNode(Start, ReadDeclAs<FieldDecl>(), End));
682  break;
683 
685  E->setComponent(
686  I,
687  OffsetOfNode(Start, Record.getIdentifierInfo(), End));
688  break;
689 
690  case OffsetOfNode::Base: {
691  auto *Base = new (Record.getContext()) CXXBaseSpecifier();
692  *Base = Record.readCXXBaseSpecifier();
694  break;
695  }
696  }
697  }
698 
699  for (unsigned I = 0, N = E->getNumExpressions(); I != N; ++I)
700  E->setIndexExpr(I, Record.readSubExpr());
701 }
702 
703 void ASTStmtReader::VisitUnaryExprOrTypeTraitExpr(UnaryExprOrTypeTraitExpr *E) {
704  VisitExpr(E);
705  E->setKind(static_cast<UnaryExprOrTypeTrait>(Record.readInt()));
706  if (Record.peekInt() == 0) {
707  E->setArgument(Record.readSubExpr());
708  Record.skipInts(1);
709  } else {
710  E->setArgument(GetTypeSourceInfo());
711  }
712  E->setOperatorLoc(ReadSourceLocation());
713  E->setRParenLoc(ReadSourceLocation());
714 }
715 
716 void ASTStmtReader::VisitArraySubscriptExpr(ArraySubscriptExpr *E) {
717  VisitExpr(E);
718  E->setLHS(Record.readSubExpr());
719  E->setRHS(Record.readSubExpr());
720  E->setRBracketLoc(ReadSourceLocation());
721 }
722 
723 void ASTStmtReader::VisitOMPArraySectionExpr(OMPArraySectionExpr *E) {
724  VisitExpr(E);
725  E->setBase(Record.readSubExpr());
726  E->setLowerBound(Record.readSubExpr());
727  E->setLength(Record.readSubExpr());
728  E->setColonLoc(ReadSourceLocation());
729  E->setRBracketLoc(ReadSourceLocation());
730 }
731 
732 void ASTStmtReader::VisitCallExpr(CallExpr *E) {
733  VisitExpr(E);
734  unsigned NumArgs = Record.readInt();
735  assert((NumArgs == E->getNumArgs()) && "Wrong NumArgs!");
736  E->setRParenLoc(ReadSourceLocation());
737  E->setCallee(Record.readSubExpr());
738  for (unsigned I = 0; I != NumArgs; ++I)
739  E->setArg(I, Record.readSubExpr());
740  E->setADLCallKind(static_cast<CallExpr::ADLCallKind>(Record.readInt()));
741 }
742 
743 void ASTStmtReader::VisitCXXMemberCallExpr(CXXMemberCallExpr *E) {
744  VisitCallExpr(E);
745 }
746 
747 void ASTStmtReader::VisitMemberExpr(MemberExpr *E) {
748  // Don't call VisitExpr, this is fully initialized at creation.
749  assert(E->getStmtClass() == Stmt::MemberExprClass &&
750  "It's a subclass, we must advance Idx!");
751 }
752 
753 void ASTStmtReader::VisitObjCIsaExpr(ObjCIsaExpr *E) {
754  VisitExpr(E);
755  E->setBase(Record.readSubExpr());
756  E->setIsaMemberLoc(ReadSourceLocation());
757  E->setOpLoc(ReadSourceLocation());
758  E->setArrow(Record.readInt());
759 }
760 
761 void ASTStmtReader::
762 VisitObjCIndirectCopyRestoreExpr(ObjCIndirectCopyRestoreExpr *E) {
763  VisitExpr(E);
764  E->Operand = Record.readSubExpr();
765  E->setShouldCopy(Record.readInt());
766 }
767 
768 void ASTStmtReader::VisitObjCBridgedCastExpr(ObjCBridgedCastExpr *E) {
769  VisitExplicitCastExpr(E);
770  E->LParenLoc = ReadSourceLocation();
771  E->BridgeKeywordLoc = ReadSourceLocation();
772  E->Kind = Record.readInt();
773 }
774 
775 void ASTStmtReader::VisitCastExpr(CastExpr *E) {
776  VisitExpr(E);
777  unsigned NumBaseSpecs = Record.readInt();
778  assert(NumBaseSpecs == E->path_size());
779  E->setSubExpr(Record.readSubExpr());
780  E->setCastKind((CastKind)Record.readInt());
781  CastExpr::path_iterator BaseI = E->path_begin();
782  while (NumBaseSpecs--) {
783  auto *BaseSpec = new (Record.getContext()) CXXBaseSpecifier;
784  *BaseSpec = Record.readCXXBaseSpecifier();
785  *BaseI++ = BaseSpec;
786  }
787 }
788 
789 void ASTStmtReader::VisitBinaryOperator(BinaryOperator *E) {
790  VisitExpr(E);
791  E->setLHS(Record.readSubExpr());
792  E->setRHS(Record.readSubExpr());
794  E->setOperatorLoc(ReadSourceLocation());
795  E->setFPFeatures(FPOptions(Record.readInt()));
796 }
797 
798 void ASTStmtReader::VisitCompoundAssignOperator(CompoundAssignOperator *E) {
799  VisitBinaryOperator(E);
800  E->setComputationLHSType(Record.readType());
801  E->setComputationResultType(Record.readType());
802 }
803 
804 void ASTStmtReader::VisitConditionalOperator(ConditionalOperator *E) {
805  VisitExpr(E);
806  E->SubExprs[ConditionalOperator::COND] = Record.readSubExpr();
807  E->SubExprs[ConditionalOperator::LHS] = Record.readSubExpr();
808  E->SubExprs[ConditionalOperator::RHS] = Record.readSubExpr();
809  E->QuestionLoc = ReadSourceLocation();
810  E->ColonLoc = ReadSourceLocation();
811 }
812 
813 void
814 ASTStmtReader::VisitBinaryConditionalOperator(BinaryConditionalOperator *E) {
815  VisitExpr(E);
816  E->OpaqueValue = cast<OpaqueValueExpr>(Record.readSubExpr());
817  E->SubExprs[BinaryConditionalOperator::COMMON] = Record.readSubExpr();
818  E->SubExprs[BinaryConditionalOperator::COND] = Record.readSubExpr();
819  E->SubExprs[BinaryConditionalOperator::LHS] = Record.readSubExpr();
820  E->SubExprs[BinaryConditionalOperator::RHS] = Record.readSubExpr();
821  E->QuestionLoc = ReadSourceLocation();
822  E->ColonLoc = ReadSourceLocation();
823 }
824 
825 void ASTStmtReader::VisitImplicitCastExpr(ImplicitCastExpr *E) {
826  VisitCastExpr(E);
827  E->setIsPartOfExplicitCast(Record.readInt());
828 }
829 
830 void ASTStmtReader::VisitExplicitCastExpr(ExplicitCastExpr *E) {
831  VisitCastExpr(E);
832  E->setTypeInfoAsWritten(GetTypeSourceInfo());
833 }
834 
835 void ASTStmtReader::VisitCStyleCastExpr(CStyleCastExpr *E) {
836  VisitExplicitCastExpr(E);
837  E->setLParenLoc(ReadSourceLocation());
838  E->setRParenLoc(ReadSourceLocation());
839 }
840 
841 void ASTStmtReader::VisitCompoundLiteralExpr(CompoundLiteralExpr *E) {
842  VisitExpr(E);
843  E->setLParenLoc(ReadSourceLocation());
844  E->setTypeSourceInfo(GetTypeSourceInfo());
845  E->setInitializer(Record.readSubExpr());
846  E->setFileScope(Record.readInt());
847 }
848 
849 void ASTStmtReader::VisitExtVectorElementExpr(ExtVectorElementExpr *E) {
850  VisitExpr(E);
851  E->setBase(Record.readSubExpr());
852  E->setAccessor(Record.getIdentifierInfo());
853  E->setAccessorLoc(ReadSourceLocation());
854 }
855 
856 void ASTStmtReader::VisitInitListExpr(InitListExpr *E) {
857  VisitExpr(E);
858  if (auto *SyntForm = cast_or_null<InitListExpr>(Record.readSubStmt()))
859  E->setSyntacticForm(SyntForm);
860  E->setLBraceLoc(ReadSourceLocation());
861  E->setRBraceLoc(ReadSourceLocation());
862  bool isArrayFiller = Record.readInt();
863  Expr *filler = nullptr;
864  if (isArrayFiller) {
865  filler = Record.readSubExpr();
866  E->ArrayFillerOrUnionFieldInit = filler;
867  } else
868  E->ArrayFillerOrUnionFieldInit = ReadDeclAs<FieldDecl>();
869  E->sawArrayRangeDesignator(Record.readInt());
870  unsigned NumInits = Record.readInt();
871  E->reserveInits(Record.getContext(), NumInits);
872  if (isArrayFiller) {
873  for (unsigned I = 0; I != NumInits; ++I) {
874  Expr *init = Record.readSubExpr();
875  E->updateInit(Record.getContext(), I, init ? init : filler);
876  }
877  } else {
878  for (unsigned I = 0; I != NumInits; ++I)
879  E->updateInit(Record.getContext(), I, Record.readSubExpr());
880  }
881 }
882 
883 void ASTStmtReader::VisitDesignatedInitExpr(DesignatedInitExpr *E) {
885 
886  VisitExpr(E);
887  unsigned NumSubExprs = Record.readInt();
888  assert(NumSubExprs == E->getNumSubExprs() && "Wrong number of subexprs");
889  for (unsigned I = 0; I != NumSubExprs; ++I)
890  E->setSubExpr(I, Record.readSubExpr());
891  E->setEqualOrColonLoc(ReadSourceLocation());
892  E->setGNUSyntax(Record.readInt());
893 
894  SmallVector<Designator, 4> Designators;
895  while (Record.getIdx() < Record.size()) {
896  switch ((DesignatorTypes)Record.readInt()) {
897  case DESIG_FIELD_DECL: {
898  auto *Field = ReadDeclAs<FieldDecl>();
899  SourceLocation DotLoc = ReadSourceLocation();
900  SourceLocation FieldLoc = ReadSourceLocation();
901  Designators.push_back(Designator(Field->getIdentifier(), DotLoc,
902  FieldLoc));
903  Designators.back().setField(Field);
904  break;
905  }
906 
907  case DESIG_FIELD_NAME: {
908  const IdentifierInfo *Name = Record.getIdentifierInfo();
909  SourceLocation DotLoc = ReadSourceLocation();
910  SourceLocation FieldLoc = ReadSourceLocation();
911  Designators.push_back(Designator(Name, DotLoc, FieldLoc));
912  break;
913  }
914 
915  case DESIG_ARRAY: {
916  unsigned Index = Record.readInt();
917  SourceLocation LBracketLoc = ReadSourceLocation();
918  SourceLocation RBracketLoc = ReadSourceLocation();
919  Designators.push_back(Designator(Index, LBracketLoc, RBracketLoc));
920  break;
921  }
922 
923  case DESIG_ARRAY_RANGE: {
924  unsigned Index = Record.readInt();
925  SourceLocation LBracketLoc = ReadSourceLocation();
926  SourceLocation EllipsisLoc = ReadSourceLocation();
927  SourceLocation RBracketLoc = ReadSourceLocation();
928  Designators.push_back(Designator(Index, LBracketLoc, EllipsisLoc,
929  RBracketLoc));
930  break;
931  }
932  }
933  }
934  E->setDesignators(Record.getContext(),
935  Designators.data(), Designators.size());
936 }
937 
938 void ASTStmtReader::VisitDesignatedInitUpdateExpr(DesignatedInitUpdateExpr *E) {
939  VisitExpr(E);
940  E->setBase(Record.readSubExpr());
941  E->setUpdater(Record.readSubExpr());
942 }
943 
944 void ASTStmtReader::VisitNoInitExpr(NoInitExpr *E) {
945  VisitExpr(E);
946 }
947 
948 void ASTStmtReader::VisitArrayInitLoopExpr(ArrayInitLoopExpr *E) {
949  VisitExpr(E);
950  E->SubExprs[0] = Record.readSubExpr();
951  E->SubExprs[1] = Record.readSubExpr();
952 }
953 
954 void ASTStmtReader::VisitArrayInitIndexExpr(ArrayInitIndexExpr *E) {
955  VisitExpr(E);
956 }
957 
958 void ASTStmtReader::VisitImplicitValueInitExpr(ImplicitValueInitExpr *E) {
959  VisitExpr(E);
960 }
961 
962 void ASTStmtReader::VisitVAArgExpr(VAArgExpr *E) {
963  VisitExpr(E);
964  E->setSubExpr(Record.readSubExpr());
965  E->setWrittenTypeInfo(GetTypeSourceInfo());
966  E->setBuiltinLoc(ReadSourceLocation());
967  E->setRParenLoc(ReadSourceLocation());
968  E->setIsMicrosoftABI(Record.readInt());
969 }
970 
971 void ASTStmtReader::VisitAddrLabelExpr(AddrLabelExpr *E) {
972  VisitExpr(E);
973  E->setAmpAmpLoc(ReadSourceLocation());
974  E->setLabelLoc(ReadSourceLocation());
975  E->setLabel(ReadDeclAs<LabelDecl>());
976 }
977 
978 void ASTStmtReader::VisitStmtExpr(StmtExpr *E) {
979  VisitExpr(E);
980  E->setLParenLoc(ReadSourceLocation());
981  E->setRParenLoc(ReadSourceLocation());
982  E->setSubStmt(cast_or_null<CompoundStmt>(Record.readSubStmt()));
983 }
984 
985 void ASTStmtReader::VisitChooseExpr(ChooseExpr *E) {
986  VisitExpr(E);
987  E->setCond(Record.readSubExpr());
988  E->setLHS(Record.readSubExpr());
989  E->setRHS(Record.readSubExpr());
990  E->setBuiltinLoc(ReadSourceLocation());
991  E->setRParenLoc(ReadSourceLocation());
992  E->setIsConditionTrue(Record.readInt());
993 }
994 
995 void ASTStmtReader::VisitGNUNullExpr(GNUNullExpr *E) {
996  VisitExpr(E);
997  E->setTokenLocation(ReadSourceLocation());
998 }
999 
1000 void ASTStmtReader::VisitShuffleVectorExpr(ShuffleVectorExpr *E) {
1001  VisitExpr(E);
1003  unsigned NumExprs = Record.readInt();
1004  while (NumExprs--)
1005  Exprs.push_back(Record.readSubExpr());
1006  E->setExprs(Record.getContext(), Exprs);
1007  E->setBuiltinLoc(ReadSourceLocation());
1008  E->setRParenLoc(ReadSourceLocation());
1009 }
1010 
1011 void ASTStmtReader::VisitConvertVectorExpr(ConvertVectorExpr *E) {
1012  VisitExpr(E);
1013  E->BuiltinLoc = ReadSourceLocation();
1014  E->RParenLoc = ReadSourceLocation();
1015  E->TInfo = GetTypeSourceInfo();
1016  E->SrcExpr = Record.readSubExpr();
1017 }
1018 
1019 void ASTStmtReader::VisitBlockExpr(BlockExpr *E) {
1020  VisitExpr(E);
1021  E->setBlockDecl(ReadDeclAs<BlockDecl>());
1022 }
1023 
1024 void ASTStmtReader::VisitGenericSelectionExpr(GenericSelectionExpr *E) {
1025  VisitExpr(E);
1026  E->NumAssocs = Record.readInt();
1027  E->AssocTypes = new (Record.getContext()) TypeSourceInfo*[E->NumAssocs];
1028  E->SubExprs =
1029  new(Record.getContext()) Stmt*[GenericSelectionExpr::END_EXPR+E->NumAssocs];
1030 
1031  E->SubExprs[GenericSelectionExpr::CONTROLLING] = Record.readSubExpr();
1032  for (unsigned I = 0, N = E->getNumAssocs(); I != N; ++I) {
1033  E->AssocTypes[I] = GetTypeSourceInfo();
1034  E->SubExprs[GenericSelectionExpr::END_EXPR+I] = Record.readSubExpr();
1035  }
1036  E->ResultIndex = Record.readInt();
1037 
1038  E->GenericLoc = ReadSourceLocation();
1039  E->DefaultLoc = ReadSourceLocation();
1040  E->RParenLoc = ReadSourceLocation();
1041 }
1042 
1043 void ASTStmtReader::VisitPseudoObjectExpr(PseudoObjectExpr *E) {
1044  VisitExpr(E);
1045  unsigned numSemanticExprs = Record.readInt();
1046  assert(numSemanticExprs + 1 == E->PseudoObjectExprBits.NumSubExprs);
1047  E->PseudoObjectExprBits.ResultIndex = Record.readInt();
1048 
1049  // Read the syntactic expression.
1050  E->getSubExprsBuffer()[0] = Record.readSubExpr();
1051 
1052  // Read all the semantic expressions.
1053  for (unsigned i = 0; i != numSemanticExprs; ++i) {
1054  Expr *subExpr = Record.readSubExpr();
1055  E->getSubExprsBuffer()[i+1] = subExpr;
1056  }
1057 }
1058 
1059 void ASTStmtReader::VisitAtomicExpr(AtomicExpr *E) {
1060  VisitExpr(E);
1061  E->Op = AtomicExpr::AtomicOp(Record.readInt());
1062  E->NumSubExprs = AtomicExpr::getNumSubExprs(E->Op);
1063  for (unsigned I = 0; I != E->NumSubExprs; ++I)
1064  E->SubExprs[I] = Record.readSubExpr();
1065  E->BuiltinLoc = ReadSourceLocation();
1066  E->RParenLoc = ReadSourceLocation();
1067 }
1068 
1069 //===----------------------------------------------------------------------===//
1070 // Objective-C Expressions and Statements
1071 
1072 void ASTStmtReader::VisitObjCStringLiteral(ObjCStringLiteral *E) {
1073  VisitExpr(E);
1074  E->setString(cast<StringLiteral>(Record.readSubStmt()));
1075  E->setAtLoc(ReadSourceLocation());
1076 }
1077 
1078 void ASTStmtReader::VisitObjCBoxedExpr(ObjCBoxedExpr *E) {
1079  VisitExpr(E);
1080  // could be one of several IntegerLiteral, FloatLiteral, etc.
1081  E->SubExpr = Record.readSubStmt();
1082  E->BoxingMethod = ReadDeclAs<ObjCMethodDecl>();
1083  E->Range = ReadSourceRange();
1084 }
1085 
1086 void ASTStmtReader::VisitObjCArrayLiteral(ObjCArrayLiteral *E) {
1087  VisitExpr(E);
1088  unsigned NumElements = Record.readInt();
1089  assert(NumElements == E->getNumElements() && "Wrong number of elements");
1090  Expr **Elements = E->getElements();
1091  for (unsigned I = 0, N = NumElements; I != N; ++I)
1092  Elements[I] = Record.readSubExpr();
1093  E->ArrayWithObjectsMethod = ReadDeclAs<ObjCMethodDecl>();
1094  E->Range = ReadSourceRange();
1095 }
1096 
1097 void ASTStmtReader::VisitObjCDictionaryLiteral(ObjCDictionaryLiteral *E) {
1098  VisitExpr(E);
1099  unsigned NumElements = Record.readInt();
1100  assert(NumElements == E->getNumElements() && "Wrong number of elements");
1101  bool HasPackExpansions = Record.readInt();
1102  assert(HasPackExpansions == E->HasPackExpansions &&"Pack expansion mismatch");
1103  auto *KeyValues =
1104  E->getTrailingObjects<ObjCDictionaryLiteral::KeyValuePair>();
1105  auto *Expansions =
1106  E->getTrailingObjects<ObjCDictionaryLiteral::ExpansionData>();
1107  for (unsigned I = 0; I != NumElements; ++I) {
1108  KeyValues[I].Key = Record.readSubExpr();
1109  KeyValues[I].Value = Record.readSubExpr();
1110  if (HasPackExpansions) {
1111  Expansions[I].EllipsisLoc = ReadSourceLocation();
1112  Expansions[I].NumExpansionsPlusOne = Record.readInt();
1113  }
1114  }
1115  E->DictWithObjectsMethod = ReadDeclAs<ObjCMethodDecl>();
1116  E->Range = ReadSourceRange();
1117 }
1118 
1119 void ASTStmtReader::VisitObjCEncodeExpr(ObjCEncodeExpr *E) {
1120  VisitExpr(E);
1121  E->setEncodedTypeSourceInfo(GetTypeSourceInfo());
1122  E->setAtLoc(ReadSourceLocation());
1123  E->setRParenLoc(ReadSourceLocation());
1124 }
1125 
1126 void ASTStmtReader::VisitObjCSelectorExpr(ObjCSelectorExpr *E) {
1127  VisitExpr(E);
1128  E->setSelector(Record.readSelector());
1129  E->setAtLoc(ReadSourceLocation());
1130  E->setRParenLoc(ReadSourceLocation());
1131 }
1132 
1133 void ASTStmtReader::VisitObjCProtocolExpr(ObjCProtocolExpr *E) {
1134  VisitExpr(E);
1135  E->setProtocol(ReadDeclAs<ObjCProtocolDecl>());
1136  E->setAtLoc(ReadSourceLocation());
1137  E->ProtoLoc = ReadSourceLocation();
1138  E->setRParenLoc(ReadSourceLocation());
1139 }
1140 
1141 void ASTStmtReader::VisitObjCIvarRefExpr(ObjCIvarRefExpr *E) {
1142  VisitExpr(E);
1143  E->setDecl(ReadDeclAs<ObjCIvarDecl>());
1144  E->setLocation(ReadSourceLocation());
1145  E->setOpLoc(ReadSourceLocation());
1146  E->setBase(Record.readSubExpr());
1147  E->setIsArrow(Record.readInt());
1148  E->setIsFreeIvar(Record.readInt());
1149 }
1150 
1151 void ASTStmtReader::VisitObjCPropertyRefExpr(ObjCPropertyRefExpr *E) {
1152  VisitExpr(E);
1153  unsigned MethodRefFlags = Record.readInt();
1154  bool Implicit = Record.readInt() != 0;
1155  if (Implicit) {
1156  auto *Getter = ReadDeclAs<ObjCMethodDecl>();
1157  auto *Setter = ReadDeclAs<ObjCMethodDecl>();
1158  E->setImplicitProperty(Getter, Setter, MethodRefFlags);
1159  } else {
1160  E->setExplicitProperty(ReadDeclAs<ObjCPropertyDecl>(), MethodRefFlags);
1161  }
1162  E->setLocation(ReadSourceLocation());
1163  E->setReceiverLocation(ReadSourceLocation());
1164  switch (Record.readInt()) {
1165  case 0:
1166  E->setBase(Record.readSubExpr());
1167  break;
1168  case 1:
1169  E->setSuperReceiver(Record.readType());
1170  break;
1171  case 2:
1172  E->setClassReceiver(ReadDeclAs<ObjCInterfaceDecl>());
1173  break;
1174  }
1175 }
1176 
1177 void ASTStmtReader::VisitObjCSubscriptRefExpr(ObjCSubscriptRefExpr *E) {
1178  VisitExpr(E);
1179  E->setRBracket(ReadSourceLocation());
1180  E->setBaseExpr(Record.readSubExpr());
1181  E->setKeyExpr(Record.readSubExpr());
1182  E->GetAtIndexMethodDecl = ReadDeclAs<ObjCMethodDecl>();
1183  E->SetAtIndexMethodDecl = ReadDeclAs<ObjCMethodDecl>();
1184 }
1185 
1186 void ASTStmtReader::VisitObjCMessageExpr(ObjCMessageExpr *E) {
1187  VisitExpr(E);
1188  assert(Record.peekInt() == E->getNumArgs());
1189  Record.skipInts(1);
1190  unsigned NumStoredSelLocs = Record.readInt();
1191  E->SelLocsKind = Record.readInt();
1192  E->setDelegateInitCall(Record.readInt());
1193  E->IsImplicit = Record.readInt();
1194  auto Kind = static_cast<ObjCMessageExpr::ReceiverKind>(Record.readInt());
1195  switch (Kind) {
1197  E->setInstanceReceiver(Record.readSubExpr());
1198  break;
1199 
1201  E->setClassReceiver(GetTypeSourceInfo());
1202  break;
1203 
1206  QualType T = Record.readType();
1207  SourceLocation SuperLoc = ReadSourceLocation();
1208  E->setSuper(SuperLoc, T, Kind == ObjCMessageExpr::SuperInstance);
1209  break;
1210  }
1211  }
1212 
1213  assert(Kind == E->getReceiverKind());
1214 
1215  if (Record.readInt())
1216  E->setMethodDecl(ReadDeclAs<ObjCMethodDecl>());
1217  else
1218  E->setSelector(Record.readSelector());
1219 
1220  E->LBracLoc = ReadSourceLocation();
1221  E->RBracLoc = ReadSourceLocation();
1222 
1223  for (unsigned I = 0, N = E->getNumArgs(); I != N; ++I)
1224  E->setArg(I, Record.readSubExpr());
1225 
1226  SourceLocation *Locs = E->getStoredSelLocs();
1227  for (unsigned I = 0; I != NumStoredSelLocs; ++I)
1228  Locs[I] = ReadSourceLocation();
1229 }
1230 
1231 void ASTStmtReader::VisitObjCForCollectionStmt(ObjCForCollectionStmt *S) {
1232  VisitStmt(S);
1233  S->setElement(Record.readSubStmt());
1234  S->setCollection(Record.readSubExpr());
1235  S->setBody(Record.readSubStmt());
1236  S->setForLoc(ReadSourceLocation());
1237  S->setRParenLoc(ReadSourceLocation());
1238 }
1239 
1240 void ASTStmtReader::VisitObjCAtCatchStmt(ObjCAtCatchStmt *S) {
1241  VisitStmt(S);
1242  S->setCatchBody(Record.readSubStmt());
1243  S->setCatchParamDecl(ReadDeclAs<VarDecl>());
1244  S->setAtCatchLoc(ReadSourceLocation());
1245  S->setRParenLoc(ReadSourceLocation());
1246 }
1247 
1248 void ASTStmtReader::VisitObjCAtFinallyStmt(ObjCAtFinallyStmt *S) {
1249  VisitStmt(S);
1250  S->setFinallyBody(Record.readSubStmt());
1251  S->setAtFinallyLoc(ReadSourceLocation());
1252 }
1253 
1254 void ASTStmtReader::VisitObjCAutoreleasePoolStmt(ObjCAutoreleasePoolStmt *S) {
1255  VisitStmt(S);
1256  S->setSubStmt(Record.readSubStmt());
1257  S->setAtLoc(ReadSourceLocation());
1258 }
1259 
1260 void ASTStmtReader::VisitObjCAtTryStmt(ObjCAtTryStmt *S) {
1261  VisitStmt(S);
1262  assert(Record.peekInt() == S->getNumCatchStmts());
1263  Record.skipInts(1);
1264  bool HasFinally = Record.readInt();
1265  S->setTryBody(Record.readSubStmt());
1266  for (unsigned I = 0, N = S->getNumCatchStmts(); I != N; ++I)
1267  S->setCatchStmt(I, cast_or_null<ObjCAtCatchStmt>(Record.readSubStmt()));
1268 
1269  if (HasFinally)
1270  S->setFinallyStmt(Record.readSubStmt());
1271  S->setAtTryLoc(ReadSourceLocation());
1272 }
1273 
1274 void ASTStmtReader::VisitObjCAtSynchronizedStmt(ObjCAtSynchronizedStmt *S) {
1275  VisitStmt(S);
1276  S->setSynchExpr(Record.readSubStmt());
1277  S->setSynchBody(Record.readSubStmt());
1278  S->setAtSynchronizedLoc(ReadSourceLocation());
1279 }
1280 
1281 void ASTStmtReader::VisitObjCAtThrowStmt(ObjCAtThrowStmt *S) {
1282  VisitStmt(S);
1283  S->setThrowExpr(Record.readSubStmt());
1284  S->setThrowLoc(ReadSourceLocation());
1285 }
1286 
1287 void ASTStmtReader::VisitObjCBoolLiteralExpr(ObjCBoolLiteralExpr *E) {
1288  VisitExpr(E);
1289  E->setValue(Record.readInt());
1290  E->setLocation(ReadSourceLocation());
1291 }
1292 
1293 void ASTStmtReader::VisitObjCAvailabilityCheckExpr(ObjCAvailabilityCheckExpr *E) {
1294  VisitExpr(E);
1295  SourceRange R = Record.readSourceRange();
1296  E->AtLoc = R.getBegin();
1297  E->RParen = R.getEnd();
1298  E->VersionToCheck = Record.readVersionTuple();
1299 }
1300 
1301 //===----------------------------------------------------------------------===//
1302 // C++ Expressions and Statements
1303 //===----------------------------------------------------------------------===//
1304 
1305 void ASTStmtReader::VisitCXXCatchStmt(CXXCatchStmt *S) {
1306  VisitStmt(S);
1307  S->CatchLoc = ReadSourceLocation();
1308  S->ExceptionDecl = ReadDeclAs<VarDecl>();
1309  S->HandlerBlock = Record.readSubStmt();
1310 }
1311 
1312 void ASTStmtReader::VisitCXXTryStmt(CXXTryStmt *S) {
1313  VisitStmt(S);
1314  assert(Record.peekInt() == S->getNumHandlers() && "NumStmtFields is wrong ?");
1315  Record.skipInts(1);
1316  S->TryLoc = ReadSourceLocation();
1317  S->getStmts()[0] = Record.readSubStmt();
1318  for (unsigned i = 0, e = S->getNumHandlers(); i != e; ++i)
1319  S->getStmts()[i + 1] = Record.readSubStmt();
1320 }
1321 
1322 void ASTStmtReader::VisitCXXForRangeStmt(CXXForRangeStmt *S) {
1323  VisitStmt(S);
1324  S->ForLoc = ReadSourceLocation();
1325  S->CoawaitLoc = ReadSourceLocation();
1326  S->ColonLoc = ReadSourceLocation();
1327  S->RParenLoc = ReadSourceLocation();
1328  S->setInit(Record.readSubStmt());
1329  S->setRangeStmt(Record.readSubStmt());
1330  S->setBeginStmt(Record.readSubStmt());
1331  S->setEndStmt(Record.readSubStmt());
1332  S->setCond(Record.readSubExpr());
1333  S->setInc(Record.readSubExpr());
1334  S->setLoopVarStmt(Record.readSubStmt());
1335  S->setBody(Record.readSubStmt());
1336 }
1337 
1338 void ASTStmtReader::VisitMSDependentExistsStmt(MSDependentExistsStmt *S) {
1339  VisitStmt(S);
1340  S->KeywordLoc = ReadSourceLocation();
1341  S->IsIfExists = Record.readInt();
1342  S->QualifierLoc = Record.readNestedNameSpecifierLoc();
1343  ReadDeclarationNameInfo(S->NameInfo);
1344  S->SubStmt = Record.readSubStmt();
1345 }
1346 
1347 void ASTStmtReader::VisitCXXOperatorCallExpr(CXXOperatorCallExpr *E) {
1348  VisitCallExpr(E);
1349  E->CXXOperatorCallExprBits.OperatorKind = Record.readInt();
1350  E->CXXOperatorCallExprBits.FPFeatures = Record.readInt();
1351  E->Range = Record.readSourceRange();
1352 }
1353 
1354 void ASTStmtReader::VisitCXXConstructExpr(CXXConstructExpr *E) {
1355  VisitExpr(E);
1356 
1357  unsigned NumArgs = Record.readInt();
1358  assert((NumArgs == E->getNumArgs()) && "Wrong NumArgs!");
1359 
1360  E->CXXConstructExprBits.Elidable = Record.readInt();
1361  E->CXXConstructExprBits.HadMultipleCandidates = Record.readInt();
1362  E->CXXConstructExprBits.ListInitialization = Record.readInt();
1363  E->CXXConstructExprBits.StdInitListInitialization = Record.readInt();
1364  E->CXXConstructExprBits.ZeroInitialization = Record.readInt();
1365  E->CXXConstructExprBits.ConstructionKind = Record.readInt();
1366  E->CXXConstructExprBits.Loc = ReadSourceLocation();
1367  E->Constructor = ReadDeclAs<CXXConstructorDecl>();
1368  E->ParenOrBraceRange = ReadSourceRange();
1369 
1370  for (unsigned I = 0; I != NumArgs; ++I)
1371  E->setArg(I, Record.readSubExpr());
1372 }
1373 
1374 void ASTStmtReader::VisitCXXInheritedCtorInitExpr(CXXInheritedCtorInitExpr *E) {
1375  VisitExpr(E);
1376  E->Constructor = ReadDeclAs<CXXConstructorDecl>();
1377  E->Loc = ReadSourceLocation();
1378  E->ConstructsVirtualBase = Record.readInt();
1379  E->InheritedFromVirtualBase = Record.readInt();
1380 }
1381 
1382 void ASTStmtReader::VisitCXXTemporaryObjectExpr(CXXTemporaryObjectExpr *E) {
1383  VisitCXXConstructExpr(E);
1384  E->TSI = GetTypeSourceInfo();
1385 }
1386 
1387 void ASTStmtReader::VisitLambdaExpr(LambdaExpr *E) {
1388  VisitExpr(E);
1389  unsigned NumCaptures = Record.readInt();
1390  assert(NumCaptures == E->NumCaptures);(void)NumCaptures;
1391  E->IntroducerRange = ReadSourceRange();
1392  E->CaptureDefault = static_cast<LambdaCaptureDefault>(Record.readInt());
1393  E->CaptureDefaultLoc = ReadSourceLocation();
1394  E->ExplicitParams = Record.readInt();
1395  E->ExplicitResultType = Record.readInt();
1396  E->ClosingBrace = ReadSourceLocation();
1397 
1398  // Read capture initializers.
1400  CEnd = E->capture_init_end();
1401  C != CEnd; ++C)
1402  *C = Record.readSubExpr();
1403 }
1404 
1405 void
1406 ASTStmtReader::VisitCXXStdInitializerListExpr(CXXStdInitializerListExpr *E) {
1407  VisitExpr(E);
1408  E->SubExpr = Record.readSubExpr();
1409 }
1410 
1411 void ASTStmtReader::VisitCXXNamedCastExpr(CXXNamedCastExpr *E) {
1412  VisitExplicitCastExpr(E);
1413  SourceRange R = ReadSourceRange();
1414  E->Loc = R.getBegin();
1415  E->RParenLoc = R.getEnd();
1416  R = ReadSourceRange();
1417  E->AngleBrackets = R;
1418 }
1419 
1420 void ASTStmtReader::VisitCXXStaticCastExpr(CXXStaticCastExpr *E) {
1421  return VisitCXXNamedCastExpr(E);
1422 }
1423 
1424 void ASTStmtReader::VisitCXXDynamicCastExpr(CXXDynamicCastExpr *E) {
1425  return VisitCXXNamedCastExpr(E);
1426 }
1427 
1428 void ASTStmtReader::VisitCXXReinterpretCastExpr(CXXReinterpretCastExpr *E) {
1429  return VisitCXXNamedCastExpr(E);
1430 }
1431 
1432 void ASTStmtReader::VisitCXXConstCastExpr(CXXConstCastExpr *E) {
1433  return VisitCXXNamedCastExpr(E);
1434 }
1435 
1436 void ASTStmtReader::VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr *E) {
1437  VisitExplicitCastExpr(E);
1438  E->setLParenLoc(ReadSourceLocation());
1439  E->setRParenLoc(ReadSourceLocation());
1440 }
1441 
1442 void ASTStmtReader::VisitUserDefinedLiteral(UserDefinedLiteral *E) {
1443  VisitCallExpr(E);
1444  E->UDSuffixLoc = ReadSourceLocation();
1445 }
1446 
1447 void ASTStmtReader::VisitCXXBoolLiteralExpr(CXXBoolLiteralExpr *E) {
1448  VisitExpr(E);
1449  E->setValue(Record.readInt());
1450  E->setLocation(ReadSourceLocation());
1451 }
1452 
1453 void ASTStmtReader::VisitCXXNullPtrLiteralExpr(CXXNullPtrLiteralExpr *E) {
1454  VisitExpr(E);
1455  E->setLocation(ReadSourceLocation());
1456 }
1457 
1458 void ASTStmtReader::VisitCXXTypeidExpr(CXXTypeidExpr *E) {
1459  VisitExpr(E);
1460  E->setSourceRange(ReadSourceRange());
1461  if (E->isTypeOperand()) { // typeid(int)
1463  GetTypeSourceInfo());
1464  return;
1465  }
1466 
1467  // typeid(42+2)
1468  E->setExprOperand(Record.readSubExpr());
1469 }
1470 
1471 void ASTStmtReader::VisitCXXThisExpr(CXXThisExpr *E) {
1472  VisitExpr(E);
1473  E->setLocation(ReadSourceLocation());
1474  E->setImplicit(Record.readInt());
1475 }
1476 
1477 void ASTStmtReader::VisitCXXThrowExpr(CXXThrowExpr *E) {
1478  VisitExpr(E);
1479  E->CXXThrowExprBits.ThrowLoc = ReadSourceLocation();
1480  E->Operand = Record.readSubExpr();
1481  E->CXXThrowExprBits.IsThrownVariableInScope = Record.readInt();
1482 }
1483 
1484 void ASTStmtReader::VisitCXXDefaultArgExpr(CXXDefaultArgExpr *E) {
1485  VisitExpr(E);
1486  E->Param = ReadDeclAs<ParmVarDecl>();
1487  E->CXXDefaultArgExprBits.Loc = ReadSourceLocation();
1488 }
1489 
1490 void ASTStmtReader::VisitCXXDefaultInitExpr(CXXDefaultInitExpr *E) {
1491  VisitExpr(E);
1492  E->Field = ReadDeclAs<FieldDecl>();
1493  E->CXXDefaultInitExprBits.Loc = ReadSourceLocation();
1494 }
1495 
1496 void ASTStmtReader::VisitCXXBindTemporaryExpr(CXXBindTemporaryExpr *E) {
1497  VisitExpr(E);
1498  E->setTemporary(Record.readCXXTemporary());
1499  E->setSubExpr(Record.readSubExpr());
1500 }
1501 
1502 void ASTStmtReader::VisitCXXScalarValueInitExpr(CXXScalarValueInitExpr *E) {
1503  VisitExpr(E);
1504  E->TypeInfo = GetTypeSourceInfo();
1505  E->CXXScalarValueInitExprBits.RParenLoc = ReadSourceLocation();
1506 }
1507 
1508 void ASTStmtReader::VisitCXXNewExpr(CXXNewExpr *E) {
1509  VisitExpr(E);
1510 
1511  bool IsArray = Record.readInt();
1512  bool HasInit = Record.readInt();
1513  unsigned NumPlacementArgs = Record.readInt();
1514  bool IsParenTypeId = Record.readInt();
1515 
1516  E->CXXNewExprBits.IsGlobalNew = Record.readInt();
1517  E->CXXNewExprBits.ShouldPassAlignment = Record.readInt();
1518  E->CXXNewExprBits.UsualArrayDeleteWantsSize = Record.readInt();
1519  E->CXXNewExprBits.StoredInitializationStyle = Record.readInt();
1520 
1521  assert((IsArray == E->isArray()) && "Wrong IsArray!");
1522  assert((HasInit == E->hasInitializer()) && "Wrong HasInit!");
1523  assert((NumPlacementArgs == E->getNumPlacementArgs()) &&
1524  "Wrong NumPlacementArgs!");
1525  assert((IsParenTypeId == E->isParenTypeId()) && "Wrong IsParenTypeId!");
1526  (void)IsArray;
1527  (void)HasInit;
1528  (void)NumPlacementArgs;
1529 
1530  E->setOperatorNew(ReadDeclAs<FunctionDecl>());
1531  E->setOperatorDelete(ReadDeclAs<FunctionDecl>());
1532  E->AllocatedTypeInfo = GetTypeSourceInfo();
1533  if (IsParenTypeId)
1534  E->getTrailingObjects<SourceRange>()[0] = ReadSourceRange();
1535  E->Range = ReadSourceRange();
1536  E->DirectInitRange = ReadSourceRange();
1537 
1538  // Install all the subexpressions.
1540  N = E->raw_arg_end();
1541  I != N; ++I)
1542  *I = Record.readSubStmt();
1543 }
1544 
1545 void ASTStmtReader::VisitCXXDeleteExpr(CXXDeleteExpr *E) {
1546  VisitExpr(E);
1547  E->CXXDeleteExprBits.GlobalDelete = Record.readInt();
1548  E->CXXDeleteExprBits.ArrayForm = Record.readInt();
1549  E->CXXDeleteExprBits.ArrayFormAsWritten = Record.readInt();
1550  E->CXXDeleteExprBits.UsualArrayDeleteWantsSize = Record.readInt();
1551  E->OperatorDelete = ReadDeclAs<FunctionDecl>();
1552  E->Argument = Record.readSubExpr();
1553  E->CXXDeleteExprBits.Loc = ReadSourceLocation();
1554 }
1555 
1556 void ASTStmtReader::VisitCXXPseudoDestructorExpr(CXXPseudoDestructorExpr *E) {
1557  VisitExpr(E);
1558 
1559  E->Base = Record.readSubExpr();
1560  E->IsArrow = Record.readInt();
1561  E->OperatorLoc = ReadSourceLocation();
1562  E->QualifierLoc = Record.readNestedNameSpecifierLoc();
1563  E->ScopeType = GetTypeSourceInfo();
1564  E->ColonColonLoc = ReadSourceLocation();
1565  E->TildeLoc = ReadSourceLocation();
1566 
1567  IdentifierInfo *II = Record.getIdentifierInfo();
1568  if (II)
1569  E->setDestroyedType(II, ReadSourceLocation());
1570  else
1571  E->setDestroyedType(GetTypeSourceInfo());
1572 }
1573 
1574 void ASTStmtReader::VisitExprWithCleanups(ExprWithCleanups *E) {
1575  VisitExpr(E);
1576 
1577  unsigned NumObjects = Record.readInt();
1578  assert(NumObjects == E->getNumObjects());
1579  for (unsigned i = 0; i != NumObjects; ++i)
1580  E->getTrailingObjects<BlockDecl *>()[i] =
1581  ReadDeclAs<BlockDecl>();
1582 
1583  E->ExprWithCleanupsBits.CleanupsHaveSideEffects = Record.readInt();
1584  E->SubExpr = Record.readSubExpr();
1585 }
1586 
1587 void ASTStmtReader::VisitCXXDependentScopeMemberExpr(
1589  VisitExpr(E);
1590 
1591  bool HasTemplateKWAndArgsInfo = Record.readInt();
1592  unsigned NumTemplateArgs = Record.readInt();
1593  bool HasFirstQualifierFoundInScope = Record.readInt();
1594 
1595  assert((HasTemplateKWAndArgsInfo == E->hasTemplateKWAndArgsInfo()) &&
1596  "Wrong HasTemplateKWAndArgsInfo!");
1597  assert(
1598  (HasFirstQualifierFoundInScope == E->hasFirstQualifierFoundInScope()) &&
1599  "Wrong HasFirstQualifierFoundInScope!");
1600 
1601  if (HasTemplateKWAndArgsInfo)
1602  ReadTemplateKWAndArgsInfo(
1603  *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>(),
1604  E->getTrailingObjects<TemplateArgumentLoc>(), NumTemplateArgs);
1605 
1606  assert((NumTemplateArgs == E->getNumTemplateArgs()) &&
1607  "Wrong NumTemplateArgs!");
1608 
1609  E->CXXDependentScopeMemberExprBits.IsArrow = Record.readInt();
1610  E->CXXDependentScopeMemberExprBits.OperatorLoc = ReadSourceLocation();
1611  E->BaseType = Record.readType();
1612  E->QualifierLoc = Record.readNestedNameSpecifierLoc();
1613  E->Base = Record.readSubExpr();
1614 
1615  if (HasFirstQualifierFoundInScope)
1616  *E->getTrailingObjects<NamedDecl *>() = ReadDeclAs<NamedDecl>();
1617 
1618  ReadDeclarationNameInfo(E->MemberNameInfo);
1619 }
1620 
1621 void
1622 ASTStmtReader::VisitDependentScopeDeclRefExpr(DependentScopeDeclRefExpr *E) {
1623  VisitExpr(E);
1624 
1625  if (Record.readInt()) // HasTemplateKWAndArgsInfo
1626  ReadTemplateKWAndArgsInfo(
1627  *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>(),
1628  E->getTrailingObjects<TemplateArgumentLoc>(),
1629  /*NumTemplateArgs=*/Record.readInt());
1630 
1631  E->QualifierLoc = Record.readNestedNameSpecifierLoc();
1632  ReadDeclarationNameInfo(E->NameInfo);
1633 }
1634 
1635 void
1636 ASTStmtReader::VisitCXXUnresolvedConstructExpr(CXXUnresolvedConstructExpr *E) {
1637  VisitExpr(E);
1638  assert(Record.peekInt() == E->arg_size() &&
1639  "Read wrong record during creation ?");
1640  Record.skipInts(1);
1641  for (unsigned I = 0, N = E->arg_size(); I != N; ++I)
1642  E->setArg(I, Record.readSubExpr());
1643  E->TSI = GetTypeSourceInfo();
1644  E->setLParenLoc(ReadSourceLocation());
1645  E->setRParenLoc(ReadSourceLocation());
1646 }
1647 
1648 void ASTStmtReader::VisitOverloadExpr(OverloadExpr *E) {
1649  VisitExpr(E);
1650 
1651  unsigned NumResults = Record.readInt();
1652  bool HasTemplateKWAndArgsInfo = Record.readInt();
1653  assert((E->getNumDecls() == NumResults) && "Wrong NumResults!");
1654  assert((E->hasTemplateKWAndArgsInfo() == HasTemplateKWAndArgsInfo) &&
1655  "Wrong HasTemplateKWAndArgsInfo!");
1656 
1657  if (HasTemplateKWAndArgsInfo) {
1658  unsigned NumTemplateArgs = Record.readInt();
1659  ReadTemplateKWAndArgsInfo(*E->getTrailingASTTemplateKWAndArgsInfo(),
1661  NumTemplateArgs);
1662  assert((E->getNumTemplateArgs() == NumTemplateArgs) &&
1663  "Wrong NumTemplateArgs!");
1664  }
1665 
1666  UnresolvedSet<8> Decls;
1667  for (unsigned I = 0; I != NumResults; ++I) {
1668  auto *D = ReadDeclAs<NamedDecl>();
1669  auto AS = (AccessSpecifier)Record.readInt();
1670  Decls.addDecl(D, AS);
1671  }
1672 
1673  DeclAccessPair *Results = E->getTrailingResults();
1674  UnresolvedSetIterator Iter = Decls.begin();
1675  for (unsigned I = 0; I != NumResults; ++I) {
1676  Results[I] = (Iter + I).getPair();
1677  }
1678 
1679  ReadDeclarationNameInfo(E->NameInfo);
1680  E->QualifierLoc = Record.readNestedNameSpecifierLoc();
1681 }
1682 
1683 void ASTStmtReader::VisitUnresolvedMemberExpr(UnresolvedMemberExpr *E) {
1684  VisitOverloadExpr(E);
1685  E->UnresolvedMemberExprBits.IsArrow = Record.readInt();
1686  E->UnresolvedMemberExprBits.HasUnresolvedUsing = Record.readInt();
1687  E->Base = Record.readSubExpr();
1688  E->BaseType = Record.readType();
1689  E->OperatorLoc = ReadSourceLocation();
1690 }
1691 
1692 void ASTStmtReader::VisitUnresolvedLookupExpr(UnresolvedLookupExpr *E) {
1693  VisitOverloadExpr(E);
1694  E->UnresolvedLookupExprBits.RequiresADL = Record.readInt();
1695  E->UnresolvedLookupExprBits.Overloaded = Record.readInt();
1696  E->NamingClass = ReadDeclAs<CXXRecordDecl>();
1697 }
1698 
1699 void ASTStmtReader::VisitTypeTraitExpr(TypeTraitExpr *E) {
1700  VisitExpr(E);
1701  E->TypeTraitExprBits.NumArgs = Record.readInt();
1702  E->TypeTraitExprBits.Kind = Record.readInt();
1703  E->TypeTraitExprBits.Value = Record.readInt();
1704  SourceRange Range = ReadSourceRange();
1705  E->Loc = Range.getBegin();
1706  E->RParenLoc = Range.getEnd();
1707 
1708  auto **Args = E->getTrailingObjects<TypeSourceInfo *>();
1709  for (unsigned I = 0, N = E->getNumArgs(); I != N; ++I)
1710  Args[I] = GetTypeSourceInfo();
1711 }
1712 
1713 void ASTStmtReader::VisitArrayTypeTraitExpr(ArrayTypeTraitExpr *E) {
1714  VisitExpr(E);
1715  E->ATT = (ArrayTypeTrait)Record.readInt();
1716  E->Value = (unsigned int)Record.readInt();
1717  SourceRange Range = ReadSourceRange();
1718  E->Loc = Range.getBegin();
1719  E->RParen = Range.getEnd();
1720  E->QueriedType = GetTypeSourceInfo();
1721  E->Dimension = Record.readSubExpr();
1722 }
1723 
1724 void ASTStmtReader::VisitExpressionTraitExpr(ExpressionTraitExpr *E) {
1725  VisitExpr(E);
1726  E->ET = (ExpressionTrait)Record.readInt();
1727  E->Value = (bool)Record.readInt();
1728  SourceRange Range = ReadSourceRange();
1729  E->QueriedExpression = Record.readSubExpr();
1730  E->Loc = Range.getBegin();
1731  E->RParen = Range.getEnd();
1732 }
1733 
1734 void ASTStmtReader::VisitCXXNoexceptExpr(CXXNoexceptExpr *E) {
1735  VisitExpr(E);
1736  E->CXXNoexceptExprBits.Value = Record.readInt();
1737  E->Range = ReadSourceRange();
1738  E->Operand = Record.readSubExpr();
1739 }
1740 
1741 void ASTStmtReader::VisitPackExpansionExpr(PackExpansionExpr *E) {
1742  VisitExpr(E);
1743  E->EllipsisLoc = ReadSourceLocation();
1744  E->NumExpansions = Record.readInt();
1745  E->Pattern = Record.readSubExpr();
1746 }
1747 
1748 void ASTStmtReader::VisitSizeOfPackExpr(SizeOfPackExpr *E) {
1749  VisitExpr(E);
1750  unsigned NumPartialArgs = Record.readInt();
1751  E->OperatorLoc = ReadSourceLocation();
1752  E->PackLoc = ReadSourceLocation();
1753  E->RParenLoc = ReadSourceLocation();
1754  E->Pack = Record.readDeclAs<NamedDecl>();
1755  if (E->isPartiallySubstituted()) {
1756  assert(E->Length == NumPartialArgs);
1757  for (auto *I = E->getTrailingObjects<TemplateArgument>(),
1758  *E = I + NumPartialArgs;
1759  I != E; ++I)
1760  new (I) TemplateArgument(Record.readTemplateArgument());
1761  } else if (!E->isValueDependent()) {
1762  E->Length = Record.readInt();
1763  }
1764 }
1765 
1766 void ASTStmtReader::VisitSubstNonTypeTemplateParmExpr(
1768  VisitExpr(E);
1769  E->Param = ReadDeclAs<NonTypeTemplateParmDecl>();
1770  E->SubstNonTypeTemplateParmExprBits.NameLoc = ReadSourceLocation();
1771  E->Replacement = Record.readSubExpr();
1772 }
1773 
1774 void ASTStmtReader::VisitSubstNonTypeTemplateParmPackExpr(
1776  VisitExpr(E);
1777  E->Param = ReadDeclAs<NonTypeTemplateParmDecl>();
1778  TemplateArgument ArgPack = Record.readTemplateArgument();
1779  if (ArgPack.getKind() != TemplateArgument::Pack)
1780  return;
1781 
1782  E->Arguments = ArgPack.pack_begin();
1783  E->NumArguments = ArgPack.pack_size();
1784  E->NameLoc = ReadSourceLocation();
1785 }
1786 
1787 void ASTStmtReader::VisitFunctionParmPackExpr(FunctionParmPackExpr *E) {
1788  VisitExpr(E);
1789  E->NumParameters = Record.readInt();
1790  E->ParamPack = ReadDeclAs<ParmVarDecl>();
1791  E->NameLoc = ReadSourceLocation();
1792  auto **Parms = E->getTrailingObjects<ParmVarDecl *>();
1793  for (unsigned i = 0, n = E->NumParameters; i != n; ++i)
1794  Parms[i] = ReadDeclAs<ParmVarDecl>();
1795 }
1796 
1797 void ASTStmtReader::VisitMaterializeTemporaryExpr(MaterializeTemporaryExpr *E) {
1798  VisitExpr(E);
1799  E->State = Record.readSubExpr();
1800  auto *VD = ReadDeclAs<ValueDecl>();
1801  unsigned ManglingNumber = Record.readInt();
1802  E->setExtendingDecl(VD, ManglingNumber);
1803 }
1804 
1805 void ASTStmtReader::VisitCXXFoldExpr(CXXFoldExpr *E) {
1806  VisitExpr(E);
1807  E->LParenLoc = ReadSourceLocation();
1808  E->EllipsisLoc = ReadSourceLocation();
1809  E->RParenLoc = ReadSourceLocation();
1810  E->SubExprs[0] = Record.readSubExpr();
1811  E->SubExprs[1] = Record.readSubExpr();
1812  E->Opcode = (BinaryOperatorKind)Record.readInt();
1813 }
1814 
1815 void ASTStmtReader::VisitOpaqueValueExpr(OpaqueValueExpr *E) {
1816  VisitExpr(E);
1817  E->SourceExpr = Record.readSubExpr();
1818  E->OpaqueValueExprBits.Loc = ReadSourceLocation();
1819  E->setIsUnique(Record.readInt());
1820 }
1821 
1822 void ASTStmtReader::VisitTypoExpr(TypoExpr *E) {
1823  llvm_unreachable("Cannot read TypoExpr nodes");
1824 }
1825 
1826 //===----------------------------------------------------------------------===//
1827 // Microsoft Expressions and Statements
1828 //===----------------------------------------------------------------------===//
1829 void ASTStmtReader::VisitMSPropertyRefExpr(MSPropertyRefExpr *E) {
1830  VisitExpr(E);
1831  E->IsArrow = (Record.readInt() != 0);
1832  E->BaseExpr = Record.readSubExpr();
1833  E->QualifierLoc = Record.readNestedNameSpecifierLoc();
1834  E->MemberLoc = ReadSourceLocation();
1835  E->TheDecl = ReadDeclAs<MSPropertyDecl>();
1836 }
1837 
1838 void ASTStmtReader::VisitMSPropertySubscriptExpr(MSPropertySubscriptExpr *E) {
1839  VisitExpr(E);
1840  E->setBase(Record.readSubExpr());
1841  E->setIdx(Record.readSubExpr());
1842  E->setRBracketLoc(ReadSourceLocation());
1843 }
1844 
1845 void ASTStmtReader::VisitCXXUuidofExpr(CXXUuidofExpr *E) {
1846  VisitExpr(E);
1847  E->setSourceRange(ReadSourceRange());
1848  std::string UuidStr = ReadString();
1849  E->setUuidStr(StringRef(UuidStr).copy(Record.getContext()));
1850  if (E->isTypeOperand()) { // __uuidof(ComType)
1852  GetTypeSourceInfo());
1853  return;
1854  }
1855 
1856  // __uuidof(expr)
1857  E->setExprOperand(Record.readSubExpr());
1858 }
1859 
1860 void ASTStmtReader::VisitSEHLeaveStmt(SEHLeaveStmt *S) {
1861  VisitStmt(S);
1862  S->setLeaveLoc(ReadSourceLocation());
1863 }
1864 
1865 void ASTStmtReader::VisitSEHExceptStmt(SEHExceptStmt *S) {
1866  VisitStmt(S);
1867  S->Loc = ReadSourceLocation();
1868  S->Children[SEHExceptStmt::FILTER_EXPR] = Record.readSubStmt();
1869  S->Children[SEHExceptStmt::BLOCK] = Record.readSubStmt();
1870 }
1871 
1872 void ASTStmtReader::VisitSEHFinallyStmt(SEHFinallyStmt *S) {
1873  VisitStmt(S);
1874  S->Loc = ReadSourceLocation();
1875  S->Block = Record.readSubStmt();
1876 }
1877 
1878 void ASTStmtReader::VisitSEHTryStmt(SEHTryStmt *S) {
1879  VisitStmt(S);
1880  S->IsCXXTry = Record.readInt();
1881  S->TryLoc = ReadSourceLocation();
1882  S->Children[SEHTryStmt::TRY] = Record.readSubStmt();
1883  S->Children[SEHTryStmt::HANDLER] = Record.readSubStmt();
1884 }
1885 
1886 //===----------------------------------------------------------------------===//
1887 // CUDA Expressions and Statements
1888 //===----------------------------------------------------------------------===//
1889 
1890 void ASTStmtReader::VisitCUDAKernelCallExpr(CUDAKernelCallExpr *E) {
1891  VisitCallExpr(E);
1892  E->setConfig(cast<CallExpr>(Record.readSubExpr()));
1893 }
1894 
1895 //===----------------------------------------------------------------------===//
1896 // OpenCL Expressions and Statements.
1897 //===----------------------------------------------------------------------===//
1898 void ASTStmtReader::VisitAsTypeExpr(AsTypeExpr *E) {
1899  VisitExpr(E);
1900  E->BuiltinLoc = ReadSourceLocation();
1901  E->RParenLoc = ReadSourceLocation();
1902  E->SrcExpr = Record.readSubExpr();
1903 }
1904 
1905 //===----------------------------------------------------------------------===//
1906 // OpenMP Directives.
1907 //===----------------------------------------------------------------------===//
1908 
1909 void ASTStmtReader::VisitOMPExecutableDirective(OMPExecutableDirective *E) {
1910  E->setLocStart(ReadSourceLocation());
1911  E->setLocEnd(ReadSourceLocation());
1912  OMPClauseReader ClauseReader(Record);
1914  for (unsigned i = 0; i < E->getNumClauses(); ++i)
1915  Clauses.push_back(ClauseReader.readClause());
1916  E->setClauses(Clauses);
1917  if (E->hasAssociatedStmt())
1918  E->setAssociatedStmt(Record.readSubStmt());
1919 }
1920 
1921 void ASTStmtReader::VisitOMPLoopDirective(OMPLoopDirective *D) {
1922  VisitStmt(D);
1923  // Two fields (NumClauses and CollapsedNum) were read in ReadStmtFromStream.
1924  Record.skipInts(2);
1925  VisitOMPExecutableDirective(D);
1926  D->setIterationVariable(Record.readSubExpr());
1927  D->setLastIteration(Record.readSubExpr());
1928  D->setCalcLastIteration(Record.readSubExpr());
1929  D->setPreCond(Record.readSubExpr());
1930  D->setCond(Record.readSubExpr());
1931  D->setInit(Record.readSubExpr());
1932  D->setInc(Record.readSubExpr());
1933  D->setPreInits(Record.readSubStmt());
1937  D->setIsLastIterVariable(Record.readSubExpr());
1938  D->setLowerBoundVariable(Record.readSubExpr());
1939  D->setUpperBoundVariable(Record.readSubExpr());
1940  D->setStrideVariable(Record.readSubExpr());
1941  D->setEnsureUpperBound(Record.readSubExpr());
1942  D->setNextLowerBound(Record.readSubExpr());
1943  D->setNextUpperBound(Record.readSubExpr());
1944  D->setNumIterations(Record.readSubExpr());
1945  }
1949  D->setDistInc(Record.readSubExpr());
1950  D->setPrevEnsureUpperBound(Record.readSubExpr());
1954  D->setCombinedInit(Record.readSubExpr());
1955  D->setCombinedCond(Record.readSubExpr());
1958  D->setCombinedDistCond(Record.readSubExpr());
1960  }
1962  unsigned CollapsedNum = D->getCollapsedNumber();
1963  Sub.reserve(CollapsedNum);
1964  for (unsigned i = 0; i < CollapsedNum; ++i)
1965  Sub.push_back(Record.readSubExpr());
1966  D->setCounters(Sub);
1967  Sub.clear();
1968  for (unsigned i = 0; i < CollapsedNum; ++i)
1969  Sub.push_back(Record.readSubExpr());
1970  D->setPrivateCounters(Sub);
1971  Sub.clear();
1972  for (unsigned i = 0; i < CollapsedNum; ++i)
1973  Sub.push_back(Record.readSubExpr());
1974  D->setInits(Sub);
1975  Sub.clear();
1976  for (unsigned i = 0; i < CollapsedNum; ++i)
1977  Sub.push_back(Record.readSubExpr());
1978  D->setUpdates(Sub);
1979  Sub.clear();
1980  for (unsigned i = 0; i < CollapsedNum; ++i)
1981  Sub.push_back(Record.readSubExpr());
1982  D->setFinals(Sub);
1983 }
1984 
1985 void ASTStmtReader::VisitOMPParallelDirective(OMPParallelDirective *D) {
1986  VisitStmt(D);
1987  // The NumClauses field was read in ReadStmtFromStream.
1988  Record.skipInts(1);
1989  VisitOMPExecutableDirective(D);
1990  D->setHasCancel(Record.readInt());
1991 }
1992 
1993 void ASTStmtReader::VisitOMPSimdDirective(OMPSimdDirective *D) {
1994  VisitOMPLoopDirective(D);
1995 }
1996 
1997 void ASTStmtReader::VisitOMPForDirective(OMPForDirective *D) {
1998  VisitOMPLoopDirective(D);
1999  D->setHasCancel(Record.readInt());
2000 }
2001 
2002 void ASTStmtReader::VisitOMPForSimdDirective(OMPForSimdDirective *D) {
2003  VisitOMPLoopDirective(D);
2004 }
2005 
2006 void ASTStmtReader::VisitOMPSectionsDirective(OMPSectionsDirective *D) {
2007  VisitStmt(D);
2008  // The NumClauses field was read in ReadStmtFromStream.
2009  Record.skipInts(1);
2010  VisitOMPExecutableDirective(D);
2011  D->setHasCancel(Record.readInt());
2012 }
2013 
2014 void ASTStmtReader::VisitOMPSectionDirective(OMPSectionDirective *D) {
2015  VisitStmt(D);
2016  VisitOMPExecutableDirective(D);
2017  D->setHasCancel(Record.readInt());
2018 }
2019 
2020 void ASTStmtReader::VisitOMPSingleDirective(OMPSingleDirective *D) {
2021  VisitStmt(D);
2022  // The NumClauses field was read in ReadStmtFromStream.
2023  Record.skipInts(1);
2024  VisitOMPExecutableDirective(D);
2025 }
2026 
2027 void ASTStmtReader::VisitOMPMasterDirective(OMPMasterDirective *D) {
2028  VisitStmt(D);
2029  VisitOMPExecutableDirective(D);
2030 }
2031 
2032 void ASTStmtReader::VisitOMPCriticalDirective(OMPCriticalDirective *D) {
2033  VisitStmt(D);
2034  // The NumClauses field was read in ReadStmtFromStream.
2035  Record.skipInts(1);
2036  VisitOMPExecutableDirective(D);
2037  ReadDeclarationNameInfo(D->DirName);
2038 }
2039 
2040 void ASTStmtReader::VisitOMPParallelForDirective(OMPParallelForDirective *D) {
2041  VisitOMPLoopDirective(D);
2042  D->setHasCancel(Record.readInt());
2043 }
2044 
2045 void ASTStmtReader::VisitOMPParallelForSimdDirective(
2047  VisitOMPLoopDirective(D);
2048 }
2049 
2050 void ASTStmtReader::VisitOMPParallelSectionsDirective(
2052  VisitStmt(D);
2053  // The NumClauses field was read in ReadStmtFromStream.
2054  Record.skipInts(1);
2055  VisitOMPExecutableDirective(D);
2056  D->setHasCancel(Record.readInt());
2057 }
2058 
2059 void ASTStmtReader::VisitOMPTaskDirective(OMPTaskDirective *D) {
2060  VisitStmt(D);
2061  // The NumClauses field was read in ReadStmtFromStream.
2062  Record.skipInts(1);
2063  VisitOMPExecutableDirective(D);
2064  D->setHasCancel(Record.readInt());
2065 }
2066 
2067 void ASTStmtReader::VisitOMPTaskyieldDirective(OMPTaskyieldDirective *D) {
2068  VisitStmt(D);
2069  VisitOMPExecutableDirective(D);
2070 }
2071 
2072 void ASTStmtReader::VisitOMPBarrierDirective(OMPBarrierDirective *D) {
2073  VisitStmt(D);
2074  VisitOMPExecutableDirective(D);
2075 }
2076 
2077 void ASTStmtReader::VisitOMPTaskwaitDirective(OMPTaskwaitDirective *D) {
2078  VisitStmt(D);
2079  VisitOMPExecutableDirective(D);
2080 }
2081 
2082 void ASTStmtReader::VisitOMPTaskgroupDirective(OMPTaskgroupDirective *D) {
2083  VisitStmt(D);
2084  // The NumClauses field was read in ReadStmtFromStream.
2085  Record.skipInts(1);
2086  VisitOMPExecutableDirective(D);
2087  D->setReductionRef(Record.readSubExpr());
2088 }
2089 
2090 void ASTStmtReader::VisitOMPFlushDirective(OMPFlushDirective *D) {
2091  VisitStmt(D);
2092  // The NumClauses field was read in ReadStmtFromStream.
2093  Record.skipInts(1);
2094  VisitOMPExecutableDirective(D);
2095 }
2096 
2097 void ASTStmtReader::VisitOMPOrderedDirective(OMPOrderedDirective *D) {
2098  VisitStmt(D);
2099  // The NumClauses field was read in ReadStmtFromStream.
2100  Record.skipInts(1);
2101  VisitOMPExecutableDirective(D);
2102 }
2103 
2104 void ASTStmtReader::VisitOMPAtomicDirective(OMPAtomicDirective *D) {
2105  VisitStmt(D);
2106  // The NumClauses field was read in ReadStmtFromStream.
2107  Record.skipInts(1);
2108  VisitOMPExecutableDirective(D);
2109  D->setX(Record.readSubExpr());
2110  D->setV(Record.readSubExpr());
2111  D->setExpr(Record.readSubExpr());
2112  D->setUpdateExpr(Record.readSubExpr());
2113  D->IsXLHSInRHSPart = Record.readInt() != 0;
2114  D->IsPostfixUpdate = Record.readInt() != 0;
2115 }
2116 
2117 void ASTStmtReader::VisitOMPTargetDirective(OMPTargetDirective *D) {
2118  VisitStmt(D);
2119  // The NumClauses field was read in ReadStmtFromStream.
2120  Record.skipInts(1);
2121  VisitOMPExecutableDirective(D);
2122 }
2123 
2124 void ASTStmtReader::VisitOMPTargetDataDirective(OMPTargetDataDirective *D) {
2125  VisitStmt(D);
2126  Record.skipInts(1);
2127  VisitOMPExecutableDirective(D);
2128 }
2129 
2130 void ASTStmtReader::VisitOMPTargetEnterDataDirective(
2132  VisitStmt(D);
2133  Record.skipInts(1);
2134  VisitOMPExecutableDirective(D);
2135 }
2136 
2137 void ASTStmtReader::VisitOMPTargetExitDataDirective(
2139  VisitStmt(D);
2140  Record.skipInts(1);
2141  VisitOMPExecutableDirective(D);
2142 }
2143 
2144 void ASTStmtReader::VisitOMPTargetParallelDirective(
2146  VisitStmt(D);
2147  Record.skipInts(1);
2148  VisitOMPExecutableDirective(D);
2149 }
2150 
2151 void ASTStmtReader::VisitOMPTargetParallelForDirective(
2153  VisitOMPLoopDirective(D);
2154  D->setHasCancel(Record.readInt());
2155 }
2156 
2157 void ASTStmtReader::VisitOMPTeamsDirective(OMPTeamsDirective *D) {
2158  VisitStmt(D);
2159  // The NumClauses field was read in ReadStmtFromStream.
2160  Record.skipInts(1);
2161  VisitOMPExecutableDirective(D);
2162 }
2163 
2164 void ASTStmtReader::VisitOMPCancellationPointDirective(
2166  VisitStmt(D);
2167  VisitOMPExecutableDirective(D);
2168  D->setCancelRegion(static_cast<OpenMPDirectiveKind>(Record.readInt()));
2169 }
2170 
2171 void ASTStmtReader::VisitOMPCancelDirective(OMPCancelDirective *D) {
2172  VisitStmt(D);
2173  // The NumClauses field was read in ReadStmtFromStream.
2174  Record.skipInts(1);
2175  VisitOMPExecutableDirective(D);
2176  D->setCancelRegion(static_cast<OpenMPDirectiveKind>(Record.readInt()));
2177 }
2178 
2179 void ASTStmtReader::VisitOMPTaskLoopDirective(OMPTaskLoopDirective *D) {
2180  VisitOMPLoopDirective(D);
2181 }
2182 
2183 void ASTStmtReader::VisitOMPTaskLoopSimdDirective(OMPTaskLoopSimdDirective *D) {
2184  VisitOMPLoopDirective(D);
2185 }
2186 
2187 void ASTStmtReader::VisitOMPDistributeDirective(OMPDistributeDirective *D) {
2188  VisitOMPLoopDirective(D);
2189 }
2190 
2191 void ASTStmtReader::VisitOMPTargetUpdateDirective(OMPTargetUpdateDirective *D) {
2192  VisitStmt(D);
2193  Record.skipInts(1);
2194  VisitOMPExecutableDirective(D);
2195 }
2196 
2197 void ASTStmtReader::VisitOMPDistributeParallelForDirective(
2199  VisitOMPLoopDirective(D);
2200  D->setHasCancel(Record.readInt());
2201 }
2202 
2203 void ASTStmtReader::VisitOMPDistributeParallelForSimdDirective(
2205  VisitOMPLoopDirective(D);
2206 }
2207 
2208 void ASTStmtReader::VisitOMPDistributeSimdDirective(
2210  VisitOMPLoopDirective(D);
2211 }
2212 
2213 void ASTStmtReader::VisitOMPTargetParallelForSimdDirective(
2215  VisitOMPLoopDirective(D);
2216 }
2217 
2218 void ASTStmtReader::VisitOMPTargetSimdDirective(OMPTargetSimdDirective *D) {
2219  VisitOMPLoopDirective(D);
2220 }
2221 
2222 void ASTStmtReader::VisitOMPTeamsDistributeDirective(
2224  VisitOMPLoopDirective(D);
2225 }
2226 
2227 void ASTStmtReader::VisitOMPTeamsDistributeSimdDirective(
2229  VisitOMPLoopDirective(D);
2230 }
2231 
2232 void ASTStmtReader::VisitOMPTeamsDistributeParallelForSimdDirective(
2234  VisitOMPLoopDirective(D);
2235 }
2236 
2237 void ASTStmtReader::VisitOMPTeamsDistributeParallelForDirective(
2239  VisitOMPLoopDirective(D);
2240  D->setHasCancel(Record.readInt());
2241 }
2242 
2243 void ASTStmtReader::VisitOMPTargetTeamsDirective(OMPTargetTeamsDirective *D) {
2244  VisitStmt(D);
2245  // The NumClauses field was read in ReadStmtFromStream.
2246  Record.skipInts(1);
2247  VisitOMPExecutableDirective(D);
2248 }
2249 
2250 void ASTStmtReader::VisitOMPTargetTeamsDistributeDirective(
2252  VisitOMPLoopDirective(D);
2253 }
2254 
2255 void ASTStmtReader::VisitOMPTargetTeamsDistributeParallelForDirective(
2257  VisitOMPLoopDirective(D);
2258  D->setHasCancel(Record.readInt());
2259 }
2260 
2261 void ASTStmtReader::VisitOMPTargetTeamsDistributeParallelForSimdDirective(
2263  VisitOMPLoopDirective(D);
2264 }
2265 
2266 void ASTStmtReader::VisitOMPTargetTeamsDistributeSimdDirective(
2268  VisitOMPLoopDirective(D);
2269 }
2270 
2271 //===----------------------------------------------------------------------===//
2272 // ASTReader Implementation
2273 //===----------------------------------------------------------------------===//
2274 
2276  switch (ReadingKind) {
2277  case Read_None:
2278  llvm_unreachable("should not call this when not reading anything");
2279  case Read_Decl:
2280  case Read_Type:
2281  return ReadStmtFromStream(F);
2282  case Read_Stmt:
2283  return ReadSubStmt();
2284  }
2285 
2286  llvm_unreachable("ReadingKind not set ?");
2287 }
2288 
2290  return cast_or_null<Expr>(ReadStmt(F));
2291 }
2292 
2294  return cast_or_null<Expr>(ReadSubStmt());
2295 }
2296 
2297 // Within the bitstream, expressions are stored in Reverse Polish
2298 // Notation, with each of the subexpressions preceding the
2299 // expression they are stored in. Subexpressions are stored from last to first.
2300 // To evaluate expressions, we continue reading expressions and placing them on
2301 // the stack, with expressions having operands removing those operands from the
2302 // stack. Evaluation terminates when we see a STMT_STOP record, and
2303 // the single remaining expression on the stack is our result.
2304 Stmt *ASTReader::ReadStmtFromStream(ModuleFile &F) {
2305  ReadingKindTracker ReadingKind(Read_Stmt, *this);
2306  llvm::BitstreamCursor &Cursor = F.DeclsCursor;
2307 
2308  // Map of offset to previously deserialized stmt. The offset points
2309  // just after the stmt record.
2310  llvm::DenseMap<uint64_t, Stmt *> StmtEntries;
2311 
2312 #ifndef NDEBUG
2313  unsigned PrevNumStmts = StmtStack.size();
2314 #endif
2315 
2316  ASTRecordReader Record(*this, F);
2317  ASTStmtReader Reader(Record, Cursor);
2318  Stmt::EmptyShell Empty;
2319 
2320  while (true) {
2321  llvm::BitstreamEntry Entry = Cursor.advanceSkippingSubblocks();
2322 
2323  switch (Entry.Kind) {
2324  case llvm::BitstreamEntry::SubBlock: // Handled for us already.
2326  Error("malformed block record in AST file");
2327  return nullptr;
2328  case llvm::BitstreamEntry::EndBlock:
2329  goto Done;
2330  case llvm::BitstreamEntry::Record:
2331  // The interesting case.
2332  break;
2333  }
2334 
2335  ASTContext &Context = getContext();
2336  Stmt *S = nullptr;
2337  bool Finished = false;
2338  bool IsStmtReference = false;
2339  switch ((StmtCode)Record.readRecord(Cursor, Entry.ID)) {
2340  case STMT_STOP:
2341  Finished = true;
2342  break;
2343 
2344  case STMT_REF_PTR:
2345  IsStmtReference = true;
2346  assert(StmtEntries.find(Record[0]) != StmtEntries.end() &&
2347  "No stmt was recorded for this offset reference!");
2348  S = StmtEntries[Record.readInt()];
2349  break;
2350 
2351  case STMT_NULL_PTR:
2352  S = nullptr;
2353  break;
2354 
2355  case STMT_NULL:
2356  S = new (Context) NullStmt(Empty);
2357  break;
2358 
2359  case STMT_COMPOUND:
2361  Context, /*NumStmts=*/Record[ASTStmtReader::NumStmtFields]);
2362  break;
2363 
2364  case STMT_CASE:
2366  Context,
2367  /*CaseStmtIsGNURange*/ Record[ASTStmtReader::NumStmtFields + 3]);
2368  break;
2369 
2370  case STMT_DEFAULT:
2371  S = new (Context) DefaultStmt(Empty);
2372  break;
2373 
2374  case STMT_LABEL:
2375  S = new (Context) LabelStmt(Empty);
2376  break;
2377 
2378  case STMT_ATTRIBUTED:
2380  Context,
2381  /*NumAttrs*/Record[ASTStmtReader::NumStmtFields]);
2382  break;
2383 
2384  case STMT_IF:
2385  S = IfStmt::CreateEmpty(
2386  Context,
2387  /* HasElse=*/Record[ASTStmtReader::NumStmtFields + 1],
2388  /* HasVar=*/Record[ASTStmtReader::NumStmtFields + 2],
2389  /* HasInit=*/Record[ASTStmtReader::NumStmtFields + 3]);
2390  break;
2391 
2392  case STMT_SWITCH:
2394  Context,
2395  /* HasInit=*/Record[ASTStmtReader::NumStmtFields],
2396  /* HasVar=*/Record[ASTStmtReader::NumStmtFields + 1]);
2397  break;
2398 
2399  case STMT_WHILE:
2401  Context,
2402  /* HasVar=*/Record[ASTStmtReader::NumStmtFields]);
2403  break;
2404 
2405  case STMT_DO:
2406  S = new (Context) DoStmt(Empty);
2407  break;
2408 
2409  case STMT_FOR:
2410  S = new (Context) ForStmt(Empty);
2411  break;
2412 
2413  case STMT_GOTO:
2414  S = new (Context) GotoStmt(Empty);
2415  break;
2416 
2417  case STMT_INDIRECT_GOTO:
2418  S = new (Context) IndirectGotoStmt(Empty);
2419  break;
2420 
2421  case STMT_CONTINUE:
2422  S = new (Context) ContinueStmt(Empty);
2423  break;
2424 
2425  case STMT_BREAK:
2426  S = new (Context) BreakStmt(Empty);
2427  break;
2428 
2429  case STMT_RETURN:
2431  Context, /* HasNRVOCandidate=*/Record[ASTStmtReader::NumStmtFields]);
2432  break;
2433 
2434  case STMT_DECL:
2435  S = new (Context) DeclStmt(Empty);
2436  break;
2437 
2438  case STMT_GCCASM:
2439  S = new (Context) GCCAsmStmt(Empty);
2440  break;
2441 
2442  case STMT_MSASM:
2443  S = new (Context) MSAsmStmt(Empty);
2444  break;
2445 
2446  case STMT_CAPTURED:
2448  Context, Record[ASTStmtReader::NumStmtFields]);
2449  break;
2450 
2451  case EXPR_CONSTANT:
2452  S = new (Context) ConstantExpr(Empty);
2453  break;
2454 
2455  case EXPR_PREDEFINED:
2457  Context,
2458  /*HasFunctionName*/ Record[ASTStmtReader::NumExprFields]);
2459  break;
2460 
2461  case EXPR_DECL_REF:
2463  Context,
2464  /*HasQualifier=*/Record[ASTStmtReader::NumExprFields],
2465  /*HasFoundDecl=*/Record[ASTStmtReader::NumExprFields + 1],
2466  /*HasTemplateKWAndArgsInfo=*/Record[ASTStmtReader::NumExprFields + 2],
2467  /*NumTemplateArgs=*/Record[ASTStmtReader::NumExprFields + 2] ?
2468  Record[ASTStmtReader::NumExprFields + 5] : 0);
2469  break;
2470 
2471  case EXPR_INTEGER_LITERAL:
2472  S = IntegerLiteral::Create(Context, Empty);
2473  break;
2474 
2475  case EXPR_FLOATING_LITERAL:
2476  S = FloatingLiteral::Create(Context, Empty);
2477  break;
2478 
2480  S = new (Context) ImaginaryLiteral(Empty);
2481  break;
2482 
2483  case EXPR_STRING_LITERAL:
2485  Context,
2486  /* NumConcatenated=*/Record[ASTStmtReader::NumExprFields],
2487  /* Length=*/Record[ASTStmtReader::NumExprFields + 1],
2488  /* CharByteWidth=*/Record[ASTStmtReader::NumExprFields + 2]);
2489  break;
2490 
2492  S = new (Context) CharacterLiteral(Empty);
2493  break;
2494 
2495  case EXPR_PAREN:
2496  S = new (Context) ParenExpr(Empty);
2497  break;
2498 
2499  case EXPR_PAREN_LIST:
2501  Context,
2502  /* NumExprs=*/Record[ASTStmtReader::NumExprFields]);
2503  break;
2504 
2505  case EXPR_UNARY_OPERATOR:
2506  S = new (Context) UnaryOperator(Empty);
2507  break;
2508 
2509  case EXPR_OFFSETOF:
2510  S = OffsetOfExpr::CreateEmpty(Context,
2511  Record[ASTStmtReader::NumExprFields],
2512  Record[ASTStmtReader::NumExprFields + 1]);
2513  break;
2514 
2515  case EXPR_SIZEOF_ALIGN_OF:
2516  S = new (Context) UnaryExprOrTypeTraitExpr(Empty);
2517  break;
2518 
2519  case EXPR_ARRAY_SUBSCRIPT:
2520  S = new (Context) ArraySubscriptExpr(Empty);
2521  break;
2522 
2524  S = new (Context) OMPArraySectionExpr(Empty);
2525  break;
2526 
2527  case EXPR_CALL:
2529  Context, /*NumArgs=*/Record[ASTStmtReader::NumExprFields], Empty);
2530  break;
2531 
2532  case EXPR_MEMBER: {
2533  // We load everything here and fully initialize it at creation.
2534  // That way we can use MemberExpr::Create and don't have to duplicate its
2535  // logic with a MemberExpr::CreateEmpty.
2536 
2537  assert(Record.getIdx() == 0);
2538  NestedNameSpecifierLoc QualifierLoc;
2539  if (Record.readInt()) { // HasQualifier.
2540  QualifierLoc = Record.readNestedNameSpecifierLoc();
2541  }
2542 
2543  SourceLocation TemplateKWLoc;
2544  TemplateArgumentListInfo ArgInfo;
2545  bool HasTemplateKWAndArgsInfo = Record.readInt();
2546  if (HasTemplateKWAndArgsInfo) {
2547  TemplateKWLoc = Record.readSourceLocation();
2548  unsigned NumTemplateArgs = Record.readInt();
2549  ArgInfo.setLAngleLoc(Record.readSourceLocation());
2550  ArgInfo.setRAngleLoc(Record.readSourceLocation());
2551  for (unsigned i = 0; i != NumTemplateArgs; ++i)
2552  ArgInfo.addArgument(Record.readTemplateArgumentLoc());
2553  }
2554 
2555  bool HadMultipleCandidates = Record.readInt();
2556 
2557  auto *FoundD = Record.readDeclAs<NamedDecl>();
2558  auto AS = (AccessSpecifier)Record.readInt();
2559  DeclAccessPair FoundDecl = DeclAccessPair::make(FoundD, AS);
2560 
2561  QualType T = Record.readType();
2562  auto VK = static_cast<ExprValueKind>(Record.readInt());
2563  auto OK = static_cast<ExprObjectKind>(Record.readInt());
2564  Expr *Base = ReadSubExpr();
2565  auto *MemberD = Record.readDeclAs<ValueDecl>();
2566  SourceLocation MemberLoc = Record.readSourceLocation();
2567  DeclarationNameInfo MemberNameInfo(MemberD->getDeclName(), MemberLoc);
2568  bool IsArrow = Record.readInt();
2569  SourceLocation OperatorLoc = Record.readSourceLocation();
2570 
2571  S = MemberExpr::Create(Context, Base, IsArrow, OperatorLoc, QualifierLoc,
2572  TemplateKWLoc, MemberD, FoundDecl, MemberNameInfo,
2573  HasTemplateKWAndArgsInfo ? &ArgInfo : nullptr, T,
2574  VK, OK);
2575  Record.readDeclarationNameLoc(cast<MemberExpr>(S)->MemberDNLoc,
2576  MemberD->getDeclName());
2577  if (HadMultipleCandidates)
2578  cast<MemberExpr>(S)->setHadMultipleCandidates(true);
2579  break;
2580  }
2581 
2582  case EXPR_BINARY_OPERATOR:
2583  S = new (Context) BinaryOperator(Empty);
2584  break;
2585 
2587  S = new (Context) CompoundAssignOperator(Empty);
2588  break;
2589 
2591  S = new (Context) ConditionalOperator(Empty);
2592  break;
2593 
2595  S = new (Context) BinaryConditionalOperator(Empty);
2596  break;
2597 
2598  case EXPR_IMPLICIT_CAST:
2599  S = ImplicitCastExpr::CreateEmpty(Context,
2600  /*PathSize*/ Record[ASTStmtReader::NumExprFields]);
2601  break;
2602 
2603  case EXPR_CSTYLE_CAST:
2604  S = CStyleCastExpr::CreateEmpty(Context,
2605  /*PathSize*/ Record[ASTStmtReader::NumExprFields]);
2606  break;
2607 
2608  case EXPR_COMPOUND_LITERAL:
2609  S = new (Context) CompoundLiteralExpr(Empty);
2610  break;
2611 
2613  S = new (Context) ExtVectorElementExpr(Empty);
2614  break;
2615 
2616  case EXPR_INIT_LIST:
2617  S = new (Context) InitListExpr(Empty);
2618  break;
2619 
2620  case EXPR_DESIGNATED_INIT:
2621  S = DesignatedInitExpr::CreateEmpty(Context,
2622  Record[ASTStmtReader::NumExprFields] - 1);
2623 
2624  break;
2625 
2627  S = new (Context) DesignatedInitUpdateExpr(Empty);
2628  break;
2629 
2631  S = new (Context) ImplicitValueInitExpr(Empty);
2632  break;
2633 
2634  case EXPR_NO_INIT:
2635  S = new (Context) NoInitExpr(Empty);
2636  break;
2637 
2638  case EXPR_ARRAY_INIT_LOOP:
2639  S = new (Context) ArrayInitLoopExpr(Empty);
2640  break;
2641 
2642  case EXPR_ARRAY_INIT_INDEX:
2643  S = new (Context) ArrayInitIndexExpr(Empty);
2644  break;
2645 
2646  case EXPR_VA_ARG:
2647  S = new (Context) VAArgExpr(Empty);
2648  break;
2649 
2650  case EXPR_ADDR_LABEL:
2651  S = new (Context) AddrLabelExpr(Empty);
2652  break;
2653 
2654  case EXPR_STMT:
2655  S = new (Context) StmtExpr(Empty);
2656  break;
2657 
2658  case EXPR_CHOOSE:
2659  S = new (Context) ChooseExpr(Empty);
2660  break;
2661 
2662  case EXPR_GNU_NULL:
2663  S = new (Context) GNUNullExpr(Empty);
2664  break;
2665 
2666  case EXPR_SHUFFLE_VECTOR:
2667  S = new (Context) ShuffleVectorExpr(Empty);
2668  break;
2669 
2670  case EXPR_CONVERT_VECTOR:
2671  S = new (Context) ConvertVectorExpr(Empty);
2672  break;
2673 
2674  case EXPR_BLOCK:
2675  S = new (Context) BlockExpr(Empty);
2676  break;
2677 
2679  S = new (Context) GenericSelectionExpr(Empty);
2680  break;
2681 
2683  S = new (Context) ObjCStringLiteral(Empty);
2684  break;
2685 
2687  S = new (Context) ObjCBoxedExpr(Empty);
2688  break;
2689 
2691  S = ObjCArrayLiteral::CreateEmpty(Context,
2692  Record[ASTStmtReader::NumExprFields]);
2693  break;
2694 
2697  Record[ASTStmtReader::NumExprFields],
2698  Record[ASTStmtReader::NumExprFields + 1]);
2699  break;
2700 
2701  case EXPR_OBJC_ENCODE:
2702  S = new (Context) ObjCEncodeExpr(Empty);
2703  break;
2704 
2706  S = new (Context) ObjCSelectorExpr(Empty);
2707  break;
2708 
2710  S = new (Context) ObjCProtocolExpr(Empty);
2711  break;
2712 
2714  S = new (Context) ObjCIvarRefExpr(Empty);
2715  break;
2716 
2718  S = new (Context) ObjCPropertyRefExpr(Empty);
2719  break;
2720 
2722  S = new (Context) ObjCSubscriptRefExpr(Empty);
2723  break;
2724 
2726  llvm_unreachable("mismatching AST file");
2727 
2729  S = ObjCMessageExpr::CreateEmpty(Context,
2730  Record[ASTStmtReader::NumExprFields],
2731  Record[ASTStmtReader::NumExprFields + 1]);
2732  break;
2733 
2734  case EXPR_OBJC_ISA:
2735  S = new (Context) ObjCIsaExpr(Empty);
2736  break;
2737 
2739  S = new (Context) ObjCIndirectCopyRestoreExpr(Empty);
2740  break;
2741 
2743  S = new (Context) ObjCBridgedCastExpr(Empty);
2744  break;
2745 
2747  S = new (Context) ObjCForCollectionStmt(Empty);
2748  break;
2749 
2750  case STMT_OBJC_CATCH:
2751  S = new (Context) ObjCAtCatchStmt(Empty);
2752  break;
2753 
2754  case STMT_OBJC_FINALLY:
2755  S = new (Context) ObjCAtFinallyStmt(Empty);
2756  break;
2757 
2758  case STMT_OBJC_AT_TRY:
2759  S = ObjCAtTryStmt::CreateEmpty(Context,
2760  Record[ASTStmtReader::NumStmtFields],
2761  Record[ASTStmtReader::NumStmtFields + 1]);
2762  break;
2763 
2765  S = new (Context) ObjCAtSynchronizedStmt(Empty);
2766  break;
2767 
2768  case STMT_OBJC_AT_THROW:
2769  S = new (Context) ObjCAtThrowStmt(Empty);
2770  break;
2771 
2773  S = new (Context) ObjCAutoreleasePoolStmt(Empty);
2774  break;
2775 
2777  S = new (Context) ObjCBoolLiteralExpr(Empty);
2778  break;
2779 
2781  S = new (Context) ObjCAvailabilityCheckExpr(Empty);
2782  break;
2783 
2784  case STMT_SEH_LEAVE:
2785  S = new (Context) SEHLeaveStmt(Empty);
2786  break;
2787 
2788  case STMT_SEH_EXCEPT:
2789  S = new (Context) SEHExceptStmt(Empty);
2790  break;
2791 
2792  case STMT_SEH_FINALLY:
2793  S = new (Context) SEHFinallyStmt(Empty);
2794  break;
2795 
2796  case STMT_SEH_TRY:
2797  S = new (Context) SEHTryStmt(Empty);
2798  break;
2799 
2800  case STMT_CXX_CATCH:
2801  S = new (Context) CXXCatchStmt(Empty);
2802  break;
2803 
2804  case STMT_CXX_TRY:
2805  S = CXXTryStmt::Create(Context, Empty,
2806  /*NumHandlers=*/Record[ASTStmtReader::NumStmtFields]);
2807  break;
2808 
2809  case STMT_CXX_FOR_RANGE:
2810  S = new (Context) CXXForRangeStmt(Empty);
2811  break;
2812 
2814  S = new (Context) MSDependentExistsStmt(SourceLocation(), true,
2817  nullptr);
2818  break;
2819 
2821  S =
2823  Record[ASTStmtReader::NumStmtFields],
2824  Empty);
2825  break;
2826 
2827  case STMT_OMP_SIMD_DIRECTIVE: {
2828  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields];
2829  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
2830  S = OMPSimdDirective::CreateEmpty(Context, NumClauses,
2831  CollapsedNum, Empty);
2832  break;
2833  }
2834 
2835  case STMT_OMP_FOR_DIRECTIVE: {
2836  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields];
2837  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
2838  S = OMPForDirective::CreateEmpty(Context, NumClauses, CollapsedNum,
2839  Empty);
2840  break;
2841  }
2842 
2844  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields];
2845  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
2846  S = OMPForSimdDirective::CreateEmpty(Context, NumClauses, CollapsedNum,
2847  Empty);
2848  break;
2849  }
2850 
2853  Context, Record[ASTStmtReader::NumStmtFields], Empty);
2854  break;
2855 
2857  S = OMPSectionDirective::CreateEmpty(Context, Empty);
2858  break;
2859 
2862  Context, Record[ASTStmtReader::NumStmtFields], Empty);
2863  break;
2864 
2866  S = OMPMasterDirective::CreateEmpty(Context, Empty);
2867  break;
2868 
2871  Context, Record[ASTStmtReader::NumStmtFields], Empty);
2872  break;
2873 
2875  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields];
2876  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
2877  S = OMPParallelForDirective::CreateEmpty(Context, NumClauses,
2878  CollapsedNum, Empty);
2879  break;
2880  }
2881 
2883  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields];
2884  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
2885  S = OMPParallelForSimdDirective::CreateEmpty(Context, NumClauses,
2886  CollapsedNum, Empty);
2887  break;
2888  }
2889 
2892  Context, Record[ASTStmtReader::NumStmtFields], Empty);
2893  break;
2894 
2897  Context, Record[ASTStmtReader::NumStmtFields], Empty);
2898  break;
2899 
2901  S = OMPTaskyieldDirective::CreateEmpty(Context, Empty);
2902  break;
2903 
2905  S = OMPBarrierDirective::CreateEmpty(Context, Empty);
2906  break;
2907 
2909  S = OMPTaskwaitDirective::CreateEmpty(Context, Empty);
2910  break;
2911 
2914  Context, Record[ASTStmtReader::NumStmtFields], Empty);
2915  break;
2916 
2919  Context, Record[ASTStmtReader::NumStmtFields], Empty);
2920  break;
2921 
2924  Context, Record[ASTStmtReader::NumStmtFields], Empty);
2925  break;
2926 
2929  Context, Record[ASTStmtReader::NumStmtFields], Empty);
2930  break;
2931 
2934  Context, Record[ASTStmtReader::NumStmtFields], Empty);
2935  break;
2936 
2939  Context, Record[ASTStmtReader::NumStmtFields], Empty);
2940  break;
2941 
2944  Context, Record[ASTStmtReader::NumStmtFields], Empty);
2945  break;
2946 
2949  Context, Record[ASTStmtReader::NumStmtFields], Empty);
2950  break;
2951 
2954  Context, Record[ASTStmtReader::NumStmtFields], Empty);
2955  break;
2956 
2958  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields];
2959  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
2960  S = OMPTargetParallelForDirective::CreateEmpty(Context, NumClauses,
2961  CollapsedNum, Empty);
2962  break;
2963  }
2964 
2967  Context, Record[ASTStmtReader::NumStmtFields], Empty);
2968  break;
2969 
2972  Context, Record[ASTStmtReader::NumStmtFields], Empty);
2973  break;
2974 
2976  S = OMPCancellationPointDirective::CreateEmpty(Context, Empty);
2977  break;
2978 
2981  Context, Record[ASTStmtReader::NumStmtFields], Empty);
2982  break;
2983 
2985  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields];
2986  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
2987  S = OMPTaskLoopDirective::CreateEmpty(Context, NumClauses, CollapsedNum,
2988  Empty);
2989  break;
2990  }
2991 
2993  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields];
2994  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
2995  S = OMPTaskLoopSimdDirective::CreateEmpty(Context, NumClauses,
2996  CollapsedNum, Empty);
2997  break;
2998  }
2999 
3001  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields];
3002  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3003  S = OMPDistributeDirective::CreateEmpty(Context, NumClauses, CollapsedNum,
3004  Empty);
3005  break;
3006  }
3007 
3009  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields];
3010  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3011  S = OMPDistributeParallelForDirective::CreateEmpty(Context, NumClauses,
3012  CollapsedNum, Empty);
3013  break;
3014  }
3015 
3017  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields];
3018  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3020  CollapsedNum,
3021  Empty);
3022  break;
3023  }
3024 
3026  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields];
3027  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3028  S = OMPDistributeSimdDirective::CreateEmpty(Context, NumClauses,
3029  CollapsedNum, Empty);
3030  break;
3031  }
3032 
3034  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields];
3035  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3036  S = OMPTargetParallelForSimdDirective::CreateEmpty(Context, NumClauses,
3037  CollapsedNum, Empty);
3038  break;
3039  }
3040 
3042  auto NumClauses = Record[ASTStmtReader::NumStmtFields];
3043  auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3044  S = OMPTargetSimdDirective::CreateEmpty(Context, NumClauses, CollapsedNum,
3045  Empty);
3046  break;
3047  }
3048 
3050  auto NumClauses = Record[ASTStmtReader::NumStmtFields];
3051  auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3052  S = OMPTeamsDistributeDirective::CreateEmpty(Context, NumClauses,
3053  CollapsedNum, Empty);
3054  break;
3055  }
3056 
3058  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields];
3059  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3060  S = OMPTeamsDistributeSimdDirective::CreateEmpty(Context, NumClauses,
3061  CollapsedNum, Empty);
3062  break;
3063  }
3064 
3066  auto NumClauses = Record[ASTStmtReader::NumStmtFields];
3067  auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3069  Context, NumClauses, CollapsedNum, Empty);
3070  break;
3071  }
3072 
3074  auto NumClauses = Record[ASTStmtReader::NumStmtFields];
3075  auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3077  Context, NumClauses, CollapsedNum, Empty);
3078  break;
3079  }
3080 
3083  Context, Record[ASTStmtReader::NumStmtFields], Empty);
3084  break;
3085 
3087  auto NumClauses = Record[ASTStmtReader::NumStmtFields];
3088  auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3089  S = OMPTargetTeamsDistributeDirective::CreateEmpty(Context, NumClauses,
3090  CollapsedNum, Empty);
3091  break;
3092  }
3093 
3095  auto NumClauses = Record[ASTStmtReader::NumStmtFields];
3096  auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3098  Context, NumClauses, CollapsedNum, Empty);
3099  break;
3100  }
3101 
3103  auto NumClauses = Record[ASTStmtReader::NumStmtFields];
3104  auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3106  Context, NumClauses, CollapsedNum, Empty);
3107  break;
3108  }
3109 
3111  auto NumClauses = Record[ASTStmtReader::NumStmtFields];
3112  auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3114  Context, NumClauses, CollapsedNum, Empty);
3115  break;
3116  }
3117 
3120  Context, /*NumArgs=*/Record[ASTStmtReader::NumExprFields], Empty);
3121  break;
3122 
3123  case EXPR_CXX_MEMBER_CALL:
3125  Context, /*NumArgs=*/Record[ASTStmtReader::NumExprFields], Empty);
3126  break;
3127 
3128  case EXPR_CXX_CONSTRUCT:
3130  Context,
3131  /* NumArgs=*/Record[ASTStmtReader::NumExprFields]);
3132  break;
3133 
3135  S = new (Context) CXXInheritedCtorInitExpr(Empty);
3136  break;
3137 
3140  Context,
3141  /* NumArgs=*/Record[ASTStmtReader::NumExprFields]);
3142  break;
3143 
3144  case EXPR_CXX_STATIC_CAST:
3145  S = CXXStaticCastExpr::CreateEmpty(Context,
3146  /*PathSize*/ Record[ASTStmtReader::NumExprFields]);
3147  break;
3148 
3149  case EXPR_CXX_DYNAMIC_CAST:
3150  S = CXXDynamicCastExpr::CreateEmpty(Context,
3151  /*PathSize*/ Record[ASTStmtReader::NumExprFields]);
3152  break;
3153 
3156  /*PathSize*/ Record[ASTStmtReader::NumExprFields]);
3157  break;
3158 
3159  case EXPR_CXX_CONST_CAST:
3160  S = CXXConstCastExpr::CreateEmpty(Context);
3161  break;
3162 
3165  /*PathSize*/ Record[ASTStmtReader::NumExprFields]);
3166  break;
3167 
3170  Context, /*NumArgs=*/Record[ASTStmtReader::NumExprFields], Empty);
3171  break;
3172 
3174  S = new (Context) CXXStdInitializerListExpr(Empty);
3175  break;
3176 
3177  case EXPR_CXX_BOOL_LITERAL:
3178  S = new (Context) CXXBoolLiteralExpr(Empty);
3179  break;
3180 
3182  S = new (Context) CXXNullPtrLiteralExpr(Empty);
3183  break;
3184 
3185  case EXPR_CXX_TYPEID_EXPR:
3186  S = new (Context) CXXTypeidExpr(Empty, true);
3187  break;
3188 
3189  case EXPR_CXX_TYPEID_TYPE:
3190  S = new (Context) CXXTypeidExpr(Empty, false);
3191  break;
3192 
3193  case EXPR_CXX_UUIDOF_EXPR:
3194  S = new (Context) CXXUuidofExpr(Empty, true);
3195  break;
3196 
3198  S = new (Context) MSPropertyRefExpr(Empty);
3199  break;
3200 
3202  S = new (Context) MSPropertySubscriptExpr(Empty);
3203  break;
3204 
3205  case EXPR_CXX_UUIDOF_TYPE:
3206  S = new (Context) CXXUuidofExpr(Empty, false);
3207  break;
3208 
3209  case EXPR_CXX_THIS:
3210  S = new (Context) CXXThisExpr(Empty);
3211  break;
3212 
3213  case EXPR_CXX_THROW:
3214  S = new (Context) CXXThrowExpr(Empty);
3215  break;
3216 
3217  case EXPR_CXX_DEFAULT_ARG:
3218  S = new (Context) CXXDefaultArgExpr(Empty);
3219  break;
3220 
3221  case EXPR_CXX_DEFAULT_INIT:
3222  S = new (Context) CXXDefaultInitExpr(Empty);
3223  break;
3224 
3226  S = new (Context) CXXBindTemporaryExpr(Empty);
3227  break;
3228 
3230  S = new (Context) CXXScalarValueInitExpr(Empty);
3231  break;
3232 
3233  case EXPR_CXX_NEW:
3235  Context,
3236  /*IsArray=*/Record[ASTStmtReader::NumExprFields],
3237  /*HasInit=*/Record[ASTStmtReader::NumExprFields + 1],
3238  /*NumPlacementArgs=*/Record[ASTStmtReader::NumExprFields + 2],
3239  /*IsParenTypeId=*/Record[ASTStmtReader::NumExprFields + 3]);
3240  break;
3241 
3242  case EXPR_CXX_DELETE:
3243  S = new (Context) CXXDeleteExpr(Empty);
3244  break;
3245 
3247  S = new (Context) CXXPseudoDestructorExpr(Empty);
3248  break;
3249 
3251  S = ExprWithCleanups::Create(Context, Empty,
3252  Record[ASTStmtReader::NumExprFields]);
3253  break;
3254 
3257  Context,
3258  /*HasTemplateKWAndArgsInfo=*/Record[ASTStmtReader::NumExprFields],
3259  /*NumTemplateArgs=*/Record[ASTStmtReader::NumExprFields + 1],
3260  /*HasFirstQualifierFoundInScope=*/
3261  Record[ASTStmtReader::NumExprFields + 2]);
3262  break;
3263 
3266  /*HasTemplateKWAndArgsInfo=*/Record[ASTStmtReader::NumExprFields],
3267  /*NumTemplateArgs=*/Record[ASTStmtReader::NumExprFields]
3268  ? Record[ASTStmtReader::NumExprFields + 1]
3269  : 0);
3270  break;
3271 
3274  /*NumArgs=*/Record[ASTStmtReader::NumExprFields]);
3275  break;
3276 
3279  Context,
3280  /*NumResults=*/Record[ASTStmtReader::NumExprFields],
3281  /*HasTemplateKWAndArgsInfo=*/Record[ASTStmtReader::NumExprFields + 1],
3282  /*NumTemplateArgs=*/
3283  Record[ASTStmtReader::NumExprFields + 1]
3284  ? Record[ASTStmtReader::NumExprFields + 2]
3285  : 0);
3286  break;
3287 
3290  Context,
3291  /*NumResults=*/Record[ASTStmtReader::NumExprFields],
3292  /*HasTemplateKWAndArgsInfo=*/Record[ASTStmtReader::NumExprFields + 1],
3293  /*NumTemplateArgs=*/
3294  Record[ASTStmtReader::NumExprFields + 1]
3295  ? Record[ASTStmtReader::NumExprFields + 2]
3296  : 0);
3297  break;
3298 
3299  case EXPR_TYPE_TRAIT:
3301  Record[ASTStmtReader::NumExprFields]);
3302  break;
3303 
3304  case EXPR_ARRAY_TYPE_TRAIT:
3305  S = new (Context) ArrayTypeTraitExpr(Empty);
3306  break;
3307 
3309  S = new (Context) ExpressionTraitExpr(Empty);
3310  break;
3311 
3312  case EXPR_CXX_NOEXCEPT:
3313  S = new (Context) CXXNoexceptExpr(Empty);
3314  break;
3315 
3316  case EXPR_PACK_EXPANSION:
3317  S = new (Context) PackExpansionExpr(Empty);
3318  break;
3319 
3320  case EXPR_SIZEOF_PACK:
3322  Context,
3323  /*NumPartialArgs=*/Record[ASTStmtReader::NumExprFields]);
3324  break;
3325 
3327  S = new (Context) SubstNonTypeTemplateParmExpr(Empty);
3328  break;
3329 
3331  S = new (Context) SubstNonTypeTemplateParmPackExpr(Empty);
3332  break;
3333 
3336  Record[ASTStmtReader::NumExprFields]);
3337  break;
3338 
3340  S = new (Context) MaterializeTemporaryExpr(Empty);
3341  break;
3342 
3343  case EXPR_CXX_FOLD:
3344  S = new (Context) CXXFoldExpr(Empty);
3345  break;
3346 
3347  case EXPR_OPAQUE_VALUE:
3348  S = new (Context) OpaqueValueExpr(Empty);
3349  break;
3350 
3351  case EXPR_CUDA_KERNEL_CALL:
3353  Context, /*NumArgs=*/Record[ASTStmtReader::NumExprFields], Empty);
3354  break;
3355 
3356  case EXPR_ASTYPE:
3357  S = new (Context) AsTypeExpr(Empty);
3358  break;
3359 
3360  case EXPR_PSEUDO_OBJECT: {
3361  unsigned numSemanticExprs = Record[ASTStmtReader::NumExprFields];
3362  S = PseudoObjectExpr::Create(Context, Empty, numSemanticExprs);
3363  break;
3364  }
3365 
3366  case EXPR_ATOMIC:
3367  S = new (Context) AtomicExpr(Empty);
3368  break;
3369 
3370  case EXPR_LAMBDA: {
3371  unsigned NumCaptures = Record[ASTStmtReader::NumExprFields];
3372  S = LambdaExpr::CreateDeserialized(Context, NumCaptures);
3373  break;
3374  }
3375 
3376  case STMT_COROUTINE_BODY: {
3377  unsigned NumParams = Record[ASTStmtReader::NumStmtFields];
3378  S = CoroutineBodyStmt::Create(Context, Empty, NumParams);
3379  break;
3380  }
3381 
3382  case STMT_CORETURN:
3383  S = new (Context) CoreturnStmt(Empty);
3384  break;
3385 
3386  case EXPR_COAWAIT:
3387  S = new (Context) CoawaitExpr(Empty);
3388  break;
3389 
3390  case EXPR_COYIELD:
3391  S = new (Context) CoyieldExpr(Empty);
3392  break;
3393 
3395  S = new (Context) DependentCoawaitExpr(Empty);
3396  break;
3397  }
3398 
3399  // We hit a STMT_STOP, so we're done with this expression.
3400  if (Finished)
3401  break;
3402 
3403  ++NumStatementsRead;
3404 
3405  if (S && !IsStmtReference) {
3406  Reader.Visit(S);
3407  StmtEntries[Cursor.GetCurrentBitNo()] = S;
3408  }
3409 
3410  assert(Record.getIdx() == Record.size() &&
3411  "Invalid deserialization of statement");
3412  StmtStack.push_back(S);
3413  }
3414 Done:
3415  assert(StmtStack.size() > PrevNumStmts && "Read too many sub-stmts!");
3416  assert(StmtStack.size() == PrevNumStmts + 1 && "Extra expressions on stack!");
3417  return StmtStack.pop_back_val();
3418 }
void setPreInits(Stmt *PreInits)
Definition: StmtOpenMP.h:496
void setCombinedParForInDistCond(Expr *CombParForInDistCond)
Definition: StmtOpenMP.h:615
static AttributedStmt * CreateEmpty(const ASTContext &C, unsigned NumAttrs)
Definition: Stmt.cpp:361
void setFPFeatures(FPOptions F)
Definition: Expr.h:3457
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
Definition: ExprObjC.h:577
A PredefinedExpr record.
Definition: ASTBitCodes.h:1629
void setCond(Expr *Cond)
Definition: Stmt.h:2120
const uint64_t & readInt()
Returns the current value in this record, and advances to the next value.
Definition: ASTReader.h:2401
A call to an overloaded operator written using operator syntax.
Definition: ExprCXX.h:78
ObjCIndirectCopyRestoreExpr - Represents the passing of a function argument by indirect copy-restore ...
Definition: ExprObjC.h:1518
The receiver is the instance of the superclass object.
Definition: ExprObjC.h:1061
Represents a single C99 designator.
Definition: Expr.h:4494
void setConditionVariable(const ASTContext &C, VarDecl *V)
Definition: Stmt.cpp:910
static DependentScopeDeclRefExpr * CreateEmpty(const ASTContext &Context, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
Definition: ExprCXX.cpp:492
void setValueDependent(bool VD)
Set whether this expression is value-dependent or not.
Definition: Expr.h:152
Defines the clang::ASTContext interface.
void setRParenLoc(SourceLocation L)
Definition: ExprCXX.h:1553
A CompoundLiteralExpr record.
Definition: ASTBitCodes.h:1689
This represents &#39;#pragma omp distribute simd&#39; composite directive.
Definition: StmtOpenMP.h:3248
This represents &#39;#pragma omp master&#39; directive.
Definition: StmtOpenMP.h:1431
DesignatorTypes
The kinds of designators that can occur in a DesignatedInitExpr.
Definition: ASTBitCodes.h:1982
void setRangeStmt(Stmt *S)
Definition: StmtCXX.h:186
SourceLocation readSourceLocation()
Read a source location, advancing Idx.
Definition: ASTReader.h:2598
The null pointer literal (C++11 [lex.nullptr])
Definition: ExprCXX.h:596
unsigned getNumDecls() const
Gets the number of declarations in the unresolved set.
Definition: ExprCXX.h:2738
This represents &#39;#pragma omp task&#39; directive.
Definition: StmtOpenMP.h:1771
void setEnsureUpperBound(Expr *EUB)
Definition: StmtOpenMP.h:527
This represents a GCC inline-assembly statement extension.
Definition: Stmt.h:2675
static CXXConstructExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs)
Create an empty C++ construction expression.
Definition: ExprCXX.cpp:999
Represents a &#39;co_await&#39; expression while the type of the promise is dependent.
Definition: ExprCXX.h:4455
void setSubStmt(CompoundStmt *S)
Definition: Expr.h:3819
The receiver is an object instance.
Definition: ExprObjC.h:1055
unsigned getNumInputs() const
Definition: Stmt.h:2591
static OMPMasterDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:303
UnresolvedMemberExprBitfields UnresolvedMemberExprBits
Definition: Stmt.h:940
An IndirectGotoStmt record.
Definition: ASTBitCodes.h:1602
A (possibly-)qualified type.
Definition: Type.h:638
capture_init_iterator capture_init_begin()
Retrieve the first initialization argument.
Definition: Stmt.h:3279
StringKind getKind() const
Definition: Expr.h:1681
An AddrLabelExpr record.
Definition: ASTBitCodes.h:1719
void setInc(Expr *E)
Definition: StmtCXX.h:190
void setOperatorLoc(SourceLocation L)
Definition: Expr.h:2290
CXXDeleteExprBitfields CXXDeleteExprBits
Definition: Stmt.h:931
void setRawSemantics(APFloatSemantics Sem)
Set the raw enumeration value representing the floating-point semantics of this literal (32-bit IEEE...
Definition: Expr.h:1475
void setNRVOCandidate(const VarDecl *Var)
Set the variable that might be used for the named return value optimization.
Definition: Stmt.h:2493
Defines enumerations for the type traits support.
void setLocation(SourceLocation L)
Definition: ExprCXX.h:581
A CXXStaticCastExpr record.
Definition: ASTBitCodes.h:1841
ASTStmtReader(ASTRecordReader &Record, llvm::BitstreamCursor &Cursor)
void setCombinedCond(Expr *CombCond)
Definition: StmtOpenMP.h:595
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
Definition: ExprCXX.h:2430
An AttributedStmt record.
Definition: ASTBitCodes.h:1581
A CXXReinterpretCastExpr record.
Definition: ASTBitCodes.h:1847
An ObjCBoolLiteralExpr record.
Definition: ASTBitCodes.h:1809
void setCombinedLowerBoundVariable(Expr *CombLB)
Definition: StmtOpenMP.h:575
void setRHS(Expr *E)
Definition: Expr.h:2353
static OMPTaskwaitDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:519
static OMPTargetParallelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:715
void setHasCancel(bool Has)
Set cancel state.
Definition: StmtOpenMP.h:1358
Represents a &#39;co_return&#39; statement in the C++ Coroutines TS.
Definition: StmtCXX.h:435
Stmt - This represents one statement.
Definition: Stmt.h:66
static OMPTaskgroupDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:540
void setLastIteration(Expr *LI)
Definition: StmtOpenMP.h:482
unsigned getNumArgs() const
getNumArgs - Return the number of actual arguments to this call.
Definition: Expr.h:2540
IfStmt - This represents an if/then/else.
Definition: Stmt.h:1687
void setPrivateCounters(ArrayRef< Expr *> A)
Definition: StmtOpenMP.cpp:32
void setArrow(bool A)
Definition: ExprObjC.h:1466
C Language Family Type Representation.
unsigned getNumOutputs() const
Definition: Stmt.h:2569
This represents &#39;#pragma omp for simd&#39; directive.
Definition: StmtOpenMP.h:1181
void setOpcode(Opcode Opc)
Definition: Expr.h:3325
void setRParenLoc(SourceLocation L)
Definition: Stmt.h:2697
void setContinueLoc(SourceLocation L)
Definition: Stmt.h:2394
void setThrowExpr(Stmt *S)
Definition: StmtObjC.h:327
void setAtLoc(SourceLocation L)
Definition: ExprObjC.h:447
An ImplicitValueInitExpr record.
Definition: ASTBitCodes.h:1713
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:87
void setDeclGroup(DeclGroupRef DGR)
Definition: Stmt.h:1163
An ImplicitCastExpr record.
Definition: ASTBitCodes.h:1683
This represents &#39;#pragma omp teams distribute parallel for&#39; composite directive.
Definition: StmtOpenMP.h:3659
void setRBracket(SourceLocation RB)
Definition: ExprObjC.h:840
Represents the index of the current element of an array being initialized by an ArrayInitLoopExpr.
Definition: Expr.h:4858
LambdaCaptureDefault
The default, if any, capture method for a lambda expression.
Definition: Lambda.h:23
void setType(QualType t)
Definition: Expr.h:129
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
Definition: ExprCXX.h:2828
Defines the C++ template declaration subclasses.
void setPrevEnsureUpperBound(Expr *PrevEUB)
Definition: StmtOpenMP.h:570
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.
Definition: Expr.h:4665
Represents an attribute applied to a statement.
Definition: Stmt.h:1633
void setUpperBoundVariable(Expr *UB)
Definition: StmtOpenMP.h:513
void setComputationResultType(QualType T)
Definition: Expr.h:3531
llvm::APFloat readAPFloat(const llvm::fltSemantics &Sem)
Read a floating-point value, advancing Idx.
Definition: ASTReader.h:2618
void setNumIterations(Expr *NI)
Definition: StmtOpenMP.h:548
ParenExpr - This represents a parethesized expression, e.g.
Definition: Expr.h:1844
A CXXOperatorCallExpr record.
Definition: ASTBitCodes.h:1826
void setSuper(SourceLocation Loc, QualType T, bool IsInstanceSuper)
Definition: ExprObjC.h:1290
This represents &#39;#pragma omp target teams distribute&#39; combined directive.
Definition: StmtOpenMP.h:3796
A CXXTemporaryObjectExpr record.
Definition: ASTBitCodes.h:1838
Represents Objective-C&#39;s @throw statement.
Definition: StmtObjC.h:313
void setNextLowerBound(Expr *NLB)
Definition: StmtOpenMP.h:534
DeclRefExprBitfields DeclRefExprBits
Definition: Stmt.h:906
Represents a call to a C++ constructor.
Definition: ExprCXX.h:1262
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
Definition: ExprObjC.h:803
void setADLCallKind(ADLCallKind V=UsesADL)
Definition: Expr.h:2521
unsigned NumOutputs
Definition: Stmt.h:2534
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent...
Definition: ExprCXX.h:2514
void setValue(bool V)
Definition: ExprObjC.h:95
A constant expression context.
Definition: ASTBitCodes.h:1626
const TargetInfo & getTargetInfo() const
Definition: ASTContext.h:690
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
Definition: Specifiers.h:98
A container of type source information.
Definition: Decl.h:87
void setSwitchCaseList(SwitchCase *SC)
Definition: Stmt.h:2017
Stmt * SubExpr
Definition: Expr.h:879
void setCanOverflow(bool C)
Definition: Expr.h:1940
void setInstanceReceiver(Expr *rec)
Turn this message send into an instance message that computes the receiver object with the given expr...
Definition: ExprObjC.h:1219
Floating point control options.
Definition: LangOptions.h:307
This represents &#39;#pragma omp parallel for&#39; directive.
Definition: StmtOpenMP.h:1552
MS property subscript expression.
Definition: ExprCXX.h:828
void setStartLoc(SourceLocation L)
Definition: Stmt.h:1165
void setForLoc(SourceLocation L)
Definition: Stmt.h:2284
This represents &#39;#pragma omp target teams distribute parallel for&#39; combined directive.
Definition: StmtOpenMP.h:3864
static ObjCDictionaryLiteral * CreateEmpty(const ASTContext &C, unsigned NumElements, bool HasPackExpansions)
Definition: ExprObjC.cpp:105
Represents a prvalue temporary that is written into memory so that a reference can bind to it...
Definition: ExprCXX.h:4156
void setLocation(SourceLocation L)
Definition: ExprObjC.h:557
void setDelegateInitCall(bool isDelegate)
Definition: ExprObjC.h:1361
void setProtocol(ObjCProtocolDecl *P)
Definition: ExprObjC.h:491
void setRParenLoc(SourceLocation L)
Definition: ExprCXX.h:3218
void setIsLastIterVariable(Expr *IL)
Definition: StmtOpenMP.h:499
This represents &#39;#pragma omp target exit data&#39; directive.
Definition: StmtOpenMP.h:2463
void setRAngleLoc(SourceLocation Loc)
Definition: TemplateBase.h:575
static OffsetOfExpr * CreateEmpty(const ASTContext &C, unsigned NumComps, unsigned NumExprs)
Definition: Expr.cpp:1460
static OMPTargetTeamsDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPParallelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for N clauses.
Definition: StmtOpenMP.cpp:72
bool hasTemplateKWAndArgsInfo() const
Definition: Expr.h:1161
ObjCIsaExpr - Represent X->isa and X.isa when X is an ObjC &#39;id&#39; type.
Definition: ExprObjC.h:1437
void setIsPartOfExplicitCast(bool PartOfExplicitCast)
Definition: Expr.h:3135
CompoundLiteralExpr - [C99 6.5.2.5].
Definition: Expr.h:2925
void setSubExpr(unsigned Idx, Expr *E)
Definition: Expr.h:4672
void setInitializer(Expr *E)
Definition: Expr.h:2953
void setLength(Expr *E)
Set length of the array section.
Definition: ExprOpenMP.h:102
void setOpLoc(SourceLocation L)
Definition: ExprObjC.h:1474
void recordSwitchCaseID(SwitchCase *SC, unsigned ID)
Definition: ASTReader.h:2652
unsigned getNumArgs() const
Determine the number of arguments to this type trait.
Definition: ExprCXX.h:2479
static FunctionParmPackExpr * CreateEmpty(const ASTContext &Context, unsigned NumParams)
Definition: ExprCXX.cpp:1558
void setAsmLoc(SourceLocation L)
Definition: Stmt.h:2551
AttributedStmtBitfields AttributedStmtBits
Definition: Stmt.h:891
QualType readType()
Read a type from the current position in the record.
Definition: ASTReader.h:2497
static PredefinedExpr * CreateEmpty(const ASTContext &Ctx, bool HasFunctionName)
Create an empty PredefinedExpr.
Definition: Expr.cpp:506
void setCombinedDistCond(Expr *CombDistCond)
Definition: StmtOpenMP.h:610
void setValue(unsigned Val)
Definition: Expr.h:1430
void setLocation(SourceLocation Location)
Definition: Expr.h:1375
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>".
Definition: TemplateBase.h:604
Implicit construction of a std::initializer_list<T> object from an array temporary within list-initia...
Definition: ExprCXX.h:624
static DeclRefExpr * CreateEmpty(const ASTContext &Context, bool HasQualifier, bool HasFoundDecl, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
Construct an empty declaration reference expression.
Definition: Expr.cpp:450
unsigned getNumPlacementArgs() const
Definition: ExprCXX.h:2051
void setGNUSyntax(bool GNU)
Definition: Expr.h:4650
Defines the Objective-C statement AST node classes.
A CXXConstructExpr record.
Definition: ASTBitCodes.h:1832
unsigned getNumExpressions() const
Definition: Expr.h:2195
void setBeginStmt(Stmt *S)
Definition: StmtCXX.h:187
void setBase(Expr *E)
Set base of the array section.
Definition: ExprOpenMP.h:85
ReceiverKind
The kind of receiver this message is sending to.
Definition: ExprObjC.h:1050
raw_arg_iterator raw_arg_begin()
Definition: ExprCXX.h:2143
A C++ throw-expression (C++ [except.throw]).
Definition: ExprCXX.h:1015
Represents an expression – generally a full-expression – that introduces cleanups to be run at the ...
Definition: ExprCXX.h:3089
Represents a parameter to a function.
Definition: Decl.h:1550
void setInit(Expr *Init)
Definition: StmtOpenMP.h:494
Defines the clang::Expr interface and subclasses for C++ expressions.
void setThen(Stmt *Then)
Definition: Stmt.h:1779
void setTarget(Expr *E)
Definition: Stmt.h:2363
A ShuffleVectorExpr record.
Definition: ASTBitCodes.h:1731
A C++ static_cast expression (C++ [expr.static.cast]).
Definition: ExprCXX.h:326
LabelStmt - Represents a label, which has a substatement.
Definition: Stmt.h:1593
static OMPTargetExitDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
Definition: StmtOpenMP.cpp:832
void setAtLoc(SourceLocation L)
Definition: ExprObjC.h:68
Represents a C99 designated initializer expression.
Definition: Expr.h:4419
An OffsetOfExpr record.
Definition: ASTBitCodes.h:1659
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
Definition: Decl.h:298
NestedNameSpecifierLoc readNestedNameSpecifierLoc()
Definition: ASTReader.h:2552
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.
Definition: ASTBitCodes.h:1803
T * readDeclAs()
Reads a declaration from the given position in the record, advancing Idx.
Definition: ASTReader.h:2520
static OMPTargetDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:690
A DesignatedInitExpr record.
Definition: ASTBitCodes.h:1698
This represents &#39;#pragma omp parallel&#39; directive.
Definition: StmtOpenMP.h:276
ShuffleVectorExpr - clang-specific builtin-in function __builtin_shufflevector.
Definition: Expr.h:3846
void setExprOperand(Expr *E)
Definition: ExprCXX.h:938
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition: ASTContext.h:155
A C++ nested-name-specifier augmented with source location information.
void setLHS(Expr *E)
Definition: Expr.h:2349
static OMPTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:953
Internal struct for storing Key/value pair.
Definition: ExprObjC.h:268
void setKeyExpr(Stmt *S)
Definition: ExprObjC.h:852
static OMPTargetParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:763
static ObjCMessageExpr * CreateEmpty(const ASTContext &Context, unsigned NumArgs, unsigned NumStoredSelLocs)
Create an empty Objective-C message expression, to be filled in by subsequent calls.
Definition: ExprObjC.cpp:264
void setIsMicrosoftABI(bool IsMS)
Definition: Expr.h:4115
Represents a place-holder for an object not to be initialized by anything.
Definition: Expr.h:4713
static OMPFlushDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:608
GNUNullExpr - Implements the GNU __null extension, which is a name for a null pointer constant that h...
Definition: Expr.h:4057
void setArg(unsigned I, Expr *E)
Definition: ExprCXX.h:3254
void setArg(unsigned Arg, Expr *ArgExpr)
setArg - Set the specified argument.
Definition: Expr.h:2563
The iterator over UnresolvedSets.
Definition: UnresolvedSet.h:32
void setRParen(SourceLocation Loc)
Definition: Expr.h:1873
TemplateArgument readTemplateArgument(bool Canonicalize=false)
Read a template argument, advancing Idx.
Definition: ASTReader.h:2562
This represents &#39;#pragma omp target simd&#39; directive.
Definition: StmtOpenMP.h:3384
void setCapturedDecl(CapturedDecl *D)
Set the outlined function declaration.
Definition: Stmt.cpp:1274
void setReturnLoc(SourceLocation L)
Definition: Stmt.h:2500
Represents a C++ member access expression for which lookup produced a set of overloaded functions...
Definition: ExprCXX.h:3538
Defines some OpenMP-specific enums and functions.
void setCond(Expr *Cond)
Definition: Stmt.h:1954
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
Definition: Expr.h:5116
OpenMPDirectiveKind getDirectiveKind() const
Definition: StmtOpenMP.h:244
void setIfLoc(SourceLocation IfLoc)
Definition: Stmt.h:1847
This represents &#39;#pragma omp barrier&#39; directive.
Definition: StmtOpenMP.h:1883
void setComponent(unsigned Idx, OffsetOfNode ON)
Definition: Expr.h:2171
ObjCArrayLiteral - used for objective-c array containers; as in: @["Hello", NSApp, [NSNumber numberWithInt:42]];.
Definition: ExprObjC.h:171
TypeSourceInfo * getTypeSourceInfo()
Reads a declarator info from the given record, advancing Idx.
Definition: ASTReader.h:2482
unsigned getCharByteWidth() const
Definition: Expr.h:1679
This is a common base class for loop directives (&#39;omp simd&#39;, &#39;omp for&#39;, &#39;omp for simd&#39; etc...
Definition: StmtOpenMP.h:338
Represents a reference to a non-type template parameter pack that has been substituted with a non-tem...
Definition: ExprCXX.h:4014
void setSubStmt(Stmt *S)
Definition: Stmt.h:1518
This represents &#39;#pragma omp critical&#39; directive.
Definition: StmtOpenMP.h:1478
static OMPCriticalDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:325
void setRParenLoc(SourceLocation L)
Definition: Expr.h:3827
void setCond(Expr *Cond)
Definition: StmtOpenMP.h:491
size_t size() const
The length of this record.
Definition: ASTReader.h:2391
void setSubExpr(Expr *E)
As with any mutator of the AST, be very careful when modifying an existing AST to preserve its invari...
Definition: Expr.h:895
Represents Objective-C&#39;s @catch statement.
Definition: StmtObjC.h:74
void setLBraceLoc(SourceLocation Loc)
Definition: Expr.h:4331
static OMPTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:903
IndirectGotoStmt - This represents an indirect goto.
Definition: Stmt.h:2339
Describes an C or C++ initializer list.
Definition: Expr.h:4185
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
Definition: ExprCXX.h:669
This represents &#39;#pragma omp distribute parallel for&#39; composite directive.
Definition: StmtOpenMP.h:3099
void setValue(const ASTContext &C, const llvm::APInt &Val)
Definition: Expr.h:1293
This represents &#39;#pragma omp teams distribute parallel for simd&#39; composite directive.
Definition: StmtOpenMP.h:3588
void setBuiltinLoc(SourceLocation L)
Definition: Expr.h:3865
BinaryOperatorKind
void setSubExpr(Expr *E)
Definition: Expr.h:1862
void setLHS(Expr *E)
Definition: Expr.h:4025
unsigned getLength() const
Definition: Expr.h:1678
ForStmt - This represents a &#39;for (init;cond;inc)&#39; stmt.
Definition: Stmt.h:2237
void setOperatorNew(FunctionDecl *D)
Definition: ExprCXX.h:2034
static DeclAccessPair make(NamedDecl *D, AccessSpecifier AS)
void setLocation(SourceLocation L)
Definition: ExprCXX.h:611
CXXScalarValueInitExprBitfields CXXScalarValueInitExprBits
Definition: Stmt.h:929
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)
Definition: StmtObjC.h:288
A convenient class for passing around template argument information.
Definition: TemplateBase.h:555
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
void setSelector(Selector S)
Definition: ExprObjC.h:443
A reference to a previously [de]serialized Stmt record.
Definition: ASTBitCodes.h:1563
void setEndLoc(SourceLocation L)
Definition: Stmt.h:1167
capture_init_iterator capture_init_begin()
Retrieve the first initialization argument for this lambda expression (which initializes the first ca...
Definition: ExprCXX.h:1794
path_iterator path_begin()
Definition: Expr.h:3070
void setLocation(SourceLocation L)
Definition: ExprObjC.h:101
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
Definition: ExprCXX.h:3486
A builtin binary operation expression such as "x + y" or "x <= y".
Definition: Expr.h:3287
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)
Definition: Expr.h:5139
CXXForRangeStmt - This represents C++0x [stmt.ranged]&#39;s ranged for statement, represented as &#39;for (ra...
Definition: StmtCXX.h:127
SourceRange readSourceRange()
Read a source range, advancing Idx.
Definition: ASTReader.h:2603
static const unsigned NumStmtFields
The number of record fields required for the Stmt class itself.
This represents &#39;#pragma omp cancellation point&#39; directive.
Definition: StmtOpenMP.h:2718
void setString(StringLiteral *S)
Definition: ExprObjC.h:65
void setAsmString(StringLiteral *E)
Definition: Stmt.h:2703
ObjCStringLiteral, used for Objective-C string literals i.e.
Definition: ExprObjC.h:51
CaseStmt - Represent a case statement.
Definition: Stmt.h:1394
TypoExpr - Internal placeholder for expressions where typo correction still needs to be performed and...
Definition: Expr.h:5562
void setCombinedInit(Expr *CombInit)
Definition: StmtOpenMP.h:590
void setLHS(Expr *Val)
Definition: Stmt.h:1491
This represents &#39;#pragma omp teams&#39; directive.
Definition: StmtOpenMP.h:2661
void setOperatorLoc(SourceLocation L)
Definition: Expr.h:2153
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
Definition: Expr.h:2998
Helper class for OffsetOfExpr.
Definition: Expr.h:2013
A marker record that indicates that we are at the end of an expression.
Definition: ASTBitCodes.h:1557
void setInit(Stmt *Init)
Definition: Stmt.h:1977
This represents &#39;#pragma omp teams distribute simd&#39; combined directive.
Definition: StmtOpenMP.h:3518
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.
Definition: ExprCXX.h:1217
void setDestroyedType(IdentifierInfo *II, SourceLocation Loc)
Set the name of destroyed type for a dependent pseudo-destructor expression.
Definition: ExprCXX.h:2400
ArrayTypeTrait
Names for the array type traits.
Definition: TypeTraits.h:91
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...
Definition: ExprCXX.h:1649
static OMPTaskyieldDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:491
void setCond(Expr *E)
Definition: Stmt.h:2279
static IntegerLiteral * Create(const ASTContext &C, const llvm::APInt &V, QualType type, SourceLocation l)
Returns a new integer literal with value &#39;V&#39; and type &#39;type&#39;.
Definition: Expr.cpp:792
void setOpcode(Opcode Opc)
Definition: Expr.h:1924
void ReadTemplateKWAndArgsInfo(ASTTemplateKWAndArgsInfo &Args, TemplateArgumentLoc *ArgsLocArray, unsigned NumTemplateArgs)
Read and initialize a ExplicitTemplateArgumentList structure.
DeclAccessPair * getTrailingResults()
Return the results. Defined after UnresolvedMemberExpr.
Definition: ExprCXX.h:3686
Represents a C++ member access expression where the actual member referenced could not be resolved be...
Definition: ExprCXX.h:3284
void setRParenLoc(SourceLocation Loc)
Definition: StmtObjC.h:56
CXXBaseSpecifier readCXXBaseSpecifier()
Read a C++ base specifier, advancing Idx.
Definition: ASTReader.h:2584
void setRParenLoc(SourceLocation R)
Definition: Expr.h:2157
A default argument (C++ [dcl.fct.default]).
Definition: ExprCXX.h:1073
bool isTypeOperand() const
Definition: ExprCXX.h:916
const uint64_t & peekInt()
Returns the current value in this record, without advancing.
Definition: ASTReader.h:2404
void setSourceRange(SourceRange R)
Definition: ExprCXX.h:949
unsigned NumClobbers
Definition: Stmt.h:2536
void setRParenLoc(SourceLocation L)
Definition: Expr.h:3254
Represents the this expression in C++.
Definition: ExprCXX.h:976
void setCastKind(CastKind K)
Definition: Expr.h:3045
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>".
Definition: TemplateBase.h:651
static OMPTargetDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
Definition: StmtOpenMP.cpp:787
static OMPTeamsDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
PredefinedExprBitfields PredefinedExprBits
Definition: Stmt.h:905
void setEqualOrColonLoc(SourceLocation L)
Definition: Expr.h:4645
This represents &#39;#pragma omp target parallel for simd&#39; directive.
Definition: StmtOpenMP.h:3316
void setArgument(Expr *E)
Definition: Expr.h:2274
OpenMP 4.0 [2.4, Array Sections].
Definition: ExprOpenMP.h:45
void setTypeSourceInfo(TypeSourceInfo *tsi)
Definition: Expr.h:2162
ConditionalOperator - The ?: ternary operator.
Definition: Expr.h:3582
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]).
Definition: ExprCXX.h:2286
void setAmpAmpLoc(SourceLocation L)
Definition: Expr.h:3772
void setBreakLoc(SourceLocation L)
Definition: Stmt.h:2420
ASTTemplateKWAndArgsInfo * getTrailingASTTemplateKWAndArgsInfo()
Return the optional template keyword and arguments info.
Definition: ExprCXX.h:3692
CompoundStmt - This represents a group of statements like { stmt stmt }.
Definition: Stmt.h:1241
void setBlockDecl(BlockDecl *BD)
Definition: Expr.h:5193
This represents &#39;#pragma omp taskgroup&#39; directive.
Definition: StmtOpenMP.h:1971
static OMPSingleDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:282
CastKind
CastKind - The kind of operation required for a conversion.
void setSemiLoc(SourceLocation L)
Definition: Stmt.h:1222
void setSubExpr(Expr *E)
Definition: Expr.h:1927
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand...
Definition: Expr.h:2222
void setLParen(SourceLocation Loc)
Definition: Expr.h:1869
ConstantExpr - An expression that occurs in a constant context.
Definition: Expr.h:904
Represents a call to the builtin function __builtin_va_arg.
Definition: Expr.h:4091
static OMPTeamsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:856
void setLeaveLoc(SourceLocation L)
Definition: Stmt.h:3081
void setConditionVariable(const ASTContext &Ctx, VarDecl *V)
Set the condition variable for this if statement.
Definition: Stmt.cpp:871
This represents &#39;#pragma omp distribute&#39; directive.
Definition: StmtOpenMP.h:2972
SubstNonTypeTemplateParmExprBitfields SubstNonTypeTemplateParmExprBits
Definition: Stmt.h:942
void setInits(ArrayRef< Expr *> A)
Definition: StmtOpenMP.cpp:39
void setOperatorDelete(FunctionDecl *D)
Definition: ExprCXX.h:2036
void setRParenLoc(SourceLocation L)
Definition: Stmt.h:2219
An expression "T()" which creates a value-initialized rvalue of type T, which is a non-class type...
Definition: ExprCXX.h:1871
void setLocation(SourceLocation Location)
Definition: Expr.h:1428
void setRParenLoc(SourceLocation Loc)
Definition: StmtObjC.h:105
Pepresents a block literal declaration, which is like an unnamed FunctionDecl.
Definition: Decl.h:3858
static OMPSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:111
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
Definition: Decl.h:637
This represents one expression.
Definition: Expr.h:106
Defines the clang::LangOptions interface.
void setDesignators(const ASTContext &C, const Designator *Desigs, unsigned NumDesigs)
Definition: Expr.cpp:3926
void setRBraceLoc(SourceLocation Loc)
Definition: Expr.h:4333
void setInit(Stmt *Init)
Definition: Stmt.h:1840
void setIsImplicit(bool value=true)
Definition: ExprCXX.h:4446
SourceLocation End
void setWhileLoc(SourceLocation L)
Definition: Stmt.h:2165
ExprValueKind
The categorization of expression values, currently following the C++11 scheme.
Definition: Specifiers.h:107
void setCallee(Expr *F)
Definition: Expr.h:2516
void setRParenLoc(SourceLocation L)
Definition: Expr.h:3868
void setLParenLoc(SourceLocation L)
Definition: Stmt.h:2286
void setBase(Expr *Base)
Definition: Expr.h:4769
Stmt * ReadStmt(ModuleFile &F)
Reads a statement.
static CXXMemberCallExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, EmptyShell Empty)
Definition: ExprCXX.cpp:629
void setSyntacticForm(InitListExpr *Init)
Definition: Expr.h:4346
Represents a C++ functional cast expression that builds a temporary object.
Definition: ExprCXX.h:1581
static ReturnStmt * CreateEmpty(const ASTContext &Ctx, bool HasNRVOCandidate)
Create an empty return statement, optionally with storage for an NRVO candidate.
Definition: Stmt.cpp:1072
void setRBracketLoc(SourceLocation L)
Definition: ExprOpenMP.h:113
A C++ const_cast expression (C++ [expr.const.cast]).
Definition: ExprCXX.h:444
void setTypeDependent(bool TD)
Set whether this expression is type-dependent or not.
Definition: Expr.h:170
void setTypeOperandSourceInfo(TypeSourceInfo *TSI)
Definition: ExprCXX.h:928
BlockExpr - Adaptor class for mixing a BlockDecl with expressions.
Definition: Expr.h:5177
Field designator where only the field name is known.
Definition: ASTBitCodes.h:1984
static OMPDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Defines an enumeration for C++ overloaded operators.
This represents &#39;#pragma omp target teams distribute parallel for simd&#39; combined directive.
Definition: StmtOpenMP.h:3948
void setRHS(Expr *E)
Definition: Expr.h:3330
void setInc(Expr *E)
Definition: Stmt.h:2280
raw_arg_iterator raw_arg_end()
Definition: ExprCXX.h:2144
static CXXReinterpretCastExpr * CreateEmpty(const ASTContext &Context, unsigned pathSize)
Definition: ExprCXX.cpp:790
#define bool
Definition: stdbool.h:31
void setUuidStr(StringRef US)
Definition: ExprCXX.h:943
void setWrittenTypeInfo(TypeSourceInfo *TI)
Definition: Expr.h:4118
void setRetValue(Expr *E)
Definition: Stmt.h:2478
void setBody(Stmt *S)
Definition: Stmt.h:2281
unsigned getNumTemplateArgs() const
Definition: ExprCXX.h:2794
ObjCDictionaryLiteral - AST node to represent objective-c dictionary literals; as in:"name" : NSUserN...
Definition: ExprObjC.h:288
ExprBitfields ExprBits
Definition: Stmt.h:904
void setObjectKind(ExprObjectKind Cat)
setObjectKind - Set the object kind produced by this expression.
Definition: Expr.h:425
bool hasQualifier() const
Determine whether this declaration reference was preceded by a C++ nested-name-specifier, e.g., N::foo.
Definition: Expr.h:1129
void setBody(Stmt *Body)
Definition: Stmt.h:1963
static UserDefinedLiteral * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, EmptyShell Empty)
Definition: ExprCXX.cpp:862
Represents Objective-C&#39;s @synchronized statement.
Definition: StmtObjC.h:262
ObjCSelectorExpr used for @selector in Objective-C.
Definition: ExprObjC.h:429
A CXXStdInitializerListExpr record.
Definition: ASTBitCodes.h:1859
void setFinallyBody(Stmt *S)
Definition: StmtObjC.h:134
Represents an expression that computes the length of a parameter pack.
Definition: ExprCXX.h:3844
CXXTryStmt - A C++ try block, including all handlers.
Definition: StmtCXX.h:65
AsTypeExpr - Clang builtin function __builtin_astype [OpenCL 6.2.4.2] This AST node provides support ...
Definition: Expr.h:5226
An ArraySubscriptExpr record.
Definition: ASTBitCodes.h:1665
Decl * readDecl()
Reads a declaration from the given position in a record in the given module, advancing Idx...
Definition: ASTReader.h:2510
static FloatingLiteral * Create(const ASTContext &C, const llvm::APFloat &V, bool isexact, QualType Type, SourceLocation L)
Definition: Expr.cpp:848
This represents &#39;#pragma omp target teams distribute simd&#39; combined directive.
Definition: StmtOpenMP.h:4021
CXXDefaultInitExprBitfields CXXDefaultInitExprBits
Definition: Stmt.h:928
Information about a module that has been loaded by the ASTReader.
Definition: Module.h:108
ExprWithCleanupsBitfields ExprWithCleanupsBits
Definition: Stmt.h:935
An ArrayInitLoopExpr record.
Definition: ASTBitCodes.h:1707
unsigned getNumClauses() const
Get number of clauses.
Definition: StmtOpenMP.h:184
A PseudoObjectExpr record.
Definition: ASTBitCodes.h:1743
void setColonLoc(SourceLocation L)
Definition: ExprOpenMP.h:110
void setFinallyStmt(Stmt *S)
Definition: StmtObjC.h:236
CompoundStmtBitfields CompoundStmtBits
Definition: Stmt.h:889
An ObjCIndirectCopyRestoreExpr record.
Definition: ASTBitCodes.h:1785
This represents &#39;#pragma omp for&#39; directive.
Definition: StmtOpenMP.h:1104
IdentifierInfo * getIdentifierInfo()
Definition: ASTReader.h:2524
static OMPTargetEnterDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
Definition: StmtOpenMP.cpp:810
void setValueKind(ExprValueKind Cat)
setValueKind - Set the value kind produced by this expression.
Definition: Expr.h:422
StringLiteralBitfields StringLiteralBits
Definition: Stmt.h:908
void setRParenLoc(SourceLocation L)
Definition: ExprObjC.h:497
bool hasInitializer() const
Whether this new-expression has any initializer at all.
Definition: ExprCXX.h:2077
Represents a folding of a pack over an operator.
Definition: ExprCXX.h:4266
void setEndStmt(Stmt *S)
Definition: StmtCXX.h:188
ReturnStmt - This represents a return, optionally of an expression: return; return 4;...
Definition: Stmt.h:2443
This represents &#39;#pragma omp target teams&#39; directive.
Definition: StmtOpenMP.h:3737
void setAssociatedStmt(Stmt *S)
Set the associated statement for the directive.
Definition: StmtOpenMP.h:85
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.
Definition: ExprObjC.h:904
void setBody(Stmt *Body)
Definition: Stmt.h:2129
This represents a Microsoft inline-assembly statement extension.
Definition: Stmt.h:2850
void setColonLoc(SourceLocation L)
Definition: Stmt.h:1376
void setIsArrow(bool A)
Definition: ExprObjC.h:553
void setRParenLoc(SourceLocation L)
Definition: Expr.h:4033
A DesignatedInitUpdateExpr record.
Definition: ASTBitCodes.h:1701
SourceLocation getEnd() const
void setAtLoc(SourceLocation L)
Definition: ExprObjC.h:403
UnaryOperator - This represents the unary-expression&#39;s (except sizeof and alignof), the postinc/postdec operators from postfix-expression, and various extensions.
Definition: Expr.h:1896
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.
Definition: ExprObjC.h:1188
A member reference to an MSPropertyDecl.
Definition: ExprCXX.h:759
static OMPParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:422
static UnresolvedLookupExpr * CreateEmpty(const ASTContext &Context, unsigned NumResults, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
Definition: ExprCXX.cpp:357
Represents a reference to a non-type template parameter that has been substituted with a template arg...
Definition: ExprCXX.h:3958
void setForLoc(SourceLocation Loc)
Definition: StmtObjC.h:54
This represents &#39;#pragma omp cancel&#39; directive.
Definition: StmtOpenMP.h:2776
void setDistInc(Expr *DistInc)
Definition: StmtOpenMP.h:565
void setBase(Expr *base)
Definition: ExprObjC.h:549
ValueDecl * getDecl()
Definition: Expr.h:1114
An ObjCAvailabilityCheckExpr record.
Definition: ASTBitCodes.h:1812
void setRParenLoc(SourceLocation L)
Definition: ExprObjC.h:448
std::string readString()
Read a string, advancing Idx.
Definition: ASTReader.h:2623
void setConditionVariable(const ASTContext &Ctx, VarDecl *V)
Set the condition variable of this while statement.
Definition: Stmt.cpp:1028
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.
Definition: Expr.h:3224
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.
Definition: StmtOpenMP.cpp:20
void skipInts(unsigned N)
Skips the specified number of values.
Definition: ASTReader.h:2407
This file defines OpenMP AST classes for clauses.
ImaginaryLiteral - We support imaginary integer and floating point literals, like "1...
Definition: Expr.h:1517
An ObjCForCollectionStmt record.
Definition: ASTBitCodes.h:1788
This represents &#39;#pragma omp flush&#39; directive.
Definition: StmtOpenMP.h:2044
This represents &#39;#pragma omp parallel for simd&#39; directive.
Definition: StmtOpenMP.h:1632
void setRParenLoc(SourceLocation L)
Definition: Expr.h:4124
void setAtTryLoc(SourceLocation Loc)
Definition: StmtObjC.h:194
DoStmt - This represents a &#39;do/while&#39; stmt.
Definition: Stmt.h:2185
AsmStmt is the base class for GCCAsmStmt and MSAsmStmt.
Definition: Stmt.h:2520
void setTypeOperandSourceInfo(TypeSourceInfo *TSI)
Definition: ExprCXX.h:721
void setBody(Stmt *S)
Definition: StmtCXX.h:192
A MS-style AsmStmt record.
Definition: ASTBitCodes.h:1623
unsigned readRecord(llvm::BitstreamCursor &Cursor, unsigned AbbrevID)
Reads a record with id AbbrevID from Cursor, resetting the internal state.
void setConditionVariable(const ASTContext &Ctx, VarDecl *VD)
Set the condition variable in this switch statement.
Definition: Stmt.cpp:972
void setLocStart(SourceLocation Loc)
Set starting location of directive kind.
Definition: StmtOpenMP.h:176
OpaqueValueExprBitfields OpaqueValueExprBits
Definition: Stmt.h:951
static OMPParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:374
static CoroutineBodyStmt * Create(const ASTContext &C, CtorArgs const &Args)
Definition: StmtCXX.cpp:87
void setSynchExpr(Stmt *S)
Definition: StmtObjC.h:296
This represents &#39;#pragma omp target enter data&#39; directive.
Definition: StmtOpenMP.h:2404
void setUpdates(ArrayRef< Expr *> A)
Definition: StmtOpenMP.cpp:45
const llvm::fltSemantics & getSemantics() const
Return the APFloat semantics this literal uses.
Definition: Expr.cpp:858
void setLowerBoundVariable(Expr *LB)
Definition: StmtOpenMP.h:506
void setLParenLoc(SourceLocation L)
Definition: ExprCXX.h:1551
void setTypeSourceInfo(TypeSourceInfo *tinfo)
Definition: Expr.h:2964
A C++ dynamic_cast expression (C++ [expr.dynamic.cast]).
Definition: ExprCXX.h:362
OpaqueValueExpr - An expression referring to an opaque object of a fixed type and value class...
Definition: Expr.h:945
void setComputationLHSType(QualType T)
Definition: Expr.h:3528
ConvertVectorExpr - Clang builtin function __builtin_convertvector This AST node provides support for...
Definition: Expr.h:3914
unsigned getNumArgs() const
Return the number of actual arguments in this message, not counting the receiver. ...
Definition: ExprObjC.h:1329
static OMPSectionDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:259
void setDecl(LabelDecl *D)
Definition: Stmt.h:1611
Kind
A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr...
Definition: ExprCXX.h:2635
A field in a dependent type, known only by its name.
Definition: Expr.h:2022
This captures a statement into a function.
Definition: Stmt.h:3105
Represents a call to an inherited base class constructor from an inheriting constructor.
Definition: ExprCXX.h:1448
unsigned path_size() const
Definition: Expr.h:3069
PseudoObjectExpr - An expression which accesses a pseudo-object l-value.
Definition: Expr.h:5299
void setLParenLoc(SourceLocation L)
Definition: Expr.h:3251
void setSubStmt(Stmt *S)
Definition: Stmt.h:1557
void setAccessorLoc(SourceLocation L)
Definition: Expr.h:5142
void setGotoLoc(SourceLocation L)
Definition: Stmt.h:2354
static CXXDynamicCastExpr * CreateEmpty(const ASTContext &Context, unsigned pathSize)
Definition: ExprCXX.cpp:732
CXXTemporary * readCXXTemporary()
Definition: ASTReader.h:2593
unsigned getNumExprs() const
Return the number of expressions in this paren list.
Definition: Expr.h:4945
void setLocation(SourceLocation L)
Definition: Expr.h:1123
This represents &#39;#pragma omp single&#39; directive.
Definition: StmtOpenMP.h:1376
Encodes a location in the source.
void setLocation(SourceLocation L)
Definition: Expr.h:1811
void setPrevLowerBoundVariable(Expr *PrevLB)
Definition: StmtOpenMP.h:555
void setIterationVariable(Expr *IV)
Definition: StmtOpenMP.h:479
Defines enumerations for expression traits intrinsics.
PseudoObjectExprBitfields PseudoObjectExprBits
Definition: Stmt.h:919
Stmt * readSubStmt()
Reads a sub-statement operand during statement reading.
Definition: ASTReader.h:2450
static CXXOperatorCallExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, EmptyShell Empty)
Definition: ExprCXX.cpp:571
UnresolvedLookupExprBitfields UnresolvedLookupExprBits
Definition: Stmt.h:939
unsigned getNumHandlers() const
Definition: StmtCXX.h:103
void setUpdater(Expr *Updater)
Definition: Expr.h:4774
CXXThrowExprBitfields CXXThrowExprBits
Definition: Stmt.h:926
static OMPTaskDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:473
This is a basic class for representing single OpenMP executable directive.
Definition: StmtOpenMP.h:33
static OMPTargetUpdateDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setDoLoc(SourceLocation L)
Definition: Stmt.h:2215
static CXXConstCastExpr * CreateEmpty(const ASTContext &Context)
Definition: ExprCXX.cpp:804
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)"...
Definition: ExprCXX.h:1914
void setCombinedNextLowerBound(Expr *CombNLB)
Definition: StmtOpenMP.h:600
void setAtCatchLoc(SourceLocation Loc)
Definition: StmtObjC.h:103
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c dictionary literal.
Definition: ExprObjC.h:342
A call to a literal operator (C++11 [over.literal]) written as a user-defined literal (C++11 [lit...
Definition: ExprCXX.h:481
void setSourceRange(SourceRange R)
Definition: ExprCXX.h:739
static ObjCAtTryStmt * CreateEmpty(const ASTContext &Context, unsigned NumCatchStmts, bool HasFinally)
Definition: StmtObjC.cpp:58
void setConstexpr(bool C)
Definition: Stmt.h:1861
Represents a call to a member function that may be written either with member call syntax (e...
Definition: ExprCXX.h:171
static StringLiteral * CreateEmpty(const ASTContext &Ctx, unsigned NumConcatenated, unsigned Length, unsigned CharByteWidth)
Construct an empty string literal.
Definition: Expr.cpp:994
void setIdentLoc(SourceLocation L)
Definition: Stmt.h:1608
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. ...
Definition: Stmt.h:1143
void setInit(Stmt *S)
Definition: StmtCXX.h:184
void setLabelLoc(SourceLocation L)
Definition: Expr.h:3774
void readDeclarationNameInfo(DeclarationNameInfo &NameInfo)
Definition: ASTReader.h:2540
ExprObjectKind
A further classification of the kind of object referenced by an l-value or x-value.
Definition: Specifiers.h:124
A CXXFunctionalCastExpr record.
Definition: ASTBitCodes.h:1853
void setTemporary(CXXTemporary *T)
Definition: ExprCXX.h:1238
static ExprWithCleanups * Create(const ASTContext &C, EmptyShell empty, unsigned numObjects)
Definition: ExprCXX.cpp:1250
void setAllEnumCasesCovered()
Set a flag in the SwitchStmt indicating that if the &#39;switch (X)&#39; is a switch over an enum value then ...
Definition: Stmt.h:2036
Expr * readSubExpr()
Reads a sub-expression operand during statement reading.
Definition: ASTReader.h:2453
void VisitStmt(Stmt *S)
StmtVisitor - This class implements a simple visitor for Stmt subclasses.
Definition: StmtVisitor.h:183
void setClassReceiver(TypeSourceInfo *TSInfo)
Definition: ExprObjC.h:1241
void setCatchParamDecl(VarDecl *D)
Definition: StmtObjC.h:100
An ObjCEncodeExpr record.
Definition: ASTBitCodes.h:1758
static OMPAtomicDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:664
This represents &#39;#pragma omp taskwait&#39; directive.
Definition: StmtOpenMP.h:1927
void setLHS(Expr *E)
Definition: Expr.h:3328
void setConfig(CallExpr *E)
Sets the kernel configuration expression.
Definition: ExprCXX.h:249
void setIsFreeIvar(bool A)
Definition: ExprObjC.h:554
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.
Definition: Expr.h:5433
void readDeclarationNameLoc(DeclarationNameLoc &DNLoc, DeclarationName Name)
Definition: ASTReader.h:2537
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...
Definition: Expr.cpp:2023
bool isArray() const
Definition: ExprCXX.h:2038
static OMPOrderedDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:633
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)
Definition: UnresolvedSet.h:89
ObjCProtocolExpr used for protocol expression in Objective-C.
Definition: ExprObjC.h:474
static WhileStmt * CreateEmpty(const ASTContext &Ctx, bool HasVar)
Create an empty while statement optionally with storage for a condition variable. ...
Definition: Stmt.cpp:1014
bool isValueDependent() const
isValueDependent - Determines whether this expression is value-dependent (C++ [temp.dep.constexpr]).
Definition: Expr.h:149
void setDecl(ValueDecl *NewD)
Definition: Expr.h:1116
void setThrowLoc(SourceLocation Loc)
Definition: StmtObjC.h:330
unsigned getIdx() const
The current position in this record.
Definition: ASTReader.h:2388
An ObjCIsa Expr record.
Definition: ASTBitCodes.h:1782
ASTContext & getContext()
Retrieve the AST context that this AST reader supplements.
Definition: ASTReader.h:2385
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
Definition: Expr.h:3115
Stmt * getCapturedStmt()
Retrieve the statement being captured.
Definition: Stmt.h:3206
This represents &#39;#pragma omp target&#39; directive.
Definition: StmtOpenMP.h:2288
static OMPTeamsDistributeParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setSubExpr(Expr *E)
Definition: ExprCXX.h:1242
static DesignatedInitExpr * CreateEmpty(const ASTContext &C, unsigned NumIndexExprs)
Definition: Expr.cpp:3919
static DeclGroup * Create(ASTContext &C, Decl **Decls, unsigned NumDecls)
Definition: DeclGroup.cpp:21
bool isParenTypeId() const
Definition: ExprCXX.h:2068
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)
Definition: ExprObjC.h:849
NullStmtBitfields NullStmtBits
Definition: Stmt.h:888
An expression trait intrinsic.
Definition: ExprCXX.h:2580
void setEncodedTypeSourceInfo(TypeSourceInfo *EncType)
Definition: ExprObjC.h:411
static CXXDependentScopeMemberExpr * CreateEmpty(const ASTContext &Ctx, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs, bool HasFirstQualifierFoundInScope)
Definition: ExprCXX.cpp:1371
An AtomicExpr record.
Definition: ASTBitCodes.h:1746
This represents &#39;#pragma omp ordered&#39; directive.
Definition: StmtOpenMP.h:2099
StmtExpr - This is the GNU Statement Expression extension: ({int X=4; X;}).
Definition: Expr.h:3801
void setCond(Expr *E)
Definition: StmtCXX.h:189
static SizeOfPackExpr * CreateDeserialized(ASTContext &Context, unsigned NumPartialArgs)
Definition: ExprCXX.cpp:1515
This represents &#39;#pragma omp target update&#39; directive.
Definition: StmtOpenMP.h:3040
ObjCBoxedExpr - used for generalized expression boxing.
Definition: ExprObjC.h:117
void setSubExpr(Expr *E)
Definition: Expr.h:4111
void setLAngleLoc(SourceLocation Loc)
Definition: TemplateBase.h:574
void sawArrayRangeDesignator(bool ARD=true)
Definition: Expr.h:4356
static CXXTemporaryObjectExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs)
Definition: ExprCXX.cpp:965
void addArgument(const TemplateArgumentLoc &Loc)
Definition: TemplateBase.h:595
void setCapturedRecordDecl(RecordDecl *D)
Set the record declaration for captured variables.
Definition: Stmt.h:3226
Representation of a Microsoft __if_exists or __if_not_exists statement with a dependent name...
Definition: StmtCXX.h:241
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)
Definition: Expr.cpp:1539
A placeholder type used to construct an empty shell of a type, that will be filled in later (e...
Definition: Stmt.h:976
void setSimple(bool V)
Definition: Stmt.h:2554
A qualified reference to a name whose declaration cannot yet be resolved.
Definition: ExprCXX.h:2942
void setRBracketLoc(SourceLocation L)
Definition: ExprCXX.h:867
void readAttributes(AttrVec &Attrs)
Reads attributes from the current stream position, advancing Idx.
Definition: ASTReader.h:2643
CompoundAssignOperator - For compound assignments (e.g.
Definition: Expr.h:3504
Expr ** getElements()
Retrieve elements of array of literals.
Definition: ExprObjC.h:202
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.
Definition: Expr.h:5010
AddrLabelExpr - The GNU address of label extension, representing &&label.
Definition: Expr.h:3757
An Objective-C "bridged" cast expression, which casts between Objective-C pointers and C pointers...
Definition: ExprObjC.h:1575
Represents a reference to a function parameter pack that has been substituted but not yet expanded...
Definition: ExprCXX.h:4078
Represents a template argument.
Definition: TemplateBase.h:51
void setGotoLoc(SourceLocation L)
Definition: Stmt.h:2321
void setPrevUpperBoundVariable(Expr *PrevUB)
Definition: StmtOpenMP.h:560
static CXXUnresolvedConstructExpr * CreateEmpty(const ASTContext &Context, unsigned NumArgs)
Definition: ExprCXX.cpp:1291
void setCombinedEnsureUpperBound(Expr *CombEUB)
Definition: StmtOpenMP.h:585
static OMPForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:160
void setLocation(SourceLocation L)
Definition: Expr.h:1494
NullStmt - This is the null statement ";": C99 6.8.3p3.
Definition: Stmt.h:1210
void setCounters(ArrayRef< Expr *> A)
Definition: StmtOpenMP.cpp:26
bool isTypeOperand() const
Definition: ExprCXX.h:709
unsigned getNumAssocs() const
Definition: Expr.h:5037
Dataflow Directional Tag Classes.
void setExtendingDecl(const ValueDecl *ExtendedBy, unsigned ManglingNumber)
Definition: ExprCXX.cpp:1564
An InitListExpr record.
Definition: ASTBitCodes.h:1695
llvm::BitstreamCursor DeclsCursor
DeclsCursor - This is a cursor to the start of the DECLS_BLOCK block.
Definition: Module.h:406
void setBuiltinLoc(SourceLocation L)
Definition: Expr.h:4030
[C99 6.4.2.2] - A predefined identifier such as func.
Definition: Expr.h:1758
UnaryOperatorKind
void setValue(bool V)
Definition: ExprCXX.h:575
A CXXBoolLiteralExpr record.
Definition: ASTBitCodes.h:1862
Represents a delete expression for memory deallocation and destructor calls, e.g. ...
Definition: ExprCXX.h:2170
void setCombinedUpperBoundVariable(Expr *CombUB)
Definition: StmtOpenMP.h:580
void setRParenLoc(SourceLocation L)
Definition: Expr.h:2636
static CapturedStmt * CreateDeserialized(const ASTContext &Context, unsigned NumCaptures)
Definition: Stmt.cpp:1247
An ExtVectorElementExpr record.
Definition: ASTBitCodes.h:1692
void setLabel(LabelDecl *L)
Definition: Expr.h:3780
static OMPTargetTeamsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setTypeInfoAsWritten(TypeSourceInfo *writtenTy)
Definition: Expr.h:3209
This represents &#39;#pragma omp section&#39; directive.
Definition: StmtOpenMP.h:1314
void setAtLoc(SourceLocation L)
Definition: ExprObjC.h:496
This represents &#39;#pragma omp teams distribute&#39; directive.
Definition: StmtOpenMP.h:3450
void setIsUnique(bool V)
Definition: Expr.h:1005
Selector readSelector()
Read a selector from the Record, advancing Idx.
Definition: ASTReader.h:2529
Expr * ReadExpr(ModuleFile &F)
Reads an expression.
void setSubExpr(Expr *E)
Definition: Expr.h:1531
void setExprs(const ASTContext &C, ArrayRef< Expr *> Exprs)
Definition: Expr.cpp:3770
void setSubExpr(Expr *E)
Definition: Expr.h:3052
void setCollection(Expr *E)
Definition: StmtObjC.h:48
void setDecl(ObjCIvarDecl *d)
Definition: ExprObjC.h:545
void setFileScope(bool FS)
Definition: Expr.h:2956
void setExact(bool E)
Definition: Expr.h:1486
A runtime availability query.
Definition: ExprObjC.h:1636
A C++ reinterpret_cast expression (C++ [expr.reinterpret.cast]).
Definition: ExprCXX.h:404
This represents &#39;#pragma omp simd&#39; directive.
Definition: StmtOpenMP.h:1039
Represents a &#39;co_yield&#39; expression.
Definition: ExprCXX.h:4502
An ObjCAutoreleasePoolStmt record.
Definition: ASTBitCodes.h:1806
The name of a declaration.
StmtClass getStmtClass() const
Definition: Stmt.h:1029
Represents a C++11 pack expansion that produces a sequence of expressions.
Definition: ExprCXX.h:3772
A CXXDynamicCastExpr record.
Definition: ASTBitCodes.h:1844
static LambdaExpr * CreateDeserialized(const ASTContext &C, unsigned NumCaptures)
Construct a new lambda expression that will be deserialized from an external source.
Definition: ExprCXX.cpp:1146
static PseudoObjectExpr * Create(const ASTContext &Context, Expr *syntactic, ArrayRef< Expr *> semantic, unsigned resultIndex)
Definition: Expr.cpp:4092
void setInstantiationDependent(bool ID)
Set whether this expression is instantiation-dependent or not.
Definition: Expr.h:196
void setEllipsisLoc(SourceLocation L)
Set the location of the ...
Definition: Stmt.h:1476
Kind
The kind of offsetof node we have.
Definition: Expr.h:2016
TemplateArgumentLoc readTemplateArgumentLoc()
Reads a TemplateArgumentLoc, advancing Idx.
Definition: ASTReader.h:2472
void setLParenLoc(SourceLocation L)
Definition: Expr.h:3825
void setSelector(Selector S)
Definition: ExprObjC.h:1298
ExplicitCastExpr - An explicit cast written in the source code.
Definition: Expr.h:3190
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnd...
void setMethodDecl(ObjCMethodDecl *MD)
Definition: ExprObjC.h:1317
This represents &#39;#pragma omp atomic&#39; directive.
Definition: StmtOpenMP.h:2154
static CompoundStmt * CreateEmpty(const ASTContext &C, unsigned NumStmts)
Definition: Stmt.cpp:339
pack_iterator pack_begin() const
Iterator referencing the first argument of a template argument pack.
Definition: TemplateBase.h:340
void setImplicit(bool I)
Definition: ExprCXX.h:998
An ObjCAtFinallyStmt record.
Definition: ASTBitCodes.h:1794
VersionTuple readVersionTuple()
Read a version tuple, advancing Idx.
Definition: ASTReader.h:2633
CXXNewExprBitfields CXXNewExprBits
Definition: Stmt.h:930
Represents a __leave statement.
Definition: Stmt.h:3070
unsigned getCollapsedNumber() const
Get number of collapsed loops.
Definition: StmtOpenMP.h:783
unsigned getNumSubExprs() const
Definition: Expr.h:5498
void setRBracketLoc(SourceLocation L)
Definition: Expr.h:2369
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
Definition: ExprCXX.h:3719
SwitchStmt - This represents a &#39;switch&#39; stmt.
Definition: Stmt.h:1886
CXXConstructExprBitfields CXXConstructExprBits
Definition: Stmt.h:934
static OMPForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:209
Represents the body of a coroutine.
Definition: StmtCXX.h:302
void setElement(Stmt *S)
Definition: StmtObjC.h:47
TemplateArgumentLoc * getTrailingTemplateArgumentLoc()
Return the optional template arguments.
Definition: ExprCXX.h:3702
Location wrapper for a TemplateArgument.
Definition: TemplateBase.h:450
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.
Definition: StmtObjC.h:218
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
Definition: Expr.h:2312
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c array literal.
Definition: ExprObjC.h:210
static OMPBarrierDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:505
This file defines OpenMP AST classes for executable directives and clauses.
Represents Objective-C&#39;s collection statement.
Definition: StmtObjC.h:24
static CUDAKernelCallExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, EmptyShell Empty)
Definition: ExprCXX.cpp:1651
void setRHS(Expr *Val)
Definition: Stmt.h:1507
An ObjCAtSynchronizedStmt record.
Definition: ASTBitCodes.h:1800
unsigned getNumObjects() const
Definition: ExprCXX.h:3120
void setIndexExpr(unsigned Idx, Expr *E)
Definition: Expr.h:2190
ObjCEncodeExpr, used for @encode in Objective-C.
Definition: ExprObjC.h:386
void setVolatile(bool V)
Definition: Stmt.h:2557
void setLowerBound(Expr *E)
Set lower bound of the array section.
Definition: ExprOpenMP.h:96
An implicit indirection through a C++ base class, when the field found is in a base class...
Definition: Expr.h:2025
Represents a call to a CUDA kernel function.
Definition: ExprCXX.h:219
Represents a &#39;co_await&#39; expression.
Definition: ExprCXX.h:4419
TypeTraitExprBitfields TypeTraitExprBits
Definition: Stmt.h:932
static ImplicitCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize)
Definition: Expr.cpp:1858
void setSwitchLoc(SourceLocation L)
Definition: Stmt.h:2020
A CXXMemberCallExpr record.
Definition: ASTBitCodes.h:1829
void setAtFinallyLoc(SourceLocation Loc)
Definition: StmtObjC.h:142
void setArg(unsigned Arg, Expr *ArgExpr)
Set the specified argument.
Definition: ExprCXX.h:1423
void setKind(UnaryExprOrTypeTrait K)
Definition: Expr.h:2256
void setRParenLoc(SourceLocation L)
Definition: Expr.h:2293
void setRHS(Expr *E)
Definition: Expr.h:4027
void setOperatorLoc(SourceLocation L)
Definition: Expr.h:3320
void setBody(Stmt *Body)
Definition: Stmt.h:2212
void setValue(const ASTContext &C, const llvm::APFloat &Val)
Definition: Expr.h:1462
Represents Objective-C&#39;s @finally statement.
Definition: StmtObjC.h:120
void setCatchBody(Stmt *S)
Definition: StmtObjC.h:92
static CXXFunctionalCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize)
Definition: ExprCXX.cpp:824
bool hasAssociatedStmt() const
Returns true if directive has associated statement.
Definition: StmtOpenMP.h:193
void setLParenLoc(SourceLocation L)
Definition: Expr.h:2959
The template argument is actually a parameter pack.
Definition: TemplateBase.h:91
Represents a base class of a C++ class.
Definition: DeclCXX.h:192
void setRParenLoc(SourceLocation L)
Definition: ExprObjC.h:405
unsigned getNumClobbers() const
Definition: Stmt.h:2601
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.
Definition: ExprObjC.h:513
void setAtSynchronizedLoc(SourceLocation Loc)
Definition: StmtObjC.h:280
bool isPartiallySubstituted() const
Determine whether this represents a partially-substituted sizeof...
Definition: ExprCXX.h:3932
void setElseLoc(SourceLocation ElseLoc)
Definition: Stmt.h:1854
void setOperatorLoc(SourceLocation L)
Definition: Expr.h:1931
void setLocation(SourceLocation Location)
Definition: Expr.h:1336
A ConvertVectorExpr record.
Definition: ASTBitCodes.h:1734
unsigned arg_size() const
Retrieve the number of arguments.
Definition: ExprCXX.h:3226
void setStarLoc(SourceLocation L)
Definition: Stmt.h:2356
void setLParenLoc(SourceLocation L)
Definition: ExprCXX.h:3213
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
Definition: ExprCXX.h:3169
GotoStmt - This represents a direct goto.
Definition: Stmt.h:2304
A use of a default initializer in a constructor or in aggregate initialization.
Definition: ExprCXX.h:1137
static CStyleCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize)
Definition: Expr.cpp:1880
void setLocation(SourceLocation L)
Definition: ExprCXX.h:992
void setCond(Expr *Cond)
Definition: Stmt.h:2208
CapturedDecl * getCapturedDecl()
Retrieve the outlined function declaration.
Definition: Stmt.cpp:1265
void setBuiltinLoc(SourceLocation L)
Definition: Expr.h:4121
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.
Definition: Expr.h:2682
GNU array range designator.
Definition: ASTBitCodes.h:1994
void setBase(Expr *E)
Definition: Expr.h:5136
Defines the clang::SourceLocation class and associated facilities.
An ArrayInitIndexExpr record.
Definition: ASTBitCodes.h:1710
A GCC-style AsmStmt record.
Definition: ASTBitCodes.h:1620
This represents &#39;#pragma omp target parallel&#39; directive.
Definition: StmtOpenMP.h:2521
void setStrideVariable(Expr *ST)
Definition: StmtOpenMP.h:520
ContinueStmt - This represents a continue.
Definition: Stmt.h:2384
static CXXStaticCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize)
Definition: ExprCXX.cpp:707
Represents a loop initializing the elements of an array.
Definition: Expr.h:4803
static CXXTryStmt * Create(const ASTContext &C, SourceLocation tryLoc, Stmt *tryBlock, ArrayRef< Stmt *> handlers)
Definition: StmtCXX.cpp:26
ChooseExpr - GNU builtin-in function __builtin_choose_expr.
Definition: Expr.h:3977
static OMPParallelSectionsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:449
CXXDefaultArgExprBitfields CXXDefaultArgExprBits
Definition: Stmt.h:927
BinaryConditionalOperator - The GNU extension to the conditional operator which allows the middle ope...
Definition: Expr.h:3655
CXXCatchStmt - This represents a C++ catch block.
Definition: StmtCXX.h:29
An index into an array.
Definition: Expr.h:2018
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr.type.conv]).
Definition: ExprCXX.h:1519
An ObjCAtCatchStmt record.
Definition: ASTBitCodes.h:1791
static TypeTraitExpr * CreateDeserialized(const ASTContext &C, unsigned NumArgs)
Definition: ExprCXX.cpp:1621
Expr * ReadSubExpr()
Reads a sub-expression operand during statement reading.
WhileStmt - This represents a &#39;while&#39; stmt.
Definition: Stmt.h:2063
CXXOperatorCallExprBitfields CXXOperatorCallExprBits
Definition: Stmt.h:922
static IfStmt * CreateEmpty(const ASTContext &Ctx, bool HasElse, bool HasVar, bool HasInit)
Create an empty IfStmt optionally with storage for an else statement, condition variable and init exp...
Definition: Stmt.cpp:855
void initializeFrom(SourceLocation TemplateKWLoc, const TemplateArgumentListInfo &List, TemplateArgumentLoc *OutArgArray)
Field designator where the field has been resolved to a declaration.
Definition: ASTBitCodes.h:1988
void setIsaMemberLoc(SourceLocation L)
Definition: ExprObjC.h:1471
unsigned getNumConcatenated() const
getNumConcatenated - Get the number of string literal tokens that were concatenated in translation ph...
Definition: Expr.h:1708
static CXXNewExpr * CreateEmpty(const ASTContext &Ctx, bool IsArray, bool HasInit, unsigned NumPlacementArgs, bool IsParenTypeId)
Create an empty c++ new expression.
Definition: ExprCXX.cpp:202
static ParenListExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumExprs)
Create an empty paren list.
Definition: Expr.cpp:4060
A CXXInheritedCtorInitExpr record.
Definition: ASTBitCodes.h:1835
void setExprOperand(Expr *E)
Definition: ExprCXX.h:731
The receiver is a class.
Definition: ExprObjC.h:1052
Represents Objective-C&#39;s @try ... @catch ... @finally statement.
Definition: StmtObjC.h:154
void setElse(Stmt *Else)
Definition: Stmt.h:1793
This represents &#39;#pragma omp taskloop simd&#39; directive.
Definition: StmtOpenMP.h:2906
void setTokenLocation(SourceLocation L)
Definition: Expr.h:4072
static OMPSectionsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:236
unsigned getNumCatchStmts() const
Retrieve the number of @catch statements in this try-catch-finally block.
Definition: StmtObjC.h:203
StringLiteral - This represents a string literal expression, e.g.
Definition: Expr.h:1566
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Definition: Expr.h:2396
llvm::APInt readAPInt()
Read an integral value, advancing Idx.
Definition: ASTReader.h:2608
void setOpLoc(SourceLocation L)
Definition: ExprObjC.h:565
void setLoopVarStmt(Stmt *S)
Definition: StmtCXX.h:191
void setTryBody(Stmt *S)
Definition: StmtObjC.h:199
An object for streaming information from a record.
Definition: ASTReader.h:2362
Internal struct to describes an element that is a pack expansion, used if any of the elements in the ...
Definition: ExprObjC.h:276
void setPreCond(Expr *PC)
Definition: StmtOpenMP.h:488
RetTy Visit(PTR(Stmt) S, ParamTys... P)
Definition: StmtVisitor.h:43
void setRParenLoc(SourceLocation L)
Definition: Stmt.h:2288
void reserveInits(const ASTContext &C, unsigned NumInits)
Reserve space for some number of initializers.
Definition: Expr.cpp:2014
static OMPCancelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:585
bool hasTemplateKWAndArgsInfo() const
Definition: ExprCXX.h:2679
Abstract class common to all of the C++ "named"/"keyword" casts.
Definition: ExprCXX.h:270
This represents &#39;#pragma omp sections&#39; directive.
Definition: StmtOpenMP.h:1246
void setNextSwitchCase(SwitchCase *SC)
Definition: Stmt.h:1371
ObjCBoolLiteralExpr - Objective-C Boolean Literal.
Definition: ExprObjC.h:82
unsigned getNumComponents() const
Definition: Expr.h:2176
This represents &#39;#pragma omp target data&#39; directive.
Definition: StmtOpenMP.h:2346
void setNextUpperBound(Expr *NUB)
Definition: StmtOpenMP.h:541
capture_init_iterator capture_init_end()
Retrieve the iterator pointing one past the last initialization argument for this lambda expression...
Definition: ExprCXX.h:1806
capture_range captures()
Definition: Stmt.h:3240
void setKind(CharacterKind kind)
Definition: Expr.h:1429
A reference to a declared variable, function, enum, etc.
Definition: Expr.h:1041
static CaseStmt * CreateEmpty(const ASTContext &Ctx, bool CaseStmtIsGNURange)
Build an empty case statement.
Definition: Stmt.cpp:1091
Designator - A designator in a C99 designated initializer.
Definition: Designator.h:37
void setLabel(LabelDecl *D)
Definition: Stmt.h:2318
Token readToken()
Reads a token out of a record, advancing Idx.
Definition: ASTReader.h:2648
BreakStmt - This represents a break.
Definition: Stmt.h:2410
void setSubStmt(Stmt *SS)
Definition: Stmt.h:1617
static ObjCArrayLiteral * CreateEmpty(const ASTContext &C, unsigned NumElements)
Definition: ExprObjC.cpp:53
void setInc(Expr *Inc)
Definition: StmtOpenMP.h:495
CXXNoexceptExprBitfields CXXNoexceptExprBits
Definition: Stmt.h:941
unsigned getNumArgs() const
Return the number of arguments to the constructor call.
Definition: ExprCXX.h:1410
static SwitchStmt * CreateEmpty(const ASTContext &Ctx, bool HasInit, bool HasVar)
Create an empty switch statement optionally with storage for an init expression and a condition varia...
Definition: Stmt.cpp:957
A trivial tuple used to represent a source range.
void setInit(Stmt *S)
Definition: Stmt.h:2278
This represents &#39;#pragma omp taskyield&#39; directive.
Definition: StmtOpenMP.h:1839
This represents a decl that may have a name.
Definition: Decl.h:249
unsigned NumInputs
Definition: Stmt.h:2535
This represents &#39;#pragma omp distribute parallel for simd&#39; composite directive.
Definition: StmtOpenMP.h:3179
A boolean literal, per ([C++ lex.bool] Boolean literals).
Definition: ExprCXX.h:562
OffsetOfExpr - [C99 7.17] - This represents an expression of the form offsetof(record-type, member-designator).
Definition: Expr.h:2117
This represents &#39;#pragma omp parallel sections&#39; directive.
Definition: StmtOpenMP.h:1700
A Microsoft C++ __uuidof expression, which gets the _GUID that corresponds to the supplied type or ex...
Definition: ExprCXX.h:887
void setCalcLastIteration(Expr *CLI)
Definition: StmtOpenMP.h:485
SwitchCase * getSwitchCaseWithID(unsigned ID)
Retrieve the switch-case statement with the given ID.
Definition: ASTReader.h:2657
static CallExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, EmptyShell Empty)
Create an empty call expression, for deserialization.
Definition: Expr.cpp:1305
The receiver is a superclass.
Definition: ExprObjC.h:1058
void setCombinedNextUpperBound(Expr *CombNUB)
Definition: StmtOpenMP.h:605
SourceLocation getBegin() const
capture_init_iterator capture_init_end()
Retrieve the iterator pointing one past the last initialization argument.
Definition: Stmt.h:3289
Represents Objective-C&#39;s @autoreleasepool Statement.
Definition: StmtObjC.h:345
void setWhileLoc(SourceLocation L)
Definition: Stmt.h:2217
StmtCode
Record codes for each kind of statement or expression.
Definition: ASTBitCodes.h:1554
void setLocEnd(SourceLocation Loc)
Set ending location of directive.
Definition: StmtOpenMP.h:181
void setArg(unsigned Arg, Expr *ArgExpr)
setArg - Set the specified argument.
Definition: ExprObjC.h:1352
void setFinals(ArrayRef< Expr *> A)
Definition: StmtOpenMP.cpp:51
static OMPTeamsDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setBase(Expr *E)
Definition: ExprObjC.h:1462
Represents an implicitly-generated value initialization of an object of a given type.
Definition: Expr.h:4893
void setKeywordLoc(SourceLocation L)
Definition: Stmt.h:1374
void setCapturedRegionKind(CapturedRegionKind Kind)
Set the captured region kind.
Definition: Stmt.cpp:1285
A GenericSelectionExpr record.
Definition: ASTBitCodes.h:1740
This represents &#39;#pragma omp target parallel for&#39; directive.
Definition: StmtOpenMP.h:2581
void setBody(Stmt *B)
Definition: Decl.cpp:4467
void setCond(Expr *Cond)
Definition: Stmt.h:1770
static OMPCancellationPointDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:563
void setLabelLoc(SourceLocation L)
Definition: Stmt.h:2323
#define BLOCK(DERIVED, BASE)
Definition: Template.h:470
void setCond(Expr *E)
Definition: Expr.h:4023
void setAtLoc(SourceLocation Loc)
Definition: StmtObjC.h:366
void setIsConditionTrue(bool isTrue)
Definition: Expr.h:4010
OMPClause * readClause()
CXXDependentScopeMemberExprBitfields CXXDependentScopeMemberExprBits
Definition: Stmt.h:937
static UnresolvedMemberExpr * CreateEmpty(const ASTContext &Context, unsigned NumResults, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
Definition: ExprCXX.cpp:1461
This represents &#39;#pragma omp taskloop&#39; directive.
Definition: StmtOpenMP.h:2841