clang  19.0.0git
ASTReaderStmt.cpp
Go to the documentation of this file.
1 //===- ASTReaderStmt.cpp - Stmt/Expr Deserialization ----------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // Statement/expression deserialization. This implements the
10 // ASTReader::ReadStmt method.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #include "clang/AST/ASTConcept.h"
15 #include "clang/AST/ASTContext.h"
16 #include "clang/AST/AttrIterator.h"
17 #include "clang/AST/Decl.h"
19 #include "clang/AST/DeclCXX.h"
20 #include "clang/AST/DeclGroup.h"
21 #include "clang/AST/DeclObjC.h"
22 #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"
53 #include "llvm/ADT/BitmaskEnum.h"
54 #include "llvm/ADT/DenseMap.h"
55 #include "llvm/ADT/SmallString.h"
56 #include "llvm/ADT/SmallVector.h"
57 #include "llvm/ADT/StringRef.h"
58 #include "llvm/Bitstream/BitstreamReader.h"
59 #include "llvm/Support/Casting.h"
60 #include "llvm/Support/ErrorHandling.h"
61 #include <algorithm>
62 #include <cassert>
63 #include <cstdint>
64 #include <optional>
65 #include <string>
66 
67 using namespace clang;
68 using namespace serialization;
69 
70 namespace clang {
71 
72  class ASTStmtReader : public StmtVisitor<ASTStmtReader> {
74  llvm::BitstreamCursor &DeclsCursor;
75 
76  std::optional<BitsUnpacker> CurrentUnpackingBits;
77 
78  SourceLocation readSourceLocation() {
79  return Record.readSourceLocation();
80  }
81 
82  SourceRange readSourceRange() {
83  return Record.readSourceRange();
84  }
85 
86  std::string readString() {
87  return Record.readString();
88  }
89 
90  TypeSourceInfo *readTypeSourceInfo() {
91  return Record.readTypeSourceInfo();
92  }
93 
94  Decl *readDecl() {
95  return Record.readDecl();
96  }
97 
98  template<typename T>
99  T *readDeclAs() {
100  return Record.readDeclAs<T>();
101  }
102 
103  public:
104  ASTStmtReader(ASTRecordReader &Record, llvm::BitstreamCursor &Cursor)
105  : Record(Record), DeclsCursor(Cursor) {}
106 
107  /// The number of record fields required for the Stmt class
108  /// itself.
109  static const unsigned NumStmtFields = 0;
110 
111  /// The number of record fields required for the Expr class
112  /// itself.
113  static const unsigned NumExprFields = NumStmtFields + 2;
114 
115  /// The number of bits required for the packing bits for the Expr class.
116  static const unsigned NumExprBits = 10;
117 
118  /// Read and initialize a ExplicitTemplateArgumentList structure.
119  void ReadTemplateKWAndArgsInfo(ASTTemplateKWAndArgsInfo &Args,
120  TemplateArgumentLoc *ArgsLocArray,
121  unsigned NumTemplateArgs);
122 
123  void VisitStmt(Stmt *S);
124 #define STMT(Type, Base) \
125  void Visit##Type(Type *);
126 #include "clang/AST/StmtNodes.inc"
127  };
128 
129 } // namespace clang
130 
132  TemplateArgumentLoc *ArgsLocArray,
133  unsigned NumTemplateArgs) {
134  SourceLocation TemplateKWLoc = readSourceLocation();
135  TemplateArgumentListInfo ArgInfo;
136  ArgInfo.setLAngleLoc(readSourceLocation());
137  ArgInfo.setRAngleLoc(readSourceLocation());
138  for (unsigned i = 0; i != NumTemplateArgs; ++i)
139  ArgInfo.addArgument(Record.readTemplateArgumentLoc());
140  Args.initializeFrom(TemplateKWLoc, ArgInfo, ArgsLocArray);
141 }
142 
144  assert(Record.getIdx() == NumStmtFields && "Incorrect statement field count");
145 }
146 
147 void ASTStmtReader::VisitNullStmt(NullStmt *S) {
148  VisitStmt(S);
149  S->setSemiLoc(readSourceLocation());
150  S->NullStmtBits.HasLeadingEmptyMacro = Record.readInt();
151 }
152 
153 void ASTStmtReader::VisitCompoundStmt(CompoundStmt *S) {
154  VisitStmt(S);
156  unsigned NumStmts = Record.readInt();
157  unsigned HasFPFeatures = Record.readInt();
158  assert(S->hasStoredFPFeatures() == HasFPFeatures);
159  while (NumStmts--)
160  Stmts.push_back(Record.readSubStmt());
161  S->setStmts(Stmts);
162  if (HasFPFeatures)
163  S->setStoredFPFeatures(
165  S->LBraceLoc = readSourceLocation();
166  S->RBraceLoc = readSourceLocation();
167 }
168 
169 void ASTStmtReader::VisitSwitchCase(SwitchCase *S) {
170  VisitStmt(S);
171  Record.recordSwitchCaseID(S, Record.readInt());
172  S->setKeywordLoc(readSourceLocation());
173  S->setColonLoc(readSourceLocation());
174 }
175 
176 void ASTStmtReader::VisitCaseStmt(CaseStmt *S) {
177  VisitSwitchCase(S);
178  bool CaseStmtIsGNURange = Record.readInt();
179  S->setLHS(Record.readSubExpr());
180  S->setSubStmt(Record.readSubStmt());
181  if (CaseStmtIsGNURange) {
182  S->setRHS(Record.readSubExpr());
183  S->setEllipsisLoc(readSourceLocation());
184  }
185 }
186 
187 void ASTStmtReader::VisitDefaultStmt(DefaultStmt *S) {
188  VisitSwitchCase(S);
189  S->setSubStmt(Record.readSubStmt());
190 }
191 
192 void ASTStmtReader::VisitLabelStmt(LabelStmt *S) {
193  VisitStmt(S);
194  bool IsSideEntry = Record.readInt();
195  auto *LD = readDeclAs<LabelDecl>();
196  LD->setStmt(S);
197  S->setDecl(LD);
198  S->setSubStmt(Record.readSubStmt());
199  S->setIdentLoc(readSourceLocation());
200  S->setSideEntry(IsSideEntry);
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  CurrentUnpackingBits.emplace(Record.readInt());
223 
224  bool HasElse = CurrentUnpackingBits->getNextBit();
225  bool HasVar = CurrentUnpackingBits->getNextBit();
226  bool HasInit = CurrentUnpackingBits->getNextBit();
227 
228  S->setStatementKind(static_cast<IfStatementKind>(Record.readInt()));
229  S->setCond(Record.readSubExpr());
230  S->setThen(Record.readSubStmt());
231  if (HasElse)
232  S->setElse(Record.readSubStmt());
233  if (HasVar)
234  S->setConditionVariableDeclStmt(cast<DeclStmt>(Record.readSubStmt()));
235  if (HasInit)
236  S->setInit(Record.readSubStmt());
237 
238  S->setIfLoc(readSourceLocation());
239  S->setLParenLoc(readSourceLocation());
240  S->setRParenLoc(readSourceLocation());
241  if (HasElse)
242  S->setElseLoc(readSourceLocation());
243 }
244 
245 void ASTStmtReader::VisitSwitchStmt(SwitchStmt *S) {
246  VisitStmt(S);
247 
248  bool HasInit = Record.readInt();
249  bool HasVar = Record.readInt();
250  bool AllEnumCasesCovered = Record.readInt();
251  if (AllEnumCasesCovered)
252  S->setAllEnumCasesCovered();
253 
254  S->setCond(Record.readSubExpr());
255  S->setBody(Record.readSubStmt());
256  if (HasInit)
257  S->setInit(Record.readSubStmt());
258  if (HasVar)
259  S->setConditionVariableDeclStmt(cast<DeclStmt>(Record.readSubStmt()));
260 
261  S->setSwitchLoc(readSourceLocation());
262  S->setLParenLoc(readSourceLocation());
263  S->setRParenLoc(readSourceLocation());
264 
265  SwitchCase *PrevSC = nullptr;
266  for (auto E = Record.size(); Record.getIdx() != E; ) {
267  SwitchCase *SC = Record.getSwitchCaseWithID(Record.readInt());
268  if (PrevSC)
269  PrevSC->setNextSwitchCase(SC);
270  else
271  S->setSwitchCaseList(SC);
272 
273  PrevSC = SC;
274  }
275 }
276 
277 void ASTStmtReader::VisitWhileStmt(WhileStmt *S) {
278  VisitStmt(S);
279 
280  bool HasVar = Record.readInt();
281 
282  S->setCond(Record.readSubExpr());
283  S->setBody(Record.readSubStmt());
284  if (HasVar)
285  S->setConditionVariableDeclStmt(cast<DeclStmt>(Record.readSubStmt()));
286 
287  S->setWhileLoc(readSourceLocation());
288  S->setLParenLoc(readSourceLocation());
289  S->setRParenLoc(readSourceLocation());
290 }
291 
292 void ASTStmtReader::VisitDoStmt(DoStmt *S) {
293  VisitStmt(S);
294  S->setCond(Record.readSubExpr());
295  S->setBody(Record.readSubStmt());
296  S->setDoLoc(readSourceLocation());
297  S->setWhileLoc(readSourceLocation());
298  S->setRParenLoc(readSourceLocation());
299 }
300 
301 void ASTStmtReader::VisitForStmt(ForStmt *S) {
302  VisitStmt(S);
303  S->setInit(Record.readSubStmt());
304  S->setCond(Record.readSubExpr());
305  S->setConditionVariableDeclStmt(cast_or_null<DeclStmt>(Record.readSubStmt()));
306  S->setInc(Record.readSubExpr());
307  S->setBody(Record.readSubStmt());
308  S->setForLoc(readSourceLocation());
309  S->setLParenLoc(readSourceLocation());
310  S->setRParenLoc(readSourceLocation());
311 }
312 
313 void ASTStmtReader::VisitGotoStmt(GotoStmt *S) {
314  VisitStmt(S);
315  S->setLabel(readDeclAs<LabelDecl>());
316  S->setGotoLoc(readSourceLocation());
317  S->setLabelLoc(readSourceLocation());
318 }
319 
320 void ASTStmtReader::VisitIndirectGotoStmt(IndirectGotoStmt *S) {
321  VisitStmt(S);
322  S->setGotoLoc(readSourceLocation());
323  S->setStarLoc(readSourceLocation());
324  S->setTarget(Record.readSubExpr());
325 }
326 
327 void ASTStmtReader::VisitContinueStmt(ContinueStmt *S) {
328  VisitStmt(S);
329  S->setContinueLoc(readSourceLocation());
330 }
331 
332 void ASTStmtReader::VisitBreakStmt(BreakStmt *S) {
333  VisitStmt(S);
334  S->setBreakLoc(readSourceLocation());
335 }
336 
337 void ASTStmtReader::VisitReturnStmt(ReturnStmt *S) {
338  VisitStmt(S);
339 
340  bool HasNRVOCandidate = Record.readInt();
341 
342  S->setRetValue(Record.readSubExpr());
343  if (HasNRVOCandidate)
344  S->setNRVOCandidate(readDeclAs<VarDecl>());
345 
346  S->setReturnLoc(readSourceLocation());
347 }
348 
349 void ASTStmtReader::VisitDeclStmt(DeclStmt *S) {
350  VisitStmt(S);
351  S->setStartLoc(readSourceLocation());
352  S->setEndLoc(readSourceLocation());
353 
354  if (Record.size() - Record.getIdx() == 1) {
355  // Single declaration
356  S->setDeclGroup(DeclGroupRef(readDecl()));
357  } else {
359  int N = Record.size() - Record.getIdx();
360  Decls.reserve(N);
361  for (int I = 0; I < N; ++I)
362  Decls.push_back(readDecl());
363  S->setDeclGroup(DeclGroupRef(DeclGroup::Create(Record.getContext(),
364  Decls.data(),
365  Decls.size())));
366  }
367 }
368 
369 void ASTStmtReader::VisitAsmStmt(AsmStmt *S) {
370  VisitStmt(S);
371  S->NumOutputs = Record.readInt();
372  S->NumInputs = Record.readInt();
373  S->NumClobbers = Record.readInt();
374  S->setAsmLoc(readSourceLocation());
375  S->setVolatile(Record.readInt());
376  S->setSimple(Record.readInt());
377 }
378 
379 void ASTStmtReader::VisitGCCAsmStmt(GCCAsmStmt *S) {
380  VisitAsmStmt(S);
381  S->NumLabels = Record.readInt();
382  S->setRParenLoc(readSourceLocation());
383  S->setAsmString(cast_or_null<StringLiteral>(Record.readSubStmt()));
384 
385  unsigned NumOutputs = S->getNumOutputs();
386  unsigned NumInputs = S->getNumInputs();
387  unsigned NumClobbers = S->getNumClobbers();
388  unsigned NumLabels = S->getNumLabels();
389 
390  // Outputs and inputs
394  for (unsigned I = 0, N = NumOutputs + NumInputs; I != N; ++I) {
395  Names.push_back(Record.readIdentifier());
396  Constraints.push_back(cast_or_null<StringLiteral>(Record.readSubStmt()));
397  Exprs.push_back(Record.readSubStmt());
398  }
399 
400  // Constraints
402  for (unsigned I = 0; I != NumClobbers; ++I)
403  Clobbers.push_back(cast_or_null<StringLiteral>(Record.readSubStmt()));
404 
405  // Labels
406  for (unsigned I = 0, N = NumLabels; I != N; ++I) {
407  Names.push_back(Record.readIdentifier());
408  Exprs.push_back(Record.readSubStmt());
409  }
410 
411  S->setOutputsAndInputsAndClobbers(Record.getContext(),
412  Names.data(), Constraints.data(),
413  Exprs.data(), NumOutputs, NumInputs,
414  NumLabels,
415  Clobbers.data(), NumClobbers);
416 }
417 
418 void ASTStmtReader::VisitMSAsmStmt(MSAsmStmt *S) {
419  VisitAsmStmt(S);
420  S->LBraceLoc = readSourceLocation();
421  S->EndLoc = readSourceLocation();
422  S->NumAsmToks = Record.readInt();
423  std::string AsmStr = readString();
424 
425  // Read the tokens.
426  SmallVector<Token, 16> AsmToks;
427  AsmToks.reserve(S->NumAsmToks);
428  for (unsigned i = 0, e = S->NumAsmToks; i != e; ++i) {
429  AsmToks.push_back(Record.readToken());
430  }
431 
432  // The calls to reserve() for the FooData vectors are mandatory to
433  // prevent dead StringRefs in the Foo vectors.
434 
435  // Read the clobbers.
436  SmallVector<std::string, 16> ClobbersData;
438  ClobbersData.reserve(S->NumClobbers);
439  Clobbers.reserve(S->NumClobbers);
440  for (unsigned i = 0, e = S->NumClobbers; i != e; ++i) {
441  ClobbersData.push_back(readString());
442  Clobbers.push_back(ClobbersData.back());
443  }
444 
445  // Read the operands.
446  unsigned NumOperands = S->NumOutputs + S->NumInputs;
448  SmallVector<std::string, 16> ConstraintsData;
449  SmallVector<StringRef, 16> Constraints;
450  Exprs.reserve(NumOperands);
451  ConstraintsData.reserve(NumOperands);
452  Constraints.reserve(NumOperands);
453  for (unsigned i = 0; i != NumOperands; ++i) {
454  Exprs.push_back(cast<Expr>(Record.readSubStmt()));
455  ConstraintsData.push_back(readString());
456  Constraints.push_back(ConstraintsData.back());
457  }
458 
459  S->initialize(Record.getContext(), AsmStr, AsmToks,
460  Constraints, Exprs, Clobbers);
461 }
462 
463 void ASTStmtReader::VisitCoroutineBodyStmt(CoroutineBodyStmt *S) {
464  VisitStmt(S);
465  assert(Record.peekInt() == S->NumParams);
466  Record.skipInts(1);
467  auto *StoredStmts = S->getStoredStmts();
468  for (unsigned i = 0;
469  i < CoroutineBodyStmt::SubStmt::FirstParamMove + S->NumParams; ++i)
470  StoredStmts[i] = Record.readSubStmt();
471 }
472 
473 void ASTStmtReader::VisitCoreturnStmt(CoreturnStmt *S) {
474  VisitStmt(S);
475  S->CoreturnLoc = Record.readSourceLocation();
476  for (auto &SubStmt: S->SubStmts)
477  SubStmt = Record.readSubStmt();
478  S->IsImplicit = Record.readInt() != 0;
479 }
480 
481 void ASTStmtReader::VisitCoawaitExpr(CoawaitExpr *E) {
482  VisitExpr(E);
483  E->KeywordLoc = readSourceLocation();
484  for (auto &SubExpr: E->SubExprs)
485  SubExpr = Record.readSubStmt();
486  E->OpaqueValue = cast_or_null<OpaqueValueExpr>(Record.readSubStmt());
487  E->setIsImplicit(Record.readInt() != 0);
488 }
489 
490 void ASTStmtReader::VisitCoyieldExpr(CoyieldExpr *E) {
491  VisitExpr(E);
492  E->KeywordLoc = readSourceLocation();
493  for (auto &SubExpr: E->SubExprs)
494  SubExpr = Record.readSubStmt();
495  E->OpaqueValue = cast_or_null<OpaqueValueExpr>(Record.readSubStmt());
496 }
497 
498 void ASTStmtReader::VisitDependentCoawaitExpr(DependentCoawaitExpr *E) {
499  VisitExpr(E);
500  E->KeywordLoc = readSourceLocation();
501  for (auto &SubExpr: E->SubExprs)
502  SubExpr = Record.readSubStmt();
503 }
504 
505 void ASTStmtReader::VisitCapturedStmt(CapturedStmt *S) {
506  VisitStmt(S);
507  Record.skipInts(1);
508  S->setCapturedDecl(readDeclAs<CapturedDecl>());
509  S->setCapturedRegionKind(static_cast<CapturedRegionKind>(Record.readInt()));
510  S->setCapturedRecordDecl(readDeclAs<RecordDecl>());
511 
512  // Capture inits
513  for (CapturedStmt::capture_init_iterator I = S->capture_init_begin(),
514  E = S->capture_init_end();
515  I != E; ++I)
516  *I = Record.readSubExpr();
517 
518  // Body
519  S->setCapturedStmt(Record.readSubStmt());
520  S->getCapturedDecl()->setBody(S->getCapturedStmt());
521 
522  // Captures
523  for (auto &I : S->captures()) {
524  I.VarAndKind.setPointer(readDeclAs<VarDecl>());
525  I.VarAndKind.setInt(
526  static_cast<CapturedStmt::VariableCaptureKind>(Record.readInt()));
527  I.Loc = readSourceLocation();
528  }
529 }
530 
531 void ASTStmtReader::VisitExpr(Expr *E) {
532  VisitStmt(E);
533  CurrentUnpackingBits.emplace(Record.readInt());
534  E->setDependence(static_cast<ExprDependence>(
535  CurrentUnpackingBits->getNextBits(/*Width=*/5)));
536  E->setValueKind(static_cast<ExprValueKind>(
537  CurrentUnpackingBits->getNextBits(/*Width=*/2)));
538  E->setObjectKind(static_cast<ExprObjectKind>(
539  CurrentUnpackingBits->getNextBits(/*Width=*/3)));
540 
541  E->setType(Record.readType());
542  assert(Record.getIdx() == NumExprFields &&
543  "Incorrect expression field count");
544 }
545 
546 void ASTStmtReader::VisitConstantExpr(ConstantExpr *E) {
547  VisitExpr(E);
548 
549  auto StorageKind = static_cast<ConstantResultStorageKind>(Record.readInt());
550  assert(E->getResultStorageKind() == StorageKind && "Wrong ResultKind!");
551 
552  E->ConstantExprBits.APValueKind = Record.readInt();
553  E->ConstantExprBits.IsUnsigned = Record.readInt();
554  E->ConstantExprBits.BitWidth = Record.readInt();
555  E->ConstantExprBits.HasCleanup = false; // Not serialized, see below.
556  E->ConstantExprBits.IsImmediateInvocation = Record.readInt();
557 
558  switch (StorageKind) {
560  break;
561 
563  E->Int64Result() = Record.readInt();
564  break;
565 
567  E->APValueResult() = Record.readAPValue();
568  if (E->APValueResult().needsCleanup()) {
569  E->ConstantExprBits.HasCleanup = true;
570  Record.getContext().addDestruction(&E->APValueResult());
571  }
572  break;
573  }
574 
575  E->setSubExpr(Record.readSubExpr());
576 }
577 
578 void ASTStmtReader::VisitSYCLUniqueStableNameExpr(SYCLUniqueStableNameExpr *E) {
579  VisitExpr(E);
580 
581  E->setLocation(readSourceLocation());
582  E->setLParenLocation(readSourceLocation());
583  E->setRParenLocation(readSourceLocation());
584 
585  E->setTypeSourceInfo(Record.readTypeSourceInfo());
586 }
587 
588 void ASTStmtReader::VisitSYCLUniqueStableIdExpr(SYCLUniqueStableIdExpr *E) {
589  VisitExpr(E);
590 
591  E->setLocation(readSourceLocation());
592  E->setLParenLocation(readSourceLocation());
593  E->setRParenLocation(readSourceLocation());
594 
595  E->setExpr(Record.readSubExpr());
596 }
597 
598 void ASTStmtReader::VisitPredefinedExpr(PredefinedExpr *E) {
599  VisitExpr(E);
600  bool HasFunctionName = Record.readInt();
601  E->PredefinedExprBits.HasFunctionName = HasFunctionName;
602  E->PredefinedExprBits.Kind = Record.readInt();
603  E->PredefinedExprBits.IsTransparent = Record.readInt();
604  E->setLocation(readSourceLocation());
605  if (HasFunctionName)
606  E->setFunctionName(cast<StringLiteral>(Record.readSubExpr()));
607 }
608 
609 void ASTStmtReader::VisitDeclRefExpr(DeclRefExpr *E) {
610  VisitExpr(E);
611 
612  CurrentUnpackingBits.emplace(Record.readInt());
613  E->DeclRefExprBits.HadMultipleCandidates = CurrentUnpackingBits->getNextBit();
614  E->DeclRefExprBits.RefersToEnclosingVariableOrCapture =
615  CurrentUnpackingBits->getNextBit();
616  E->DeclRefExprBits.NonOdrUseReason =
617  CurrentUnpackingBits->getNextBits(/*Width=*/2);
618  E->DeclRefExprBits.IsImmediateEscalating = CurrentUnpackingBits->getNextBit();
619  E->DeclRefExprBits.HasFoundDecl = CurrentUnpackingBits->getNextBit();
620  E->DeclRefExprBits.HasQualifier = CurrentUnpackingBits->getNextBit();
621  E->DeclRefExprBits.HasTemplateKWAndArgsInfo =
622  CurrentUnpackingBits->getNextBit();
623  E->DeclRefExprBits.CapturedByCopyInLambdaWithExplicitObjectParameter = false;
624  unsigned NumTemplateArgs = 0;
625  if (E->hasTemplateKWAndArgsInfo())
626  NumTemplateArgs = Record.readInt();
627 
628  if (E->hasQualifier())
629  new (E->getTrailingObjects<NestedNameSpecifierLoc>())
630  NestedNameSpecifierLoc(Record.readNestedNameSpecifierLoc());
631 
632  if (E->hasFoundDecl())
633  *E->getTrailingObjects<NamedDecl *>() = readDeclAs<NamedDecl>();
634 
635  if (E->hasTemplateKWAndArgsInfo())
636  ReadTemplateKWAndArgsInfo(
637  *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>(),
638  E->getTrailingObjects<TemplateArgumentLoc>(), NumTemplateArgs);
639 
640  E->D = readDeclAs<ValueDecl>();
641  E->setLocation(readSourceLocation());
642  E->DNLoc = Record.readDeclarationNameLoc(E->getDecl()->getDeclName());
643 }
644 
645 void ASTStmtReader::VisitIntegerLiteral(IntegerLiteral *E) {
646  VisitExpr(E);
647  E->setLocation(readSourceLocation());
648  E->setValue(Record.getContext(), Record.readAPInt());
649 }
650 
651 void ASTStmtReader::VisitFixedPointLiteral(FixedPointLiteral *E) {
652  VisitExpr(E);
653  E->setLocation(readSourceLocation());
654  E->setScale(Record.readInt());
655  E->setValue(Record.getContext(), Record.readAPInt());
656 }
657 
658 void ASTStmtReader::VisitFloatingLiteral(FloatingLiteral *E) {
659  VisitExpr(E);
660  E->setRawSemantics(
661  static_cast<llvm::APFloatBase::Semantics>(Record.readInt()));
662  E->setExact(Record.readInt());
663  E->setValue(Record.getContext(), Record.readAPFloat(E->getSemantics()));
664  E->setLocation(readSourceLocation());
665 }
666 
667 void ASTStmtReader::VisitImaginaryLiteral(ImaginaryLiteral *E) {
668  VisitExpr(E);
669  E->setSubExpr(Record.readSubExpr());
670 }
671 
672 void ASTStmtReader::VisitStringLiteral(StringLiteral *E) {
673  VisitExpr(E);
674 
675  // NumConcatenated, Length and CharByteWidth are set by the empty
676  // ctor since they are needed to allocate storage for the trailing objects.
677  unsigned NumConcatenated = Record.readInt();
678  unsigned Length = Record.readInt();
679  unsigned CharByteWidth = Record.readInt();
680  assert((NumConcatenated == E->getNumConcatenated()) &&
681  "Wrong number of concatenated tokens!");
682  assert((Length == E->getLength()) && "Wrong Length!");
683  assert((CharByteWidth == E->getCharByteWidth()) && "Wrong character width!");
684  E->StringLiteralBits.Kind = Record.readInt();
685  E->StringLiteralBits.IsPascal = Record.readInt();
686 
687  // The character width is originally computed via mapCharByteWidth.
688  // Check that the deserialized character width is consistant with the result
689  // of calling mapCharByteWidth.
690  assert((CharByteWidth ==
691  StringLiteral::mapCharByteWidth(Record.getContext().getTargetInfo(),
692  E->getKind())) &&
693  "Wrong character width!");
694 
695  // Deserialize the trailing array of SourceLocation.
696  for (unsigned I = 0; I < NumConcatenated; ++I)
697  E->setStrTokenLoc(I, readSourceLocation());
698 
699  // Deserialize the trailing array of char holding the string data.
700  char *StrData = E->getStrDataAsChar();
701  for (unsigned I = 0; I < Length * CharByteWidth; ++I)
702  StrData[I] = Record.readInt();
703 }
704 
705 void ASTStmtReader::VisitCharacterLiteral(CharacterLiteral *E) {
706  VisitExpr(E);
707  E->setValue(Record.readInt());
708  E->setLocation(readSourceLocation());
709  E->setKind(static_cast<CharacterLiteralKind>(Record.readInt()));
710 }
711 
712 void ASTStmtReader::VisitParenExpr(ParenExpr *E) {
713  VisitExpr(E);
714  E->setLParen(readSourceLocation());
715  E->setRParen(readSourceLocation());
716  E->setSubExpr(Record.readSubExpr());
717 }
718 
719 void ASTStmtReader::VisitParenListExpr(ParenListExpr *E) {
720  VisitExpr(E);
721  unsigned NumExprs = Record.readInt();
722  assert((NumExprs == E->getNumExprs()) && "Wrong NumExprs!");
723  for (unsigned I = 0; I != NumExprs; ++I)
724  E->getTrailingObjects<Stmt *>()[I] = Record.readSubStmt();
725  E->LParenLoc = readSourceLocation();
726  E->RParenLoc = readSourceLocation();
727 }
728 
729 void ASTStmtReader::VisitUnaryOperator(UnaryOperator *E) {
730  VisitExpr(E);
731  bool hasFP_Features = CurrentUnpackingBits->getNextBit();
732  assert(hasFP_Features == E->hasStoredFPFeatures());
733  E->setSubExpr(Record.readSubExpr());
734  E->setOpcode(
735  (UnaryOperator::Opcode)CurrentUnpackingBits->getNextBits(/*Width=*/5));
736  E->setOperatorLoc(readSourceLocation());
737  E->setCanOverflow(CurrentUnpackingBits->getNextBit());
738  if (hasFP_Features)
741 }
742 
743 void ASTStmtReader::VisitOffsetOfExpr(OffsetOfExpr *E) {
744  VisitExpr(E);
745  assert(E->getNumComponents() == Record.peekInt());
746  Record.skipInts(1);
747  assert(E->getNumExpressions() == Record.peekInt());
748  Record.skipInts(1);
749  E->setOperatorLoc(readSourceLocation());
750  E->setRParenLoc(readSourceLocation());
751  E->setTypeSourceInfo(readTypeSourceInfo());
752  for (unsigned I = 0, N = E->getNumComponents(); I != N; ++I) {
753  auto Kind = static_cast<OffsetOfNode::Kind>(Record.readInt());
754  SourceLocation Start = readSourceLocation();
755  SourceLocation End = readSourceLocation();
756  switch (Kind) {
757  case OffsetOfNode::Array:
758  E->setComponent(I, OffsetOfNode(Start, Record.readInt(), End));
759  break;
760 
761  case OffsetOfNode::Field:
762  E->setComponent(
763  I, OffsetOfNode(Start, readDeclAs<FieldDecl>(), End));
764  break;
765 
767  E->setComponent(
768  I,
769  OffsetOfNode(Start, Record.readIdentifier(), End));
770  break;
771 
772  case OffsetOfNode::Base: {
773  auto *Base = new (Record.getContext()) CXXBaseSpecifier();
774  *Base = Record.readCXXBaseSpecifier();
776  break;
777  }
778  }
779  }
780 
781  for (unsigned I = 0, N = E->getNumExpressions(); I != N; ++I)
782  E->setIndexExpr(I, Record.readSubExpr());
783 }
784 
785 void ASTStmtReader::VisitUnaryExprOrTypeTraitExpr(UnaryExprOrTypeTraitExpr *E) {
786  VisitExpr(E);
787  E->setKind(static_cast<UnaryExprOrTypeTrait>(Record.readInt()));
788  if (Record.peekInt() == 0) {
789  E->setArgument(Record.readSubExpr());
790  Record.skipInts(1);
791  } else {
792  E->setArgument(readTypeSourceInfo());
793  }
794  E->setOperatorLoc(readSourceLocation());
795  E->setRParenLoc(readSourceLocation());
796 }
797 
800  ConstraintSatisfaction Satisfaction;
801  Satisfaction.IsSatisfied = Record.readInt();
802  Satisfaction.ContainsErrors = Record.readInt();
803  if (!Satisfaction.IsSatisfied) {
804  unsigned NumDetailRecords = Record.readInt();
805  for (unsigned i = 0; i != NumDetailRecords; ++i) {
806  Expr *ConstraintExpr = Record.readExpr();
807  if (/* IsDiagnostic */Record.readInt()) {
808  SourceLocation DiagLocation = Record.readSourceLocation();
809  std::string DiagMessage = Record.readString();
810  Satisfaction.Details.emplace_back(
811  ConstraintExpr, new (Record.getContext())
813  DiagLocation, DiagMessage});
814  } else
815  Satisfaction.Details.emplace_back(ConstraintExpr, Record.readExpr());
816  }
817  }
818  return Satisfaction;
819 }
820 
821 void ASTStmtReader::VisitConceptSpecializationExpr(
823  VisitExpr(E);
824  E->SpecDecl = Record.readDeclAs<ImplicitConceptSpecializationDecl>();
825  if (Record.readBool())
826  E->ConceptRef = Record.readConceptReference();
827  E->Satisfaction = E->isValueDependent() ? nullptr :
830 }
831 
834  std::string SubstitutedEntity = Record.readString();
835  SourceLocation DiagLoc = Record.readSourceLocation();
836  std::string DiagMessage = Record.readString();
837  return new (Record.getContext())
838  concepts::Requirement::SubstitutionDiagnostic{SubstitutedEntity, DiagLoc,
839  DiagMessage};
840 }
841 
842 void ASTStmtReader::VisitRequiresExpr(RequiresExpr *E) {
843  VisitExpr(E);
844  unsigned NumLocalParameters = Record.readInt();
845  unsigned NumRequirements = Record.readInt();
846  E->RequiresExprBits.RequiresKWLoc = Record.readSourceLocation();
847  E->RequiresExprBits.IsSatisfied = Record.readInt();
848  E->Body = Record.readDeclAs<RequiresExprBodyDecl>();
849  llvm::SmallVector<ParmVarDecl *, 4> LocalParameters;
850  for (unsigned i = 0; i < NumLocalParameters; ++i)
851  LocalParameters.push_back(cast<ParmVarDecl>(Record.readDecl()));
852  std::copy(LocalParameters.begin(), LocalParameters.end(),
853  E->getTrailingObjects<ParmVarDecl *>());
855  for (unsigned i = 0; i < NumRequirements; ++i) {
856  auto RK =
857  static_cast<concepts::Requirement::RequirementKind>(Record.readInt());
858  concepts::Requirement *R = nullptr;
859  switch (RK) {
861  auto Status =
863  Record.readInt());
865  R = new (Record.getContext())
867  else
868  R = new (Record.getContext())
869  concepts::TypeRequirement(Record.readTypeSourceInfo());
870  } break;
873  auto Status =
875  Record.readInt());
877  Expr *> E;
880  } else
881  E = Record.readExpr();
882 
883  std::optional<concepts::ExprRequirement::ReturnTypeRequirement> Req;
884  ConceptSpecializationExpr *SubstitutedConstraintExpr = nullptr;
885  SourceLocation NoexceptLoc;
887  Req.emplace();
888  } else {
889  NoexceptLoc = Record.readSourceLocation();
890  switch (/* returnTypeRequirementKind */Record.readInt()) {
891  case 0:
892  // No return type requirement.
893  Req.emplace();
894  break;
895  case 1: {
896  // type-constraint
897  TemplateParameterList *TPL = Record.readTemplateParameterList();
898  if (Status >=
900  SubstitutedConstraintExpr =
901  cast<ConceptSpecializationExpr>(Record.readExpr());
902  Req.emplace(TPL);
903  } break;
904  case 2:
905  // Substitution failure
906  Req.emplace(readSubstitutionDiagnostic(Record));
907  break;
908  }
909  }
910  if (Expr *Ex = E.dyn_cast<Expr *>())
911  R = new (Record.getContext()) concepts::ExprRequirement(
912  Ex, RK == concepts::Requirement::RK_Simple, NoexceptLoc,
913  std::move(*Req), Status, SubstitutedConstraintExpr);
914  else
915  R = new (Record.getContext()) concepts::ExprRequirement(
917  RK == concepts::Requirement::RK_Simple, NoexceptLoc,
918  std::move(*Req));
919  } break;
921  bool HasInvalidConstraint = Record.readInt();
922  if (HasInvalidConstraint) {
923  std::string InvalidConstraint = Record.readString();
924  char *InvalidConstraintBuf =
925  new (Record.getContext()) char[InvalidConstraint.size()];
926  std::copy(InvalidConstraint.begin(), InvalidConstraint.end(),
927  InvalidConstraintBuf);
928  R = new (Record.getContext()) concepts::NestedRequirement(
929  Record.getContext(),
930  StringRef(InvalidConstraintBuf, InvalidConstraint.size()),
932  break;
933  }
934  Expr *E = Record.readExpr();
935  if (E->isInstantiationDependent())
936  R = new (Record.getContext()) concepts::NestedRequirement(E);
937  else
938  R = new (Record.getContext())
939  concepts::NestedRequirement(Record.getContext(), E,
941  } break;
942  }
943  if (!R)
944  continue;
945  Requirements.push_back(R);
946  }
947  std::copy(Requirements.begin(), Requirements.end(),
948  E->getTrailingObjects<concepts::Requirement *>());
949  E->LParenLoc = Record.readSourceLocation();
950  E->RParenLoc = Record.readSourceLocation();
951  E->RBraceLoc = Record.readSourceLocation();
952 }
953 
954 void ASTStmtReader::VisitArraySubscriptExpr(ArraySubscriptExpr *E) {
955  VisitExpr(E);
956  E->setLHS(Record.readSubExpr());
957  E->setRHS(Record.readSubExpr());
958  E->setRBracketLoc(readSourceLocation());
959 }
960 
961 void ASTStmtReader::VisitMatrixSubscriptExpr(MatrixSubscriptExpr *E) {
962  VisitExpr(E);
963  E->setBase(Record.readSubExpr());
964  E->setRowIdx(Record.readSubExpr());
965  E->setColumnIdx(Record.readSubExpr());
966  E->setRBracketLoc(readSourceLocation());
967 }
968 
969 void ASTStmtReader::VisitArraySectionExpr(ArraySectionExpr *E) {
970  VisitExpr(E);
971  E->ASType = Record.readEnum<ArraySectionExpr::ArraySectionType>();
972 
973  E->setBase(Record.readSubExpr());
974  E->setLowerBound(Record.readSubExpr());
975  E->setLength(Record.readSubExpr());
976 
977  if (E->isOMPArraySection())
978  E->setStride(Record.readSubExpr());
979 
980  E->setColonLocFirst(readSourceLocation());
981 
982  if (E->isOMPArraySection())
983  E->setColonLocSecond(readSourceLocation());
984 
985  E->setRBracketLoc(readSourceLocation());
986 }
987 
988 void ASTStmtReader::VisitOMPArrayShapingExpr(OMPArrayShapingExpr *E) {
989  VisitExpr(E);
990  unsigned NumDims = Record.readInt();
991  E->setBase(Record.readSubExpr());
992  SmallVector<Expr *, 4> Dims(NumDims);
993  for (unsigned I = 0; I < NumDims; ++I)
994  Dims[I] = Record.readSubExpr();
995  E->setDimensions(Dims);
996  SmallVector<SourceRange, 4> SRs(NumDims);
997  for (unsigned I = 0; I < NumDims; ++I)
998  SRs[I] = readSourceRange();
999  E->setBracketsRanges(SRs);
1000  E->setLParenLoc(readSourceLocation());
1001  E->setRParenLoc(readSourceLocation());
1002 }
1003 
1004 void ASTStmtReader::VisitOMPIteratorExpr(OMPIteratorExpr *E) {
1005  VisitExpr(E);
1006  unsigned NumIters = Record.readInt();
1007  E->setIteratorKwLoc(readSourceLocation());
1008  E->setLParenLoc(readSourceLocation());
1009  E->setRParenLoc(readSourceLocation());
1010  for (unsigned I = 0; I < NumIters; ++I) {
1011  E->setIteratorDeclaration(I, Record.readDeclRef());
1012  E->setAssignmentLoc(I, readSourceLocation());
1013  Expr *Begin = Record.readSubExpr();
1014  Expr *End = Record.readSubExpr();
1015  Expr *Step = Record.readSubExpr();
1016  SourceLocation ColonLoc = readSourceLocation();
1017  SourceLocation SecColonLoc;
1018  if (Step)
1019  SecColonLoc = readSourceLocation();
1020  E->setIteratorRange(I, Begin, ColonLoc, End, SecColonLoc, Step);
1021  // Deserialize helpers
1023  HD.CounterVD = cast_or_null<VarDecl>(Record.readDeclRef());
1024  HD.Upper = Record.readSubExpr();
1025  HD.Update = Record.readSubExpr();
1026  HD.CounterUpdate = Record.readSubExpr();
1027  E->setHelper(I, HD);
1028  }
1029 }
1030 
1031 void ASTStmtReader::VisitCallExpr(CallExpr *E) {
1032  VisitExpr(E);
1033 
1034  unsigned NumArgs = Record.readInt();
1035  CurrentUnpackingBits.emplace(Record.readInt());
1036  E->setADLCallKind(
1037  static_cast<CallExpr::ADLCallKind>(CurrentUnpackingBits->getNextBit()));
1038  bool HasFPFeatures = CurrentUnpackingBits->getNextBit();
1039  assert((NumArgs == E->getNumArgs()) && "Wrong NumArgs!");
1040  E->setRParenLoc(readSourceLocation());
1041  E->setCallee(Record.readSubExpr());
1042  for (unsigned I = 0; I != NumArgs; ++I)
1043  E->setArg(I, Record.readSubExpr());
1044 
1045  if (HasFPFeatures)
1048 }
1049 
1050 void ASTStmtReader::VisitCXXMemberCallExpr(CXXMemberCallExpr *E) {
1051  VisitCallExpr(E);
1052 }
1053 
1054 void ASTStmtReader::VisitMemberExpr(MemberExpr *E) {
1055  VisitExpr(E);
1056 
1057  CurrentUnpackingBits.emplace(Record.readInt());
1058  bool HasQualifier = CurrentUnpackingBits->getNextBit();
1059  bool HasFoundDecl = CurrentUnpackingBits->getNextBit();
1060  bool HasTemplateInfo = CurrentUnpackingBits->getNextBit();
1061  unsigned NumTemplateArgs = Record.readInt();
1062 
1063  E->Base = Record.readSubExpr();
1064  E->MemberDecl = Record.readDeclAs<ValueDecl>();
1065  E->MemberDNLoc = Record.readDeclarationNameLoc(E->MemberDecl->getDeclName());
1066  E->MemberLoc = Record.readSourceLocation();
1067  E->MemberExprBits.IsArrow = CurrentUnpackingBits->getNextBit();
1068  E->MemberExprBits.HasQualifier = HasQualifier;
1069  E->MemberExprBits.HasFoundDecl = HasFoundDecl;
1070  E->MemberExprBits.HasTemplateKWAndArgsInfo = HasTemplateInfo;
1071  E->MemberExprBits.HadMultipleCandidates = CurrentUnpackingBits->getNextBit();
1072  E->MemberExprBits.NonOdrUseReason =
1073  CurrentUnpackingBits->getNextBits(/*Width=*/2);
1074  E->MemberExprBits.OperatorLoc = Record.readSourceLocation();
1075 
1076  if (HasQualifier)
1077  new (E->getTrailingObjects<NestedNameSpecifierLoc>())
1078  NestedNameSpecifierLoc(Record.readNestedNameSpecifierLoc());
1079 
1080  if (HasFoundDecl) {
1081  auto *FoundD = Record.readDeclAs<NamedDecl>();
1082  auto AS = (AccessSpecifier)CurrentUnpackingBits->getNextBits(/*Width=*/2);
1083  *E->getTrailingObjects<DeclAccessPair>() = DeclAccessPair::make(FoundD, AS);
1084  }
1085 
1086  if (HasTemplateInfo)
1087  ReadTemplateKWAndArgsInfo(
1088  *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>(),
1089  E->getTrailingObjects<TemplateArgumentLoc>(), NumTemplateArgs);
1090 }
1091 
1092 void ASTStmtReader::VisitObjCIsaExpr(ObjCIsaExpr *E) {
1093  VisitExpr(E);
1094  E->setBase(Record.readSubExpr());
1095  E->setIsaMemberLoc(readSourceLocation());
1096  E->setOpLoc(readSourceLocation());
1097  E->setArrow(Record.readInt());
1098 }
1099 
1100 void ASTStmtReader::
1101 VisitObjCIndirectCopyRestoreExpr(ObjCIndirectCopyRestoreExpr *E) {
1102  VisitExpr(E);
1103  E->Operand = Record.readSubExpr();
1104  E->setShouldCopy(Record.readInt());
1105 }
1106 
1107 void ASTStmtReader::VisitObjCBridgedCastExpr(ObjCBridgedCastExpr *E) {
1108  VisitExplicitCastExpr(E);
1109  E->LParenLoc = readSourceLocation();
1110  E->BridgeKeywordLoc = readSourceLocation();
1111  E->Kind = Record.readInt();
1112 }
1113 
1114 void ASTStmtReader::VisitCastExpr(CastExpr *E) {
1115  VisitExpr(E);
1116  unsigned NumBaseSpecs = Record.readInt();
1117  assert(NumBaseSpecs == E->path_size());
1118 
1119  CurrentUnpackingBits.emplace(Record.readInt());
1120  E->setCastKind((CastKind)CurrentUnpackingBits->getNextBits(/*Width=*/7));
1121  unsigned HasFPFeatures = CurrentUnpackingBits->getNextBit();
1122  assert(E->hasStoredFPFeatures() == HasFPFeatures);
1123 
1124  E->setSubExpr(Record.readSubExpr());
1125 
1126  CastExpr::path_iterator BaseI = E->path_begin();
1127  while (NumBaseSpecs--) {
1128  auto *BaseSpec = new (Record.getContext()) CXXBaseSpecifier;
1129  *BaseSpec = Record.readCXXBaseSpecifier();
1130  *BaseI++ = BaseSpec;
1131  }
1132  if (HasFPFeatures)
1133  *E->getTrailingFPFeatures() =
1135 }
1136 
1137 void ASTStmtReader::VisitBinaryOperator(BinaryOperator *E) {
1138  VisitExpr(E);
1139  CurrentUnpackingBits.emplace(Record.readInt());
1140  E->setOpcode(
1141  (BinaryOperator::Opcode)CurrentUnpackingBits->getNextBits(/*Width=*/6));
1142  bool hasFP_Features = CurrentUnpackingBits->getNextBit();
1143  E->setHasStoredFPFeatures(hasFP_Features);
1144  E->setLHS(Record.readSubExpr());
1145  E->setRHS(Record.readSubExpr());
1146  E->setOperatorLoc(readSourceLocation());
1147  if (hasFP_Features)
1150 }
1151 
1152 void ASTStmtReader::VisitCompoundAssignOperator(CompoundAssignOperator *E) {
1153  VisitBinaryOperator(E);
1154  E->setComputationLHSType(Record.readType());
1155  E->setComputationResultType(Record.readType());
1156 }
1157 
1158 void ASTStmtReader::VisitConditionalOperator(ConditionalOperator *E) {
1159  VisitExpr(E);
1160  E->SubExprs[ConditionalOperator::COND] = Record.readSubExpr();
1161  E->SubExprs[ConditionalOperator::LHS] = Record.readSubExpr();
1162  E->SubExprs[ConditionalOperator::RHS] = Record.readSubExpr();
1163  E->QuestionLoc = readSourceLocation();
1164  E->ColonLoc = readSourceLocation();
1165 }
1166 
1167 void
1168 ASTStmtReader::VisitBinaryConditionalOperator(BinaryConditionalOperator *E) {
1169  VisitExpr(E);
1170  E->OpaqueValue = cast<OpaqueValueExpr>(Record.readSubExpr());
1171  E->SubExprs[BinaryConditionalOperator::COMMON] = Record.readSubExpr();
1172  E->SubExprs[BinaryConditionalOperator::COND] = Record.readSubExpr();
1173  E->SubExprs[BinaryConditionalOperator::LHS] = Record.readSubExpr();
1174  E->SubExprs[BinaryConditionalOperator::RHS] = Record.readSubExpr();
1175  E->QuestionLoc = readSourceLocation();
1176  E->ColonLoc = readSourceLocation();
1177 }
1178 
1179 void ASTStmtReader::VisitImplicitCastExpr(ImplicitCastExpr *E) {
1180  VisitCastExpr(E);
1181  E->setIsPartOfExplicitCast(CurrentUnpackingBits->getNextBit());
1182 }
1183 
1184 void ASTStmtReader::VisitExplicitCastExpr(ExplicitCastExpr *E) {
1185  VisitCastExpr(E);
1186  E->setTypeInfoAsWritten(readTypeSourceInfo());
1187 }
1188 
1189 void ASTStmtReader::VisitCStyleCastExpr(CStyleCastExpr *E) {
1190  VisitExplicitCastExpr(E);
1191  E->setLParenLoc(readSourceLocation());
1192  E->setRParenLoc(readSourceLocation());
1193 }
1194 
1195 void ASTStmtReader::VisitCompoundLiteralExpr(CompoundLiteralExpr *E) {
1196  VisitExpr(E);
1197  E->setLParenLoc(readSourceLocation());
1198  E->setTypeSourceInfo(readTypeSourceInfo());
1199  E->setInitializer(Record.readSubExpr());
1200  E->setFileScope(Record.readInt());
1201 }
1202 
1203 void ASTStmtReader::VisitExtVectorElementExpr(ExtVectorElementExpr *E) {
1204  VisitExpr(E);
1205  E->setBase(Record.readSubExpr());
1206  E->setAccessor(Record.readIdentifier());
1207  E->setAccessorLoc(readSourceLocation());
1208 }
1209 
1210 void ASTStmtReader::VisitInitListExpr(InitListExpr *E) {
1211  VisitExpr(E);
1212  if (auto *SyntForm = cast_or_null<InitListExpr>(Record.readSubStmt()))
1213  E->setSyntacticForm(SyntForm);
1214  E->setLBraceLoc(readSourceLocation());
1215  E->setRBraceLoc(readSourceLocation());
1216  bool isArrayFiller = Record.readInt();
1217  Expr *filler = nullptr;
1218  if (isArrayFiller) {
1219  filler = Record.readSubExpr();
1220  E->ArrayFillerOrUnionFieldInit = filler;
1221  } else
1222  E->ArrayFillerOrUnionFieldInit = readDeclAs<FieldDecl>();
1223  E->sawArrayRangeDesignator(Record.readInt());
1224  unsigned NumInits = Record.readInt();
1225  E->reserveInits(Record.getContext(), NumInits);
1226  if (isArrayFiller) {
1227  for (unsigned I = 0; I != NumInits; ++I) {
1228  Expr *init = Record.readSubExpr();
1229  E->updateInit(Record.getContext(), I, init ? init : filler);
1230  }
1231  } else {
1232  for (unsigned I = 0; I != NumInits; ++I)
1233  E->updateInit(Record.getContext(), I, Record.readSubExpr());
1234  }
1235 }
1236 
1237 void ASTStmtReader::VisitDesignatedInitExpr(DesignatedInitExpr *E) {
1239 
1240  VisitExpr(E);
1241  unsigned NumSubExprs = Record.readInt();
1242  assert(NumSubExprs == E->getNumSubExprs() && "Wrong number of subexprs");
1243  for (unsigned I = 0; I != NumSubExprs; ++I)
1244  E->setSubExpr(I, Record.readSubExpr());
1245  E->setEqualOrColonLoc(readSourceLocation());
1246  E->setGNUSyntax(Record.readInt());
1247 
1248  SmallVector<Designator, 4> Designators;
1249  while (Record.getIdx() < Record.size()) {
1250  switch ((DesignatorTypes)Record.readInt()) {
1251  case DESIG_FIELD_DECL: {
1252  auto *Field = readDeclAs<FieldDecl>();
1253  SourceLocation DotLoc = readSourceLocation();
1254  SourceLocation FieldLoc = readSourceLocation();
1255  Designators.push_back(Designator::CreateFieldDesignator(
1256  Field->getIdentifier(), DotLoc, FieldLoc));
1257  Designators.back().setFieldDecl(Field);
1258  break;
1259  }
1260 
1261  case DESIG_FIELD_NAME: {
1262  const IdentifierInfo *Name = Record.readIdentifier();
1263  SourceLocation DotLoc = readSourceLocation();
1264  SourceLocation FieldLoc = readSourceLocation();
1265  Designators.push_back(Designator::CreateFieldDesignator(Name, DotLoc,
1266  FieldLoc));
1267  break;
1268  }
1269 
1270  case DESIG_ARRAY: {
1271  unsigned Index = Record.readInt();
1272  SourceLocation LBracketLoc = readSourceLocation();
1273  SourceLocation RBracketLoc = readSourceLocation();
1274  Designators.push_back(Designator::CreateArrayDesignator(Index,
1275  LBracketLoc,
1276  RBracketLoc));
1277  break;
1278  }
1279 
1280  case DESIG_ARRAY_RANGE: {
1281  unsigned Index = Record.readInt();
1282  SourceLocation LBracketLoc = readSourceLocation();
1283  SourceLocation EllipsisLoc = readSourceLocation();
1284  SourceLocation RBracketLoc = readSourceLocation();
1285  Designators.push_back(Designator::CreateArrayRangeDesignator(
1286  Index, LBracketLoc, EllipsisLoc, RBracketLoc));
1287  break;
1288  }
1289  }
1290  }
1291  E->setDesignators(Record.getContext(),
1292  Designators.data(), Designators.size());
1293 }
1294 
1295 void ASTStmtReader::VisitDesignatedInitUpdateExpr(DesignatedInitUpdateExpr *E) {
1296  VisitExpr(E);
1297  E->setBase(Record.readSubExpr());
1298  E->setUpdater(Record.readSubExpr());
1299 }
1300 
1301 void ASTStmtReader::VisitNoInitExpr(NoInitExpr *E) {
1302  VisitExpr(E);
1303 }
1304 
1305 void ASTStmtReader::VisitArrayInitLoopExpr(ArrayInitLoopExpr *E) {
1306  VisitExpr(E);
1307  E->SubExprs[0] = Record.readSubExpr();
1308  E->SubExprs[1] = Record.readSubExpr();
1309 }
1310 
1311 void ASTStmtReader::VisitArrayInitIndexExpr(ArrayInitIndexExpr *E) {
1312  VisitExpr(E);
1313 }
1314 
1315 void ASTStmtReader::VisitImplicitValueInitExpr(ImplicitValueInitExpr *E) {
1316  VisitExpr(E);
1317 }
1318 
1319 void ASTStmtReader::VisitVAArgExpr(VAArgExpr *E) {
1320  VisitExpr(E);
1321  E->setSubExpr(Record.readSubExpr());
1322  E->setWrittenTypeInfo(readTypeSourceInfo());
1323  E->setBuiltinLoc(readSourceLocation());
1324  E->setRParenLoc(readSourceLocation());
1325  E->setIsMicrosoftABI(Record.readInt());
1326 }
1327 
1328 void ASTStmtReader::VisitSourceLocExpr(SourceLocExpr *E) {
1329  VisitExpr(E);
1330  E->ParentContext = readDeclAs<DeclContext>();
1331  E->BuiltinLoc = readSourceLocation();
1332  E->RParenLoc = readSourceLocation();
1333  E->SourceLocExprBits.Kind = Record.readInt();
1334 }
1335 
1336 void ASTStmtReader::VisitAddrLabelExpr(AddrLabelExpr *E) {
1337  VisitExpr(E);
1338  E->setAmpAmpLoc(readSourceLocation());
1339  E->setLabelLoc(readSourceLocation());
1340  E->setLabel(readDeclAs<LabelDecl>());
1341 }
1342 
1343 void ASTStmtReader::VisitStmtExpr(StmtExpr *E) {
1344  VisitExpr(E);
1345  E->setLParenLoc(readSourceLocation());
1346  E->setRParenLoc(readSourceLocation());
1347  E->setSubStmt(cast_or_null<CompoundStmt>(Record.readSubStmt()));
1348  E->StmtExprBits.TemplateDepth = Record.readInt();
1349 }
1350 
1351 void ASTStmtReader::VisitChooseExpr(ChooseExpr *E) {
1352  VisitExpr(E);
1353  E->setCond(Record.readSubExpr());
1354  E->setLHS(Record.readSubExpr());
1355  E->setRHS(Record.readSubExpr());
1356  E->setBuiltinLoc(readSourceLocation());
1357  E->setRParenLoc(readSourceLocation());
1358  E->setIsConditionTrue(Record.readInt());
1359 }
1360 
1361 void ASTStmtReader::VisitGNUNullExpr(GNUNullExpr *E) {
1362  VisitExpr(E);
1363  E->setTokenLocation(readSourceLocation());
1364 }
1365 
1366 void ASTStmtReader::VisitShuffleVectorExpr(ShuffleVectorExpr *E) {
1367  VisitExpr(E);
1369  unsigned NumExprs = Record.readInt();
1370  while (NumExprs--)
1371  Exprs.push_back(Record.readSubExpr());
1372  E->setExprs(Record.getContext(), Exprs);
1373  E->setBuiltinLoc(readSourceLocation());
1374  E->setRParenLoc(readSourceLocation());
1375 }
1376 
1377 void ASTStmtReader::VisitConvertVectorExpr(ConvertVectorExpr *E) {
1378  VisitExpr(E);
1379  E->BuiltinLoc = readSourceLocation();
1380  E->RParenLoc = readSourceLocation();
1381  E->TInfo = readTypeSourceInfo();
1382  E->SrcExpr = Record.readSubExpr();
1383 }
1384 
1385 void ASTStmtReader::VisitBlockExpr(BlockExpr *E) {
1386  VisitExpr(E);
1387  E->setBlockDecl(readDeclAs<BlockDecl>());
1388 }
1389 
1390 void ASTStmtReader::VisitGenericSelectionExpr(GenericSelectionExpr *E) {
1391  VisitExpr(E);
1392 
1393  unsigned NumAssocs = Record.readInt();
1394  assert(NumAssocs == E->getNumAssocs() && "Wrong NumAssocs!");
1395  E->IsExprPredicate = Record.readInt();
1396  E->ResultIndex = Record.readInt();
1397  E->GenericSelectionExprBits.GenericLoc = readSourceLocation();
1398  E->DefaultLoc = readSourceLocation();
1399  E->RParenLoc = readSourceLocation();
1400 
1401  Stmt **Stmts = E->getTrailingObjects<Stmt *>();
1402  // Add 1 to account for the controlling expression which is the first
1403  // expression in the trailing array of Stmt *. This is not needed for
1404  // the trailing array of TypeSourceInfo *.
1405  for (unsigned I = 0, N = NumAssocs + 1; I < N; ++I)
1406  Stmts[I] = Record.readSubExpr();
1407 
1408  TypeSourceInfo **TSIs = E->getTrailingObjects<TypeSourceInfo *>();
1409  for (unsigned I = 0, N = NumAssocs; I < N; ++I)
1410  TSIs[I] = readTypeSourceInfo();
1411 }
1412 
1413 void ASTStmtReader::VisitPseudoObjectExpr(PseudoObjectExpr *E) {
1414  VisitExpr(E);
1415  unsigned numSemanticExprs = Record.readInt();
1416  assert(numSemanticExprs + 1 == E->PseudoObjectExprBits.NumSubExprs);
1417  E->PseudoObjectExprBits.ResultIndex = Record.readInt();
1418 
1419  // Read the syntactic expression.
1420  E->getSubExprsBuffer()[0] = Record.readSubExpr();
1421 
1422  // Read all the semantic expressions.
1423  for (unsigned i = 0; i != numSemanticExprs; ++i) {
1424  Expr *subExpr = Record.readSubExpr();
1425  E->getSubExprsBuffer()[i+1] = subExpr;
1426  }
1427 }
1428 
1429 void ASTStmtReader::VisitAtomicExpr(AtomicExpr *E) {
1430  VisitExpr(E);
1431  E->Op = AtomicExpr::AtomicOp(Record.readInt());
1432  E->NumSubExprs = AtomicExpr::getNumSubExprs(E->Op);
1433  for (unsigned I = 0; I != E->NumSubExprs; ++I)
1434  E->SubExprs[I] = Record.readSubExpr();
1435  E->BuiltinLoc = readSourceLocation();
1436  E->RParenLoc = readSourceLocation();
1437 }
1438 
1439 //===----------------------------------------------------------------------===//
1440 // Objective-C Expressions and Statements
1441 
1442 void ASTStmtReader::VisitObjCStringLiteral(ObjCStringLiteral *E) {
1443  VisitExpr(E);
1444  E->setString(cast<StringLiteral>(Record.readSubStmt()));
1445  E->setAtLoc(readSourceLocation());
1446 }
1447 
1448 void ASTStmtReader::VisitObjCBoxedExpr(ObjCBoxedExpr *E) {
1449  VisitExpr(E);
1450  // could be one of several IntegerLiteral, FloatLiteral, etc.
1451  E->SubExpr = Record.readSubStmt();
1452  E->BoxingMethod = readDeclAs<ObjCMethodDecl>();
1453  E->Range = readSourceRange();
1454 }
1455 
1456 void ASTStmtReader::VisitObjCArrayLiteral(ObjCArrayLiteral *E) {
1457  VisitExpr(E);
1458  unsigned NumElements = Record.readInt();
1459  assert(NumElements == E->getNumElements() && "Wrong number of elements");
1460  Expr **Elements = E->getElements();
1461  for (unsigned I = 0, N = NumElements; I != N; ++I)
1462  Elements[I] = Record.readSubExpr();
1463  E->ArrayWithObjectsMethod = readDeclAs<ObjCMethodDecl>();
1464  E->Range = readSourceRange();
1465 }
1466 
1467 void ASTStmtReader::VisitObjCDictionaryLiteral(ObjCDictionaryLiteral *E) {
1468  VisitExpr(E);
1469  unsigned NumElements = Record.readInt();
1470  assert(NumElements == E->getNumElements() && "Wrong number of elements");
1471  bool HasPackExpansions = Record.readInt();
1472  assert(HasPackExpansions == E->HasPackExpansions &&"Pack expansion mismatch");
1473  auto *KeyValues =
1474  E->getTrailingObjects<ObjCDictionaryLiteral::KeyValuePair>();
1475  auto *Expansions =
1476  E->getTrailingObjects<ObjCDictionaryLiteral::ExpansionData>();
1477  for (unsigned I = 0; I != NumElements; ++I) {
1478  KeyValues[I].Key = Record.readSubExpr();
1479  KeyValues[I].Value = Record.readSubExpr();
1480  if (HasPackExpansions) {
1481  Expansions[I].EllipsisLoc = readSourceLocation();
1482  Expansions[I].NumExpansionsPlusOne = Record.readInt();
1483  }
1484  }
1485  E->DictWithObjectsMethod = readDeclAs<ObjCMethodDecl>();
1486  E->Range = readSourceRange();
1487 }
1488 
1489 void ASTStmtReader::VisitObjCEncodeExpr(ObjCEncodeExpr *E) {
1490  VisitExpr(E);
1491  E->setEncodedTypeSourceInfo(readTypeSourceInfo());
1492  E->setAtLoc(readSourceLocation());
1493  E->setRParenLoc(readSourceLocation());
1494 }
1495 
1496 void ASTStmtReader::VisitObjCSelectorExpr(ObjCSelectorExpr *E) {
1497  VisitExpr(E);
1498  E->setSelector(Record.readSelector());
1499  E->setAtLoc(readSourceLocation());
1500  E->setRParenLoc(readSourceLocation());
1501 }
1502 
1503 void ASTStmtReader::VisitObjCProtocolExpr(ObjCProtocolExpr *E) {
1504  VisitExpr(E);
1505  E->setProtocol(readDeclAs<ObjCProtocolDecl>());
1506  E->setAtLoc(readSourceLocation());
1507  E->ProtoLoc = readSourceLocation();
1508  E->setRParenLoc(readSourceLocation());
1509 }
1510 
1511 void ASTStmtReader::VisitObjCIvarRefExpr(ObjCIvarRefExpr *E) {
1512  VisitExpr(E);
1513  E->setDecl(readDeclAs<ObjCIvarDecl>());
1514  E->setLocation(readSourceLocation());
1515  E->setOpLoc(readSourceLocation());
1516  E->setBase(Record.readSubExpr());
1517  E->setIsArrow(Record.readInt());
1518  E->setIsFreeIvar(Record.readInt());
1519 }
1520 
1521 void ASTStmtReader::VisitObjCPropertyRefExpr(ObjCPropertyRefExpr *E) {
1522  VisitExpr(E);
1523  unsigned MethodRefFlags = Record.readInt();
1524  bool Implicit = Record.readInt() != 0;
1525  if (Implicit) {
1526  auto *Getter = readDeclAs<ObjCMethodDecl>();
1527  auto *Setter = readDeclAs<ObjCMethodDecl>();
1528  E->setImplicitProperty(Getter, Setter, MethodRefFlags);
1529  } else {
1530  E->setExplicitProperty(readDeclAs<ObjCPropertyDecl>(), MethodRefFlags);
1531  }
1532  E->setLocation(readSourceLocation());
1533  E->setReceiverLocation(readSourceLocation());
1534  switch (Record.readInt()) {
1535  case 0:
1536  E->setBase(Record.readSubExpr());
1537  break;
1538  case 1:
1539  E->setSuperReceiver(Record.readType());
1540  break;
1541  case 2:
1542  E->setClassReceiver(readDeclAs<ObjCInterfaceDecl>());
1543  break;
1544  }
1545 }
1546 
1547 void ASTStmtReader::VisitObjCSubscriptRefExpr(ObjCSubscriptRefExpr *E) {
1548  VisitExpr(E);
1549  E->setRBracket(readSourceLocation());
1550  E->setBaseExpr(Record.readSubExpr());
1551  E->setKeyExpr(Record.readSubExpr());
1552  E->GetAtIndexMethodDecl = readDeclAs<ObjCMethodDecl>();
1553  E->SetAtIndexMethodDecl = readDeclAs<ObjCMethodDecl>();
1554 }
1555 
1556 void ASTStmtReader::VisitObjCMessageExpr(ObjCMessageExpr *E) {
1557  VisitExpr(E);
1558  assert(Record.peekInt() == E->getNumArgs());
1559  Record.skipInts(1);
1560  unsigned NumStoredSelLocs = Record.readInt();
1561  E->SelLocsKind = Record.readInt();
1562  E->setDelegateInitCall(Record.readInt());
1563  E->IsImplicit = Record.readInt();
1564  auto Kind = static_cast<ObjCMessageExpr::ReceiverKind>(Record.readInt());
1565  switch (Kind) {
1567  E->setInstanceReceiver(Record.readSubExpr());
1568  break;
1569 
1571  E->setClassReceiver(readTypeSourceInfo());
1572  break;
1573 
1576  QualType T = Record.readType();
1577  SourceLocation SuperLoc = readSourceLocation();
1578  E->setSuper(SuperLoc, T, Kind == ObjCMessageExpr::SuperInstance);
1579  break;
1580  }
1581  }
1582 
1583  assert(Kind == E->getReceiverKind());
1584 
1585  if (Record.readInt())
1586  E->setMethodDecl(readDeclAs<ObjCMethodDecl>());
1587  else
1588  E->setSelector(Record.readSelector());
1589 
1590  E->LBracLoc = readSourceLocation();
1591  E->RBracLoc = readSourceLocation();
1592 
1593  for (unsigned I = 0, N = E->getNumArgs(); I != N; ++I)
1594  E->setArg(I, Record.readSubExpr());
1595 
1596  SourceLocation *Locs = E->getStoredSelLocs();
1597  for (unsigned I = 0; I != NumStoredSelLocs; ++I)
1598  Locs[I] = readSourceLocation();
1599 }
1600 
1601 void ASTStmtReader::VisitObjCForCollectionStmt(ObjCForCollectionStmt *S) {
1602  VisitStmt(S);
1603  S->setElement(Record.readSubStmt());
1604  S->setCollection(Record.readSubExpr());
1605  S->setBody(Record.readSubStmt());
1606  S->setForLoc(readSourceLocation());
1607  S->setRParenLoc(readSourceLocation());
1608 }
1609 
1610 void ASTStmtReader::VisitObjCAtCatchStmt(ObjCAtCatchStmt *S) {
1611  VisitStmt(S);
1612  S->setCatchBody(Record.readSubStmt());
1613  S->setCatchParamDecl(readDeclAs<VarDecl>());
1614  S->setAtCatchLoc(readSourceLocation());
1615  S->setRParenLoc(readSourceLocation());
1616 }
1617 
1618 void ASTStmtReader::VisitObjCAtFinallyStmt(ObjCAtFinallyStmt *S) {
1619  VisitStmt(S);
1620  S->setFinallyBody(Record.readSubStmt());
1621  S->setAtFinallyLoc(readSourceLocation());
1622 }
1623 
1624 void ASTStmtReader::VisitObjCAutoreleasePoolStmt(ObjCAutoreleasePoolStmt *S) {
1625  VisitStmt(S); // FIXME: no test coverage.
1626  S->setSubStmt(Record.readSubStmt());
1627  S->setAtLoc(readSourceLocation());
1628 }
1629 
1630 void ASTStmtReader::VisitObjCAtTryStmt(ObjCAtTryStmt *S) {
1631  VisitStmt(S);
1632  assert(Record.peekInt() == S->getNumCatchStmts());
1633  Record.skipInts(1);
1634  bool HasFinally = Record.readInt();
1635  S->setTryBody(Record.readSubStmt());
1636  for (unsigned I = 0, N = S->getNumCatchStmts(); I != N; ++I)
1637  S->setCatchStmt(I, cast_or_null<ObjCAtCatchStmt>(Record.readSubStmt()));
1638 
1639  if (HasFinally)
1640  S->setFinallyStmt(Record.readSubStmt());
1641  S->setAtTryLoc(readSourceLocation());
1642 }
1643 
1644 void ASTStmtReader::VisitObjCAtSynchronizedStmt(ObjCAtSynchronizedStmt *S) {
1645  VisitStmt(S); // FIXME: no test coverage.
1646  S->setSynchExpr(Record.readSubStmt());
1647  S->setSynchBody(Record.readSubStmt());
1648  S->setAtSynchronizedLoc(readSourceLocation());
1649 }
1650 
1651 void ASTStmtReader::VisitObjCAtThrowStmt(ObjCAtThrowStmt *S) {
1652  VisitStmt(S); // FIXME: no test coverage.
1653  S->setThrowExpr(Record.readSubStmt());
1654  S->setThrowLoc(readSourceLocation());
1655 }
1656 
1657 void ASTStmtReader::VisitObjCBoolLiteralExpr(ObjCBoolLiteralExpr *E) {
1658  VisitExpr(E);
1659  E->setValue(Record.readInt());
1660  E->setLocation(readSourceLocation());
1661 }
1662 
1663 void ASTStmtReader::VisitObjCAvailabilityCheckExpr(ObjCAvailabilityCheckExpr *E) {
1664  VisitExpr(E);
1665  SourceRange R = Record.readSourceRange();
1666  E->AtLoc = R.getBegin();
1667  E->RParen = R.getEnd();
1668  E->VersionToCheck = Record.readVersionTuple();
1669 }
1670 
1671 //===----------------------------------------------------------------------===//
1672 // C++ Expressions and Statements
1673 //===----------------------------------------------------------------------===//
1674 
1675 void ASTStmtReader::VisitCXXCatchStmt(CXXCatchStmt *S) {
1676  VisitStmt(S);
1677  S->CatchLoc = readSourceLocation();
1678  S->ExceptionDecl = readDeclAs<VarDecl>();
1679  S->HandlerBlock = Record.readSubStmt();
1680 }
1681 
1682 void ASTStmtReader::VisitCXXTryStmt(CXXTryStmt *S) {
1683  VisitStmt(S);
1684  assert(Record.peekInt() == S->getNumHandlers() && "NumStmtFields is wrong ?");
1685  Record.skipInts(1);
1686  S->TryLoc = readSourceLocation();
1687  S->getStmts()[0] = Record.readSubStmt();
1688  for (unsigned i = 0, e = S->getNumHandlers(); i != e; ++i)
1689  S->getStmts()[i + 1] = Record.readSubStmt();
1690 }
1691 
1692 void ASTStmtReader::VisitCXXForRangeStmt(CXXForRangeStmt *S) {
1693  VisitStmt(S);
1694  S->ForLoc = readSourceLocation();
1695  S->CoawaitLoc = readSourceLocation();
1696  S->ColonLoc = readSourceLocation();
1697  S->RParenLoc = readSourceLocation();
1698  S->setInit(Record.readSubStmt());
1699  S->setRangeStmt(Record.readSubStmt());
1700  S->setBeginStmt(Record.readSubStmt());
1701  S->setEndStmt(Record.readSubStmt());
1702  S->setCond(Record.readSubExpr());
1703  S->setInc(Record.readSubExpr());
1704  S->setLoopVarStmt(Record.readSubStmt());
1705  S->setBody(Record.readSubStmt());
1706 }
1707 
1708 void ASTStmtReader::VisitMSDependentExistsStmt(MSDependentExistsStmt *S) {
1709  VisitStmt(S);
1710  S->KeywordLoc = readSourceLocation();
1711  S->IsIfExists = Record.readInt();
1712  S->QualifierLoc = Record.readNestedNameSpecifierLoc();
1713  S->NameInfo = Record.readDeclarationNameInfo();
1714  S->SubStmt = Record.readSubStmt();
1715 }
1716 
1717 void ASTStmtReader::VisitCXXOperatorCallExpr(CXXOperatorCallExpr *E) {
1718  VisitCallExpr(E);
1719  E->CXXOperatorCallExprBits.OperatorKind = Record.readInt();
1720  E->Range = Record.readSourceRange();
1721 }
1722 
1723 void ASTStmtReader::VisitCXXRewrittenBinaryOperator(
1725  VisitExpr(E);
1726  E->CXXRewrittenBinaryOperatorBits.IsReversed = Record.readInt();
1727  E->SemanticForm = Record.readSubExpr();
1728 }
1729 
1730 void ASTStmtReader::VisitCXXConstructExpr(CXXConstructExpr *E) {
1731  VisitExpr(E);
1732 
1733  unsigned NumArgs = Record.readInt();
1734  assert((NumArgs == E->getNumArgs()) && "Wrong NumArgs!");
1735 
1736  E->CXXConstructExprBits.Elidable = Record.readInt();
1737  E->CXXConstructExprBits.HadMultipleCandidates = Record.readInt();
1738  E->CXXConstructExprBits.ListInitialization = Record.readInt();
1739  E->CXXConstructExprBits.StdInitListInitialization = Record.readInt();
1740  E->CXXConstructExprBits.ZeroInitialization = Record.readInt();
1741  E->CXXConstructExprBits.ConstructionKind = Record.readInt();
1742  E->CXXConstructExprBits.IsImmediateEscalating = Record.readInt();
1743  E->CXXConstructExprBits.Loc = readSourceLocation();
1744  E->Constructor = readDeclAs<CXXConstructorDecl>();
1745  E->ParenOrBraceRange = readSourceRange();
1746 
1747  for (unsigned I = 0; I != NumArgs; ++I)
1748  E->setArg(I, Record.readSubExpr());
1749 }
1750 
1751 void ASTStmtReader::VisitCXXInheritedCtorInitExpr(CXXInheritedCtorInitExpr *E) {
1752  VisitExpr(E);
1753  E->Constructor = readDeclAs<CXXConstructorDecl>();
1754  E->Loc = readSourceLocation();
1755  E->ConstructsVirtualBase = Record.readInt();
1756  E->InheritedFromVirtualBase = Record.readInt();
1757 }
1758 
1759 void ASTStmtReader::VisitCXXTemporaryObjectExpr(CXXTemporaryObjectExpr *E) {
1760  VisitCXXConstructExpr(E);
1761  E->TSI = readTypeSourceInfo();
1762 }
1763 
1764 void ASTStmtReader::VisitLambdaExpr(LambdaExpr *E) {
1765  VisitExpr(E);
1766  unsigned NumCaptures = Record.readInt();
1767  (void)NumCaptures;
1768  assert(NumCaptures == E->LambdaExprBits.NumCaptures);
1769  E->IntroducerRange = readSourceRange();
1770  E->LambdaExprBits.CaptureDefault = Record.readInt();
1771  E->CaptureDefaultLoc = readSourceLocation();
1772  E->LambdaExprBits.ExplicitParams = Record.readInt();
1773  E->LambdaExprBits.ExplicitResultType = Record.readInt();
1774  E->ClosingBrace = readSourceLocation();
1775 
1776  // Read capture initializers.
1778  CEnd = E->capture_init_end();
1779  C != CEnd; ++C)
1780  *C = Record.readSubExpr();
1781 
1782  // The body will be lazily deserialized when needed from the call operator
1783  // declaration.
1784 }
1785 
1786 void
1787 ASTStmtReader::VisitCXXStdInitializerListExpr(CXXStdInitializerListExpr *E) {
1788  VisitExpr(E);
1789  E->SubExpr = Record.readSubExpr();
1790 }
1791 
1792 void ASTStmtReader::VisitCXXNamedCastExpr(CXXNamedCastExpr *E) {
1793  VisitExplicitCastExpr(E);
1794  SourceRange R = readSourceRange();
1795  E->Loc = R.getBegin();
1796  E->RParenLoc = R.getEnd();
1797  if (CurrentUnpackingBits->getNextBit())
1798  E->AngleBrackets = readSourceRange();
1799 }
1800 
1801 void ASTStmtReader::VisitCXXStaticCastExpr(CXXStaticCastExpr *E) {
1802  return VisitCXXNamedCastExpr(E);
1803 }
1804 
1805 void ASTStmtReader::VisitCXXDynamicCastExpr(CXXDynamicCastExpr *E) {
1806  return VisitCXXNamedCastExpr(E);
1807 }
1808 
1809 void ASTStmtReader::VisitCXXReinterpretCastExpr(CXXReinterpretCastExpr *E) {
1810  return VisitCXXNamedCastExpr(E);
1811 }
1812 
1813 void ASTStmtReader::VisitCXXAddrspaceCastExpr(CXXAddrspaceCastExpr *E) {
1814  return VisitCXXNamedCastExpr(E);
1815 }
1816 
1817 void ASTStmtReader::VisitCXXConstCastExpr(CXXConstCastExpr *E) {
1818  return VisitCXXNamedCastExpr(E);
1819 }
1820 
1821 void ASTStmtReader::VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr *E) {
1822  VisitExplicitCastExpr(E);
1823  E->setLParenLoc(readSourceLocation());
1824  E->setRParenLoc(readSourceLocation());
1825 }
1826 
1827 void ASTStmtReader::VisitBuiltinBitCastExpr(BuiltinBitCastExpr *E) {
1828  VisitExplicitCastExpr(E);
1829  E->KWLoc = readSourceLocation();
1830  E->RParenLoc = readSourceLocation();
1831 }
1832 
1833 void ASTStmtReader::VisitSYCLBuiltinNumFieldsExpr(SYCLBuiltinNumFieldsExpr *E) {
1834  E->setLocation(readSourceLocation());
1835  E->SourceTy = Record.readType();
1836 }
1837 
1838 void ASTStmtReader::VisitSYCLBuiltinFieldTypeExpr(SYCLBuiltinFieldTypeExpr *E) {
1839  E->setLocation(readSourceLocation());
1840  E->SourceTy = Record.readType();
1841  E->Index = Record.readExpr();
1842 }
1843 
1844 void ASTStmtReader::VisitSYCLBuiltinNumBasesExpr(SYCLBuiltinNumBasesExpr *E) {
1845  E->setLocation(readSourceLocation());
1846  E->SourceTy = Record.readType();
1847 }
1848 
1849 void ASTStmtReader::VisitSYCLBuiltinBaseTypeExpr(SYCLBuiltinBaseTypeExpr *E) {
1850  E->setLocation(readSourceLocation());
1851  E->SourceTy = Record.readType();
1852  E->Index = Record.readExpr();
1853 }
1854 
1855 void ASTStmtReader::VisitUserDefinedLiteral(UserDefinedLiteral *E) {
1856  VisitCallExpr(E);
1857  E->UDSuffixLoc = readSourceLocation();
1858 }
1859 
1860 void ASTStmtReader::VisitCXXBoolLiteralExpr(CXXBoolLiteralExpr *E) {
1861  VisitExpr(E);
1862  E->setValue(Record.readInt());
1863  E->setLocation(readSourceLocation());
1864 }
1865 
1866 void ASTStmtReader::VisitCXXNullPtrLiteralExpr(CXXNullPtrLiteralExpr *E) {
1867  VisitExpr(E);
1868  E->setLocation(readSourceLocation());
1869 }
1870 
1871 void ASTStmtReader::VisitCXXTypeidExpr(CXXTypeidExpr *E) {
1872  VisitExpr(E);
1873  E->setSourceRange(readSourceRange());
1874  if (E->isTypeOperand())
1875  E->Operand = readTypeSourceInfo();
1876  else
1877  E->Operand = Record.readSubExpr();
1878 }
1879 
1880 void ASTStmtReader::VisitCXXThisExpr(CXXThisExpr *E) {
1881  VisitExpr(E);
1882  E->setLocation(readSourceLocation());
1883  E->setImplicit(Record.readInt());
1885 }
1886 
1887 void ASTStmtReader::VisitCXXThrowExpr(CXXThrowExpr *E) {
1888  VisitExpr(E);
1889  E->CXXThrowExprBits.ThrowLoc = readSourceLocation();
1890  E->Operand = Record.readSubExpr();
1891  E->CXXThrowExprBits.IsThrownVariableInScope = Record.readInt();
1892 }
1893 
1894 void ASTStmtReader::VisitCXXDefaultArgExpr(CXXDefaultArgExpr *E) {
1895  VisitExpr(E);
1896  E->Param = readDeclAs<ParmVarDecl>();
1897  E->UsedContext = readDeclAs<DeclContext>();
1898  E->CXXDefaultArgExprBits.Loc = readSourceLocation();
1899  E->CXXDefaultArgExprBits.HasRewrittenInit = Record.readInt();
1900  if (E->CXXDefaultArgExprBits.HasRewrittenInit)
1901  *E->getTrailingObjects<Expr *>() = Record.readSubExpr();
1902 }
1903 
1904 void ASTStmtReader::VisitCXXDefaultInitExpr(CXXDefaultInitExpr *E) {
1905  VisitExpr(E);
1906  E->CXXDefaultInitExprBits.HasRewrittenInit = Record.readInt();
1907  E->Field = readDeclAs<FieldDecl>();
1908  E->UsedContext = readDeclAs<DeclContext>();
1909  E->CXXDefaultInitExprBits.Loc = readSourceLocation();
1910  if (E->CXXDefaultInitExprBits.HasRewrittenInit)
1911  *E->getTrailingObjects<Expr *>() = Record.readSubExpr();
1912 }
1913 
1914 void ASTStmtReader::VisitCXXBindTemporaryExpr(CXXBindTemporaryExpr *E) {
1915  VisitExpr(E);
1916  E->setTemporary(Record.readCXXTemporary());
1917  E->setSubExpr(Record.readSubExpr());
1918 }
1919 
1920 void ASTStmtReader::VisitCXXScalarValueInitExpr(CXXScalarValueInitExpr *E) {
1921  VisitExpr(E);
1922  E->TypeInfo = readTypeSourceInfo();
1923  E->CXXScalarValueInitExprBits.RParenLoc = readSourceLocation();
1924 }
1925 
1926 void ASTStmtReader::VisitCXXNewExpr(CXXNewExpr *E) {
1927  VisitExpr(E);
1928 
1929  bool IsArray = Record.readInt();
1930  bool HasInit = Record.readInt();
1931  unsigned NumPlacementArgs = Record.readInt();
1932  bool IsParenTypeId = Record.readInt();
1933 
1934  E->CXXNewExprBits.IsGlobalNew = Record.readInt();
1935  E->CXXNewExprBits.ShouldPassAlignment = Record.readInt();
1936  E->CXXNewExprBits.UsualArrayDeleteWantsSize = Record.readInt();
1937  E->CXXNewExprBits.HasInitializer = Record.readInt();
1938  E->CXXNewExprBits.StoredInitializationStyle = Record.readInt();
1939 
1940  assert((IsArray == E->isArray()) && "Wrong IsArray!");
1941  assert((HasInit == E->hasInitializer()) && "Wrong HasInit!");
1942  assert((NumPlacementArgs == E->getNumPlacementArgs()) &&
1943  "Wrong NumPlacementArgs!");
1944  assert((IsParenTypeId == E->isParenTypeId()) && "Wrong IsParenTypeId!");
1945  (void)IsArray;
1946  (void)HasInit;
1947  (void)NumPlacementArgs;
1948 
1949  E->setOperatorNew(readDeclAs<FunctionDecl>());
1950  E->setOperatorDelete(readDeclAs<FunctionDecl>());
1951  E->AllocatedTypeInfo = readTypeSourceInfo();
1952  if (IsParenTypeId)
1953  E->getTrailingObjects<SourceRange>()[0] = readSourceRange();
1954  E->Range = readSourceRange();
1955  E->DirectInitRange = readSourceRange();
1956 
1957  // Install all the subexpressions.
1959  N = E->raw_arg_end();
1960  I != N; ++I)
1961  *I = Record.readSubStmt();
1962 }
1963 
1964 void ASTStmtReader::VisitCXXDeleteExpr(CXXDeleteExpr *E) {
1965  VisitExpr(E);
1966  E->CXXDeleteExprBits.GlobalDelete = Record.readInt();
1967  E->CXXDeleteExprBits.ArrayForm = Record.readInt();
1968  E->CXXDeleteExprBits.ArrayFormAsWritten = Record.readInt();
1969  E->CXXDeleteExprBits.UsualArrayDeleteWantsSize = Record.readInt();
1970  E->OperatorDelete = readDeclAs<FunctionDecl>();
1971  E->Argument = Record.readSubExpr();
1972  E->CXXDeleteExprBits.Loc = readSourceLocation();
1973 }
1974 
1975 void ASTStmtReader::VisitCXXPseudoDestructorExpr(CXXPseudoDestructorExpr *E) {
1976  VisitExpr(E);
1977 
1978  E->Base = Record.readSubExpr();
1979  E->IsArrow = Record.readInt();
1980  E->OperatorLoc = readSourceLocation();
1981  E->QualifierLoc = Record.readNestedNameSpecifierLoc();
1982  E->ScopeType = readTypeSourceInfo();
1983  E->ColonColonLoc = readSourceLocation();
1984  E->TildeLoc = readSourceLocation();
1985 
1986  IdentifierInfo *II = Record.readIdentifier();
1987  if (II)
1988  E->setDestroyedType(II, readSourceLocation());
1989  else
1990  E->setDestroyedType(readTypeSourceInfo());
1991 }
1992 
1993 void ASTStmtReader::VisitExprWithCleanups(ExprWithCleanups *E) {
1994  VisitExpr(E);
1995 
1996  unsigned NumObjects = Record.readInt();
1997  assert(NumObjects == E->getNumObjects());
1998  for (unsigned i = 0; i != NumObjects; ++i) {
1999  unsigned CleanupKind = Record.readInt();
2001  if (CleanupKind == COK_Block)
2002  Obj = readDeclAs<BlockDecl>();
2003  else if (CleanupKind == COK_CompoundLiteral)
2004  Obj = cast<CompoundLiteralExpr>(Record.readSubExpr());
2005  else
2006  llvm_unreachable("unexpected cleanup object type");
2007  E->getTrailingObjects<ExprWithCleanups::CleanupObject>()[i] = Obj;
2008  }
2009 
2010  E->ExprWithCleanupsBits.CleanupsHaveSideEffects = Record.readInt();
2011  E->SubExpr = Record.readSubExpr();
2012 }
2013 
2014 void ASTStmtReader::VisitCXXDependentScopeMemberExpr(
2016  VisitExpr(E);
2017 
2018  unsigned NumTemplateArgs = Record.readInt();
2019  CurrentUnpackingBits.emplace(Record.readInt());
2020  bool HasTemplateKWAndArgsInfo = CurrentUnpackingBits->getNextBit();
2021  bool HasFirstQualifierFoundInScope = CurrentUnpackingBits->getNextBit();
2022 
2023  assert((HasTemplateKWAndArgsInfo == E->hasTemplateKWAndArgsInfo()) &&
2024  "Wrong HasTemplateKWAndArgsInfo!");
2025  assert(
2026  (HasFirstQualifierFoundInScope == E->hasFirstQualifierFoundInScope()) &&
2027  "Wrong HasFirstQualifierFoundInScope!");
2028 
2029  if (HasTemplateKWAndArgsInfo)
2030  ReadTemplateKWAndArgsInfo(
2031  *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>(),
2032  E->getTrailingObjects<TemplateArgumentLoc>(), NumTemplateArgs);
2033 
2034  assert((NumTemplateArgs == E->getNumTemplateArgs()) &&
2035  "Wrong NumTemplateArgs!");
2036 
2037  E->CXXDependentScopeMemberExprBits.IsArrow =
2038  CurrentUnpackingBits->getNextBit();
2039 
2040  E->BaseType = Record.readType();
2041  E->QualifierLoc = Record.readNestedNameSpecifierLoc();
2042  // not ImplicitAccess
2043  if (CurrentUnpackingBits->getNextBit())
2044  E->Base = Record.readSubExpr();
2045  else
2046  E->Base = nullptr;
2047 
2048  E->CXXDependentScopeMemberExprBits.OperatorLoc = readSourceLocation();
2049 
2050  if (HasFirstQualifierFoundInScope)
2051  *E->getTrailingObjects<NamedDecl *>() = readDeclAs<NamedDecl>();
2052 
2053  E->MemberNameInfo = Record.readDeclarationNameInfo();
2054 }
2055 
2056 void
2057 ASTStmtReader::VisitDependentScopeDeclRefExpr(DependentScopeDeclRefExpr *E) {
2058  VisitExpr(E);
2059 
2060  if (CurrentUnpackingBits->getNextBit()) // HasTemplateKWAndArgsInfo
2061  ReadTemplateKWAndArgsInfo(
2062  *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>(),
2063  E->getTrailingObjects<TemplateArgumentLoc>(),
2064  /*NumTemplateArgs=*/CurrentUnpackingBits->getNextBits(/*Width=*/16));
2065 
2066  E->QualifierLoc = Record.readNestedNameSpecifierLoc();
2067  E->NameInfo = Record.readDeclarationNameInfo();
2068 }
2069 
2070 void
2071 ASTStmtReader::VisitCXXUnresolvedConstructExpr(CXXUnresolvedConstructExpr *E) {
2072  VisitExpr(E);
2073  assert(Record.peekInt() == E->getNumArgs() &&
2074  "Read wrong record during creation ?");
2075  Record.skipInts(1);
2076  for (unsigned I = 0, N = E->getNumArgs(); I != N; ++I)
2077  E->setArg(I, Record.readSubExpr());
2078  E->TypeAndInitForm.setPointer(readTypeSourceInfo());
2079  E->setLParenLoc(readSourceLocation());
2080  E->setRParenLoc(readSourceLocation());
2081  E->TypeAndInitForm.setInt(Record.readInt());
2082 }
2083 
2084 void ASTStmtReader::VisitOverloadExpr(OverloadExpr *E) {
2085  VisitExpr(E);
2086 
2087  unsigned NumResults = Record.readInt();
2088  CurrentUnpackingBits.emplace(Record.readInt());
2089  bool HasTemplateKWAndArgsInfo = CurrentUnpackingBits->getNextBit();
2090  assert((E->getNumDecls() == NumResults) && "Wrong NumResults!");
2091  assert((E->hasTemplateKWAndArgsInfo() == HasTemplateKWAndArgsInfo) &&
2092  "Wrong HasTemplateKWAndArgsInfo!");
2093 
2094  if (HasTemplateKWAndArgsInfo) {
2095  unsigned NumTemplateArgs = Record.readInt();
2096  ReadTemplateKWAndArgsInfo(*E->getTrailingASTTemplateKWAndArgsInfo(),
2098  NumTemplateArgs);
2099  assert((E->getNumTemplateArgs() == NumTemplateArgs) &&
2100  "Wrong NumTemplateArgs!");
2101  }
2102 
2103  UnresolvedSet<8> Decls;
2104  for (unsigned I = 0; I != NumResults; ++I) {
2105  auto *D = readDeclAs<NamedDecl>();
2106  auto AS = (AccessSpecifier)Record.readInt();
2107  Decls.addDecl(D, AS);
2108  }
2109 
2110  DeclAccessPair *Results = E->getTrailingResults();
2111  UnresolvedSetIterator Iter = Decls.begin();
2112  for (unsigned I = 0; I != NumResults; ++I) {
2113  Results[I] = (Iter + I).getPair();
2114  }
2115 
2116  E->NameInfo = Record.readDeclarationNameInfo();
2117  E->QualifierLoc = Record.readNestedNameSpecifierLoc();
2118 }
2119 
2120 void ASTStmtReader::VisitUnresolvedMemberExpr(UnresolvedMemberExpr *E) {
2121  VisitOverloadExpr(E);
2122  E->UnresolvedMemberExprBits.IsArrow = CurrentUnpackingBits->getNextBit();
2123  E->UnresolvedMemberExprBits.HasUnresolvedUsing =
2124  CurrentUnpackingBits->getNextBit();
2125 
2126  if (/*!isImplicitAccess=*/CurrentUnpackingBits->getNextBit())
2127  E->Base = Record.readSubExpr();
2128  else
2129  E->Base = nullptr;
2130 
2131  E->OperatorLoc = readSourceLocation();
2132 
2133  E->BaseType = Record.readType();
2134 }
2135 
2136 void ASTStmtReader::VisitUnresolvedLookupExpr(UnresolvedLookupExpr *E) {
2137  VisitOverloadExpr(E);
2138  E->UnresolvedLookupExprBits.RequiresADL = CurrentUnpackingBits->getNextBit();
2139  E->NamingClass = readDeclAs<CXXRecordDecl>();
2140 }
2141 
2142 void ASTStmtReader::VisitTypeTraitExpr(TypeTraitExpr *E) {
2143  VisitExpr(E);
2144  E->TypeTraitExprBits.NumArgs = Record.readInt();
2145  E->TypeTraitExprBits.Kind = Record.readInt();
2146  E->TypeTraitExprBits.Value = Record.readInt();
2147  SourceRange Range = readSourceRange();
2148  E->Loc = Range.getBegin();
2149  E->RParenLoc = Range.getEnd();
2150 
2151  auto **Args = E->getTrailingObjects<TypeSourceInfo *>();
2152  for (unsigned I = 0, N = E->getNumArgs(); I != N; ++I)
2153  Args[I] = readTypeSourceInfo();
2154 }
2155 
2156 void ASTStmtReader::VisitArrayTypeTraitExpr(ArrayTypeTraitExpr *E) {
2157  VisitExpr(E);
2158  E->ATT = (ArrayTypeTrait)Record.readInt();
2159  E->Value = (unsigned int)Record.readInt();
2160  SourceRange Range = readSourceRange();
2161  E->Loc = Range.getBegin();
2162  E->RParen = Range.getEnd();
2163  E->QueriedType = readTypeSourceInfo();
2164  E->Dimension = Record.readSubExpr();
2165 }
2166 
2167 void ASTStmtReader::VisitExpressionTraitExpr(ExpressionTraitExpr *E) {
2168  VisitExpr(E);
2169  E->ET = (ExpressionTrait)Record.readInt();
2170  E->Value = (bool)Record.readInt();
2171  SourceRange Range = readSourceRange();
2172  E->QueriedExpression = Record.readSubExpr();
2173  E->Loc = Range.getBegin();
2174  E->RParen = Range.getEnd();
2175 }
2176 
2177 void ASTStmtReader::VisitCXXNoexceptExpr(CXXNoexceptExpr *E) {
2178  VisitExpr(E);
2179  E->CXXNoexceptExprBits.Value = Record.readInt();
2180  E->Range = readSourceRange();
2181  E->Operand = Record.readSubExpr();
2182 }
2183 
2184 void ASTStmtReader::VisitPackExpansionExpr(PackExpansionExpr *E) {
2185  VisitExpr(E);
2186  E->EllipsisLoc = readSourceLocation();
2187  E->NumExpansions = Record.readInt();
2188  E->Pattern = Record.readSubExpr();
2189 }
2190 
2191 void ASTStmtReader::VisitSizeOfPackExpr(SizeOfPackExpr *E) {
2192  VisitExpr(E);
2193  unsigned NumPartialArgs = Record.readInt();
2194  E->OperatorLoc = readSourceLocation();
2195  E->PackLoc = readSourceLocation();
2196  E->RParenLoc = readSourceLocation();
2197  E->Pack = Record.readDeclAs<NamedDecl>();
2198  if (E->isPartiallySubstituted()) {
2199  assert(E->Length == NumPartialArgs);
2200  for (auto *I = E->getTrailingObjects<TemplateArgument>(),
2201  *E = I + NumPartialArgs;
2202  I != E; ++I)
2203  new (I) TemplateArgument(Record.readTemplateArgument());
2204  } else if (!E->isValueDependent()) {
2205  E->Length = Record.readInt();
2206  }
2207 }
2208 
2209 void ASTStmtReader::VisitPackIndexingExpr(PackIndexingExpr *E) {
2210  VisitExpr(E);
2211  E->TransformedExpressions = Record.readInt();
2212  E->ExpandedToEmptyPack = Record.readInt();
2213  E->EllipsisLoc = readSourceLocation();
2214  E->RSquareLoc = readSourceLocation();
2215  E->SubExprs[0] = Record.readStmt();
2216  E->SubExprs[1] = Record.readStmt();
2217  auto **Exprs = E->getTrailingObjects<Expr *>();
2218  for (unsigned I = 0; I < E->TransformedExpressions; ++I)
2219  Exprs[I] = Record.readExpr();
2220 }
2221 
2222 void ASTStmtReader::VisitSubstNonTypeTemplateParmExpr(
2224  VisitExpr(E);
2225  E->AssociatedDeclAndRef.setPointer(readDeclAs<Decl>());
2226  E->AssociatedDeclAndRef.setInt(CurrentUnpackingBits->getNextBit());
2227  E->Index = CurrentUnpackingBits->getNextBits(/*Width=*/12);
2228  if (CurrentUnpackingBits->getNextBit())
2229  E->PackIndex = Record.readInt();
2230  else
2231  E->PackIndex = 0;
2232  E->SubstNonTypeTemplateParmExprBits.NameLoc = readSourceLocation();
2233  E->Replacement = Record.readSubExpr();
2234 }
2235 
2236 void ASTStmtReader::VisitSubstNonTypeTemplateParmPackExpr(
2238  VisitExpr(E);
2239  E->AssociatedDecl = readDeclAs<Decl>();
2240  E->Index = Record.readInt();
2241  TemplateArgument ArgPack = Record.readTemplateArgument();
2242  if (ArgPack.getKind() != TemplateArgument::Pack)
2243  return;
2244 
2245  E->Arguments = ArgPack.pack_begin();
2246  E->NumArguments = ArgPack.pack_size();
2247  E->NameLoc = readSourceLocation();
2248 }
2249 
2250 void ASTStmtReader::VisitFunctionParmPackExpr(FunctionParmPackExpr *E) {
2251  VisitExpr(E);
2252  E->NumParameters = Record.readInt();
2253  E->ParamPack = readDeclAs<ParmVarDecl>();
2254  E->NameLoc = readSourceLocation();
2255  auto **Parms = E->getTrailingObjects<VarDecl *>();
2256  for (unsigned i = 0, n = E->NumParameters; i != n; ++i)
2257  Parms[i] = readDeclAs<VarDecl>();
2258 }
2259 
2260 void ASTStmtReader::VisitMaterializeTemporaryExpr(MaterializeTemporaryExpr *E) {
2261  VisitExpr(E);
2262  bool HasMaterialzedDecl = Record.readInt();
2263  if (HasMaterialzedDecl)
2264  E->State = cast<LifetimeExtendedTemporaryDecl>(Record.readDecl());
2265  else
2266  E->State = Record.readSubExpr();
2267 }
2268 
2269 void ASTStmtReader::VisitCXXFoldExpr(CXXFoldExpr *E) {
2270  VisitExpr(E);
2271  E->LParenLoc = readSourceLocation();
2272  E->EllipsisLoc = readSourceLocation();
2273  E->RParenLoc = readSourceLocation();
2274  E->NumExpansions = Record.readInt();
2275  E->SubExprs[0] = Record.readSubExpr();
2276  E->SubExprs[1] = Record.readSubExpr();
2277  E->SubExprs[2] = Record.readSubExpr();
2278  E->Opcode = (BinaryOperatorKind)Record.readInt();
2279 }
2280 
2281 void ASTStmtReader::VisitCXXParenListInitExpr(CXXParenListInitExpr *E) {
2282  VisitExpr(E);
2283  unsigned ExpectedNumExprs = Record.readInt();
2284  assert(E->NumExprs == ExpectedNumExprs &&
2285  "expected number of expressions does not equal the actual number of "
2286  "serialized expressions.");
2287  E->NumUserSpecifiedExprs = Record.readInt();
2288  E->InitLoc = readSourceLocation();
2289  E->LParenLoc = readSourceLocation();
2290  E->RParenLoc = readSourceLocation();
2291  for (unsigned I = 0; I < ExpectedNumExprs; I++)
2292  E->getTrailingObjects<Expr *>()[I] = Record.readSubExpr();
2293 
2294  bool HasArrayFillerOrUnionDecl = Record.readBool();
2295  if (HasArrayFillerOrUnionDecl) {
2296  bool HasArrayFiller = Record.readBool();
2297  if (HasArrayFiller) {
2298  E->setArrayFiller(Record.readSubExpr());
2299  } else {
2300  E->setInitializedFieldInUnion(readDeclAs<FieldDecl>());
2301  }
2302  }
2303  E->updateDependence();
2304 }
2305 
2306 void ASTStmtReader::VisitOpaqueValueExpr(OpaqueValueExpr *E) {
2307  VisitExpr(E);
2308  E->SourceExpr = Record.readSubExpr();
2309  E->OpaqueValueExprBits.Loc = readSourceLocation();
2310  E->setIsUnique(Record.readInt());
2311 }
2312 
2313 void ASTStmtReader::VisitTypoExpr(TypoExpr *E) {
2314  llvm_unreachable("Cannot read TypoExpr nodes");
2315 }
2316 
2317 void ASTStmtReader::VisitRecoveryExpr(RecoveryExpr *E) {
2318  VisitExpr(E);
2319  unsigned NumArgs = Record.readInt();
2320  E->BeginLoc = readSourceLocation();
2321  E->EndLoc = readSourceLocation();
2322  assert((NumArgs + 0LL ==
2323  std::distance(E->children().begin(), E->children().end())) &&
2324  "Wrong NumArgs!");
2325  (void)NumArgs;
2326  for (Stmt *&Child : E->children())
2327  Child = Record.readSubStmt();
2328 }
2329 
2330 //===----------------------------------------------------------------------===//
2331 // Microsoft Expressions and Statements
2332 //===----------------------------------------------------------------------===//
2333 void ASTStmtReader::VisitMSPropertyRefExpr(MSPropertyRefExpr *E) {
2334  VisitExpr(E);
2335  E->IsArrow = (Record.readInt() != 0);
2336  E->BaseExpr = Record.readSubExpr();
2337  E->QualifierLoc = Record.readNestedNameSpecifierLoc();
2338  E->MemberLoc = readSourceLocation();
2339  E->TheDecl = readDeclAs<MSPropertyDecl>();
2340 }
2341 
2342 void ASTStmtReader::VisitMSPropertySubscriptExpr(MSPropertySubscriptExpr *E) {
2343  VisitExpr(E);
2344  E->setBase(Record.readSubExpr());
2345  E->setIdx(Record.readSubExpr());
2346  E->setRBracketLoc(readSourceLocation());
2347 }
2348 
2349 void ASTStmtReader::VisitCXXUuidofExpr(CXXUuidofExpr *E) {
2350  VisitExpr(E);
2351  E->setSourceRange(readSourceRange());
2352  E->Guid = readDeclAs<MSGuidDecl>();
2353  if (E->isTypeOperand())
2354  E->Operand = readTypeSourceInfo();
2355  else
2356  E->Operand = Record.readSubExpr();
2357 }
2358 
2359 void ASTStmtReader::VisitSEHLeaveStmt(SEHLeaveStmt *S) {
2360  VisitStmt(S);
2361  S->setLeaveLoc(readSourceLocation());
2362 }
2363 
2364 void ASTStmtReader::VisitSEHExceptStmt(SEHExceptStmt *S) {
2365  VisitStmt(S);
2366  S->Loc = readSourceLocation();
2367  S->Children[SEHExceptStmt::FILTER_EXPR] = Record.readSubStmt();
2368  S->Children[SEHExceptStmt::BLOCK] = Record.readSubStmt();
2369 }
2370 
2371 void ASTStmtReader::VisitSEHFinallyStmt(SEHFinallyStmt *S) {
2372  VisitStmt(S);
2373  S->Loc = readSourceLocation();
2374  S->Block = Record.readSubStmt();
2375 }
2376 
2377 void ASTStmtReader::VisitSEHTryStmt(SEHTryStmt *S) {
2378  VisitStmt(S);
2379  S->IsCXXTry = Record.readInt();
2380  S->TryLoc = readSourceLocation();
2381  S->Children[SEHTryStmt::TRY] = Record.readSubStmt();
2382  S->Children[SEHTryStmt::HANDLER] = Record.readSubStmt();
2383 }
2384 
2385 //===----------------------------------------------------------------------===//
2386 // CUDA Expressions and Statements
2387 //===----------------------------------------------------------------------===//
2388 
2389 void ASTStmtReader::VisitCUDAKernelCallExpr(CUDAKernelCallExpr *E) {
2390  VisitCallExpr(E);
2391  E->setPreArg(CUDAKernelCallExpr::CONFIG, Record.readSubExpr());
2392 }
2393 
2394 //===----------------------------------------------------------------------===//
2395 // OpenCL Expressions and Statements.
2396 //===----------------------------------------------------------------------===//
2397 void ASTStmtReader::VisitAsTypeExpr(AsTypeExpr *E) {
2398  VisitExpr(E);
2399  E->BuiltinLoc = readSourceLocation();
2400  E->RParenLoc = readSourceLocation();
2401  E->SrcExpr = Record.readSubExpr();
2402 }
2403 
2404 //===----------------------------------------------------------------------===//
2405 // OpenMP Directives.
2406 //===----------------------------------------------------------------------===//
2407 
2408 void ASTStmtReader::VisitOMPCanonicalLoop(OMPCanonicalLoop *S) {
2409  VisitStmt(S);
2410  for (Stmt *&SubStmt : S->SubStmts)
2411  SubStmt = Record.readSubStmt();
2412 }
2413 
2414 void ASTStmtReader::VisitOMPExecutableDirective(OMPExecutableDirective *E) {
2415  Record.readOMPChildren(E->Data);
2416  E->setLocStart(readSourceLocation());
2417  E->setLocEnd(readSourceLocation());
2419 }
2420 
2421 void ASTStmtReader::VisitOMPLoopBasedDirective(OMPLoopBasedDirective *D) {
2422  VisitStmt(D);
2423  // Field CollapsedNum was read in ReadStmtFromStream.
2424  Record.skipInts(1);
2425  VisitOMPExecutableDirective(D);
2426 }
2427 
2428 void ASTStmtReader::VisitOMPLoopDirective(OMPLoopDirective *D) {
2429  VisitOMPLoopBasedDirective(D);
2430 }
2431 
2432 void ASTStmtReader::VisitOMPMetaDirective(OMPMetaDirective *D) {
2433  VisitStmt(D);
2434  // The NumClauses field was read in ReadStmtFromStream.
2435  Record.skipInts(1);
2436  VisitOMPExecutableDirective(D);
2437 }
2438 
2439 void ASTStmtReader::VisitOMPParallelDirective(OMPParallelDirective *D) {
2440  VisitStmt(D);
2441  VisitOMPExecutableDirective(D);
2442  D->setHasCancel(Record.readBool());
2443 }
2444 
2445 void ASTStmtReader::VisitOMPSimdDirective(OMPSimdDirective *D) {
2446  VisitOMPLoopDirective(D);
2447 }
2448 
2449 void ASTStmtReader::VisitOMPLoopTransformationDirective(
2451  VisitOMPLoopBasedDirective(D);
2452  D->setNumGeneratedLoops(Record.readUInt32());
2453 }
2454 
2455 void ASTStmtReader::VisitOMPTileDirective(OMPTileDirective *D) {
2456  VisitOMPLoopTransformationDirective(D);
2457 }
2458 
2459 void ASTStmtReader::VisitOMPUnrollDirective(OMPUnrollDirective *D) {
2460  VisitOMPLoopTransformationDirective(D);
2461 }
2462 
2463 void ASTStmtReader::VisitOMPForDirective(OMPForDirective *D) {
2464  VisitOMPLoopDirective(D);
2465  D->setHasCancel(Record.readBool());
2466 }
2467 
2468 void ASTStmtReader::VisitOMPForSimdDirective(OMPForSimdDirective *D) {
2469  VisitOMPLoopDirective(D);
2470 }
2471 
2472 void ASTStmtReader::VisitOMPSectionsDirective(OMPSectionsDirective *D) {
2473  VisitStmt(D);
2474  VisitOMPExecutableDirective(D);
2475  D->setHasCancel(Record.readBool());
2476 }
2477 
2478 void ASTStmtReader::VisitOMPSectionDirective(OMPSectionDirective *D) {
2479  VisitStmt(D);
2480  VisitOMPExecutableDirective(D);
2481  D->setHasCancel(Record.readBool());
2482 }
2483 
2484 void ASTStmtReader::VisitOMPScopeDirective(OMPScopeDirective *D) {
2485  VisitStmt(D);
2486  VisitOMPExecutableDirective(D);
2487 }
2488 
2489 void ASTStmtReader::VisitOMPSingleDirective(OMPSingleDirective *D) {
2490  VisitStmt(D);
2491  VisitOMPExecutableDirective(D);
2492 }
2493 
2494 void ASTStmtReader::VisitOMPMasterDirective(OMPMasterDirective *D) {
2495  VisitStmt(D);
2496  VisitOMPExecutableDirective(D);
2497 }
2498 
2499 void ASTStmtReader::VisitOMPCriticalDirective(OMPCriticalDirective *D) {
2500  VisitStmt(D);
2501  VisitOMPExecutableDirective(D);
2502  D->DirName = Record.readDeclarationNameInfo();
2503 }
2504 
2505 void ASTStmtReader::VisitOMPParallelForDirective(OMPParallelForDirective *D) {
2506  VisitOMPLoopDirective(D);
2507  D->setHasCancel(Record.readBool());
2508 }
2509 
2510 void ASTStmtReader::VisitOMPParallelForSimdDirective(
2512  VisitOMPLoopDirective(D);
2513 }
2514 
2515 void ASTStmtReader::VisitOMPParallelMasterDirective(
2517  VisitStmt(D);
2518  VisitOMPExecutableDirective(D);
2519 }
2520 
2521 void ASTStmtReader::VisitOMPParallelMaskedDirective(
2523  VisitStmt(D);
2524  VisitOMPExecutableDirective(D);
2525 }
2526 
2527 void ASTStmtReader::VisitOMPParallelSectionsDirective(
2529  VisitStmt(D);
2530  VisitOMPExecutableDirective(D);
2531  D->setHasCancel(Record.readBool());
2532 }
2533 
2534 void ASTStmtReader::VisitOMPTaskDirective(OMPTaskDirective *D) {
2535  VisitStmt(D);
2536  VisitOMPExecutableDirective(D);
2537  D->setHasCancel(Record.readBool());
2538 }
2539 
2540 void ASTStmtReader::VisitOMPTaskyieldDirective(OMPTaskyieldDirective *D) {
2541  VisitStmt(D);
2542  VisitOMPExecutableDirective(D);
2543 }
2544 
2545 void ASTStmtReader::VisitOMPBarrierDirective(OMPBarrierDirective *D) {
2546  VisitStmt(D);
2547  VisitOMPExecutableDirective(D);
2548 }
2549 
2550 void ASTStmtReader::VisitOMPTaskwaitDirective(OMPTaskwaitDirective *D) {
2551  VisitStmt(D);
2552  // The NumClauses field was read in ReadStmtFromStream.
2553  Record.skipInts(1);
2554  VisitOMPExecutableDirective(D);
2555 }
2556 
2557 void ASTStmtReader::VisitOMPErrorDirective(OMPErrorDirective *D) {
2558  VisitStmt(D);
2559  // The NumClauses field was read in ReadStmtFromStream.
2560  Record.skipInts(1);
2561  VisitOMPExecutableDirective(D);
2562 }
2563 
2564 void ASTStmtReader::VisitOMPTaskgroupDirective(OMPTaskgroupDirective *D) {
2565  VisitStmt(D);
2566  VisitOMPExecutableDirective(D);
2567 }
2568 
2569 void ASTStmtReader::VisitOMPFlushDirective(OMPFlushDirective *D) {
2570  VisitStmt(D);
2571  VisitOMPExecutableDirective(D);
2572 }
2573 
2574 void ASTStmtReader::VisitOMPDepobjDirective(OMPDepobjDirective *D) {
2575  VisitStmt(D);
2576  VisitOMPExecutableDirective(D);
2577 }
2578 
2579 void ASTStmtReader::VisitOMPScanDirective(OMPScanDirective *D) {
2580  VisitStmt(D);
2581  VisitOMPExecutableDirective(D);
2582 }
2583 
2584 void ASTStmtReader::VisitOMPOrderedDirective(OMPOrderedDirective *D) {
2585  VisitStmt(D);
2586  VisitOMPExecutableDirective(D);
2587 }
2588 
2589 void ASTStmtReader::VisitOMPAtomicDirective(OMPAtomicDirective *D) {
2590  VisitStmt(D);
2591  VisitOMPExecutableDirective(D);
2592  D->Flags.IsXLHSInRHSPart = Record.readBool() ? 1 : 0;
2593  D->Flags.IsPostfixUpdate = Record.readBool() ? 1 : 0;
2594  D->Flags.IsFailOnly = Record.readBool() ? 1 : 0;
2595 }
2596 
2597 void ASTStmtReader::VisitOMPTargetDirective(OMPTargetDirective *D) {
2598  VisitStmt(D);
2599  VisitOMPExecutableDirective(D);
2600 }
2601 
2602 void ASTStmtReader::VisitOMPTargetDataDirective(OMPTargetDataDirective *D) {
2603  VisitStmt(D);
2604  VisitOMPExecutableDirective(D);
2605 }
2606 
2607 void ASTStmtReader::VisitOMPTargetEnterDataDirective(
2609  VisitStmt(D);
2610  VisitOMPExecutableDirective(D);
2611 }
2612 
2613 void ASTStmtReader::VisitOMPTargetExitDataDirective(
2615  VisitStmt(D);
2616  VisitOMPExecutableDirective(D);
2617 }
2618 
2619 void ASTStmtReader::VisitOMPTargetParallelDirective(
2621  VisitStmt(D);
2622  VisitOMPExecutableDirective(D);
2623  D->setHasCancel(Record.readBool());
2624 }
2625 
2626 void ASTStmtReader::VisitOMPTargetParallelForDirective(
2628  VisitOMPLoopDirective(D);
2629  D->setHasCancel(Record.readBool());
2630 }
2631 
2632 void ASTStmtReader::VisitOMPTeamsDirective(OMPTeamsDirective *D) {
2633  VisitStmt(D);
2634  VisitOMPExecutableDirective(D);
2635 }
2636 
2637 void ASTStmtReader::VisitOMPCancellationPointDirective(
2639  VisitStmt(D);
2640  VisitOMPExecutableDirective(D);
2641  D->setCancelRegion(Record.readEnum<OpenMPDirectiveKind>());
2642 }
2643 
2644 void ASTStmtReader::VisitOMPCancelDirective(OMPCancelDirective *D) {
2645  VisitStmt(D);
2646  VisitOMPExecutableDirective(D);
2647  D->setCancelRegion(Record.readEnum<OpenMPDirectiveKind>());
2648 }
2649 
2650 void ASTStmtReader::VisitOMPTaskLoopDirective(OMPTaskLoopDirective *D) {
2651  VisitOMPLoopDirective(D);
2652  D->setHasCancel(Record.readBool());
2653 }
2654 
2655 void ASTStmtReader::VisitOMPTaskLoopSimdDirective(OMPTaskLoopSimdDirective *D) {
2656  VisitOMPLoopDirective(D);
2657 }
2658 
2659 void ASTStmtReader::VisitOMPMasterTaskLoopDirective(
2661  VisitOMPLoopDirective(D);
2662  D->setHasCancel(Record.readBool());
2663 }
2664 
2665 void ASTStmtReader::VisitOMPMaskedTaskLoopDirective(
2667  VisitOMPLoopDirective(D);
2668  D->setHasCancel(Record.readBool());
2669 }
2670 
2671 void ASTStmtReader::VisitOMPMasterTaskLoopSimdDirective(
2673  VisitOMPLoopDirective(D);
2674 }
2675 
2676 void ASTStmtReader::VisitOMPMaskedTaskLoopSimdDirective(
2678  VisitOMPLoopDirective(D);
2679 }
2680 
2681 void ASTStmtReader::VisitOMPParallelMasterTaskLoopDirective(
2683  VisitOMPLoopDirective(D);
2684  D->setHasCancel(Record.readBool());
2685 }
2686 
2687 void ASTStmtReader::VisitOMPParallelMaskedTaskLoopDirective(
2689  VisitOMPLoopDirective(D);
2690  D->setHasCancel(Record.readBool());
2691 }
2692 
2693 void ASTStmtReader::VisitOMPParallelMasterTaskLoopSimdDirective(
2695  VisitOMPLoopDirective(D);
2696 }
2697 
2698 void ASTStmtReader::VisitOMPParallelMaskedTaskLoopSimdDirective(
2700  VisitOMPLoopDirective(D);
2701 }
2702 
2703 void ASTStmtReader::VisitOMPDistributeDirective(OMPDistributeDirective *D) {
2704  VisitOMPLoopDirective(D);
2705 }
2706 
2707 void ASTStmtReader::VisitOMPTargetUpdateDirective(OMPTargetUpdateDirective *D) {
2708  VisitStmt(D);
2709  VisitOMPExecutableDirective(D);
2710 }
2711 
2712 void ASTStmtReader::VisitOMPDistributeParallelForDirective(
2714  VisitOMPLoopDirective(D);
2715  D->setHasCancel(Record.readBool());
2716 }
2717 
2718 void ASTStmtReader::VisitOMPDistributeParallelForSimdDirective(
2720  VisitOMPLoopDirective(D);
2721 }
2722 
2723 void ASTStmtReader::VisitOMPDistributeSimdDirective(
2725  VisitOMPLoopDirective(D);
2726 }
2727 
2728 void ASTStmtReader::VisitOMPTargetParallelForSimdDirective(
2730  VisitOMPLoopDirective(D);
2731 }
2732 
2733 void ASTStmtReader::VisitOMPTargetSimdDirective(OMPTargetSimdDirective *D) {
2734  VisitOMPLoopDirective(D);
2735 }
2736 
2737 void ASTStmtReader::VisitOMPTeamsDistributeDirective(
2739  VisitOMPLoopDirective(D);
2740 }
2741 
2742 void ASTStmtReader::VisitOMPTeamsDistributeSimdDirective(
2744  VisitOMPLoopDirective(D);
2745 }
2746 
2747 void ASTStmtReader::VisitOMPTeamsDistributeParallelForSimdDirective(
2749  VisitOMPLoopDirective(D);
2750 }
2751 
2752 void ASTStmtReader::VisitOMPTeamsDistributeParallelForDirective(
2754  VisitOMPLoopDirective(D);
2755  D->setHasCancel(Record.readBool());
2756 }
2757 
2758 void ASTStmtReader::VisitOMPTargetTeamsDirective(OMPTargetTeamsDirective *D) {
2759  VisitStmt(D);
2760  VisitOMPExecutableDirective(D);
2761 }
2762 
2763 void ASTStmtReader::VisitOMPTargetTeamsDistributeDirective(
2765  VisitOMPLoopDirective(D);
2766 }
2767 
2768 void ASTStmtReader::VisitOMPTargetTeamsDistributeParallelForDirective(
2770  VisitOMPLoopDirective(D);
2771  D->setHasCancel(Record.readBool());
2772 }
2773 
2774 void ASTStmtReader::VisitOMPTargetTeamsDistributeParallelForSimdDirective(
2776  VisitOMPLoopDirective(D);
2777 }
2778 
2779 void ASTStmtReader::VisitOMPTargetTeamsDistributeSimdDirective(
2781  VisitOMPLoopDirective(D);
2782 }
2783 
2784 void ASTStmtReader::VisitOMPInteropDirective(OMPInteropDirective *D) {
2785  VisitStmt(D);
2786  VisitOMPExecutableDirective(D);
2787 }
2788 
2789 void ASTStmtReader::VisitOMPDispatchDirective(OMPDispatchDirective *D) {
2790  VisitStmt(D);
2791  VisitOMPExecutableDirective(D);
2792  D->setTargetCallLoc(Record.readSourceLocation());
2793 }
2794 
2795 void ASTStmtReader::VisitOMPMaskedDirective(OMPMaskedDirective *D) {
2796  VisitStmt(D);
2797  VisitOMPExecutableDirective(D);
2798 }
2799 
2800 void ASTStmtReader::VisitOMPGenericLoopDirective(OMPGenericLoopDirective *D) {
2801  VisitOMPLoopDirective(D);
2802 }
2803 
2804 void ASTStmtReader::VisitOMPTeamsGenericLoopDirective(
2806  VisitOMPLoopDirective(D);
2807 }
2808 
2809 void ASTStmtReader::VisitOMPTargetTeamsGenericLoopDirective(
2811  VisitOMPLoopDirective(D);
2812  D->setCanBeParallelFor(Record.readBool());
2813 }
2814 
2815 void ASTStmtReader::VisitOMPParallelGenericLoopDirective(
2817  VisitOMPLoopDirective(D);
2818 }
2819 
2820 void ASTStmtReader::VisitOMPTargetParallelGenericLoopDirective(
2822  VisitOMPLoopDirective(D);
2823 }
2824 
2825 //===----------------------------------------------------------------------===//
2826 // OpenACC Constructs/Directives.
2827 //===----------------------------------------------------------------------===//
2828 void ASTStmtReader::VisitOpenACCConstructStmt(OpenACCConstructStmt *S) {
2829  (void)Record.readInt();
2830  S->Kind = Record.readEnum<OpenACCDirectiveKind>();
2831  S->Range = Record.readSourceRange();
2832  Record.readOpenACCClauseList(S->Clauses);
2833 }
2834 
2835 void ASTStmtReader::VisitOpenACCAssociatedStmtConstruct(
2837  VisitOpenACCConstructStmt(S);
2838  S->setAssociatedStmt(Record.readSubStmt());
2839 }
2840 
2841 void ASTStmtReader::VisitOpenACCComputeConstruct(OpenACCComputeConstruct *S) {
2842  VisitStmt(S);
2843  VisitOpenACCAssociatedStmtConstruct(S);
2844 }
2845 
2846 //===----------------------------------------------------------------------===//
2847 // ASTReader Implementation
2848 //===----------------------------------------------------------------------===//
2849 
2851  switch (ReadingKind) {
2852  case Read_None:
2853  llvm_unreachable("should not call this when not reading anything");
2854  case Read_Decl:
2855  case Read_Type:
2856  return ReadStmtFromStream(F);
2857  case Read_Stmt:
2858  return ReadSubStmt();
2859  }
2860 
2861  llvm_unreachable("ReadingKind not set ?");
2862 }
2863 
2865  return cast_or_null<Expr>(ReadStmt(F));
2866 }
2867 
2869  return cast_or_null<Expr>(ReadSubStmt());
2870 }
2871 
2872 // Within the bitstream, expressions are stored in Reverse Polish
2873 // Notation, with each of the subexpressions preceding the
2874 // expression they are stored in. Subexpressions are stored from last to first.
2875 // To evaluate expressions, we continue reading expressions and placing them on
2876 // the stack, with expressions having operands removing those operands from the
2877 // stack. Evaluation terminates when we see a STMT_STOP record, and
2878 // the single remaining expression on the stack is our result.
2879 Stmt *ASTReader::ReadStmtFromStream(ModuleFile &F) {
2880  ReadingKindTracker ReadingKind(Read_Stmt, *this);
2881  llvm::BitstreamCursor &Cursor = F.DeclsCursor;
2882 
2883  // Map of offset to previously deserialized stmt. The offset points
2884  // just after the stmt record.
2885  llvm::DenseMap<uint64_t, Stmt *> StmtEntries;
2886 
2887 #ifndef NDEBUG
2888  unsigned PrevNumStmts = StmtStack.size();
2889 #endif
2890 
2891  ASTRecordReader Record(*this, F);
2892  ASTStmtReader Reader(Record, Cursor);
2893  Stmt::EmptyShell Empty;
2894 
2895  while (true) {
2897  Cursor.advanceSkippingSubblocks();
2898  if (!MaybeEntry) {
2899  Error(toString(MaybeEntry.takeError()));
2900  return nullptr;
2901  }
2902  llvm::BitstreamEntry Entry = MaybeEntry.get();
2903 
2904  switch (Entry.Kind) {
2905  case llvm::BitstreamEntry::SubBlock: // Handled for us already.
2907  Error("malformed block record in AST file");
2908  return nullptr;
2909  case llvm::BitstreamEntry::EndBlock:
2910  goto Done;
2912  // The interesting case.
2913  break;
2914  }
2915 
2916  ASTContext &Context = getContext();
2917  Stmt *S = nullptr;
2918  bool Finished = false;
2919  bool IsStmtReference = false;
2920  Expected<unsigned> MaybeStmtCode = Record.readRecord(Cursor, Entry.ID);
2921  if (!MaybeStmtCode) {
2922  Error(toString(MaybeStmtCode.takeError()));
2923  return nullptr;
2924  }
2925  switch ((StmtCode)MaybeStmtCode.get()) {
2926  case STMT_STOP:
2927  Finished = true;
2928  break;
2929 
2930  case STMT_REF_PTR:
2931  IsStmtReference = true;
2932  assert(StmtEntries.contains(Record[0]) &&
2933  "No stmt was recorded for this offset reference!");
2934  S = StmtEntries[Record.readInt()];
2935  break;
2936 
2937  case STMT_NULL_PTR:
2938  S = nullptr;
2939  break;
2940 
2941  case STMT_NULL:
2942  S = new (Context) NullStmt(Empty);
2943  break;
2944 
2945  case STMT_COMPOUND: {
2946  unsigned NumStmts = Record[ASTStmtReader::NumStmtFields];
2947  bool HasFPFeatures = Record[ASTStmtReader::NumStmtFields + 1];
2948  S = CompoundStmt::CreateEmpty(Context, NumStmts, HasFPFeatures);
2949  break;
2950  }
2951 
2952  case STMT_CASE:
2954  Context,
2955  /*CaseStmtIsGNURange*/ Record[ASTStmtReader::NumStmtFields + 3]);
2956  break;
2957 
2958  case STMT_DEFAULT:
2959  S = new (Context) DefaultStmt(Empty);
2960  break;
2961 
2962  case STMT_LABEL:
2963  S = new (Context) LabelStmt(Empty);
2964  break;
2965 
2966  case STMT_ATTRIBUTED:
2968  Context,
2969  /*NumAttrs*/Record[ASTStmtReader::NumStmtFields]);
2970  break;
2971 
2972  case STMT_IF: {
2974  bool HasElse = IfStmtBits.getNextBit();
2975  bool HasVar = IfStmtBits.getNextBit();
2976  bool HasInit = IfStmtBits.getNextBit();
2977  S = IfStmt::CreateEmpty(Context, HasElse, HasVar, HasInit);
2978  break;
2979  }
2980 
2981  case STMT_SWITCH:
2983  Context,
2984  /* HasInit=*/Record[ASTStmtReader::NumStmtFields],
2985  /* HasVar=*/Record[ASTStmtReader::NumStmtFields + 1]);
2986  break;
2987 
2988  case STMT_WHILE:
2990  Context,
2991  /* HasVar=*/Record[ASTStmtReader::NumStmtFields]);
2992  break;
2993 
2994  case STMT_DO:
2995  S = new (Context) DoStmt(Empty);
2996  break;
2997 
2998  case STMT_FOR:
2999  S = new (Context) ForStmt(Empty);
3000  break;
3001 
3002  case STMT_GOTO:
3003  S = new (Context) GotoStmt(Empty);
3004  break;
3005 
3006  case STMT_INDIRECT_GOTO:
3007  S = new (Context) IndirectGotoStmt(Empty);
3008  break;
3009 
3010  case STMT_CONTINUE:
3011  S = new (Context) ContinueStmt(Empty);
3012  break;
3013 
3014  case STMT_BREAK:
3015  S = new (Context) BreakStmt(Empty);
3016  break;
3017 
3018  case STMT_RETURN:
3020  Context, /* HasNRVOCandidate=*/Record[ASTStmtReader::NumStmtFields]);
3021  break;
3022 
3023  case STMT_DECL:
3024  S = new (Context) DeclStmt(Empty);
3025  break;
3026 
3027  case STMT_GCCASM:
3028  S = new (Context) GCCAsmStmt(Empty);
3029  break;
3030 
3031  case STMT_MSASM:
3032  S = new (Context) MSAsmStmt(Empty);
3033  break;
3034 
3035  case STMT_CAPTURED:
3038  break;
3039 
3040  case EXPR_CONSTANT:
3042  Context, static_cast<ConstantResultStorageKind>(
3043  /*StorageKind=*/Record[ASTStmtReader::NumExprFields]));
3044  break;
3045 
3048  break;
3049 
3052  break;
3053 
3054  case EXPR_PREDEFINED:
3056  Context,
3057  /*HasFunctionName*/ Record[ASTStmtReader::NumExprFields]);
3058  break;
3059 
3060  case EXPR_DECL_REF: {
3062  DeclRefExprBits.advance(5);
3063  bool HasFoundDecl = DeclRefExprBits.getNextBit();
3064  bool HasQualifier = DeclRefExprBits.getNextBit();
3065  bool HasTemplateKWAndArgsInfo = DeclRefExprBits.getNextBit();
3066  unsigned NumTemplateArgs = HasTemplateKWAndArgsInfo
3068  : 0;
3069  S = DeclRefExpr::CreateEmpty(Context, HasQualifier, HasFoundDecl,
3070  HasTemplateKWAndArgsInfo, NumTemplateArgs);
3071  break;
3072  }
3073 
3074  case EXPR_INTEGER_LITERAL:
3075  S = IntegerLiteral::Create(Context, Empty);
3076  break;
3077 
3079  S = FixedPointLiteral::Create(Context, Empty);
3080  break;
3081 
3082  case EXPR_FLOATING_LITERAL:
3083  S = FloatingLiteral::Create(Context, Empty);
3084  break;
3085 
3087  S = new (Context) ImaginaryLiteral(Empty);
3088  break;
3089 
3090  case EXPR_STRING_LITERAL:
3092  Context,
3093  /* NumConcatenated=*/Record[ASTStmtReader::NumExprFields],
3094  /* Length=*/Record[ASTStmtReader::NumExprFields + 1],
3095  /* CharByteWidth=*/Record[ASTStmtReader::NumExprFields + 2]);
3096  break;
3097 
3099  S = new (Context) CharacterLiteral(Empty);
3100  break;
3101 
3102  case EXPR_PAREN:
3103  S = new (Context) ParenExpr(Empty);
3104  break;
3105 
3106  case EXPR_PAREN_LIST:
3108  Context,
3109  /* NumExprs=*/Record[ASTStmtReader::NumExprFields]);
3110  break;
3111 
3112  case EXPR_UNARY_OPERATOR: {
3113  BitsUnpacker UnaryOperatorBits(Record[ASTStmtReader::NumStmtFields]);
3114  UnaryOperatorBits.advance(ASTStmtReader::NumExprBits);
3115  bool HasFPFeatures = UnaryOperatorBits.getNextBit();
3116  S = UnaryOperator::CreateEmpty(Context, HasFPFeatures);
3117  break;
3118  }
3119 
3120  case EXPR_OFFSETOF:
3121  S = OffsetOfExpr::CreateEmpty(Context,
3124  break;
3125 
3126  case EXPR_SIZEOF_ALIGN_OF:
3127  S = new (Context) UnaryExprOrTypeTraitExpr(Empty);
3128  break;
3129 
3130  case EXPR_ARRAY_SUBSCRIPT:
3131  S = new (Context) ArraySubscriptExpr(Empty);
3132  break;
3133 
3134  case EXPR_MATRIX_SUBSCRIPT:
3135  S = new (Context) MatrixSubscriptExpr(Empty);
3136  break;
3137 
3138  case EXPR_ARRAY_SECTION:
3139  S = new (Context) ArraySectionExpr(Empty);
3140  break;
3141 
3145  break;
3146 
3147  case EXPR_OMP_ITERATOR:
3148  S = OMPIteratorExpr::CreateEmpty(Context,
3150  break;
3151 
3152  case EXPR_CALL: {
3153  auto NumArgs = Record[ASTStmtReader::NumExprFields];
3155  CallExprBits.advance(1);
3156  auto HasFPFeatures = CallExprBits.getNextBit();
3157  S = CallExpr::CreateEmpty(Context, NumArgs, HasFPFeatures, Empty);
3158  break;
3159  }
3160 
3161  case EXPR_RECOVERY:
3163  Context, /*NumArgs=*/Record[ASTStmtReader::NumExprFields]);
3164  break;
3165 
3166  case EXPR_MEMBER: {
3168  bool HasQualifier = ExprMemberBits.getNextBit();
3169  bool HasFoundDecl = ExprMemberBits.getNextBit();
3170  bool HasTemplateInfo = ExprMemberBits.getNextBit();
3171  unsigned NumTemplateArgs = Record[ASTStmtReader::NumExprFields + 1];
3172  S = MemberExpr::CreateEmpty(Context, HasQualifier, HasFoundDecl,
3173  HasTemplateInfo, NumTemplateArgs);
3174  break;
3175  }
3176 
3177  case EXPR_BINARY_OPERATOR: {
3178  BitsUnpacker BinaryOperatorBits(Record[ASTStmtReader::NumExprFields]);
3179  BinaryOperatorBits.advance(/*Size of opcode*/ 6);
3180  bool HasFPFeatures = BinaryOperatorBits.getNextBit();
3181  S = BinaryOperator::CreateEmpty(Context, HasFPFeatures);
3182  break;
3183  }
3184 
3186  BitsUnpacker BinaryOperatorBits(Record[ASTStmtReader::NumExprFields]);
3187  BinaryOperatorBits.advance(/*Size of opcode*/ 6);
3188  bool HasFPFeatures = BinaryOperatorBits.getNextBit();
3189  S = CompoundAssignOperator::CreateEmpty(Context, HasFPFeatures);
3190  break;
3191  }
3192 
3194  S = new (Context) ConditionalOperator(Empty);
3195  break;
3196 
3198  S = new (Context) BinaryConditionalOperator(Empty);
3199  break;
3200 
3201  case EXPR_IMPLICIT_CAST: {
3202  unsigned PathSize = Record[ASTStmtReader::NumExprFields];
3204  CastExprBits.advance(7);
3205  bool HasFPFeatures = CastExprBits.getNextBit();
3206  S = ImplicitCastExpr::CreateEmpty(Context, PathSize, HasFPFeatures);
3207  break;
3208  }
3209 
3210  case EXPR_CSTYLE_CAST: {
3211  unsigned PathSize = Record[ASTStmtReader::NumExprFields];
3213  CastExprBits.advance(7);
3214  bool HasFPFeatures = CastExprBits.getNextBit();
3215  S = CStyleCastExpr::CreateEmpty(Context, PathSize, HasFPFeatures);
3216  break;
3217  }
3218 
3219  case EXPR_COMPOUND_LITERAL:
3220  S = new (Context) CompoundLiteralExpr(Empty);
3221  break;
3222 
3224  S = new (Context) ExtVectorElementExpr(Empty);
3225  break;
3226 
3227  case EXPR_INIT_LIST:
3228  S = new (Context) InitListExpr(Empty);
3229  break;
3230 
3231  case EXPR_DESIGNATED_INIT:
3232  S = DesignatedInitExpr::CreateEmpty(Context,
3234 
3235  break;
3236 
3238  S = new (Context) DesignatedInitUpdateExpr(Empty);
3239  break;
3240 
3242  S = new (Context) ImplicitValueInitExpr(Empty);
3243  break;
3244 
3245  case EXPR_NO_INIT:
3246  S = new (Context) NoInitExpr(Empty);
3247  break;
3248 
3249  case EXPR_ARRAY_INIT_LOOP:
3250  S = new (Context) ArrayInitLoopExpr(Empty);
3251  break;
3252 
3253  case EXPR_ARRAY_INIT_INDEX:
3254  S = new (Context) ArrayInitIndexExpr(Empty);
3255  break;
3256 
3257  case EXPR_VA_ARG:
3258  S = new (Context) VAArgExpr(Empty);
3259  break;
3260 
3261  case EXPR_SOURCE_LOC:
3262  S = new (Context) SourceLocExpr(Empty);
3263  break;
3264 
3265  case EXPR_ADDR_LABEL:
3266  S = new (Context) AddrLabelExpr(Empty);
3267  break;
3268 
3269  case EXPR_STMT:
3270  S = new (Context) StmtExpr(Empty);
3271  break;
3272 
3273  case EXPR_CHOOSE:
3274  S = new (Context) ChooseExpr(Empty);
3275  break;
3276 
3277  case EXPR_GNU_NULL:
3278  S = new (Context) GNUNullExpr(Empty);
3279  break;
3280 
3281  case EXPR_SHUFFLE_VECTOR:
3282  S = new (Context) ShuffleVectorExpr(Empty);
3283  break;
3284 
3285  case EXPR_CONVERT_VECTOR:
3286  S = new (Context) ConvertVectorExpr(Empty);
3287  break;
3288 
3289  case EXPR_BLOCK:
3290  S = new (Context) BlockExpr(Empty);
3291  break;
3292 
3295  Context,
3296  /*NumAssocs=*/Record[ASTStmtReader::NumExprFields]);
3297  break;
3298 
3300  S = new (Context) ObjCStringLiteral(Empty);
3301  break;
3302 
3304  S = new (Context) ObjCBoxedExpr(Empty);
3305  break;
3306 
3308  S = ObjCArrayLiteral::CreateEmpty(Context,
3310  break;
3311 
3316  break;
3317 
3318  case EXPR_OBJC_ENCODE:
3319  S = new (Context) ObjCEncodeExpr(Empty);
3320  break;
3321 
3323  S = new (Context) ObjCSelectorExpr(Empty);
3324  break;
3325 
3327  S = new (Context) ObjCProtocolExpr(Empty);
3328  break;
3329 
3331  S = new (Context) ObjCIvarRefExpr(Empty);
3332  break;
3333 
3335  S = new (Context) ObjCPropertyRefExpr(Empty);
3336  break;
3337 
3339  S = new (Context) ObjCSubscriptRefExpr(Empty);
3340  break;
3341 
3343  llvm_unreachable("mismatching AST file");
3344 
3346  S = ObjCMessageExpr::CreateEmpty(Context,
3349  break;
3350 
3351  case EXPR_OBJC_ISA:
3352  S = new (Context) ObjCIsaExpr(Empty);
3353  break;
3354 
3356  S = new (Context) ObjCIndirectCopyRestoreExpr(Empty);
3357  break;
3358 
3360  S = new (Context) ObjCBridgedCastExpr(Empty);
3361  break;
3362 
3364  S = new (Context) ObjCForCollectionStmt(Empty);
3365  break;
3366 
3367  case STMT_OBJC_CATCH:
3368  S = new (Context) ObjCAtCatchStmt(Empty);
3369  break;
3370 
3371  case STMT_OBJC_FINALLY:
3372  S = new (Context) ObjCAtFinallyStmt(Empty);
3373  break;
3374 
3375  case STMT_OBJC_AT_TRY:
3376  S = ObjCAtTryStmt::CreateEmpty(Context,
3379  break;
3380 
3382  S = new (Context) ObjCAtSynchronizedStmt(Empty);
3383  break;
3384 
3385  case STMT_OBJC_AT_THROW:
3386  S = new (Context) ObjCAtThrowStmt(Empty);
3387  break;
3388 
3390  S = new (Context) ObjCAutoreleasePoolStmt(Empty);
3391  break;
3392 
3394  S = new (Context) ObjCBoolLiteralExpr(Empty);
3395  break;
3396 
3398  S = new (Context) ObjCAvailabilityCheckExpr(Empty);
3399  break;
3400 
3401  case STMT_SEH_LEAVE:
3402  S = new (Context) SEHLeaveStmt(Empty);
3403  break;
3404 
3405  case STMT_SEH_EXCEPT:
3406  S = new (Context) SEHExceptStmt(Empty);
3407  break;
3408 
3409  case STMT_SEH_FINALLY:
3410  S = new (Context) SEHFinallyStmt(Empty);
3411  break;
3412 
3413  case STMT_SEH_TRY:
3414  S = new (Context) SEHTryStmt(Empty);
3415  break;
3416 
3417  case STMT_CXX_CATCH:
3418  S = new (Context) CXXCatchStmt(Empty);
3419  break;
3420 
3421  case STMT_CXX_TRY:
3422  S = CXXTryStmt::Create(Context, Empty,
3423  /*numHandlers=*/Record[ASTStmtReader::NumStmtFields]);
3424  break;
3425 
3426  case STMT_CXX_FOR_RANGE:
3427  S = new (Context) CXXForRangeStmt(Empty);
3428  break;
3429 
3431  S = new (Context) MSDependentExistsStmt(SourceLocation(), true,
3434  nullptr);
3435  break;
3436 
3438  S = OMPCanonicalLoop::createEmpty(Context);
3439  break;
3440 
3443  Context, Record[ASTStmtReader::NumStmtFields], Empty);
3444  break;
3445 
3447  S =
3450  Empty);
3451  break;
3452 
3453  case STMT_OMP_SIMD_DIRECTIVE: {
3454  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3455  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3456  S = OMPSimdDirective::CreateEmpty(Context, NumClauses,
3457  CollapsedNum, Empty);
3458  break;
3459  }
3460 
3461  case STMT_OMP_TILE_DIRECTIVE: {
3462  unsigned NumLoops = Record[ASTStmtReader::NumStmtFields];
3463  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3464  S = OMPTileDirective::CreateEmpty(Context, NumClauses, NumLoops);
3465  break;
3466  }
3467 
3469  assert(Record[ASTStmtReader::NumStmtFields] == 1 && "Unroll directive accepts only a single loop");
3470  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3471  S = OMPUnrollDirective::CreateEmpty(Context, NumClauses);
3472  break;
3473  }
3474 
3475  case STMT_OMP_FOR_DIRECTIVE: {
3476  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3477  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3478  S = OMPForDirective::CreateEmpty(Context, NumClauses, CollapsedNum,
3479  Empty);
3480  break;
3481  }
3482 
3484  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3485  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3486  S = OMPForSimdDirective::CreateEmpty(Context, NumClauses, CollapsedNum,
3487  Empty);
3488  break;
3489  }
3490 
3493  Context, Record[ASTStmtReader::NumStmtFields], Empty);
3494  break;
3495 
3497  S = OMPSectionDirective::CreateEmpty(Context, Empty);
3498  break;
3499 
3502  Context, Record[ASTStmtReader::NumStmtFields], Empty);
3503  break;
3504 
3507  Context, Record[ASTStmtReader::NumStmtFields], Empty);
3508  break;
3509 
3511  S = OMPMasterDirective::CreateEmpty(Context, Empty);
3512  break;
3513 
3516  Context, Record[ASTStmtReader::NumStmtFields], Empty);
3517  break;
3518 
3520  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3521  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3522  S = OMPParallelForDirective::CreateEmpty(Context, NumClauses,
3523  CollapsedNum, Empty);
3524  break;
3525  }
3526 
3528  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3529  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3530  S = OMPParallelForSimdDirective::CreateEmpty(Context, NumClauses,
3531  CollapsedNum, Empty);
3532  break;
3533  }
3534 
3537  Context, Record[ASTStmtReader::NumStmtFields], Empty);
3538  break;
3539 
3542  Context, Record[ASTStmtReader::NumStmtFields], Empty);
3543  break;
3544 
3547  Context, Record[ASTStmtReader::NumStmtFields], Empty);
3548  break;
3549 
3552  Context, Record[ASTStmtReader::NumStmtFields], Empty);
3553  break;
3554 
3556  S = OMPTaskyieldDirective::CreateEmpty(Context, Empty);
3557  break;
3558 
3560  S = OMPBarrierDirective::CreateEmpty(Context, Empty);
3561  break;
3562 
3565  Context, Record[ASTStmtReader::NumStmtFields], Empty);
3566  break;
3567 
3570  Context, Record[ASTStmtReader::NumStmtFields], Empty);
3571  break;
3572 
3575  Context, Record[ASTStmtReader::NumStmtFields], Empty);
3576  break;
3577 
3580  Context, Record[ASTStmtReader::NumStmtFields], Empty);
3581  break;
3582 
3585  Context, Record[ASTStmtReader::NumStmtFields], Empty);
3586  break;
3587 
3590  Context, Record[ASTStmtReader::NumStmtFields], Empty);
3591  break;
3592 
3594  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields];
3595  bool HasAssociatedStmt = Record[ASTStmtReader::NumStmtFields + 2];
3596  S = OMPOrderedDirective::CreateEmpty(Context, NumClauses,
3597  !HasAssociatedStmt, Empty);
3598  break;
3599  }
3600 
3603  Context, Record[ASTStmtReader::NumStmtFields], Empty);
3604  break;
3605 
3608  Context, Record[ASTStmtReader::NumStmtFields], Empty);
3609  break;
3610 
3613  Context, Record[ASTStmtReader::NumStmtFields], Empty);
3614  break;
3615 
3618  Context, Record[ASTStmtReader::NumStmtFields], Empty);
3619  break;
3620 
3623  Context, Record[ASTStmtReader::NumStmtFields], Empty);
3624  break;
3625 
3628  Context, Record[ASTStmtReader::NumStmtFields], Empty);
3629  break;
3630 
3632  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3633  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3634  S = OMPTargetParallelForDirective::CreateEmpty(Context, NumClauses,
3635  CollapsedNum, Empty);
3636  break;
3637  }
3638 
3641  Context, Record[ASTStmtReader::NumStmtFields], Empty);
3642  break;
3643 
3646  Context, Record[ASTStmtReader::NumStmtFields], Empty);
3647  break;
3648 
3650  S = OMPCancellationPointDirective::CreateEmpty(Context, Empty);
3651  break;
3652 
3655  Context, Record[ASTStmtReader::NumStmtFields], Empty);
3656  break;
3657 
3659  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3660  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3661  S = OMPTaskLoopDirective::CreateEmpty(Context, NumClauses, CollapsedNum,
3662  Empty);
3663  break;
3664  }
3665 
3667  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3668  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3669  S = OMPTaskLoopSimdDirective::CreateEmpty(Context, NumClauses,
3670  CollapsedNum, Empty);
3671  break;
3672  }
3673 
3675  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3676  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3677  S = OMPMasterTaskLoopDirective::CreateEmpty(Context, NumClauses,
3678  CollapsedNum, Empty);
3679  break;
3680  }
3681 
3683  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3684  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3685  S = OMPMaskedTaskLoopDirective::CreateEmpty(Context, NumClauses,
3686  CollapsedNum, Empty);
3687  break;
3688  }
3689 
3691  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3692  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3693  S = OMPMasterTaskLoopSimdDirective::CreateEmpty(Context, NumClauses,
3694  CollapsedNum, Empty);
3695  break;
3696  }
3697 
3699  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3700  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3701  S = OMPMaskedTaskLoopSimdDirective::CreateEmpty(Context, NumClauses,
3702  CollapsedNum, Empty);
3703  break;
3704  }
3705 
3707  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3708  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3709  S = OMPParallelMasterTaskLoopDirective::CreateEmpty(Context, NumClauses,
3710  CollapsedNum, Empty);
3711  break;
3712  }
3713 
3715  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3716  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3717  S = OMPParallelMaskedTaskLoopDirective::CreateEmpty(Context, NumClauses,
3718  CollapsedNum, Empty);
3719  break;
3720  }
3721 
3723  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3724  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3726  Context, NumClauses, CollapsedNum, Empty);
3727  break;
3728  }
3729 
3731  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3732  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3734  Context, NumClauses, CollapsedNum, Empty);
3735  break;
3736  }
3737 
3739  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3740  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3741  S = OMPDistributeDirective::CreateEmpty(Context, NumClauses, CollapsedNum,
3742  Empty);
3743  break;
3744  }
3745 
3747  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3748  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3749  S = OMPDistributeParallelForDirective::CreateEmpty(Context, NumClauses,
3750  CollapsedNum, Empty);
3751  break;
3752  }
3753 
3755  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3756  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3758  CollapsedNum,
3759  Empty);
3760  break;
3761  }
3762 
3764  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3765  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3766  S = OMPDistributeSimdDirective::CreateEmpty(Context, NumClauses,
3767  CollapsedNum, Empty);
3768  break;
3769  }
3770 
3772  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3773  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3774  S = OMPTargetParallelForSimdDirective::CreateEmpty(Context, NumClauses,
3775  CollapsedNum, Empty);
3776  break;
3777  }
3778 
3780  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3781  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3782  S = OMPTargetSimdDirective::CreateEmpty(Context, NumClauses, CollapsedNum,
3783  Empty);
3784  break;
3785  }
3786 
3788  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3789  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3790  S = OMPTeamsDistributeDirective::CreateEmpty(Context, NumClauses,
3791  CollapsedNum, Empty);
3792  break;
3793  }
3794 
3796  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3797  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3798  S = OMPTeamsDistributeSimdDirective::CreateEmpty(Context, NumClauses,
3799  CollapsedNum, Empty);
3800  break;
3801  }
3802 
3804  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3805  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3807  Context, NumClauses, CollapsedNum, Empty);
3808  break;
3809  }
3810 
3812  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3813  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3815  Context, NumClauses, CollapsedNum, Empty);
3816  break;
3817  }
3818 
3821  Context, Record[ASTStmtReader::NumStmtFields], Empty);
3822  break;
3823 
3825  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3826  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3827  S = OMPTargetTeamsDistributeDirective::CreateEmpty(Context, NumClauses,
3828  CollapsedNum, Empty);
3829  break;
3830  }
3831 
3833  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3834  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3836  Context, NumClauses, CollapsedNum, Empty);
3837  break;
3838  }
3839 
3841  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3842  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3844  Context, NumClauses, CollapsedNum, Empty);
3845  break;
3846  }
3847 
3849  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3850  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3852  Context, NumClauses, CollapsedNum, Empty);
3853  break;
3854  }
3855 
3858  Context, Record[ASTStmtReader::NumStmtFields], Empty);
3859  break;
3860 
3863  Context, Record[ASTStmtReader::NumStmtFields], Empty);
3864  break;
3865 
3868  Context, Record[ASTStmtReader::NumStmtFields], Empty);
3869  break;
3870 
3872  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3873  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3874  S = OMPGenericLoopDirective::CreateEmpty(Context, NumClauses,
3875  CollapsedNum, Empty);
3876  break;
3877  }
3878 
3880  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3881  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3882  S = OMPTeamsGenericLoopDirective::CreateEmpty(Context, NumClauses,
3883  CollapsedNum, Empty);
3884  break;
3885  }
3886 
3888  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3889  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3890  S = OMPTargetTeamsGenericLoopDirective::CreateEmpty(Context, NumClauses,
3891  CollapsedNum, Empty);
3892  break;
3893  }
3894 
3896  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3897  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3898  S = OMPParallelGenericLoopDirective::CreateEmpty(Context, NumClauses,
3899  CollapsedNum, Empty);
3900  break;
3901  }
3902 
3904  unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields];
3905  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields + 1];
3907  Context, NumClauses, CollapsedNum, Empty);
3908  break;
3909  }
3910 
3911  case EXPR_CXX_OPERATOR_CALL: {
3912  auto NumArgs = Record[ASTStmtReader::NumExprFields];
3914  CallExprBits.advance(1);
3915  auto HasFPFeatures = CallExprBits.getNextBit();
3916  S = CXXOperatorCallExpr::CreateEmpty(Context, NumArgs, HasFPFeatures,
3917  Empty);
3918  break;
3919  }
3920 
3921  case EXPR_CXX_MEMBER_CALL: {
3922  auto NumArgs = Record[ASTStmtReader::NumExprFields];
3924  CallExprBits.advance(1);
3925  auto HasFPFeatures = CallExprBits.getNextBit();
3926  S = CXXMemberCallExpr::CreateEmpty(Context, NumArgs, HasFPFeatures,
3927  Empty);
3928  break;
3929  }
3930 
3932  S = new (Context) CXXRewrittenBinaryOperator(Empty);
3933  break;
3934 
3935  case EXPR_CXX_CONSTRUCT:
3937  Context,
3938  /* NumArgs=*/Record[ASTStmtReader::NumExprFields]);
3939  break;
3940 
3942  S = new (Context) CXXInheritedCtorInitExpr(Empty);
3943  break;
3944 
3947  Context,
3948  /* NumArgs=*/Record[ASTStmtReader::NumExprFields]);
3949  break;
3950 
3951  case EXPR_CXX_STATIC_CAST: {
3952  unsigned PathSize = Record[ASTStmtReader::NumExprFields];
3954  CastExprBits.advance(7);
3955  bool HasFPFeatures = CastExprBits.getNextBit();
3956  S = CXXStaticCastExpr::CreateEmpty(Context, PathSize, HasFPFeatures);
3957  break;
3958  }
3959 
3960  case EXPR_CXX_DYNAMIC_CAST: {
3961  unsigned PathSize = Record[ASTStmtReader::NumExprFields];
3962  S = CXXDynamicCastExpr::CreateEmpty(Context, PathSize);
3963  break;
3964  }
3965 
3967  unsigned PathSize = Record[ASTStmtReader::NumExprFields];
3968  S = CXXReinterpretCastExpr::CreateEmpty(Context, PathSize);
3969  break;
3970  }
3971 
3972  case EXPR_CXX_CONST_CAST:
3973  S = CXXConstCastExpr::CreateEmpty(Context);
3974  break;
3975 
3977  S = CXXAddrspaceCastExpr::CreateEmpty(Context);
3978  break;
3979 
3980  case EXPR_CXX_FUNCTIONAL_CAST: {
3981  unsigned PathSize = Record[ASTStmtReader::NumExprFields];
3983  CastExprBits.advance(7);
3984  bool HasFPFeatures = CastExprBits.getNextBit();
3985  S = CXXFunctionalCastExpr::CreateEmpty(Context, PathSize, HasFPFeatures);
3986  break;
3987  }
3988 
3989  case EXPR_BUILTIN_BIT_CAST: {
3990 #ifndef NDEBUG
3991  unsigned PathSize = Record[ASTStmtReader::NumExprFields];
3992  assert(PathSize == 0 && "Wrong PathSize!");
3993 #endif
3994  S = new (Context) BuiltinBitCastExpr(Empty);
3995  break;
3996  }
3997 
3999  S = new (Context) SYCLBuiltinNumFieldsExpr(Empty);
4000  break;
4001 
4003  S = new (Context) SYCLBuiltinFieldTypeExpr(Empty);
4004  break;
4005 
4007  S = new (Context) SYCLBuiltinNumBasesExpr(Empty);
4008  break;
4009 
4011  S = new (Context) SYCLBuiltinBaseTypeExpr(Empty);
4012  break;
4013 
4015  auto NumArgs = Record[ASTStmtReader::NumExprFields];
4017  CallExprBits.advance(1);
4018  auto HasFPFeatures = CallExprBits.getNextBit();
4019  S = UserDefinedLiteral::CreateEmpty(Context, NumArgs, HasFPFeatures,
4020  Empty);
4021  break;
4022  }
4023 
4025  S = new (Context) CXXStdInitializerListExpr(Empty);
4026  break;
4027 
4028  case EXPR_CXX_BOOL_LITERAL:
4029  S = new (Context) CXXBoolLiteralExpr(Empty);
4030  break;
4031 
4033  S = new (Context) CXXNullPtrLiteralExpr(Empty);
4034  break;
4035 
4036  case EXPR_CXX_TYPEID_EXPR:
4037  S = new (Context) CXXTypeidExpr(Empty, true);
4038  break;
4039 
4040  case EXPR_CXX_TYPEID_TYPE:
4041  S = new (Context) CXXTypeidExpr(Empty, false);
4042  break;
4043 
4044  case EXPR_CXX_UUIDOF_EXPR:
4045  S = new (Context) CXXUuidofExpr(Empty, true);
4046  break;
4047 
4049  S = new (Context) MSPropertyRefExpr(Empty);
4050  break;
4051 
4053  S = new (Context) MSPropertySubscriptExpr(Empty);
4054  break;
4055 
4056  case EXPR_CXX_UUIDOF_TYPE:
4057  S = new (Context) CXXUuidofExpr(Empty, false);
4058  break;
4059 
4060  case EXPR_CXX_THIS:
4061  S = CXXThisExpr::CreateEmpty(Context);
4062  break;
4063 
4064  case EXPR_CXX_THROW:
4065  S = new (Context) CXXThrowExpr(Empty);
4066  break;
4067 
4068  case EXPR_CXX_DEFAULT_ARG:
4070  Context, /*HasRewrittenInit=*/Record[ASTStmtReader::NumExprFields]);
4071  break;
4072 
4073  case EXPR_CXX_DEFAULT_INIT:
4075  Context, /*HasRewrittenInit=*/Record[ASTStmtReader::NumExprFields]);
4076  break;
4077 
4079  S = new (Context) CXXBindTemporaryExpr(Empty);
4080  break;
4081 
4083  S = new (Context) CXXScalarValueInitExpr(Empty);
4084  break;
4085 
4086  case EXPR_CXX_NEW:
4088  Context,
4089  /*IsArray=*/Record[ASTStmtReader::NumExprFields],
4090  /*HasInit=*/Record[ASTStmtReader::NumExprFields + 1],
4091  /*NumPlacementArgs=*/Record[ASTStmtReader::NumExprFields + 2],
4092  /*IsParenTypeId=*/Record[ASTStmtReader::NumExprFields + 3]);
4093  break;
4094 
4095  case EXPR_CXX_DELETE:
4096  S = new (Context) CXXDeleteExpr(Empty);
4097  break;
4098 
4100  S = new (Context) CXXPseudoDestructorExpr(Empty);
4101  break;
4102 
4104  S = ExprWithCleanups::Create(Context, Empty,
4106  break;
4107 
4109  unsigned NumTemplateArgs = Record[ASTStmtReader::NumExprFields];
4110  BitsUnpacker DependentScopeMemberBits(
4112  bool HasTemplateKWAndArgsInfo = DependentScopeMemberBits.getNextBit();
4113 
4114  bool HasFirstQualifierFoundInScope =
4115  DependentScopeMemberBits.getNextBit();
4117  Context, HasTemplateKWAndArgsInfo, NumTemplateArgs,
4118  HasFirstQualifierFoundInScope);
4119  break;
4120  }
4121 
4123  BitsUnpacker DependentScopeDeclRefBits(
4125  DependentScopeDeclRefBits.advance(ASTStmtReader::NumExprBits);
4126  bool HasTemplateKWAndArgsInfo = DependentScopeDeclRefBits.getNextBit();
4127  unsigned NumTemplateArgs =
4128  HasTemplateKWAndArgsInfo
4129  ? DependentScopeDeclRefBits.getNextBits(/*Width=*/16)
4130  : 0;
4132  Context, HasTemplateKWAndArgsInfo, NumTemplateArgs);
4133  break;
4134  }
4135 
4138  /*NumArgs=*/Record[ASTStmtReader::NumExprFields]);
4139  break;
4140 
4142  auto NumResults = Record[ASTStmtReader::NumExprFields];
4143  BitsUnpacker OverloadExprBits(Record[ASTStmtReader::NumExprFields + 1]);
4144  auto HasTemplateKWAndArgsInfo = OverloadExprBits.getNextBit();
4145  auto NumTemplateArgs = HasTemplateKWAndArgsInfo
4147  : 0;
4149  Context, NumResults, HasTemplateKWAndArgsInfo, NumTemplateArgs);
4150  break;
4151  }
4152 
4154  auto NumResults = Record[ASTStmtReader::NumExprFields];
4155  BitsUnpacker OverloadExprBits(Record[ASTStmtReader::NumExprFields + 1]);
4156  auto HasTemplateKWAndArgsInfo = OverloadExprBits.getNextBit();
4157  auto NumTemplateArgs = HasTemplateKWAndArgsInfo
4159  : 0;
4161  Context, NumResults, HasTemplateKWAndArgsInfo, NumTemplateArgs);
4162  break;
4163  }
4164 
4165  case EXPR_TYPE_TRAIT:
4168  break;
4169 
4170  case EXPR_ARRAY_TYPE_TRAIT:
4171  S = new (Context) ArrayTypeTraitExpr(Empty);
4172  break;
4173 
4175  S = new (Context) ExpressionTraitExpr(Empty);
4176  break;
4177 
4178  case EXPR_CXX_NOEXCEPT:
4179  S = new (Context) CXXNoexceptExpr(Empty);
4180  break;
4181 
4182  case EXPR_PACK_EXPANSION:
4183  S = new (Context) PackExpansionExpr(Empty);
4184  break;
4185 
4186  case EXPR_SIZEOF_PACK:
4188  Context,
4189  /*NumPartialArgs=*/Record[ASTStmtReader::NumExprFields]);
4190  break;
4191 
4192  case EXPR_PACK_INDEXING:
4194  Context,
4195  /*TransformedExprs=*/Record[ASTStmtReader::NumExprFields]);
4196  break;
4197 
4199  S = new (Context) SubstNonTypeTemplateParmExpr(Empty);
4200  break;
4201 
4203  S = new (Context) SubstNonTypeTemplateParmPackExpr(Empty);
4204  break;
4205 
4209  break;
4210 
4212  S = new (Context) MaterializeTemporaryExpr(Empty);
4213  break;
4214 
4215  case EXPR_CXX_FOLD:
4216  S = new (Context) CXXFoldExpr(Empty);
4217  break;
4218 
4221  Context, /*numExprs=*/Record[ASTStmtReader::NumExprFields], Empty);
4222  break;
4223 
4224  case EXPR_OPAQUE_VALUE:
4225  S = new (Context) OpaqueValueExpr(Empty);
4226  break;
4227 
4228  case EXPR_CUDA_KERNEL_CALL: {
4229  auto NumArgs = Record[ASTStmtReader::NumExprFields];
4231  CallExprBits.advance(1);
4232  auto HasFPFeatures = CallExprBits.getNextBit();
4233  S = CUDAKernelCallExpr::CreateEmpty(Context, NumArgs, HasFPFeatures,
4234  Empty);
4235  break;
4236  }
4237 
4238  case EXPR_ASTYPE:
4239  S = new (Context) AsTypeExpr(Empty);
4240  break;
4241 
4242  case EXPR_PSEUDO_OBJECT: {
4243  unsigned numSemanticExprs = Record[ASTStmtReader::NumExprFields];
4244  S = PseudoObjectExpr::Create(Context, Empty, numSemanticExprs);
4245  break;
4246  }
4247 
4248  case EXPR_ATOMIC:
4249  S = new (Context) AtomicExpr(Empty);
4250  break;
4251 
4252  case EXPR_LAMBDA: {
4253  unsigned NumCaptures = Record[ASTStmtReader::NumExprFields];
4254  S = LambdaExpr::CreateDeserialized(Context, NumCaptures);
4255  break;
4256  }
4257 
4258  case STMT_COROUTINE_BODY: {
4259  unsigned NumParams = Record[ASTStmtReader::NumStmtFields];
4260  S = CoroutineBodyStmt::Create(Context, Empty, NumParams);
4261  break;
4262  }
4263 
4264  case STMT_CORETURN:
4265  S = new (Context) CoreturnStmt(Empty);
4266  break;
4267 
4268  case EXPR_COAWAIT:
4269  S = new (Context) CoawaitExpr(Empty);
4270  break;
4271 
4272  case EXPR_COYIELD:
4273  S = new (Context) CoyieldExpr(Empty);
4274  break;
4275 
4277  S = new (Context) DependentCoawaitExpr(Empty);
4278  break;
4279 
4281  S = new (Context) ConceptSpecializationExpr(Empty);
4282  break;
4283  }
4285  unsigned NumClauses = Record[ASTStmtReader::NumStmtFields];
4286  S = OpenACCComputeConstruct::CreateEmpty(Context, NumClauses);
4287  break;
4288  }
4289  case EXPR_REQUIRES:
4290  unsigned numLocalParameters = Record[ASTStmtReader::NumExprFields];
4291  unsigned numRequirement = Record[ASTStmtReader::NumExprFields + 1];
4292  S = RequiresExpr::Create(Context, Empty, numLocalParameters,
4293  numRequirement);
4294  break;
4295  }
4296 
4297  // We hit a STMT_STOP, so we're done with this expression.
4298  if (Finished)
4299  break;
4300 
4301  ++NumStatementsRead;
4302 
4303  if (S && !IsStmtReference) {
4304  Reader.Visit(S);
4305  StmtEntries[Cursor.GetCurrentBitNo()] = S;
4306  }
4307 
4308  assert(Record.getIdx() == Record.size() &&
4309  "Invalid deserialization of statement");
4310  StmtStack.push_back(S);
4311  }
4312 Done:
4313  assert(StmtStack.size() > PrevNumStmts && "Read too many sub-stmts!");
4314  assert(StmtStack.size() == PrevNumStmts + 1 && "Extra expressions on stack!");
4315  return StmtStack.pop_back_val();
4316 }
This file provides AST data structures related to concepts.
Defines the clang::ASTContext interface.
static concepts::Requirement::SubstitutionDiagnostic * readSubstitutionDiagnostic(ASTRecordReader &Record)
static ConstraintSatisfaction readConstraintSatisfaction(ASTRecordReader &Record)
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate....
Defines the C++ template declaration subclasses.
Defines the clang::Expr interface and subclasses for C++ expressions.
Defines enumerations for expression traits intrinsics.
unsigned Iter
Definition: HTMLLogger.cpp:154
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
Defines several types used to describe C++ lambda expressions that are shared between the parser and ...
Defines the clang::LangOptions interface.
llvm::MachO::Record Record
Definition: MachO.h:31
This file defines OpenMP AST classes for clauses.
Defines some OpenMP-specific enums and functions.
Defines an enumeration for C++ overloaded operators.
SourceRange Range
Definition: SemaObjC.cpp:754
Defines the clang::SourceLocation class and associated facilities.
Defines various enumerations that describe declaration and type specifiers.
Defines the Objective-C statement AST node classes.
This file defines OpenMP AST classes for executable directives and clauses.
Defines enumerations for the type traits support.
C Language Family Type Representation.
SourceLocation End
SourceLocation Begin
__device__ int
void setValue(const ASTContext &C, const llvm::APInt &Val)
bool needsCleanup() const
Returns whether the object performed allocations.
Definition: APValue.cpp:431
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition: ASTContext.h:185
Expr * ReadSubExpr()
Reads a sub-expression operand during statement reading.
Expr * ReadExpr(ModuleFile &F)
Reads an expression.
Stmt * ReadStmt(ModuleFile &F)
Reads a statement.
An object for streaming information from a record.
static const unsigned NumExprFields
The number of record fields required for the Expr class itself.
static const unsigned NumStmtFields
The number of record fields required for the Stmt class itself.
void VisitStmt(Stmt *S)
static const unsigned NumExprBits
The number of bits required for the packing bits for the Expr class.
void ReadTemplateKWAndArgsInfo(ASTTemplateKWAndArgsInfo &Args, TemplateArgumentLoc *ArgsLocArray, unsigned NumTemplateArgs)
Read and initialize a ExplicitTemplateArgumentList structure.
ASTStmtReader(ASTRecordReader &Record, llvm::BitstreamCursor &Cursor)
AddrLabelExpr - The GNU address of label extension, representing &&label.
Definition: Expr.h:4390
void setLabel(LabelDecl *L)
Definition: Expr.h:4414
void setLabelLoc(SourceLocation L)
Definition: Expr.h:4408
void setAmpAmpLoc(SourceLocation L)
Definition: Expr.h:4406
Represents the index of the current element of an array being initialized by an ArrayInitLoopExpr.
Definition: Expr.h:5605
Represents a loop initializing the elements of an array.
Definition: Expr.h:5552
This class represents BOTH the OpenMP Array Section and OpenACC 'subarray', with a boolean differenti...
Definition: Expr.h:6775
bool isOMPArraySection() const
Definition: Expr.h:6837
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
Definition: Expr.h:2716
void setRHS(Expr *E)
Definition: Expr.h:2751
void setRBracketLoc(SourceLocation L)
Definition: Expr.h:2767
void setLHS(Expr *E)
Definition: Expr.h:2747
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent.
Definition: ExprCXX.h:2848
AsTypeExpr - Clang builtin function __builtin_astype [OpenCL 6.2.4.2] This AST node provides support ...
Definition: Expr.h:6275
AsmStmt is the base class for GCCAsmStmt and MSAsmStmt.
Definition: Stmt.h:3100
AtomicExpr - Variadic atomic builtins: __atomic_exchange, __atomic_fetch_*, __atomic_load,...
Definition: Expr.h:6478
unsigned getNumSubExprs() const
Definition: Expr.h:6553
Represents an attribute applied to a statement.
Definition: Stmt.h:2080
static AttributedStmt * CreateEmpty(const ASTContext &C, unsigned NumAttrs)
Definition: Stmt.cpp:434
BinaryConditionalOperator - The GNU extension to the conditional operator which allows the middle ope...
Definition: Expr.h:4293
A builtin binary operation expression such as "x + y" or "x <= y".
Definition: Expr.h:3892
void setLHS(Expr *E)
Definition: Expr.h:3942
void setHasStoredFPFeatures(bool B)
Set and fetch the bit that shows whether FPFeatures needs to be allocated in Trailing Storage.
Definition: Expr.h:4075
void setOperatorLoc(SourceLocation L)
Definition: Expr.h:3934
void setRHS(Expr *E)
Definition: Expr.h:3944
static BinaryOperator * CreateEmpty(const ASTContext &C, bool hasFPFeatures)
Definition: Expr.cpp:4835
void setStoredFPFeatures(FPOptionsOverride F)
Set FPFeatures in trailing storage, used only by Serialization.
Definition: Expr.h:4084
void setOpcode(Opcode Opc)
Definition: Expr.h:3939
A simple helper class to unpack an integer to bits and consuming the bits in order.
Definition: ASTReader.h:2439
BlockExpr - Adaptor class for mixing a BlockDecl with expressions.
Definition: Expr.h:6214
void setBlockDecl(BlockDecl *BD)
Definition: Expr.h:6228
BreakStmt - This represents a break.
Definition: Stmt.h:2980
Represents a C++2a __builtin_bit_cast(T, v) expression.
Definition: ExprCXX.h:5293
CStyleCastExpr - An explicit cast in C (C99 6.5.4) or a C-style cast in C++ (C++ [expr....
Definition: Expr.h:3823
static CStyleCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize, bool HasFPFeatures)
Definition: Expr.cpp:2178
void setRParenLoc(SourceLocation L)
Definition: Expr.h:3859
void setLParenLoc(SourceLocation L)
Definition: Expr.h:3856
Represents a call to a CUDA kernel function.
Definition: ExprCXX.h:231
static CUDAKernelCallExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, bool HasFPFeatures, EmptyShell Empty)
Definition: ExprCXX.cpp:1871
A C++ addrspace_cast expression (currently only enabled for OpenCL).
Definition: ExprCXX.h:601
static CXXAddrspaceCastExpr * CreateEmpty(const ASTContext &Context)
Definition: ExprCXX.cpp:848
Represents a base class of a C++ class.
Definition: DeclCXX.h:146
Represents binding an expression to a temporary.
Definition: ExprCXX.h:1487
void setTemporary(CXXTemporary *T)
Definition: ExprCXX.h:1507
void setSubExpr(Expr *E)
Definition: ExprCXX.h:1511
A boolean literal, per ([C++ lex.bool] Boolean literals).
Definition: ExprCXX.h:720
void setValue(bool V)
Definition: ExprCXX.h:738
void setLocation(SourceLocation L)
Definition: ExprCXX.h:744
CXXCatchStmt - This represents a C++ catch block.
Definition: StmtCXX.h:28
A C++ const_cast expression (C++ [expr.const.cast]).
Definition: ExprCXX.h:563
static CXXConstCastExpr * CreateEmpty(const ASTContext &Context)
Definition: ExprCXX.cpp:835
Represents a call to a C++ constructor.
Definition: ExprCXX.h:1542
void setArg(unsigned Arg, Expr *ArgExpr)
Set the specified argument.
Definition: ExprCXX.h:1695
unsigned getNumArgs() const
Return the number of arguments to the constructor call.
Definition: ExprCXX.h:1682
static CXXConstructExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs)
Create an empty C++ construction expression.
Definition: ExprCXX.cpp:1125
A default argument (C++ [dcl.fct.default]).
Definition: ExprCXX.h:1264
static CXXDefaultArgExpr * CreateEmpty(const ASTContext &C, bool HasRewrittenInit)
Definition: ExprCXX.cpp:962
A use of a default initializer in a constructor or in aggregate initialization.
Definition: ExprCXX.h:1371
static CXXDefaultInitExpr * CreateEmpty(const ASTContext &C, bool HasRewrittenInit)
Definition: ExprCXX.cpp:1016
Represents a delete expression for memory deallocation and destructor calls, e.g.
Definition: ExprCXX.h:2493
Represents a C++ member access expression where the actual member referenced could not be resolved be...
Definition: ExprCXX.h:3676
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
Definition: ExprCXX.h:3874
static CXXDependentScopeMemberExpr * CreateEmpty(const ASTContext &Ctx, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs, bool HasFirstQualifierFoundInScope)
Definition: ExprCXX.cpp:1505
A C++ dynamic_cast expression (C++ [expr.dynamic.cast]).
Definition: ExprCXX.h:478
static CXXDynamicCastExpr * CreateEmpty(const ASTContext &Context, unsigned pathSize)
Definition: ExprCXX.cpp:757
Represents a folding of a pack over an operator.
Definition: ExprCXX.h:4833
CXXForRangeStmt - This represents C++0x [stmt.ranged]'s ranged for statement, represented as 'for (ra...
Definition: StmtCXX.h:135
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr....
Definition: ExprCXX.h:1813
void setLParenLoc(SourceLocation L)
Definition: ExprCXX.h:1851
static CXXFunctionalCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize, bool HasFPFeatures)
Definition: ExprCXX.cpp:868
void setRParenLoc(SourceLocation L)
Definition: ExprCXX.h:1853
Represents a call to an inherited base class constructor from an inheriting constructor.
Definition: ExprCXX.h:1733
Represents a call to a member function that may be written either with member call syntax (e....
Definition: ExprCXX.h:176
static CXXMemberCallExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, bool HasFPFeatures, EmptyShell Empty)
Definition: ExprCXX.cpp:642
Abstract class common to all of the C++ "named"/"keyword" casts.
Definition: ExprCXX.h:372
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)".
Definition: ExprCXX.h:2236
static CXXNewExpr * CreateEmpty(const ASTContext &Ctx, bool IsArray, bool HasInit, unsigned NumPlacementArgs, bool IsParenTypeId)
Create an empty c++ new expression.
Definition: ExprCXX.cpp:268
bool isArray() const
Definition: ExprCXX.h:2344
bool hasInitializer() const
Whether this new-expression has any initializer at all.
Definition: ExprCXX.h:2400
void setOperatorDelete(FunctionDecl *D)
Definition: ExprCXX.h:2342
unsigned getNumPlacementArgs() const
Definition: ExprCXX.h:2374
bool isParenTypeId() const
Definition: ExprCXX.h:2391
raw_arg_iterator raw_arg_end()
Definition: ExprCXX.h:2463
raw_arg_iterator raw_arg_begin()
Definition: ExprCXX.h:2462
void setOperatorNew(FunctionDecl *D)
Definition: ExprCXX.h:2340
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
Definition: ExprCXX.h:4119
The null pointer literal (C++11 [lex.nullptr])
Definition: ExprCXX.h:765
void setLocation(SourceLocation L)
Definition: ExprCXX.h:780
A call to an overloaded operator written using operator syntax.
Definition: ExprCXX.h:81
static CXXOperatorCallExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, bool HasFPFeatures, EmptyShell Empty)
Definition: ExprCXX.cpp:577
Represents a list-initialization with parenthesis.
Definition: ExprCXX.h:4955
void setInitializedFieldInUnion(FieldDecl *FD)
Definition: ExprCXX.h:5031
static CXXParenListInitExpr * CreateEmpty(ASTContext &C, unsigned numExprs, EmptyShell Empty)
Definition: ExprCXX.cpp:1893
void setArrayFiller(Expr *E)
Definition: ExprCXX.h:5021
Represents a C++ pseudo-destructor (C++ [expr.pseudo]).
Definition: ExprCXX.h:2612
void setDestroyedType(IdentifierInfo *II, SourceLocation Loc)
Set the name of destroyed type for a dependent pseudo-destructor expression.
Definition: ExprCXX.h:2727
A C++ reinterpret_cast expression (C++ [expr.reinterpret.cast]).
Definition: ExprCXX.h:523
static CXXReinterpretCastExpr * CreateEmpty(const ASTContext &Context, unsigned pathSize)
Definition: ExprCXX.cpp:821
A rewritten comparison expression that was originally written using operator syntax.
Definition: ExprCXX.h:283
An expression "T()" which creates a value-initialized rvalue of type T, which is a non-class type.
Definition: ExprCXX.h:2177
A C++ static_cast expression (C++ [expr.static.cast]).
Definition: ExprCXX.h:433
static CXXStaticCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize, bool hasFPFeatures)
Definition: ExprCXX.cpp:729
Implicit construction of a std::initializer_list<T> object from an array temporary within list-initia...
Definition: ExprCXX.h:797
Represents a C++ functional cast expression that builds a temporary object.
Definition: ExprCXX.h:1881
static CXXTemporaryObjectExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs)
Definition: ExprCXX.cpp:1091
Represents the this expression in C++.
Definition: ExprCXX.h:1148
void setCapturedByCopyInLambdaWithExplicitObjectParameter(bool Set)
Definition: ExprCXX.h:1178
void setLocation(SourceLocation L)
Definition: ExprCXX.h:1166
static CXXThisExpr * CreateEmpty(const ASTContext &Ctx)
Definition: ExprCXX.cpp:1525
void setImplicit(bool I)
Definition: ExprCXX.h:1172
A C++ throw-expression (C++ [except.throw]).
Definition: ExprCXX.h:1202
CXXTryStmt - A C++ try block, including all handlers.
Definition: StmtCXX.h:69
static CXXTryStmt * Create(const ASTContext &C, SourceLocation tryLoc, CompoundStmt *tryBlock, ArrayRef< Stmt * > handlers)
Definition: StmtCXX.cpp:25
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
Definition: ExprCXX.h:845
bool isTypeOperand() const
Definition: ExprCXX.h:881
void setSourceRange(SourceRange R)
Definition: ExprCXX.h:900
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
Definition: ExprCXX.h:3550
void setRParenLoc(SourceLocation L)
Definition: ExprCXX.h:3600
void setArg(unsigned I, Expr *E)
Definition: ExprCXX.h:3636
void setLParenLoc(SourceLocation L)
Definition: ExprCXX.h:3595
unsigned getNumArgs() const
Retrieve the number of arguments.
Definition: ExprCXX.h:3608
static CXXUnresolvedConstructExpr * CreateEmpty(const ASTContext &Context, unsigned NumArgs)
Definition: ExprCXX.cpp:1432
A Microsoft C++ __uuidof expression, which gets the _GUID that corresponds to the supplied type or ex...
Definition: ExprCXX.h:1062
bool isTypeOperand() const
Definition: ExprCXX.h:1092
void setSourceRange(SourceRange R)
Definition: ExprCXX.h:1113
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Definition: Expr.h:2872
void setRParenLoc(SourceLocation L)
Definition: Expr.h:3183
void setArg(unsigned Arg, Expr *ArgExpr)
setArg - Set the specified argument.
Definition: Expr.h:3076
void setADLCallKind(ADLCallKind V=UsesADL)
Definition: Expr.h:3029
static CallExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, bool HasFPFeatures, EmptyShell Empty)
Create an empty call expression, for deserialization.
Definition: Expr.cpp:1573
void setPreArg(unsigned I, Stmt *PreArg)
Definition: Expr.h:2960
void setStoredFPFeatures(FPOptionsOverride F)
Set FPOptionsOverride in trailing storage. Used only by Serialization.
Definition: Expr.h:3141
unsigned getNumArgs() const
getNumArgs - Return the number of actual arguments to this call.
Definition: Expr.h:3050
void setCallee(Expr *F)
Definition: Expr.h:3024
This captures a statement into a function.
Definition: Stmt.h:3757
static CapturedStmt * CreateDeserialized(const ASTContext &Context, unsigned NumCaptures)
Definition: Stmt.cpp:1385
VariableCaptureKind
The different capture forms: by 'this', by reference, capture for variable-length array type etc.
Definition: Stmt.h:3761
CaseStmt - Represent a case statement.
Definition: Stmt.h:1801
static CaseStmt * CreateEmpty(const ASTContext &Ctx, bool CaseStmtIsGNURange)
Build an empty case statement.
Definition: Stmt.cpp:1231
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
Definition: Expr.h:3535
FPOptionsOverride * getTrailingFPFeatures()
Return a pointer to the trailing FPOptions.
Definition: Expr.cpp:2109
path_iterator path_begin()
Definition: Expr.h:3605
unsigned path_size() const
Definition: Expr.h:3604
void setCastKind(CastKind K)
Definition: Expr.h:3580
bool hasStoredFPFeatures() const
Definition: Expr.h:3634
void setSubExpr(Expr *E)
Definition: Expr.h:3587
void setValue(unsigned Val)
Definition: Expr.h:1616
void setLocation(SourceLocation Location)
Definition: Expr.h:1612
void setKind(CharacterLiteralKind kind)
Definition: Expr.h:1613
ChooseExpr - GNU builtin-in function __builtin_choose_expr.
Definition: Expr.h:4610
void setRParenLoc(SourceLocation L)
Definition: Expr.h:4661
void setIsConditionTrue(bool isTrue)
Definition: Expr.h:4638
void setBuiltinLoc(SourceLocation L)
Definition: Expr.h:4658
void setRHS(Expr *E)
Definition: Expr.h:4655
void setCond(Expr *E)
Definition: Expr.h:4651
void setLHS(Expr *E)
Definition: Expr.h:4653
Represents a 'co_await' expression.
Definition: ExprCXX.h:5186
void setIsImplicit(bool value=true)
Definition: ExprCXX.h:5209
CompoundAssignOperator - For compound assignments (e.g.
Definition: Expr.h:4140
void setComputationResultType(QualType T)
Definition: Expr.h:4178
static CompoundAssignOperator * CreateEmpty(const ASTContext &C, bool hasFPFeatures)
Definition: Expr.cpp:4857
void setComputationLHSType(QualType T)
Definition: Expr.h:4175
CompoundLiteralExpr - [C99 6.5.2.5].
Definition: Expr.h:3465
void setFileScope(bool FS)
Definition: Expr.h:3493
void setTypeSourceInfo(TypeSourceInfo *tinfo)
Definition: Expr.h:3501
void setLParenLoc(SourceLocation L)
Definition: Expr.h:3496
void setInitializer(Expr *E)
Definition: Expr.h:3490
CompoundStmt - This represents a group of statements like { stmt stmt }.
Definition: Stmt.h:1606
static CompoundStmt * CreateEmpty(const ASTContext &C, unsigned NumStmts, bool HasFPFeatures)
Definition: Stmt.cpp:393
Represents the specialization of a concept - evaluates to a prvalue of type bool.
Definition: ExprConcepts.h:42
ConditionalOperator - The ?: ternary operator.
Definition: Expr.h:4231
ConstantExpr - An expression that occurs in a constant context and optionally the result of evaluatin...
Definition: Expr.h:1072
ConstantResultStorageKind getResultStorageKind() const
Definition: Expr.h:1141
static ConstantExpr * CreateEmpty(const ASTContext &Context, ConstantResultStorageKind StorageKind)
Definition: Expr.cpp:367
The result of a constraint satisfaction check, containing the necessary information to diagnose an un...
Definition: ASTConcept.h:35
llvm::SmallVector< std::pair< const Expr *, Detail >, 4 > Details
Pairs of unsatisfied atomic constraint expressions along with the substituted constraint expr,...
Definition: ASTConcept.h:60
std::pair< SourceLocation, StringRef > SubstitutionDiagnostic
Definition: ASTConcept.h:50
ContinueStmt - This represents a continue.
Definition: Stmt.h:2950
ConvertVectorExpr - Clang builtin function __builtin_convertvector This AST node provides support for...
Definition: Expr.h:4551
Represents a 'co_return' statement in the C++ Coroutines TS.
Definition: StmtCXX.h:473
Represents the body of a coroutine.
Definition: StmtCXX.h:320
static CoroutineBodyStmt * Create(const ASTContext &C, CtorArgs const &Args)
Definition: StmtCXX.cpp:87
Represents a 'co_yield' expression.
Definition: ExprCXX.h:5267
A POD class for pairing a NamedDecl* with an access specifier.
static DeclAccessPair make(NamedDecl *D, AccessSpecifier AS)
static DeclGroup * Create(ASTContext &C, Decl **Decls, unsigned NumDecls)
Definition: DeclGroup.cpp:20
A reference to a declared variable, function, enum, etc.
Definition: Expr.h:1260
ValueDecl * getDecl()
Definition: Expr.h:1328
bool hasTemplateKWAndArgsInfo() const
Definition: Expr.h:1375
static DeclRefExpr * CreateEmpty(const ASTContext &Context, bool HasQualifier, bool HasFoundDecl, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
Construct an empty declaration reference expression.
Definition: Expr.cpp:529
void setLocation(SourceLocation L)
Definition: Expr.h:1337
bool hasQualifier() const
Determine whether this declaration reference was preceded by a C++ nested-name-specifier,...
Definition: Expr.h:1343
DeclStmt - Adaptor class for mixing declarations with statements and expressions.
Definition: Stmt.h:1497
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:86
Represents a 'co_await' expression while the type of the promise is dependent.
Definition: ExprCXX.h:5218
A qualified reference to a name whose declaration cannot yet be resolved.
Definition: ExprCXX.h:3316
static DependentScopeDeclRefExpr * CreateEmpty(const ASTContext &Context, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
Definition: ExprCXX.cpp:497
Represents a single C99 designator.
Definition: Expr.h:5176
Represents a C99 designated initializer expression.
Definition: Expr.h:5133
static DesignatedInitExpr * CreateEmpty(const ASTContext &C, unsigned NumIndexExprs)
Definition: Expr.cpp:4656
void setSubExpr(unsigned Idx, Expr *E)
Definition: Expr.h:5420
void setGNUSyntax(bool GNU)
Definition: Expr.h:5398
void setEqualOrColonLoc(SourceLocation L)
Definition: Expr.h:5389
void setDesignators(const ASTContext &C, const Designator *Desigs, unsigned NumDesigs)
Definition: Expr.cpp:4663
unsigned getNumSubExprs() const
Retrieve the total number of subexpressions in this designated initializer expression,...
Definition: Expr.h:5413
void setBase(Expr *Base)
Definition: Expr.h:5518
void setUpdater(Expr *Updater)
Definition: Expr.h:5523
Designator - A designator in a C99 designated initializer.
Definition: Designator.h:38
static Designator CreateArrayRangeDesignator(Expr *Start, Expr *End, SourceLocation LBracketLoc, SourceLocation EllipsisLoc)
Creates a GNU array-range designator.
Definition: Designator.h:172
static Designator CreateArrayDesignator(Expr *Index, SourceLocation LBracketLoc)
Creates an array designator.
Definition: Designator.h:142
static Designator CreateFieldDesignator(const IdentifierInfo *FieldName, SourceLocation DotLoc, SourceLocation FieldLoc)
Creates a field designator.
Definition: Designator.h:115
DoStmt - This represents a 'do/while' stmt.
Definition: Stmt.h:2725
ExplicitCastExpr - An explicit cast written in the source code.
Definition: Expr.h:3782
void setTypeInfoAsWritten(TypeSourceInfo *writtenTy)
Definition: Expr.h:3805
Represents an expression – generally a full-expression – that introduces cleanups to be run at the en...
Definition: ExprCXX.h:3467
unsigned getNumObjects() const
Definition: ExprCXX.h:3495
llvm::PointerUnion< BlockDecl *, CompoundLiteralExpr * > CleanupObject
The type of objects that are kept in the cleanup.
Definition: ExprCXX.h:3473
static ExprWithCleanups * Create(const ASTContext &C, EmptyShell empty, unsigned numObjects)
Definition: ExprCXX.cpp:1397
This represents one expression.
Definition: Expr.h:110
void setType(QualType t)
Definition: Expr.h:143
bool isValueDependent() const
Determines whether the value of this expression depends on.
Definition: Expr.h:175
bool isInstantiationDependent() const
Whether this expression is instantiation-dependent, meaning that it depends in some way on.
Definition: Expr.h:221
void setValueKind(ExprValueKind Cat)
setValueKind - Set the value kind produced by this expression.
Definition: Expr.h:454
void setObjectKind(ExprObjectKind Cat)
setObjectKind - Set the object kind produced by this expression.
Definition: Expr.h:457
void setDependence(ExprDependence Deps)
Each concrete expr subclass is expected to compute its dependence and call this in the constructor.
Definition: Expr.h:135
An expression trait intrinsic.
Definition: ExprCXX.h:2919
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
Definition: Expr.h:6154
void setAccessor(IdentifierInfo *II)
Definition: Expr.h:6176
void setBase(Expr *E)
Definition: Expr.h:6173
void setAccessorLoc(SourceLocation L)
Definition: Expr.h:6179
static FPOptionsOverride getFromOpaqueInt(storage_type I)
Definition: LangOptions.h:1019
static FixedPointLiteral * Create(const ASTContext &C, EmptyShell Empty)
Returns an empty fixed-point literal.
Definition: Expr.cpp:1062
void setLocation(SourceLocation Location)
Definition: Expr.h:1564
void setScale(unsigned S)
Definition: Expr.h:1567
const llvm::fltSemantics & getSemantics() const
Return the APFloat semantics this literal uses.
Definition: Expr.h:1669
static FloatingLiteral * Create(const ASTContext &C, const llvm::APFloat &V, bool isexact, QualType Type, SourceLocation L)
Definition: Expr.cpp:1133
void setValue(const ASTContext &C, const llvm::APFloat &Val)
Definition: Expr.h:1650
void setRawSemantics(llvm::APFloatBase::Semantics Sem)
Set the raw enumeration value representing the floating-point semantics of this literal (32-bit IEEE,...
Definition: Expr.h:1664
void setExact(bool E)
Definition: Expr.h:1681
void setLocation(SourceLocation L)
Definition: Expr.h:1689
ForStmt - This represents a 'for (init;cond;inc)' stmt.
Definition: Stmt.h:2781
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:1057
Stmt * SubExpr
Definition: Expr.h:1041
Represents a reference to a function parameter pack or init-capture pack that has been substituted bu...
Definition: ExprCXX.h:4641
static FunctionParmPackExpr * CreateEmpty(const ASTContext &Context, unsigned NumParams)
Definition: ExprCXX.cpp:1755
This represents a GCC inline-assembly statement extension.
Definition: Stmt.h:3259
GNUNullExpr - Implements the GNU __null extension, which is a name for a null pointer constant that h...
Definition: Expr.h:4685
void setTokenLocation(SourceLocation L)
Definition: Expr.h:4700
Represents a C11 generic selection.
Definition: Expr.h:5766
unsigned getNumAssocs() const
The number of association expressions.
Definition: Expr.h:6006
static GenericSelectionExpr * CreateEmpty(const ASTContext &Context, unsigned NumAssocs)
Create an empty generic selection expression for deserialization.
Definition: Expr.cpp:4590
GotoStmt - This represents a direct goto.
Definition: Stmt.h:2862
One of these records is kept for each identifier that is lexed.
IfStmt - This represents an if/then/else.
Definition: Stmt.h:2138
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:973
ImaginaryLiteral - We support imaginary integer and floating point literals, like "1....
Definition: Expr.h:1712
void setSubExpr(Expr *E)
Definition: Expr.h:1726
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
Definition: Expr.h:3707
static ImplicitCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize, bool HasFPFeatures)
Definition: Expr.cpp:2151
void setIsPartOfExplicitCast(bool PartOfExplicitCast)
Definition: Expr.h:3739
Represents an implicitly-generated value initialization of an object of a given type.
Definition: Expr.h:5641
IndirectGotoStmt - This represents an indirect goto.
Definition: Stmt.h:2901
Describes an C or C++ initializer list.
Definition: Expr.h:4888
void setSyntacticForm(InitListExpr *Init)
Definition: Expr.h:5058
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:2448
void setLBraceLoc(SourceLocation Loc)
Definition: Expr.h:5043
void setRBraceLoc(SourceLocation Loc)
Definition: Expr.h:5045
void sawArrayRangeDesignator(bool ARD=true)
Definition: Expr.h:5068
void reserveInits(const ASTContext &C, unsigned NumInits)
Reserve space for some number of initializers.
Definition: Expr.cpp:2439
void setLocation(SourceLocation Location)
Definition: Expr.h:1522
static IntegerLiteral * Create(const ASTContext &C, const llvm::APInt &V, QualType type, SourceLocation l)
Returns a new integer literal with value 'V' and type 'type'.
Definition: Expr.cpp:1032
LabelStmt - Represents a label, which has a substatement.
Definition: Stmt.h:2031
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
Definition: ExprCXX.h:1950
static LambdaExpr * CreateDeserialized(const ASTContext &C, unsigned NumCaptures)
Construct a new lambda expression that will be deserialized from an external source.
Definition: ExprCXX.cpp:1264
capture_init_iterator capture_init_end()
Retrieve the iterator pointing one past the last initialization argument for this lambda expression.
Definition: ExprCXX.h:2088
capture_init_iterator capture_init_begin()
Retrieve the first initialization argument for this lambda expression (which initializes the first ca...
Definition: ExprCXX.h:2076
This represents a Microsoft inline-assembly statement extension.
Definition: Stmt.h:3482
Representation of a Microsoft __if_exists or __if_not_exists statement with a dependent name.
Definition: StmtCXX.h:253
A member reference to an MSPropertyDecl.
Definition: ExprCXX.h:929
MS property subscript expression.
Definition: ExprCXX.h:1000
void setRBracketLoc(SourceLocation L)
Definition: ExprCXX.h:1038
Represents a prvalue temporary that is written into memory so that a reference can bind to it.
Definition: ExprCXX.h:4721
MatrixSubscriptExpr - Matrix subscript expression for the MatrixType extension.
Definition: Expr.h:2794
void setColumnIdx(Expr *E)
Definition: Expr.h:2834
void setBase(Expr *E)
Definition: Expr.h:2822
void setRowIdx(Expr *E)
Definition: Expr.h:2826
void setRBracketLoc(SourceLocation L)
Definition: Expr.h:2849
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
Definition: Expr.h:3224
static MemberExpr * CreateEmpty(const ASTContext &Context, bool HasQualifier, bool HasFoundDecl, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
Definition: Expr.cpp:1831
This represents a decl that may have a name.
Definition: Decl.h:249
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
Definition: Decl.h:315
A C++ nested-name-specifier augmented with source location information.
Represents a place-holder for an object not to be initialized by anything.
Definition: Expr.h:5461
NullStmt - This is the null statement ";": C99 6.8.3p3.
Definition: Stmt.h:1569
An explicit cast in C or a C-style cast in C++, which uses the syntax ([s1][s2]......
Definition: ExprOpenMP.h:24
void setLParenLoc(SourceLocation L)
Definition: ExprOpenMP.h:69
static OMPArrayShapingExpr * CreateEmpty(const ASTContext &Context, unsigned NumDims)
Definition: Expr.cpp:5220
void setRParenLoc(SourceLocation L)
Definition: ExprOpenMP.h:72
This represents '#pragma omp atomic' directive.
Definition: StmtOpenMP.h:2963
static OMPAtomicDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:935
This represents '#pragma omp barrier' directive.
Definition: StmtOpenMP.h:2641
static OMPBarrierDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:787
This represents '#pragma omp cancel' directive.
Definition: StmtOpenMP.h:3671
static OMPCancelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:847
This represents '#pragma omp cancellation point' directive.
Definition: StmtOpenMP.h:3613
static OMPCancellationPointDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:832
Representation of an OpenMP canonical loop.
Definition: StmtOpenMP.h:142
static OMPCanonicalLoop * createEmpty(const ASTContext &Ctx)
Create an empty OMPCanonicalLoop for deserialization.
Definition: StmtOpenMP.h:176
This represents '#pragma omp critical' directive.
Definition: StmtOpenMP.h:2092
static OMPCriticalDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:592
This represents '#pragma omp depobj' directive.
Definition: StmtOpenMP.h:2857
static OMPDepobjDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:877
This represents '#pragma omp dispatch' directive.
Definition: StmtOpenMP.h:5827
static OMPDispatchDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp distribute' directive.
Definition: StmtOpenMP.h:4441
static OMPDistributeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp distribute parallel for' composite directive.
Definition: StmtOpenMP.h:4564
static OMPDistributeParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp distribute parallel for simd' composite directive.
Definition: StmtOpenMP.h:4660
static OMPDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp distribute simd' composite directive.
Definition: StmtOpenMP.h:4725
static OMPDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp error' directive.
Definition: StmtOpenMP.h:6311
static OMPErrorDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:775
This is a basic class for representing single OpenMP executable directive.
Definition: StmtOpenMP.h:266
void setLocStart(SourceLocation Loc)
Set starting location of directive kind.
Definition: StmtOpenMP.h:510
OMPChildren * Data
Data, associated with the directive.
Definition: StmtOpenMP.h:295
void setLocEnd(SourceLocation Loc)
Set ending location of directive.
Definition: StmtOpenMP.h:515
void setMappedDirective(OpenMPDirectiveKind MappedDirective)
Definition: StmtOpenMP.h:357
This represents '#pragma omp flush' directive.
Definition: StmtOpenMP.h:2805
static OMPFlushDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:862
This represents '#pragma omp for' directive.
Definition: StmtOpenMP.h:1649
static OMPForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:400
This represents '#pragma omp for simd' directive.
Definition: StmtOpenMP.h:1740
static OMPForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:487
This represents '#pragma omp loop' directive.
Definition: StmtOpenMP.h:5982
static OMPGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with a place for NumClauses clauses.
This represents '#pragma omp interop' directive.
Definition: StmtOpenMP.h:5774
static OMPInteropDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
OpenMP 5.0 [2.1.6 Iterators] Iterators are identifiers that expand to multiple values in the clause o...
Definition: ExprOpenMP.h:151
void setLParenLoc(SourceLocation L)
Definition: ExprOpenMP.h:243
static OMPIteratorExpr * CreateEmpty(const ASTContext &Context, unsigned NumIterators)
Definition: Expr.cpp:5351
void setRParenLoc(SourceLocation L)
Definition: ExprOpenMP.h:246
void setIteratorKwLoc(SourceLocation L)
Definition: ExprOpenMP.h:249
The base class for all loop-based directives, including loop transformation directives.
Definition: StmtOpenMP.h:698
This is a common base class for loop directives ('omp simd', 'omp for', 'omp for simd' etc....
Definition: StmtOpenMP.h:1018
The base class for all loop transformation directives.
Definition: StmtOpenMP.h:975
void setNumGeneratedLoops(unsigned Num)
Set the number of loops generated by this loop transformation.
Definition: StmtOpenMP.h:990
This represents '#pragma omp masked' directive.
Definition: StmtOpenMP.h:5892
static OMPMaskedDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
This represents '#pragma omp masked taskloop' directive.
Definition: StmtOpenMP.h:3946
static OMPMaskedTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp masked taskloop simd' directive.
Definition: StmtOpenMP.h:4087
static OMPMaskedTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp master' directive.
Definition: StmtOpenMP.h:2044
static OMPMasterDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:577
This represents '#pragma omp master taskloop' directive.
Definition: StmtOpenMP.h:3870
static OMPMasterTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp master taskloop simd' directive.
Definition: StmtOpenMP.h:4022
static OMPMasterTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp metadirective' directive.
Definition: StmtOpenMP.h:5943
static OMPMetaDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Definition: StmtOpenMP.cpp:273
This represents '#pragma omp ordered' directive.
Definition: StmtOpenMP.h:2909
static OMPOrderedDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, bool IsStandalone, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:908
This represents '#pragma omp parallel' directive.
Definition: StmtOpenMP.h:627
static OMPParallelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for N clauses.
Definition: StmtOpenMP.cpp:292
This represents '#pragma omp parallel for' directive.
Definition: StmtOpenMP.h:2163
static OMPParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:637
This represents '#pragma omp parallel for simd' directive.
Definition: StmtOpenMP.h:2260
static OMPParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:680
This represents '#pragma omp parallel loop' directive.
Definition: StmtOpenMP.h:6184
static OMPParallelGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp parallel masked' directive.
Definition: StmtOpenMP.h:2388
static OMPParallelMaskedDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:714
This represents '#pragma omp parallel masked taskloop' directive.
Definition: StmtOpenMP.h:4231
static OMPParallelMaskedTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp parallel masked taskloop simd' directive.
Definition: StmtOpenMP.h:4376
static OMPParallelMaskedTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp parallel master' directive.
Definition: StmtOpenMP.h:2325
static OMPParallelMasterDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:698
This represents '#pragma omp parallel master taskloop' directive.
Definition: StmtOpenMP.h:4153
static OMPParallelMasterTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp parallel master taskloop simd' directive.
Definition: StmtOpenMP.h:4309
static OMPParallelMasterTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp parallel sections' directive.
Definition: StmtOpenMP.h:2452
static OMPParallelSectionsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:732
This represents '#pragma omp scan' directive.
Definition: StmtOpenMP.h:5721
static OMPScanDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:892
This represents '#pragma omp scope' directive.
Definition: StmtOpenMP.h:1941
static OMPScopeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:544
This represents '#pragma omp section' directive.
Definition: StmtOpenMP.h:1880
static OMPSectionDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:528
void setHasCancel(bool Has)
Set cancel state.
Definition: StmtOpenMP.h:1924
This represents '#pragma omp sections' directive.
Definition: StmtOpenMP.h:1803
static OMPSectionsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:508
This represents '#pragma omp simd' directive.
Definition: StmtOpenMP.h:1585
static OMPSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:327
This represents '#pragma omp single' directive.
Definition: StmtOpenMP.h:1993
static OMPSingleDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:561
This represents '#pragma omp target data' directive.
Definition: StmtOpenMP.h:3222
static OMPTargetDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
This represents '#pragma omp target' directive.
Definition: StmtOpenMP.h:3168
static OMPTargetDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:951
This represents '#pragma omp target enter data' directive.
Definition: StmtOpenMP.h:3276
static OMPTargetEnterDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
This represents '#pragma omp target exit data' directive.
Definition: StmtOpenMP.h:3331
static OMPTargetExitDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
This represents '#pragma omp target parallel' directive.
Definition: StmtOpenMP.h:3385
static OMPTargetParallelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:970
This represents '#pragma omp target parallel for' directive.
Definition: StmtOpenMP.h:3465
static OMPTargetParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target parallel for simd' directive.
Definition: StmtOpenMP.h:4791
static OMPTargetParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target parallel loop' directive.
Definition: StmtOpenMP.h:6249
static OMPTargetParallelGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target simd' directive.
Definition: StmtOpenMP.h:4858
static OMPTargetSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target teams' directive.
Definition: StmtOpenMP.h:5216
static OMPTargetTeamsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target teams distribute' combined directive.
Definition: StmtOpenMP.h:5272
static OMPTargetTeamsDistributeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target teams distribute parallel for' combined directive.
Definition: StmtOpenMP.h:5339
static OMPTargetTeamsDistributeParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target teams distribute parallel for simd' combined directive.
Definition: StmtOpenMP.h:5437
static OMPTargetTeamsDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target teams distribute simd' combined directive.
Definition: StmtOpenMP.h:5507
static OMPTargetTeamsDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target teams loop' directive.
Definition: StmtOpenMP.h:6109
static OMPTargetTeamsGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target update' directive.
Definition: StmtOpenMP.h:4508
static OMPTargetUpdateDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp task' directive.
Definition: StmtOpenMP.h:2533
static OMPTaskDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:748
This represents '#pragma omp taskloop' directive.
Definition: StmtOpenMP.h:3731
static OMPTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp taskloop simd' directive.
Definition: StmtOpenMP.h:3804
static OMPTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp taskgroup' directive.
Definition: StmtOpenMP.h:2738
static OMPTaskgroupDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:816
This represents '#pragma omp taskwait' directive.
Definition: StmtOpenMP.h:2687
static OMPTaskwaitDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:801
This represents '#pragma omp taskyield' directive.
Definition: StmtOpenMP.h:2595
static OMPTaskyieldDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:761
This represents '#pragma omp teams' directive.
Definition: StmtOpenMP.h:3560
static OMPTeamsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp teams distribute' directive.
Definition: StmtOpenMP.h:4923
static OMPTeamsDistributeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp teams distribute parallel for' composite directive.
Definition: StmtOpenMP.h:5123
static OMPTeamsDistributeParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp teams distribute parallel for simd' composite directive.
Definition: StmtOpenMP.h:5057
static OMPTeamsDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp teams distribute simd' combined directive.
Definition: StmtOpenMP.h:4989
static OMPTeamsDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp teams loop' directive.
Definition: StmtOpenMP.h:6044
static OMPTeamsGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents the '#pragma omp tile' loop transformation directive.
Definition: StmtOpenMP.h:5565
static OMPTileDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned NumLoops)
Build an empty '#pragma omp tile' AST node for deserialization.
Definition: StmtOpenMP.cpp:422
This represents the '#pragma omp unroll' loop transformation directive.
Definition: StmtOpenMP.h:5647
static OMPUnrollDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses)
Build an empty '#pragma omp unroll' AST node for deserialization.
Definition: StmtOpenMP.cpp:445
ObjCArrayLiteral - used for objective-c array containers; as in: @["Hello", NSApp,...
Definition: ExprObjC.h:191
static ObjCArrayLiteral * CreateEmpty(const ASTContext &C, unsigned NumElements)
Definition: ExprObjC.cpp:47
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c array literal.
Definition: ExprObjC.h:228
Expr ** getElements()
Retrieve elements of array of literals.
Definition: ExprObjC.h:220
Represents Objective-C's @catch statement.
Definition: StmtObjC.h:77
Represents Objective-C's @finally statement.
Definition: StmtObjC.h:127
Represents Objective-C's @synchronized statement.
Definition: StmtObjC.h:303
Represents Objective-C's @throw statement.
Definition: StmtObjC.h:358
Represents Objective-C's @try ... @catch ... @finally statement.
Definition: StmtObjC.h:167
static ObjCAtTryStmt * CreateEmpty(const ASTContext &Context, unsigned NumCatchStmts, bool HasFinally)
Definition: StmtObjC.cpp:56
Represents Objective-C's @autoreleasepool Statement.
Definition: StmtObjC.h:394
A runtime availability query.
Definition: ExprObjC.h:1696
ObjCBoolLiteralExpr - Objective-C Boolean Literal.
Definition: ExprObjC.h:87
void setLocation(SourceLocation L)
Definition: ExprObjC.h:107
ObjCBoxedExpr - used for generalized expression boxing.
Definition: ExprObjC.h:127
An Objective-C "bridged" cast expression, which casts between Objective-C pointers and C pointers,...
Definition: ExprObjC.h:1636
ObjCDictionaryLiteral - AST node to represent objective-c dictionary literals; as in:"name" : NSUserN...
Definition: ExprObjC.h:309
static ObjCDictionaryLiteral * CreateEmpty(const ASTContext &C, unsigned NumElements, bool HasPackExpansions)
Definition: ExprObjC.cpp:88
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c dictionary literal.
Definition: ExprObjC.h:360
ObjCEncodeExpr, used for @encode in Objective-C.
Definition: ExprObjC.h:410
void setEncodedTypeSourceInfo(TypeSourceInfo *EncType)
Definition: ExprObjC.h:433
void setRParenLoc(SourceLocation L)
Definition: ExprObjC.h:427
void setAtLoc(SourceLocation L)
Definition: ExprObjC.h:425
Represents Objective-C's collection statement.
Definition: StmtObjC.h:23
ObjCIndirectCopyRestoreExpr - Represents the passing of a function argument by indirect copy-restore ...
Definition: ExprObjC.h:1575
ObjCIsaExpr - Represent X->isa and X.isa when X is an ObjC 'id' type.
Definition: ExprObjC.h:1491
void setIsaMemberLoc(SourceLocation L)
Definition: ExprObjC.h:1524
void setBase(Expr *E)
Definition: ExprObjC.h:1515
void setArrow(bool A)
Definition: ExprObjC.h:1519
void setOpLoc(SourceLocation L)
Definition: ExprObjC.h:1527
ObjCIvarRefExpr - A reference to an ObjC instance variable.
Definition: ExprObjC.h:549
void setIsArrow(bool A)
Definition: ExprObjC.h:589
void setBase(Expr *base)
Definition: ExprObjC.h:585
void setDecl(ObjCIvarDecl *d)
Definition: ExprObjC.h:581
void setIsFreeIvar(bool A)
Definition: ExprObjC.h:590
void setOpLoc(SourceLocation L)
Definition: ExprObjC.h:601
void setLocation(SourceLocation L)
Definition: ExprObjC.h:593
An expression that sends a message to the given Objective-C object or class.
Definition: ExprObjC.h:945
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:232
void setMethodDecl(ObjCMethodDecl *MD)
Definition: ExprObjC.h:1370
void setClassReceiver(TypeSourceInfo *TSInfo)
Definition: ExprObjC.h:1294
void setInstanceReceiver(Expr *rec)
Turn this message send into an instance message that computes the receiver object with the given expr...
Definition: ExprObjC.h:1272
void setSuper(SourceLocation Loc, QualType T, bool IsInstanceSuper)
Definition: ExprObjC.h:1343
ReceiverKind
The kind of receiver this message is sending to.
Definition: ExprObjC.h:948
@ SuperInstance
The receiver is the instance of the superclass object.
Definition: ExprObjC.h:959
@ Instance
The receiver is an object instance.
Definition: ExprObjC.h:953
@ SuperClass
The receiver is a superclass.
Definition: ExprObjC.h:956
@ Class
The receiver is a class.
Definition: ExprObjC.h:950
void setDelegateInitCall(bool isDelegate)
Definition: ExprObjC.h:1414
ReceiverKind getReceiverKind() const
Determine the kind of receiver that this message is being sent to.
Definition: ExprObjC.h:1234
unsigned getNumArgs() const
Return the number of actual arguments in this message, not counting the receiver.
Definition: ExprObjC.h:1382
void setSelector(Selector S)
Definition: ExprObjC.h:1351
void setArg(unsigned Arg, Expr *ArgExpr)
setArg - Set the specified argument.
Definition: ExprObjC.h:1405
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
Definition: ExprObjC.h:617
ObjCProtocolExpr used for protocol expression in Objective-C.
Definition: ExprObjC.h:505
void setProtocol(ObjCProtocolDecl *P)
Definition: ExprObjC.h:523
void setRParenLoc(SourceLocation L)
Definition: ExprObjC.h:529
void setAtLoc(SourceLocation L)
Definition: ExprObjC.h:528
ObjCSelectorExpr used for @selector in Objective-C.
Definition: ExprObjC.h:455
void setSelector(Selector S)
Definition: ExprObjC.h:470
void setAtLoc(SourceLocation L)
Definition: ExprObjC.h:474
void setRParenLoc(SourceLocation L)
Definition: ExprObjC.h:475
ObjCStringLiteral, used for Objective-C string literals i.e.
Definition: ExprObjC.h:51
void setAtLoc(SourceLocation L)
Definition: ExprObjC.h:69
void setString(StringLiteral *S)
Definition: ExprObjC.h:66
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
Definition: ExprObjC.h:844
void setRBracket(SourceLocation RB)
Definition: ExprObjC.h:875
void setKeyExpr(Stmt *S)
Definition: ExprObjC.h:887
void setBaseExpr(Stmt *S)
Definition: ExprObjC.h:884
OffsetOfExpr - [C99 7.17] - This represents an expression of the form offsetof(record-type,...
Definition: Expr.h:2517
void setOperatorLoc(SourceLocation L)
Definition: Expr.h:2551
static OffsetOfExpr * CreateEmpty(const ASTContext &C, unsigned NumComps, unsigned NumExprs)
Definition: Expr.cpp:1725
void setIndexExpr(unsigned Idx, Expr *E)
Definition: Expr.h:2588
void setTypeSourceInfo(TypeSourceInfo *tsi)
Definition: Expr.h:2560
void setComponent(unsigned Idx, OffsetOfNode ON)
Definition: Expr.h:2569
unsigned getNumExpressions() const
Definition: Expr.h:2593
void setRParenLoc(SourceLocation R)
Definition: Expr.h:2555
unsigned getNumComponents() const
Definition: Expr.h:2574
Helper class for OffsetOfExpr.
Definition: Expr.h:2411
Kind
The kind of offsetof node we have.
Definition: Expr.h:2414
@ Array
An index into an array.
Definition: Expr.h:2416
@ Identifier
A field in a dependent type, known only by its name.
Definition: Expr.h:2420
@ Field
A field.
Definition: Expr.h:2418
@ Base
An implicit indirection through a C++ base class, when the field found is in a base class.
Definition: Expr.h:2423
OpaqueValueExpr - An expression referring to an opaque object of a fixed type and value class.
Definition: Expr.h:1168
void setIsUnique(bool V)
Definition: Expr.h:1220
This is a base class for any OpenACC statement-level constructs that have an associated statement.
Definition: StmtOpenACC.h:76
This class represents a compute construct, representing a 'Kind' of ‘parallel’, 'serial',...
Definition: StmtOpenACC.h:124
static OpenACCComputeConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
Definition: StmtOpenACC.cpp:18
This is the base class for an OpenACC statement-level construct, other construct types are expected t...
Definition: StmtOpenACC.h:25
A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr.
Definition: ExprCXX.h:2978
ASTTemplateKWAndArgsInfo * getTrailingASTTemplateKWAndArgsInfo()
Return the optional template keyword and arguments info.
Definition: ExprCXX.h:4092
unsigned getNumDecls() const
Gets the number of declarations in the unresolved set.
Definition: ExprCXX.h:3081
TemplateArgumentLoc * getTrailingTemplateArgumentLoc()
Return the optional template arguments.
Definition: ExprCXX.h:4102
DeclAccessPair * getTrailingResults()
Return the results. Defined after UnresolvedMemberExpr.
Definition: ExprCXX.h:4086
bool hasTemplateKWAndArgsInfo() const
Definition: ExprCXX.h:3022
unsigned getNumTemplateArgs() const
Definition: ExprCXX.h:3137
Represents a C++11 pack expansion that produces a sequence of expressions.
Definition: ExprCXX.h:4173
static PackIndexingExpr * CreateDeserialized(ASTContext &Context, unsigned NumTransformedExprs)
Definition: ExprCXX.cpp:1696
ParenExpr - This represents a parethesized expression, e.g.
Definition: Expr.h:2182
void setLParen(SourceLocation Loc)
Definition: Expr.h:2206
void setRParen(SourceLocation Loc)
Definition: Expr.h:2210
void setSubExpr(Expr *E)
Definition: Expr.h:2199
static ParenListExpr * CreateEmpty(const ASTContext &Ctx, unsigned NumExprs)
Create an empty paren list.
Definition: Expr.cpp:4794
unsigned getNumExprs() const
Return the number of expressions in this paren list.
Definition: Expr.h:5694
Represents a parameter to a function.
Definition: Decl.h:1762
[C99 6.4.2.2] - A predefined identifier such as func.
Definition: Expr.h:1986
void setLocation(SourceLocation L)
Definition: Expr.h:2028
static PredefinedExpr * CreateEmpty(const ASTContext &Ctx, bool HasFunctionName)
Create an empty PredefinedExpr.
Definition: Expr.cpp:702
PseudoObjectExpr - An expression which accesses a pseudo-object l-value.
Definition: Expr.h:6346
static PseudoObjectExpr * Create(const ASTContext &Context, Expr *syntactic, ArrayRef< Expr * > semantic, unsigned resultIndex)
Definition: Expr.cpp:4937
A (possibly-)qualified type.
Definition: Type.h:940
Frontend produces RecoveryExprs on semantic errors that prevent creating other well-formed expression...
Definition: Expr.h:6950
child_range children()
Definition: Expr.h:6966
static RecoveryExpr * CreateEmpty(ASTContext &Ctx, unsigned NumSubExprs)
Definition: Expr.cpp:5175
Represents the body of a requires-expression.
Definition: DeclCXX.h:2029
C++2a [expr.prim.req]: A requires-expression provides a concise way to express requirements on templa...
Definition: ExprConcepts.h:510
static RequiresExpr * Create(ASTContext &C, SourceLocation RequiresKWLoc, RequiresExprBodyDecl *Body, SourceLocation LParenLoc, ArrayRef< ParmVarDecl * > LocalParameters, SourceLocation RParenLoc, ArrayRef< concepts::Requirement * > Requirements, SourceLocation RBraceLoc)
ReturnStmt - This represents a return, optionally of an expression: return; return 4;.
Definition: Stmt.h:3019
static ReturnStmt * CreateEmpty(const ASTContext &Ctx, bool HasNRVOCandidate)
Create an empty return statement, optionally with storage for an NRVO candidate.
Definition: Stmt.cpp:1212
Represents a __leave statement.
Definition: Stmt.h:3718
Represents a __builtin_base_type expression.
Definition: ExprCXX.h:5459
void setLocation(SourceLocation L)
Definition: ExprCXX.h:5486
Represents a __builtin_field_type expression.
Definition: ExprCXX.h:5372
void setLocation(SourceLocation L)
Definition: ExprCXX.h:5399
Represents a __builtin_num_bases expression.
Definition: ExprCXX.h:5413
void setLocation(SourceLocation L)
Definition: ExprCXX.h:5442
Represents a __builtin_num_fields expression.
Definition: ExprCXX.h:5320
void setLocation(SourceLocation L)
Definition: ExprCXX.h:5351
static SYCLUniqueStableIdExpr * CreateEmpty(const ASTContext &Ctx)
Definition: Expr.cpp:641
static SYCLUniqueStableNameExpr * CreateEmpty(const ASTContext &Ctx)
Definition: Expr.cpp:587
ShuffleVectorExpr - clang-specific builtin-in function __builtin_shufflevector.
Definition: Expr.h:4483
void setExprs(const ASTContext &C, ArrayRef< Expr * > Exprs)
Definition: Expr.cpp:4416
void setRParenLoc(SourceLocation L)
Definition: Expr.h:4505
void setBuiltinLoc(SourceLocation L)
Definition: Expr.h:4502
Represents an expression that computes the length of a parameter pack.
Definition: ExprCXX.h:4251
static SizeOfPackExpr * CreateDeserialized(ASTContext &Context, unsigned NumPartialArgs)
Definition: ExprCXX.cpp:1656
bool isPartiallySubstituted() const
Determine whether this represents a partially-substituted sizeof...
Definition: ExprCXX.h:4337
Represents a function call to one of __builtin_LINE(), __builtin_COLUMN(), __builtin_FUNCTION(),...
Definition: Expr.h:4779
Encodes a location in the source.
A trivial tuple used to represent a source range.
SourceLocation getEnd() const
SourceLocation getBegin() const
StmtExpr - This is the GNU Statement Expression extension: ({int X=4; X;}).
Definition: Expr.h:4435
void setRParenLoc(SourceLocation L)
Definition: Expr.h:4462
void setLParenLoc(SourceLocation L)
Definition: Expr.h:4460
void setSubStmt(CompoundStmt *S)
Definition: Expr.h:4454
StmtVisitor - This class implements a simple visitor for Stmt subclasses.
Definition: StmtVisitor.h:185
Stmt - This represents one statement.
Definition: Stmt.h:84
GenericSelectionExprBitfields GenericSelectionExprBits
Definition: Stmt.h:1233
LambdaExprBitfields LambdaExprBits
Definition: Stmt.h:1263
UnresolvedLookupExprBitfields UnresolvedLookupExprBits
Definition: Stmt.h:1259
SubstNonTypeTemplateParmExprBitfields SubstNonTypeTemplateParmExprBits
Definition: Stmt.h:1262
CXXNoexceptExprBitfields CXXNoexceptExprBits
Definition: Stmt.h:1261
CXXRewrittenBinaryOperatorBitfields CXXRewrittenBinaryOperatorBits
Definition: Stmt.h:1242
ExprWithCleanupsBitfields ExprWithCleanupsBits
Definition: Stmt.h:1255
CXXScalarValueInitExprBitfields CXXScalarValueInitExprBits
Definition: Stmt.h:1249
CXXConstructExprBitfields CXXConstructExprBits
Definition: Stmt.h:1254
CXXDependentScopeMemberExprBitfields CXXDependentScopeMemberExprBits
Definition: Stmt.h:1257
TypeTraitExprBitfields TypeTraitExprBits
Definition: Stmt.h:1252
CXXNewExprBitfields CXXNewExprBits
Definition: Stmt.h:1250
SourceLocExprBitfields SourceLocExprBits
Definition: Stmt.h:1235
ConstantExprBitfields ConstantExprBits
Definition: Stmt.h:1218
RequiresExprBitfields RequiresExprBits
Definition: Stmt.h:1264
StmtExprBitfields StmtExprBits
Definition: Stmt.h:1238
StringLiteralBitfields StringLiteralBits
Definition: Stmt.h:1222
OpaqueValueExprBitfields OpaqueValueExprBits
Definition: Stmt.h:1273
CXXThrowExprBitfields CXXThrowExprBits
Definition: Stmt.h:1246
MemberExprBitfields MemberExprBits
Definition: Stmt.h:1228
DeclRefExprBitfields DeclRefExprBits
Definition: Stmt.h:1220
CXXOperatorCallExprBitfields CXXOperatorCallExprBits
Definition: Stmt.h:1241
CXXDefaultInitExprBitfields CXXDefaultInitExprBits
Definition: Stmt.h:1248
PredefinedExprBitfields PredefinedExprBits
Definition: Stmt.h:1219
UnresolvedMemberExprBitfields UnresolvedMemberExprBits
Definition: Stmt.h:1260
PseudoObjectExprBitfields PseudoObjectExprBits
Definition: Stmt.h:1234
CXXDeleteExprBitfields CXXDeleteExprBits
Definition: Stmt.h:1251
CXXDefaultArgExprBitfields CXXDefaultArgExprBits
Definition: Stmt.h:1247
StringLiteral - This represents a string literal expression, e.g.
Definition: Expr.h:1773
unsigned getLength() const
Definition: Expr.h:1890
StringLiteralKind getKind() const
Definition: Expr.h:1893
static StringLiteral * CreateEmpty(const ASTContext &Ctx, unsigned NumConcatenated, unsigned Length, unsigned CharByteWidth)
Construct an empty string literal.
Definition: Expr.cpp:1257
unsigned getNumConcatenated() const
getNumConcatenated - Get the number of string literal tokens that were concatenated in translation ph...
Definition: Expr.h:1921
unsigned getCharByteWidth() const
Definition: Expr.h:1891
Represents a reference to a non-type template parameter that has been substituted with a template arg...
Definition: ExprCXX.h:4477
Represents a reference to a non-type template parameter pack that has been substituted with a non-tem...
Definition: ExprCXX.h:4562
void setNextSwitchCase(SwitchCase *SC)
Definition: Stmt.h:1776
SwitchStmt - This represents a 'switch' stmt.
Definition: Stmt.h:2388
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:1092
A convenient class for passing around template argument information.
Definition: TemplateBase.h:632
void setLAngleLoc(SourceLocation Loc)
Definition: TemplateBase.h:650
void setRAngleLoc(SourceLocation Loc)
Definition: TemplateBase.h:651
void addArgument(const TemplateArgumentLoc &Loc)
Definition: TemplateBase.h:667
Location wrapper for a TemplateArgument.
Definition: TemplateBase.h:524
Represents a template argument.
Definition: TemplateBase.h:61
pack_iterator pack_begin() const
Iterator referencing the first argument of a template argument pack.
Definition: TemplateBase.h:418
unsigned pack_size() const
The number of template arguments in the given template argument pack.
Definition: TemplateBase.h:438
@ Pack
The template argument is actually a parameter pack.
Definition: TemplateBase.h:107
ArgKind getKind() const
Return the kind of stored template argument.
Definition: TemplateBase.h:295
Stores a list of template parameters for a TemplateDecl and its derived classes.
Definition: DeclTemplate.h:73
A container of type source information.
Definition: Type.h:7342
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
Definition: ExprCXX.h:2763
static TypeTraitExpr * CreateDeserialized(const ASTContext &C, unsigned NumArgs)
Definition: ExprCXX.cpp:1837
unsigned getNumArgs() const
Determine the number of arguments to this type trait.
Definition: ExprCXX.h:2810
TypoExpr - Internal placeholder for expressions where typo correction still needs to be performed and...
Definition: Expr.h:6626
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand.
Definition: Expr.h:2620
void setKind(UnaryExprOrTypeTrait K)
Definition: Expr.h:2655
void setOperatorLoc(SourceLocation L)
Definition: Expr.h:2694
void setRParenLoc(SourceLocation L)
Definition: Expr.h:2697
void setArgument(Expr *E)
Definition: Expr.h:2678
UnaryOperator - This represents the unary-expression's (except sizeof and alignof),...
Definition: Expr.h:2235
void setSubExpr(Expr *E)
Definition: Expr.h:2281
void setOperatorLoc(SourceLocation L)
Definition: Expr.h:2285
void setCanOverflow(bool C)
Definition: Expr.h:2294
bool hasStoredFPFeatures() const
Is FPFeatures in Trailing Storage?
Definition: Expr.h:2376
void setOpcode(Opcode Opc)
Definition: Expr.h:2278
void setStoredFPFeatures(FPOptionsOverride F)
Set FPFeatures in trailing storage, used by Serialization & ASTImporter.
Definition: Expr.h:2385
static UnaryOperator * CreateEmpty(const ASTContext &C, bool hasFPFeatures)
Definition: Expr.cpp:4879
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
Definition: ExprCXX.h:3197
static UnresolvedLookupExpr * CreateEmpty(const ASTContext &Context, unsigned NumResults, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
Definition: ExprCXX.cpp:405
Represents a C++ member access expression for which lookup produced a set of overloaded functions.
Definition: ExprCXX.h:3936
static UnresolvedMemberExpr * CreateEmpty(const ASTContext &Context, unsigned NumResults, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
Definition: ExprCXX.cpp:1605
void addDecl(NamedDecl *D)
Definition: UnresolvedSet.h:91
The iterator over UnresolvedSets.
Definition: UnresolvedSet.h:35
A call to a literal operator (C++11 [over.literal]) written as a user-defined literal (C++11 [lit....
Definition: ExprCXX.h:637
static UserDefinedLiteral * CreateEmpty(const ASTContext &Ctx, unsigned NumArgs, bool HasFPOptions, EmptyShell Empty)
Definition: ExprCXX.cpp:916
Represents a call to the builtin function __builtin_va_arg.
Definition: Expr.h:4719
void setRParenLoc(SourceLocation L)
Definition: Expr.h:4750
void setIsMicrosoftABI(bool IsMS)
Definition: Expr.h:4741
void setSubExpr(Expr *E)
Definition: Expr.h:4737
void setBuiltinLoc(SourceLocation L)
Definition: Expr.h:4747
void setWrittenTypeInfo(TypeSourceInfo *TI)
Definition: Expr.h:4744
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
Definition: Decl.h:707
Represents a variable declaration or definition.
Definition: Decl.h:919
WhileStmt - This represents a 'while' stmt.
Definition: Stmt.h:2584
static WhileStmt * CreateEmpty(const ASTContext &Ctx, bool HasVar)
Create an empty while statement optionally with storage for a condition variable.
Definition: Stmt.cpp:1154
A requires-expression requirement which queries the validity and properties of an expression ('simple...
Definition: ExprConcepts.h:280
A requires-expression requirement which is satisfied when a general constraint expression is satisfie...
Definition: ExprConcepts.h:429
A static requirement that can be used in a requires-expression to check properties of types and expre...
Definition: ExprConcepts.h:168
A requires-expression requirement which queries the existence of a type name or type template special...
Definition: ExprConcepts.h:225
Information about a module that has been loaded by the ASTReader.
Definition: ModuleFile.h:124
llvm::BitstreamCursor DeclsCursor
DeclsCursor - This is a cursor to the start of the DECLTYPES_BLOCK block.
Definition: ModuleFile.h:445
StmtCode
Record codes for each kind of statement or expression.
Definition: ASTBitCodes.h:1469
DesignatorTypes
The kinds of designators that can occur in a DesignatedInitExpr.
Definition: ASTBitCodes.h:1964
@ EXPR_DESIGNATED_INIT
A DesignatedInitExpr record.
Definition: ASTBitCodes.h:1616
@ EXPR_COMPOUND_LITERAL
A CompoundLiteralExpr record.
Definition: ASTBitCodes.h:1607
@ STMT_OMP_DISTRIBUTE_PARALLEL_FOR_SIMD_DIRECTIVE
Definition: ASTBitCodes.h:1909
@ EXPR_OBJC_IVAR_REF_EXPR
An ObjCIvarRefExpr record.
Definition: ASTBitCodes.h:1691
@ EXPR_MEMBER
A MemberExpr record.
Definition: ASTBitCodes.h:1589
@ EXPR_CXX_TEMPORARY_OBJECT
A CXXTemporaryObjectExpr record.
Definition: ASTBitCodes.h:1765
@ STMT_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_DIRECTIVE
Definition: ASTBitCodes.h:1920
@ EXPR_COMPOUND_ASSIGN_OPERATOR
A CompoundAssignOperator record.
Definition: ASTBitCodes.h:1595
@ EXPR_CXX_STATIC_CAST
A CXXStaticCastExpr record.
Definition: ASTBitCodes.h:1768
@ EXPR_OBJC_STRING_LITERAL
An ObjCStringLiteral record.
Definition: ASTBitCodes.h:1675
@ EXPR_VA_ARG
A VAArgExpr record.
Definition: ASTBitCodes.h:1634
@ STMT_OMP_TEAMS_DISTRIBUTE_SIMD_DIRECTIVE
Definition: ASTBitCodes.h:1914
@ EXPR_OBJC_ISA
An ObjCIsa Expr record.
Definition: ASTBitCodes.h:1706
@ EXPR_CXX_OPERATOR_CALL
A CXXOperatorCallExpr record.
Definition: ASTBitCodes.h:1750
@ STMT_OBJC_AT_TRY
An ObjCAtTryStmt record.
Definition: ASTBitCodes.h:1721
@ STMT_DO
A DoStmt record.
Definition: ASTBitCodes.h:1508
@ STMT_OBJC_CATCH
An ObjCAtCatchStmt record.
Definition: ASTBitCodes.h:1715
@ STMT_IF
An IfStmt record.
Definition: ASTBitCodes.h:1499
@ EXPR_STRING_LITERAL
A StringLiteral record.
Definition: ASTBitCodes.h:1559
@ EXPR_OBJC_AVAILABILITY_CHECK
An ObjCAvailabilityCheckExpr record.
Definition: ASTBitCodes.h:1736
@ STMT_OMP_PARALLEL_MASKED_TASKLOOP_DIRECTIVE
Definition: ASTBitCodes.h:1904
@ EXPR_MATRIX_SUBSCRIPT
An MatrixSubscriptExpr record.
Definition: ASTBitCodes.h:1583
@ EXPR_PSEUDO_OBJECT
A PseudoObjectExpr record.
Definition: ASTBitCodes.h:1664
@ STMT_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_DIRECTIVE
Definition: ASTBitCodes.h:1919
@ EXPR_IMPLICIT_CAST
An ImplicitCastExpr record.
Definition: ASTBitCodes.h:1601
@ STMT_CAPTURED
A CapturedStmt record.
Definition: ASTBitCodes.h:1532
@ STMT_OMP_TARGET_PARALLEL_FOR_SIMD_DIRECTIVE
Definition: ASTBitCodes.h:1911
@ STMT_GCCASM
A GCC-style AsmStmt record.
Definition: ASTBitCodes.h:1535
@ EXPR_IMAGINARY_LITERAL
An ImaginaryLiteral record.
Definition: ASTBitCodes.h:1556
@ STMT_WHILE
A WhileStmt record.
Definition: ASTBitCodes.h:1505
@ EXPR_CONVERT_VECTOR
A ConvertVectorExpr record.
Definition: ASTBitCodes.h:1655
@ EXPR_OBJC_SUBSCRIPT_REF_EXPR
An ObjCSubscriptRefExpr record.
Definition: ASTBitCodes.h:1697
@ EXPR_STMT
A StmtExpr record.
Definition: ASTBitCodes.h:1640
@ STMT_OMP_PARALLEL_GENERIC_LOOP_DIRECTIVE
Definition: ASTBitCodes.h:1929
@ EXPR_CXX_REINTERPRET_CAST
A CXXReinterpretCastExpr record.
Definition: ASTBitCodes.h:1774
@ EXPR_DESIGNATED_INIT_UPDATE
A DesignatedInitUpdateExpr record.
Definition: ASTBitCodes.h:1619
@ STMT_OBJC_AT_SYNCHRONIZED
An ObjCAtSynchronizedStmt record.
Definition: ASTBitCodes.h:1724
@ STMT_OMP_DISTRIBUTE_PARALLEL_FOR_DIRECTIVE
Definition: ASTBitCodes.h:1908
@ EXPR_BUILTIN_BIT_CAST
A BuiltinBitCastExpr record.
Definition: ASTBitCodes.h:1786
@ STMT_OMP_TARGET_TEAMS_DISTRIBUTE_SIMD_DIRECTIVE
Definition: ASTBitCodes.h:1921
@ EXPR_CHARACTER_LITERAL
A CharacterLiteral record.
Definition: ASTBitCodes.h:1562
@ EXPR_OBJC_ENCODE
An ObjCEncodeExpr record.
Definition: ASTBitCodes.h:1682
@ EXPR_CSTYLE_CAST
A CStyleCastExpr record.
Definition: ASTBitCodes.h:1604
@ EXPR_OBJC_BOOL_LITERAL
An ObjCBoolLiteralExpr record.
Definition: ASTBitCodes.h:1733
@ EXPR_EXT_VECTOR_ELEMENT
An ExtVectorElementExpr record.
Definition: ASTBitCodes.h:1610
@ EXPR_ATOMIC
An AtomicExpr record.
Definition: ASTBitCodes.h:1667
@ EXPR_OFFSETOF
An OffsetOfExpr record.
Definition: ASTBitCodes.h:1574
@ STMT_RETURN
A ReturnStmt record.
Definition: ASTBitCodes.h:1526
@ STMT_OBJC_FOR_COLLECTION
An ObjCForCollectionStmt record.
Definition: ASTBitCodes.h:1712
@ STMT_OMP_TARGET_TEAMS_DISTRIBUTE_DIRECTIVE
Definition: ASTBitCodes.h:1918
@ EXPR_ARRAY_INIT_LOOP
An ArrayInitLoopExpr record.
Definition: ASTBitCodes.h:1625
@ STMT_OMP_PARALLEL_MASTER_TASKLOOP_DIRECTIVE
Definition: ASTBitCodes.h:1900
@ STMT_OMP_PARALLEL_MASKED_TASKLOOP_SIMD_DIRECTIVE
Definition: ASTBitCodes.h:1905
@ STMT_CONTINUE
A ContinueStmt record.
Definition: ASTBitCodes.h:1520
@ EXPR_PREDEFINED
A PredefinedExpr record.
Definition: ASTBitCodes.h:1544
@ EXPR_CXX_BOOL_LITERAL
A CXXBoolLiteralExpr record.
Definition: ASTBitCodes.h:1795
@ EXPR_PAREN_LIST
A ParenListExpr record.
Definition: ASTBitCodes.h:1568
@ EXPR_CXX_PAREN_LIST_INIT
A CXXParenListInitExpr record.
Definition: ASTBitCodes.h:1798
@ STMT_OMP_MASTER_TASKLOOP_SIMD_DIRECTIVE
Definition: ASTBitCodes.h:1899
@ STMT_COMPOUND
A CompoundStmt record.
Definition: ASTBitCodes.h:1484
@ STMT_FOR
A ForStmt record.
Definition: ASTBitCodes.h:1511
@ STMT_ATTRIBUTED
An AttributedStmt record.
Definition: ASTBitCodes.h:1496
@ STMT_OMP_TARGET_TEAMS_GENERIC_LOOP_DIRECTIVE
Definition: ASTBitCodes.h:1928
@ EXPR_CXX_REWRITTEN_BINARY_OPERATOR
A CXXRewrittenBinaryOperator record.
Definition: ASTBitCodes.h:1756
@ STMT_GOTO
A GotoStmt record.
Definition: ASTBitCodes.h:1514
@ EXPR_NO_INIT
An NoInitExpr record.
Definition: ASTBitCodes.h:1622
@ EXPR_OBJC_PROTOCOL_EXPR
An ObjCProtocolExpr record.
Definition: ASTBitCodes.h:1688
@ EXPR_ARRAY_INIT_INDEX
An ArrayInitIndexExpr record.
Definition: ASTBitCodes.h:1628
@ EXPR_CXX_CONSTRUCT
A CXXConstructExpr record.
Definition: ASTBitCodes.h:1759
@ STMT_OMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_DIRECTIVE
Definition: ASTBitCodes.h:1916
@ STMT_OMP_PARALLEL_MASTER_TASKLOOP_SIMD_DIRECTIVE
Definition: ASTBitCodes.h:1901
@ STMT_OMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_DIRECTIVE
Definition: ASTBitCodes.h:1915
@ EXPR_CXX_DYNAMIC_CAST
A CXXDynamicCastExpr record.
Definition: ASTBitCodes.h:1771
@ STMT_CXX_TRY
A CXXTryStmt record.
Definition: ASTBitCodes.h:1744
@ EXPR_GENERIC_SELECTION
A GenericSelectionExpr record.
Definition: ASTBitCodes.h:1661
@ EXPR_OBJC_INDIRECT_COPY_RESTORE
An ObjCIndirectCopyRestoreExpr record.
Definition: ASTBitCodes.h:1709
@ EXPR_CXX_INHERITED_CTOR_INIT
A CXXInheritedCtorInitExpr record.
Definition: ASTBitCodes.h:1762
@ EXPR_CALL
A CallExpr record.
Definition: ASTBitCodes.h:1586
@ EXPR_GNU_NULL
A GNUNullExpr record.
Definition: ASTBitCodes.h:1646
@ EXPR_OBJC_PROPERTY_REF_EXPR
An ObjCPropertyRefExpr record.
Definition: ASTBitCodes.h:1694
@ STMT_OMP_TARGET_PARALLEL_FOR_DIRECTIVE
Definition: ASTBitCodes.h:1891
@ EXPR_CXX_CONST_CAST
A CXXConstCastExpr record.
Definition: ASTBitCodes.h:1777
@ STMT_REF_PTR
A reference to a previously [de]serialized Stmt record.
Definition: ASTBitCodes.h:1478
@ EXPR_OBJC_MESSAGE_EXPR
An ObjCMessageExpr record.
Definition: ASTBitCodes.h:1703
@ STMT_CASE
A CaseStmt record.
Definition: ASTBitCodes.h:1487
@ EXPR_CONSTANT
A constant expression context.
Definition: ASTBitCodes.h:1541
@ STMT_STOP
A marker record that indicates that we are at the end of an expression.
Definition: ASTBitCodes.h:1472
@ STMT_MSASM
A MS-style AsmStmt record.
Definition: ASTBitCodes.h:1538
@ EXPR_CONDITIONAL_OPERATOR
A ConditionOperator record.
Definition: ASTBitCodes.h:1598
@ EXPR_BINARY_OPERATOR
A BinaryOperator record.
Definition: ASTBitCodes.h:1592
@ EXPR_CXX_STD_INITIALIZER_LIST
A CXXStdInitializerListExpr record.
Definition: ASTBitCodes.h:1792
@ EXPR_SHUFFLE_VECTOR
A ShuffleVectorExpr record.
Definition: ASTBitCodes.h:1652
@ STMT_OBJC_FINALLY
An ObjCAtFinallyStmt record.
Definition: ASTBitCodes.h:1718
@ EXPR_OBJC_SELECTOR_EXPR
An ObjCSelectorExpr record.
Definition: ASTBitCodes.h:1685
@ EXPR_FLOATING_LITERAL
A FloatingLiteral record.
Definition: ASTBitCodes.h:1553
@ STMT_NULL_PTR
A NULL expression.
Definition: ASTBitCodes.h:1475
@ STMT_DEFAULT
A DefaultStmt record.
Definition: ASTBitCodes.h:1490
@ EXPR_CHOOSE
A ChooseExpr record.
Definition: ASTBitCodes.h:1643
@ STMT_NULL
A NullStmt record.
Definition: ASTBitCodes.h:1481
@ EXPR_BLOCK
BlockExpr.
Definition: ASTBitCodes.h:1658
@ EXPR_DECL_REF
A DeclRefExpr record.
Definition: ASTBitCodes.h:1547
@ EXPR_INIT_LIST
An InitListExpr record.
Definition: ASTBitCodes.h:1613
@ EXPR_IMPLICIT_VALUE_INIT
An ImplicitValueInitExpr record.
Definition: ASTBitCodes.h:1631
@ STMT_OBJC_AUTORELEASE_POOL
An ObjCAutoreleasePoolStmt record.
Definition: ASTBitCodes.h:1730
@ EXPR_RECOVERY
A RecoveryExpr record.
Definition: ASTBitCodes.h:1670
@ EXPR_PAREN
A ParenExpr record.
Definition: ASTBitCodes.h:1565
@ STMT_OMP_TARGET_PARALLEL_GENERIC_LOOP_DIRECTIVE
Definition: ASTBitCodes.h:1930
@ STMT_LABEL
A LabelStmt record.
Definition: ASTBitCodes.h:1493
@ EXPR_CXX_FUNCTIONAL_CAST
A CXXFunctionalCastExpr record.
Definition: ASTBitCodes.h:1783
@ EXPR_USER_DEFINED_LITERAL
A UserDefinedLiteral record.
Definition: ASTBitCodes.h:1789
@ EXPR_INTEGER_LITERAL
An IntegerLiteral record.
Definition: ASTBitCodes.h:1550
@ EXPR_SOURCE_LOC
A SourceLocExpr record.
Definition: ASTBitCodes.h:1649
@ EXPR_CXX_MEMBER_CALL
A CXXMemberCallExpr record.
Definition: ASTBitCodes.h:1753
@ STMT_SWITCH
A SwitchStmt record.
Definition: ASTBitCodes.h:1502
@ STMT_DECL
A DeclStmt record.
Definition: ASTBitCodes.h:1529
@ EXPR_OBJC_KVC_REF_EXPR
UNUSED.
Definition: ASTBitCodes.h:1700
@ EXPR_SUBST_NON_TYPE_TEMPLATE_PARM_PACK
Definition: ASTBitCodes.h:1834
@ STMT_OMP_MASKED_TASKLOOP_SIMD_DIRECTIVE
Definition: ASTBitCodes.h:1903
@ EXPR_SIZEOF_ALIGN_OF
A SizefAlignOfExpr record.
Definition: ASTBitCodes.h:1577
@ STMT_BREAK
A BreakStmt record.
Definition: ASTBitCodes.h:1523
@ STMT_OBJC_AT_THROW
An ObjCAtThrowStmt record.
Definition: ASTBitCodes.h:1727
@ EXPR_ADDR_LABEL
An AddrLabelExpr record.
Definition: ASTBitCodes.h:1637
@ STMT_CXX_FOR_RANGE
A CXXForRangeStmt record.
Definition: ASTBitCodes.h:1747
@ EXPR_CXX_ADDRSPACE_CAST
A CXXAddrspaceCastExpr record.
Definition: ASTBitCodes.h:1780
@ EXPR_ARRAY_SUBSCRIPT
An ArraySubscriptExpr record.
Definition: ASTBitCodes.h:1580
@ EXPR_UNARY_OPERATOR
A UnaryOperator record.
Definition: ASTBitCodes.h:1571
@ STMT_CXX_CATCH
A CXXCatchStmt record.
Definition: ASTBitCodes.h:1741
@ STMT_INDIRECT_GOTO
An IndirectGotoStmt record.
Definition: ASTBitCodes.h:1517
@ DESIG_ARRAY_RANGE
GNU array range designator.
Definition: ASTBitCodes.h:1976
@ DESIG_FIELD_NAME
Field designator where only the field name is known.
Definition: ASTBitCodes.h:1966
@ DESIG_FIELD_DECL
Field designator where the field has been resolved to a declaration.
Definition: ASTBitCodes.h:1970
@ DESIG_ARRAY
Array designator.
Definition: ASTBitCodes.h:1973
std::string toString(const til::SExpr *E)
The JSON file list parser is used to communicate input to InstallAPI.
ConstantResultStorageKind
Describes the kind of result that can be tail-allocated.
Definition: Expr.h:1066
ArrayTypeTrait
Names for the array type traits.
Definition: TypeTraits.h:42
llvm::omp::Directive OpenMPDirectiveKind
OpenMP directives.
Definition: OpenMPKinds.h:24
IfStatementKind
In an if statement, this denotes whether the statement is a constexpr or consteval if statement.
Definition: Specifiers.h:39
ExprObjectKind
A further classification of the kind of object referenced by an l-value or x-value.
Definition: Specifiers.h:146
BinaryOperatorKind
CapturedRegionKind
The different kinds of captured statement.
Definition: CapturedStmt.h:16
UnaryExprOrTypeTrait
Names for the "expression or type" traits.
Definition: TypeTraits.h:51
UnaryOperatorKind
OpenACCDirectiveKind
Definition: OpenACCKinds.h:25
CastKind
CastKind - The kind of operation required for a conversion.
ExprValueKind
The categorization of expression values, currently following the C++11 scheme.
Definition: Specifiers.h:129
const FunctionProtoType * T
CharacterLiteralKind
Definition: Expr.h:1584
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
Definition: Specifiers.h:120
unsigned long uint64_t
float __ovld __cnfn distance(float, float)
Returns the distance between p0 and p1.
#define bool
Definition: stdbool.h:24
static ASTConstraintSatisfaction * Create(const ASTContext &C, const ConstraintSatisfaction &Satisfaction)
Definition: ASTConcept.cpp:67
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>".
Definition: TemplateBase.h:728
void initializeFrom(SourceLocation TemplateKWLoc, const TemplateArgumentListInfo &List, TemplateArgumentLoc *OutArgArray)
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspon...
Helper expressions and declaration for OMPIteratorExpr class for each iteration space.
Definition: ExprOpenMP.h:111
Expr * CounterUpdate
Updater for the internal counter: ++CounterVD;.
Definition: ExprOpenMP.h:121
Expr * Upper
Normalized upper bound.
Definition: ExprOpenMP.h:116
Expr * Update
Update expression for the originally specified iteration variable, calculated as VD = Begin + Counter...
Definition: ExprOpenMP.h:119
VarDecl * CounterVD
Internal normalized counter.
Definition: ExprOpenMP.h:113
Internal struct to describes an element that is a pack expansion, used if any of the elements in the ...
Definition: ExprObjC.h:293
Internal struct for storing Key/value pair.
Definition: ExprObjC.h:285
A placeholder type used to construct an empty shell of a type, that will be filled in later (e....
Definition: Stmt.h:1298