clang  6.0.0svn
ASTWriterStmt.cpp
Go to the documentation of this file.
1 //===--- ASTWriterStmt.cpp - Statement and Expression Serialization -------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 ///
10 /// \file
11 /// \brief Implements serialization for Statements and Expressions.
12 ///
13 //===----------------------------------------------------------------------===//
14 
16 #include "clang/AST/ASTContext.h"
17 #include "clang/AST/DeclCXX.h"
18 #include "clang/AST/DeclObjC.h"
19 #include "clang/AST/DeclTemplate.h"
20 #include "clang/AST/StmtVisitor.h"
21 #include "clang/Lex/Token.h"
22 #include "llvm/Bitcode/BitstreamWriter.h"
23 using namespace clang;
24 
25 //===----------------------------------------------------------------------===//
26 // Statement/expression serialization
27 //===----------------------------------------------------------------------===//
28 
29 namespace clang {
30 
31  class ASTStmtWriter : public StmtVisitor<ASTStmtWriter, void> {
32  ASTWriter &Writer;
33  ASTRecordWriter Record;
34 
36  unsigned AbbrevToUse;
37 
38  public:
40  : Writer(Writer), Record(Writer, Record),
41  Code(serialization::STMT_NULL_PTR), AbbrevToUse(0) {}
42 
43  ASTStmtWriter(const ASTStmtWriter&) = delete;
44 
45  uint64_t Emit() {
46  assert(Code != serialization::STMT_NULL_PTR &&
47  "unhandled sub-statement writing AST file");
48  return Record.EmitStmt(Code, AbbrevToUse);
49  }
50 
52  const TemplateArgumentLoc *Args);
53 
54  void VisitStmt(Stmt *S);
55 #define STMT(Type, Base) \
56  void Visit##Type(Type *);
57 #include "clang/AST/StmtNodes.inc"
58  };
59 }
60 
62  const ASTTemplateKWAndArgsInfo &ArgInfo, const TemplateArgumentLoc *Args) {
63  Record.AddSourceLocation(ArgInfo.TemplateKWLoc);
64  Record.AddSourceLocation(ArgInfo.LAngleLoc);
65  Record.AddSourceLocation(ArgInfo.RAngleLoc);
66  for (unsigned i = 0; i != ArgInfo.NumTemplateArgs; ++i)
67  Record.AddTemplateArgumentLoc(Args[i]);
68 }
69 
71 }
72 
73 void ASTStmtWriter::VisitNullStmt(NullStmt *S) {
74  VisitStmt(S);
75  Record.AddSourceLocation(S->getSemiLoc());
76  Record.push_back(S->HasLeadingEmptyMacro);
78 }
79 
80 void ASTStmtWriter::VisitCompoundStmt(CompoundStmt *S) {
81  VisitStmt(S);
82  Record.push_back(S->size());
83  for (auto *CS : S->body())
84  Record.AddStmt(CS);
85  Record.AddSourceLocation(S->getLBracLoc());
86  Record.AddSourceLocation(S->getRBracLoc());
88 }
89 
90 void ASTStmtWriter::VisitSwitchCase(SwitchCase *S) {
91  VisitStmt(S);
92  Record.push_back(Writer.getSwitchCaseID(S));
93  Record.AddSourceLocation(S->getKeywordLoc());
94  Record.AddSourceLocation(S->getColonLoc());
95 }
96 
97 void ASTStmtWriter::VisitCaseStmt(CaseStmt *S) {
98  VisitSwitchCase(S);
99  Record.AddStmt(S->getLHS());
100  Record.AddStmt(S->getRHS());
101  Record.AddStmt(S->getSubStmt());
102  Record.AddSourceLocation(S->getEllipsisLoc());
104 }
105 
106 void ASTStmtWriter::VisitDefaultStmt(DefaultStmt *S) {
107  VisitSwitchCase(S);
108  Record.AddStmt(S->getSubStmt());
110 }
111 
112 void ASTStmtWriter::VisitLabelStmt(LabelStmt *S) {
113  VisitStmt(S);
114  Record.AddDeclRef(S->getDecl());
115  Record.AddStmt(S->getSubStmt());
116  Record.AddSourceLocation(S->getIdentLoc());
118 }
119 
120 void ASTStmtWriter::VisitAttributedStmt(AttributedStmt *S) {
121  VisitStmt(S);
122  Record.push_back(S->getAttrs().size());
123  Record.AddAttributes(S->getAttrs());
124  Record.AddStmt(S->getSubStmt());
125  Record.AddSourceLocation(S->getAttrLoc());
127 }
128 
129 void ASTStmtWriter::VisitIfStmt(IfStmt *S) {
130  VisitStmt(S);
131  Record.push_back(S->isConstexpr());
132  Record.AddStmt(S->getInit());
133  Record.AddDeclRef(S->getConditionVariable());
134  Record.AddStmt(S->getCond());
135  Record.AddStmt(S->getThen());
136  Record.AddStmt(S->getElse());
137  Record.AddSourceLocation(S->getIfLoc());
138  Record.AddSourceLocation(S->getElseLoc());
139  Code = serialization::STMT_IF;
140 }
141 
142 void ASTStmtWriter::VisitSwitchStmt(SwitchStmt *S) {
143  VisitStmt(S);
144  Record.AddStmt(S->getInit());
145  Record.AddDeclRef(S->getConditionVariable());
146  Record.AddStmt(S->getCond());
147  Record.AddStmt(S->getBody());
148  Record.AddSourceLocation(S->getSwitchLoc());
149  Record.push_back(S->isAllEnumCasesCovered());
150  for (SwitchCase *SC = S->getSwitchCaseList(); SC;
151  SC = SC->getNextSwitchCase())
152  Record.push_back(Writer.RecordSwitchCaseID(SC));
154 }
155 
156 void ASTStmtWriter::VisitWhileStmt(WhileStmt *S) {
157  VisitStmt(S);
158  Record.AddDeclRef(S->getConditionVariable());
159  Record.AddStmt(S->getCond());
160  Record.AddStmt(S->getBody());
161  Record.AddSourceLocation(S->getWhileLoc());
163 }
164 
165 void ASTStmtWriter::VisitDoStmt(DoStmt *S) {
166  VisitStmt(S);
167  Record.AddStmt(S->getCond());
168  Record.AddStmt(S->getBody());
169  Record.AddSourceLocation(S->getDoLoc());
170  Record.AddSourceLocation(S->getWhileLoc());
171  Record.AddSourceLocation(S->getRParenLoc());
172  Code = serialization::STMT_DO;
173 }
174 
175 void ASTStmtWriter::VisitForStmt(ForStmt *S) {
176  VisitStmt(S);
177  Record.AddStmt(S->getInit());
178  Record.AddStmt(S->getCond());
179  Record.AddDeclRef(S->getConditionVariable());
180  Record.AddStmt(S->getInc());
181  Record.AddStmt(S->getBody());
182  Record.AddSourceLocation(S->getForLoc());
183  Record.AddSourceLocation(S->getLParenLoc());
184  Record.AddSourceLocation(S->getRParenLoc());
186 }
187 
188 void ASTStmtWriter::VisitGotoStmt(GotoStmt *S) {
189  VisitStmt(S);
190  Record.AddDeclRef(S->getLabel());
191  Record.AddSourceLocation(S->getGotoLoc());
192  Record.AddSourceLocation(S->getLabelLoc());
194 }
195 
196 void ASTStmtWriter::VisitIndirectGotoStmt(IndirectGotoStmt *S) {
197  VisitStmt(S);
198  Record.AddSourceLocation(S->getGotoLoc());
199  Record.AddSourceLocation(S->getStarLoc());
200  Record.AddStmt(S->getTarget());
202 }
203 
204 void ASTStmtWriter::VisitContinueStmt(ContinueStmt *S) {
205  VisitStmt(S);
206  Record.AddSourceLocation(S->getContinueLoc());
208 }
209 
210 void ASTStmtWriter::VisitBreakStmt(BreakStmt *S) {
211  VisitStmt(S);
212  Record.AddSourceLocation(S->getBreakLoc());
214 }
215 
216 void ASTStmtWriter::VisitReturnStmt(ReturnStmt *S) {
217  VisitStmt(S);
218  Record.AddStmt(S->getRetValue());
219  Record.AddSourceLocation(S->getReturnLoc());
220  Record.AddDeclRef(S->getNRVOCandidate());
222 }
223 
224 void ASTStmtWriter::VisitDeclStmt(DeclStmt *S) {
225  VisitStmt(S);
226  Record.AddSourceLocation(S->getStartLoc());
227  Record.AddSourceLocation(S->getEndLoc());
228  DeclGroupRef DG = S->getDeclGroup();
229  for (DeclGroupRef::iterator D = DG.begin(), DEnd = DG.end(); D != DEnd; ++D)
230  Record.AddDeclRef(*D);
232 }
233 
234 void ASTStmtWriter::VisitAsmStmt(AsmStmt *S) {
235  VisitStmt(S);
236  Record.push_back(S->getNumOutputs());
237  Record.push_back(S->getNumInputs());
238  Record.push_back(S->getNumClobbers());
239  Record.AddSourceLocation(S->getAsmLoc());
240  Record.push_back(S->isVolatile());
241  Record.push_back(S->isSimple());
242 }
243 
244 void ASTStmtWriter::VisitGCCAsmStmt(GCCAsmStmt *S) {
245  VisitAsmStmt(S);
246  Record.AddSourceLocation(S->getRParenLoc());
247  Record.AddStmt(S->getAsmString());
248 
249  // Outputs
250  for (unsigned I = 0, N = S->getNumOutputs(); I != N; ++I) {
252  Record.AddStmt(S->getOutputConstraintLiteral(I));
253  Record.AddStmt(S->getOutputExpr(I));
254  }
255 
256  // Inputs
257  for (unsigned I = 0, N = S->getNumInputs(); I != N; ++I) {
258  Record.AddIdentifierRef(S->getInputIdentifier(I));
259  Record.AddStmt(S->getInputConstraintLiteral(I));
260  Record.AddStmt(S->getInputExpr(I));
261  }
262 
263  // Clobbers
264  for (unsigned I = 0, N = S->getNumClobbers(); I != N; ++I)
265  Record.AddStmt(S->getClobberStringLiteral(I));
266 
268 }
269 
270 void ASTStmtWriter::VisitMSAsmStmt(MSAsmStmt *S) {
271  VisitAsmStmt(S);
272  Record.AddSourceLocation(S->getLBraceLoc());
273  Record.AddSourceLocation(S->getEndLoc());
274  Record.push_back(S->getNumAsmToks());
275  Record.AddString(S->getAsmString());
276 
277  // Tokens
278  for (unsigned I = 0, N = S->getNumAsmToks(); I != N; ++I) {
279  // FIXME: Move this to ASTRecordWriter?
280  Writer.AddToken(S->getAsmToks()[I], Record.getRecordData());
281  }
282 
283  // Clobbers
284  for (unsigned I = 0, N = S->getNumClobbers(); I != N; ++I) {
285  Record.AddString(S->getClobber(I));
286  }
287 
288  // Outputs
289  for (unsigned I = 0, N = S->getNumOutputs(); I != N; ++I) {
290  Record.AddStmt(S->getOutputExpr(I));
291  Record.AddString(S->getOutputConstraint(I));
292  }
293 
294  // Inputs
295  for (unsigned I = 0, N = S->getNumInputs(); I != N; ++I) {
296  Record.AddStmt(S->getInputExpr(I));
297  Record.AddString(S->getInputConstraint(I));
298  }
299 
301 }
302 
303 void ASTStmtWriter::VisitCoroutineBodyStmt(CoroutineBodyStmt *CoroStmt) {
304  VisitStmt(CoroStmt);
305  Record.push_back(CoroStmt->getParamMoves().size());
306  for (Stmt *S : CoroStmt->children())
307  Record.AddStmt(S);
309 }
310 
311 void ASTStmtWriter::VisitCoreturnStmt(CoreturnStmt *S) {
312  VisitStmt(S);
313  Record.AddSourceLocation(S->getKeywordLoc());
314  Record.AddStmt(S->getOperand());
315  Record.AddStmt(S->getPromiseCall());
316  Record.push_back(S->isImplicit());
318 }
319 
320 void ASTStmtWriter::VisitCoroutineSuspendExpr(CoroutineSuspendExpr *E) {
321  VisitExpr(E);
322  Record.AddSourceLocation(E->getKeywordLoc());
323  for (Stmt *S : E->children())
324  Record.AddStmt(S);
325  Record.AddStmt(E->getOpaqueValue());
326 }
327 
328 void ASTStmtWriter::VisitCoawaitExpr(CoawaitExpr *E) {
329  VisitCoroutineSuspendExpr(E);
330  Record.push_back(E->isImplicit());
332 }
333 
334 void ASTStmtWriter::VisitCoyieldExpr(CoyieldExpr *E) {
335  VisitCoroutineSuspendExpr(E);
337 }
338 
339 void ASTStmtWriter::VisitDependentCoawaitExpr(DependentCoawaitExpr *E) {
340  VisitExpr(E);
341  Record.AddSourceLocation(E->getKeywordLoc());
342  for (Stmt *S : E->children())
343  Record.AddStmt(S);
345 }
346 
347 void ASTStmtWriter::VisitCapturedStmt(CapturedStmt *S) {
348  VisitStmt(S);
349  // NumCaptures
350  Record.push_back(std::distance(S->capture_begin(), S->capture_end()));
351 
352  // CapturedDecl and captured region kind
353  Record.AddDeclRef(S->getCapturedDecl());
354  Record.push_back(S->getCapturedRegionKind());
355 
356  Record.AddDeclRef(S->getCapturedRecordDecl());
357 
358  // Capture inits
359  for (auto *I : S->capture_inits())
360  Record.AddStmt(I);
361 
362  // Body
363  Record.AddStmt(S->getCapturedStmt());
364 
365  // Captures
366  for (const auto &I : S->captures()) {
367  if (I.capturesThis() || I.capturesVariableArrayType())
368  Record.AddDeclRef(nullptr);
369  else
370  Record.AddDeclRef(I.getCapturedVar());
371  Record.push_back(I.getCaptureKind());
372  Record.AddSourceLocation(I.getLocation());
373  }
374 
376 }
377 
378 void ASTStmtWriter::VisitExpr(Expr *E) {
379  VisitStmt(E);
380  Record.AddTypeRef(E->getType());
381  Record.push_back(E->isTypeDependent());
382  Record.push_back(E->isValueDependent());
383  Record.push_back(E->isInstantiationDependent());
385  Record.push_back(E->getValueKind());
386  Record.push_back(E->getObjectKind());
387 }
388 
389 void ASTStmtWriter::VisitPredefinedExpr(PredefinedExpr *E) {
390  VisitExpr(E);
391  Record.AddSourceLocation(E->getLocation());
392  Record.push_back(E->getIdentType()); // FIXME: stable encoding
393  Record.AddStmt(E->getFunctionName());
395 }
396 
397 void ASTStmtWriter::VisitDeclRefExpr(DeclRefExpr *E) {
398  VisitExpr(E);
399 
400  Record.push_back(E->hasQualifier());
401  Record.push_back(E->getDecl() != E->getFoundDecl());
402  Record.push_back(E->hasTemplateKWAndArgsInfo());
403  Record.push_back(E->hadMultipleCandidates());
405 
406  if (E->hasTemplateKWAndArgsInfo()) {
407  unsigned NumTemplateArgs = E->getNumTemplateArgs();
408  Record.push_back(NumTemplateArgs);
409  }
410 
412 
413  if ((!E->hasTemplateKWAndArgsInfo()) && (!E->hasQualifier()) &&
414  (E->getDecl() == E->getFoundDecl()) &&
416  AbbrevToUse = Writer.getDeclRefExprAbbrev();
417  }
418 
419  if (E->hasQualifier())
421 
422  if (E->getDecl() != E->getFoundDecl())
423  Record.AddDeclRef(E->getFoundDecl());
424 
425  if (E->hasTemplateKWAndArgsInfo())
426  AddTemplateKWAndArgsInfo(*E->getTrailingObjects<ASTTemplateKWAndArgsInfo>(),
427  E->getTrailingObjects<TemplateArgumentLoc>());
428 
429  Record.AddDeclRef(E->getDecl());
430  Record.AddSourceLocation(E->getLocation());
431  Record.AddDeclarationNameLoc(E->DNLoc, E->getDecl()->getDeclName());
433 }
434 
435 void ASTStmtWriter::VisitIntegerLiteral(IntegerLiteral *E) {
436  VisitExpr(E);
437  Record.AddSourceLocation(E->getLocation());
438  Record.AddAPInt(E->getValue());
439 
440  if (E->getValue().getBitWidth() == 32) {
441  AbbrevToUse = Writer.getIntegerLiteralAbbrev();
442  }
443 
445 }
446 
447 void ASTStmtWriter::VisitFloatingLiteral(FloatingLiteral *E) {
448  VisitExpr(E);
449  Record.push_back(E->getRawSemantics());
450  Record.push_back(E->isExact());
451  Record.AddAPFloat(E->getValue());
452  Record.AddSourceLocation(E->getLocation());
454 }
455 
456 void ASTStmtWriter::VisitImaginaryLiteral(ImaginaryLiteral *E) {
457  VisitExpr(E);
458  Record.AddStmt(E->getSubExpr());
460 }
461 
462 void ASTStmtWriter::VisitStringLiteral(StringLiteral *E) {
463  VisitExpr(E);
464  Record.push_back(E->getByteLength());
465  Record.push_back(E->getNumConcatenated());
466  Record.push_back(E->getKind());
467  Record.push_back(E->isPascal());
468  // FIXME: String data should be stored as a blob at the end of the
469  // StringLiteral. However, we can't do so now because we have no
470  // provision for coping with abbreviations when we're jumping around
471  // the AST file during deserialization.
472  Record.append(E->getBytes().begin(), E->getBytes().end());
473  for (unsigned I = 0, N = E->getNumConcatenated(); I != N; ++I)
474  Record.AddSourceLocation(E->getStrTokenLoc(I));
476 }
477 
478 void ASTStmtWriter::VisitCharacterLiteral(CharacterLiteral *E) {
479  VisitExpr(E);
480  Record.push_back(E->getValue());
481  Record.AddSourceLocation(E->getLocation());
482  Record.push_back(E->getKind());
483 
484  AbbrevToUse = Writer.getCharacterLiteralAbbrev();
485 
487 }
488 
489 void ASTStmtWriter::VisitParenExpr(ParenExpr *E) {
490  VisitExpr(E);
491  Record.AddSourceLocation(E->getLParen());
492  Record.AddSourceLocation(E->getRParen());
493  Record.AddStmt(E->getSubExpr());
495 }
496 
497 void ASTStmtWriter::VisitParenListExpr(ParenListExpr *E) {
498  VisitExpr(E);
499  Record.push_back(E->NumExprs);
500  for (unsigned i=0; i != E->NumExprs; ++i)
501  Record.AddStmt(E->Exprs[i]);
502  Record.AddSourceLocation(E->LParenLoc);
503  Record.AddSourceLocation(E->RParenLoc);
505 }
506 
507 void ASTStmtWriter::VisitUnaryOperator(UnaryOperator *E) {
508  VisitExpr(E);
509  Record.AddStmt(E->getSubExpr());
510  Record.push_back(E->getOpcode()); // FIXME: stable encoding
511  Record.AddSourceLocation(E->getOperatorLoc());
513 }
514 
515 void ASTStmtWriter::VisitOffsetOfExpr(OffsetOfExpr *E) {
516  VisitExpr(E);
517  Record.push_back(E->getNumComponents());
518  Record.push_back(E->getNumExpressions());
519  Record.AddSourceLocation(E->getOperatorLoc());
520  Record.AddSourceLocation(E->getRParenLoc());
522  for (unsigned I = 0, N = E->getNumComponents(); I != N; ++I) {
523  const OffsetOfNode &ON = E->getComponent(I);
524  Record.push_back(ON.getKind()); // FIXME: Stable encoding
526  Record.AddSourceLocation(ON.getSourceRange().getEnd());
527  switch (ON.getKind()) {
528  case OffsetOfNode::Array:
529  Record.push_back(ON.getArrayExprIndex());
530  break;
531 
532  case OffsetOfNode::Field:
533  Record.AddDeclRef(ON.getField());
534  break;
535 
537  Record.AddIdentifierRef(ON.getFieldName());
538  break;
539 
540  case OffsetOfNode::Base:
541  Record.AddCXXBaseSpecifier(*ON.getBase());
542  break;
543  }
544  }
545  for (unsigned I = 0, N = E->getNumExpressions(); I != N; ++I)
546  Record.AddStmt(E->getIndexExpr(I));
548 }
549 
550 void ASTStmtWriter::VisitUnaryExprOrTypeTraitExpr(UnaryExprOrTypeTraitExpr *E) {
551  VisitExpr(E);
552  Record.push_back(E->getKind());
553  if (E->isArgumentType())
555  else {
556  Record.push_back(0);
557  Record.AddStmt(E->getArgumentExpr());
558  }
559  Record.AddSourceLocation(E->getOperatorLoc());
560  Record.AddSourceLocation(E->getRParenLoc());
562 }
563 
564 void ASTStmtWriter::VisitArraySubscriptExpr(ArraySubscriptExpr *E) {
565  VisitExpr(E);
566  Record.AddStmt(E->getLHS());
567  Record.AddStmt(E->getRHS());
568  Record.AddSourceLocation(E->getRBracketLoc());
570 }
571 
572 void ASTStmtWriter::VisitOMPArraySectionExpr(OMPArraySectionExpr *E) {
573  VisitExpr(E);
574  Record.AddStmt(E->getBase());
575  Record.AddStmt(E->getLowerBound());
576  Record.AddStmt(E->getLength());
577  Record.AddSourceLocation(E->getColonLoc());
578  Record.AddSourceLocation(E->getRBracketLoc());
580 }
581 
582 void ASTStmtWriter::VisitCallExpr(CallExpr *E) {
583  VisitExpr(E);
584  Record.push_back(E->getNumArgs());
585  Record.AddSourceLocation(E->getRParenLoc());
586  Record.AddStmt(E->getCallee());
587  for (CallExpr::arg_iterator Arg = E->arg_begin(), ArgEnd = E->arg_end();
588  Arg != ArgEnd; ++Arg)
589  Record.AddStmt(*Arg);
591 }
592 
593 void ASTStmtWriter::VisitMemberExpr(MemberExpr *E) {
594  // Don't call VisitExpr, we'll write everything here.
595 
596  Record.push_back(E->hasQualifier());
597  if (E->hasQualifier())
599 
600  Record.push_back(E->HasTemplateKWAndArgsInfo);
601  if (E->HasTemplateKWAndArgsInfo) {
603  unsigned NumTemplateArgs = E->getNumTemplateArgs();
604  Record.push_back(NumTemplateArgs);
605  Record.AddSourceLocation(E->getLAngleLoc());
606  Record.AddSourceLocation(E->getRAngleLoc());
607  for (unsigned i=0; i != NumTemplateArgs; ++i)
608  Record.AddTemplateArgumentLoc(E->getTemplateArgs()[i]);
609  }
610 
611  Record.push_back(E->hadMultipleCandidates());
612 
613  DeclAccessPair FoundDecl = E->getFoundDecl();
614  Record.AddDeclRef(FoundDecl.getDecl());
615  Record.push_back(FoundDecl.getAccess());
616 
617  Record.AddTypeRef(E->getType());
618  Record.push_back(E->getValueKind());
619  Record.push_back(E->getObjectKind());
620  Record.AddStmt(E->getBase());
621  Record.AddDeclRef(E->getMemberDecl());
622  Record.AddSourceLocation(E->getMemberLoc());
623  Record.push_back(E->isArrow());
624  Record.AddSourceLocation(E->getOperatorLoc());
625  Record.AddDeclarationNameLoc(E->MemberDNLoc,
626  E->getMemberDecl()->getDeclName());
628 }
629 
630 void ASTStmtWriter::VisitObjCIsaExpr(ObjCIsaExpr *E) {
631  VisitExpr(E);
632  Record.AddStmt(E->getBase());
633  Record.AddSourceLocation(E->getIsaMemberLoc());
634  Record.AddSourceLocation(E->getOpLoc());
635  Record.push_back(E->isArrow());
637 }
638 
639 void ASTStmtWriter::
640 VisitObjCIndirectCopyRestoreExpr(ObjCIndirectCopyRestoreExpr *E) {
641  VisitExpr(E);
642  Record.AddStmt(E->getSubExpr());
643  Record.push_back(E->shouldCopy());
645 }
646 
647 void ASTStmtWriter::VisitObjCBridgedCastExpr(ObjCBridgedCastExpr *E) {
648  VisitExplicitCastExpr(E);
649  Record.AddSourceLocation(E->getLParenLoc());
651  Record.push_back(E->getBridgeKind()); // FIXME: Stable encoding
653 }
654 
655 void ASTStmtWriter::VisitCastExpr(CastExpr *E) {
656  VisitExpr(E);
657  Record.push_back(E->path_size());
658  Record.AddStmt(E->getSubExpr());
659  Record.push_back(E->getCastKind()); // FIXME: stable encoding
660 
662  PI = E->path_begin(), PE = E->path_end(); PI != PE; ++PI)
663  Record.AddCXXBaseSpecifier(**PI);
664 }
665 
666 void ASTStmtWriter::VisitBinaryOperator(BinaryOperator *E) {
667  VisitExpr(E);
668  Record.AddStmt(E->getLHS());
669  Record.AddStmt(E->getRHS());
670  Record.push_back(E->getOpcode()); // FIXME: stable encoding
671  Record.AddSourceLocation(E->getOperatorLoc());
672  Record.push_back(E->getFPFeatures().getInt());
674 }
675 
676 void ASTStmtWriter::VisitCompoundAssignOperator(CompoundAssignOperator *E) {
677  VisitBinaryOperator(E);
678  Record.AddTypeRef(E->getComputationLHSType());
681 }
682 
683 void ASTStmtWriter::VisitConditionalOperator(ConditionalOperator *E) {
684  VisitExpr(E);
685  Record.AddStmt(E->getCond());
686  Record.AddStmt(E->getLHS());
687  Record.AddStmt(E->getRHS());
688  Record.AddSourceLocation(E->getQuestionLoc());
689  Record.AddSourceLocation(E->getColonLoc());
691 }
692 
693 void
694 ASTStmtWriter::VisitBinaryConditionalOperator(BinaryConditionalOperator *E) {
695  VisitExpr(E);
696  Record.AddStmt(E->getOpaqueValue());
697  Record.AddStmt(E->getCommon());
698  Record.AddStmt(E->getCond());
699  Record.AddStmt(E->getTrueExpr());
700  Record.AddStmt(E->getFalseExpr());
701  Record.AddSourceLocation(E->getQuestionLoc());
702  Record.AddSourceLocation(E->getColonLoc());
704 }
705 
706 void ASTStmtWriter::VisitImplicitCastExpr(ImplicitCastExpr *E) {
707  VisitCastExpr(E);
708 
709  if (E->path_size() == 0)
710  AbbrevToUse = Writer.getExprImplicitCastAbbrev();
711 
713 }
714 
715 void ASTStmtWriter::VisitExplicitCastExpr(ExplicitCastExpr *E) {
716  VisitCastExpr(E);
718 }
719 
720 void ASTStmtWriter::VisitCStyleCastExpr(CStyleCastExpr *E) {
721  VisitExplicitCastExpr(E);
722  Record.AddSourceLocation(E->getLParenLoc());
723  Record.AddSourceLocation(E->getRParenLoc());
725 }
726 
727 void ASTStmtWriter::VisitCompoundLiteralExpr(CompoundLiteralExpr *E) {
728  VisitExpr(E);
729  Record.AddSourceLocation(E->getLParenLoc());
731  Record.AddStmt(E->getInitializer());
732  Record.push_back(E->isFileScope());
734 }
735 
736 void ASTStmtWriter::VisitExtVectorElementExpr(ExtVectorElementExpr *E) {
737  VisitExpr(E);
738  Record.AddStmt(E->getBase());
739  Record.AddIdentifierRef(&E->getAccessor());
740  Record.AddSourceLocation(E->getAccessorLoc());
742 }
743 
744 void ASTStmtWriter::VisitInitListExpr(InitListExpr *E) {
745  VisitExpr(E);
746  // NOTE: only add the (possibly null) syntactic form.
747  // No need to serialize the isSemanticForm flag and the semantic form.
748  Record.AddStmt(E->getSyntacticForm());
749  Record.AddSourceLocation(E->getLBraceLoc());
750  Record.AddSourceLocation(E->getRBraceLoc());
751  bool isArrayFiller = E->ArrayFillerOrUnionFieldInit.is<Expr*>();
752  Record.push_back(isArrayFiller);
753  if (isArrayFiller)
754  Record.AddStmt(E->getArrayFiller());
755  else
757  Record.push_back(E->hadArrayRangeDesignator());
758  Record.push_back(E->getNumInits());
759  if (isArrayFiller) {
760  // ArrayFiller may have filled "holes" due to designated initializer.
761  // Replace them by 0 to indicate that the filler goes in that place.
762  Expr *filler = E->getArrayFiller();
763  for (unsigned I = 0, N = E->getNumInits(); I != N; ++I)
764  Record.AddStmt(E->getInit(I) != filler ? E->getInit(I) : nullptr);
765  } else {
766  for (unsigned I = 0, N = E->getNumInits(); I != N; ++I)
767  Record.AddStmt(E->getInit(I));
768  }
770 }
771 
772 void ASTStmtWriter::VisitDesignatedInitExpr(DesignatedInitExpr *E) {
773  VisitExpr(E);
774  Record.push_back(E->getNumSubExprs());
775  for (unsigned I = 0, N = E->getNumSubExprs(); I != N; ++I)
776  Record.AddStmt(E->getSubExpr(I));
778  Record.push_back(E->usesGNUSyntax());
779  for (const DesignatedInitExpr::Designator &D : E->designators()) {
780  if (D.isFieldDesignator()) {
781  if (FieldDecl *Field = D.getField()) {
783  Record.AddDeclRef(Field);
784  } else {
786  Record.AddIdentifierRef(D.getFieldName());
787  }
788  Record.AddSourceLocation(D.getDotLoc());
789  Record.AddSourceLocation(D.getFieldLoc());
790  } else if (D.isArrayDesignator()) {
792  Record.push_back(D.getFirstExprIndex());
793  Record.AddSourceLocation(D.getLBracketLoc());
794  Record.AddSourceLocation(D.getRBracketLoc());
795  } else {
796  assert(D.isArrayRangeDesignator() && "Unknown designator");
798  Record.push_back(D.getFirstExprIndex());
799  Record.AddSourceLocation(D.getLBracketLoc());
800  Record.AddSourceLocation(D.getEllipsisLoc());
801  Record.AddSourceLocation(D.getRBracketLoc());
802  }
803  }
805 }
806 
807 void ASTStmtWriter::VisitDesignatedInitUpdateExpr(DesignatedInitUpdateExpr *E) {
808  VisitExpr(E);
809  Record.AddStmt(E->getBase());
810  Record.AddStmt(E->getUpdater());
812 }
813 
814 void ASTStmtWriter::VisitNoInitExpr(NoInitExpr *E) {
815  VisitExpr(E);
817 }
818 
819 void ASTStmtWriter::VisitArrayInitLoopExpr(ArrayInitLoopExpr *E) {
820  VisitExpr(E);
821  Record.AddStmt(E->SubExprs[0]);
822  Record.AddStmt(E->SubExprs[1]);
824 }
825 
826 void ASTStmtWriter::VisitArrayInitIndexExpr(ArrayInitIndexExpr *E) {
827  VisitExpr(E);
829 }
830 
831 void ASTStmtWriter::VisitImplicitValueInitExpr(ImplicitValueInitExpr *E) {
832  VisitExpr(E);
834 }
835 
836 void ASTStmtWriter::VisitVAArgExpr(VAArgExpr *E) {
837  VisitExpr(E);
838  Record.AddStmt(E->getSubExpr());
840  Record.AddSourceLocation(E->getBuiltinLoc());
841  Record.AddSourceLocation(E->getRParenLoc());
842  Record.push_back(E->isMicrosoftABI());
844 }
845 
846 void ASTStmtWriter::VisitAddrLabelExpr(AddrLabelExpr *E) {
847  VisitExpr(E);
848  Record.AddSourceLocation(E->getAmpAmpLoc());
849  Record.AddSourceLocation(E->getLabelLoc());
850  Record.AddDeclRef(E->getLabel());
852 }
853 
854 void ASTStmtWriter::VisitStmtExpr(StmtExpr *E) {
855  VisitExpr(E);
856  Record.AddStmt(E->getSubStmt());
857  Record.AddSourceLocation(E->getLParenLoc());
858  Record.AddSourceLocation(E->getRParenLoc());
860 }
861 
862 void ASTStmtWriter::VisitChooseExpr(ChooseExpr *E) {
863  VisitExpr(E);
864  Record.AddStmt(E->getCond());
865  Record.AddStmt(E->getLHS());
866  Record.AddStmt(E->getRHS());
867  Record.AddSourceLocation(E->getBuiltinLoc());
868  Record.AddSourceLocation(E->getRParenLoc());
869  Record.push_back(E->isConditionDependent() ? false : E->isConditionTrue());
871 }
872 
873 void ASTStmtWriter::VisitGNUNullExpr(GNUNullExpr *E) {
874  VisitExpr(E);
875  Record.AddSourceLocation(E->getTokenLocation());
877 }
878 
879 void ASTStmtWriter::VisitShuffleVectorExpr(ShuffleVectorExpr *E) {
880  VisitExpr(E);
881  Record.push_back(E->getNumSubExprs());
882  for (unsigned I = 0, N = E->getNumSubExprs(); I != N; ++I)
883  Record.AddStmt(E->getExpr(I));
884  Record.AddSourceLocation(E->getBuiltinLoc());
885  Record.AddSourceLocation(E->getRParenLoc());
887 }
888 
889 void ASTStmtWriter::VisitConvertVectorExpr(ConvertVectorExpr *E) {
890  VisitExpr(E);
891  Record.AddSourceLocation(E->getBuiltinLoc());
892  Record.AddSourceLocation(E->getRParenLoc());
894  Record.AddStmt(E->getSrcExpr());
896 }
897 
898 void ASTStmtWriter::VisitBlockExpr(BlockExpr *E) {
899  VisitExpr(E);
900  Record.AddDeclRef(E->getBlockDecl());
902 }
903 
904 void ASTStmtWriter::VisitGenericSelectionExpr(GenericSelectionExpr *E) {
905  VisitExpr(E);
906  Record.push_back(E->getNumAssocs());
907 
908  Record.AddStmt(E->getControllingExpr());
909  for (unsigned I = 0, N = E->getNumAssocs(); I != N; ++I) {
911  Record.AddStmt(E->getAssocExpr(I));
912  }
913  Record.push_back(E->isResultDependent() ? -1U : E->getResultIndex());
914 
915  Record.AddSourceLocation(E->getGenericLoc());
916  Record.AddSourceLocation(E->getDefaultLoc());
917  Record.AddSourceLocation(E->getRParenLoc());
919 }
920 
921 void ASTStmtWriter::VisitPseudoObjectExpr(PseudoObjectExpr *E) {
922  VisitExpr(E);
923  Record.push_back(E->getNumSemanticExprs());
924 
925  // Push the result index. Currently, this needs to exactly match
926  // the encoding used internally for ResultIndex.
927  unsigned result = E->getResultExprIndex();
928  result = (result == PseudoObjectExpr::NoResult ? 0 : result + 1);
929  Record.push_back(result);
930 
931  Record.AddStmt(E->getSyntacticForm());
933  i = E->semantics_begin(), e = E->semantics_end(); i != e; ++i) {
934  Record.AddStmt(*i);
935  }
937 }
938 
939 void ASTStmtWriter::VisitAtomicExpr(AtomicExpr *E) {
940  VisitExpr(E);
941  Record.push_back(E->getOp());
942  for (unsigned I = 0, N = E->getNumSubExprs(); I != N; ++I)
943  Record.AddStmt(E->getSubExprs()[I]);
944  Record.AddSourceLocation(E->getBuiltinLoc());
945  Record.AddSourceLocation(E->getRParenLoc());
947 }
948 
949 //===----------------------------------------------------------------------===//
950 // Objective-C Expressions and Statements.
951 //===----------------------------------------------------------------------===//
952 
953 void ASTStmtWriter::VisitObjCStringLiteral(ObjCStringLiteral *E) {
954  VisitExpr(E);
955  Record.AddStmt(E->getString());
956  Record.AddSourceLocation(E->getAtLoc());
958 }
959 
960 void ASTStmtWriter::VisitObjCBoxedExpr(ObjCBoxedExpr *E) {
961  VisitExpr(E);
962  Record.AddStmt(E->getSubExpr());
963  Record.AddDeclRef(E->getBoxingMethod());
964  Record.AddSourceRange(E->getSourceRange());
966 }
967 
968 void ASTStmtWriter::VisitObjCArrayLiteral(ObjCArrayLiteral *E) {
969  VisitExpr(E);
970  Record.push_back(E->getNumElements());
971  for (unsigned i = 0; i < E->getNumElements(); i++)
972  Record.AddStmt(E->getElement(i));
974  Record.AddSourceRange(E->getSourceRange());
976 }
977 
978 void ASTStmtWriter::VisitObjCDictionaryLiteral(ObjCDictionaryLiteral *E) {
979  VisitExpr(E);
980  Record.push_back(E->getNumElements());
981  Record.push_back(E->HasPackExpansions);
982  for (unsigned i = 0; i < E->getNumElements(); i++) {
984  Record.AddStmt(Element.Key);
985  Record.AddStmt(Element.Value);
986  if (E->HasPackExpansions) {
987  Record.AddSourceLocation(Element.EllipsisLoc);
988  unsigned NumExpansions = 0;
989  if (Element.NumExpansions)
990  NumExpansions = *Element.NumExpansions + 1;
991  Record.push_back(NumExpansions);
992  }
993  }
994 
996  Record.AddSourceRange(E->getSourceRange());
998 }
999 
1000 void ASTStmtWriter::VisitObjCEncodeExpr(ObjCEncodeExpr *E) {
1001  VisitExpr(E);
1003  Record.AddSourceLocation(E->getAtLoc());
1004  Record.AddSourceLocation(E->getRParenLoc());
1006 }
1007 
1008 void ASTStmtWriter::VisitObjCSelectorExpr(ObjCSelectorExpr *E) {
1009  VisitExpr(E);
1010  Record.AddSelectorRef(E->getSelector());
1011  Record.AddSourceLocation(E->getAtLoc());
1012  Record.AddSourceLocation(E->getRParenLoc());
1014 }
1015 
1016 void ASTStmtWriter::VisitObjCProtocolExpr(ObjCProtocolExpr *E) {
1017  VisitExpr(E);
1018  Record.AddDeclRef(E->getProtocol());
1019  Record.AddSourceLocation(E->getAtLoc());
1020  Record.AddSourceLocation(E->ProtoLoc);
1021  Record.AddSourceLocation(E->getRParenLoc());
1023 }
1024 
1025 void ASTStmtWriter::VisitObjCIvarRefExpr(ObjCIvarRefExpr *E) {
1026  VisitExpr(E);
1027  Record.AddDeclRef(E->getDecl());
1028  Record.AddSourceLocation(E->getLocation());
1029  Record.AddSourceLocation(E->getOpLoc());
1030  Record.AddStmt(E->getBase());
1031  Record.push_back(E->isArrow());
1032  Record.push_back(E->isFreeIvar());
1034 }
1035 
1036 void ASTStmtWriter::VisitObjCPropertyRefExpr(ObjCPropertyRefExpr *E) {
1037  VisitExpr(E);
1038  Record.push_back(E->SetterAndMethodRefFlags.getInt());
1039  Record.push_back(E->isImplicitProperty());
1040  if (E->isImplicitProperty()) {
1043  } else {
1044  Record.AddDeclRef(E->getExplicitProperty());
1045  }
1046  Record.AddSourceLocation(E->getLocation());
1048  if (E->isObjectReceiver()) {
1049  Record.push_back(0);
1050  Record.AddStmt(E->getBase());
1051  } else if (E->isSuperReceiver()) {
1052  Record.push_back(1);
1053  Record.AddTypeRef(E->getSuperReceiverType());
1054  } else {
1055  Record.push_back(2);
1056  Record.AddDeclRef(E->getClassReceiver());
1057  }
1058 
1060 }
1061 
1062 void ASTStmtWriter::VisitObjCSubscriptRefExpr(ObjCSubscriptRefExpr *E) {
1063  VisitExpr(E);
1064  Record.AddSourceLocation(E->getRBracket());
1065  Record.AddStmt(E->getBaseExpr());
1066  Record.AddStmt(E->getKeyExpr());
1067  Record.AddDeclRef(E->getAtIndexMethodDecl());
1068  Record.AddDeclRef(E->setAtIndexMethodDecl());
1069 
1071 }
1072 
1073 void ASTStmtWriter::VisitObjCMessageExpr(ObjCMessageExpr *E) {
1074  VisitExpr(E);
1075  Record.push_back(E->getNumArgs());
1076  Record.push_back(E->getNumStoredSelLocs());
1077  Record.push_back(E->SelLocsKind);
1078  Record.push_back(E->isDelegateInitCall());
1079  Record.push_back(E->IsImplicit);
1080  Record.push_back((unsigned)E->getReceiverKind()); // FIXME: stable encoding
1081  switch (E->getReceiverKind()) {
1083  Record.AddStmt(E->getInstanceReceiver());
1084  break;
1085 
1088  break;
1089 
1092  Record.AddTypeRef(E->getSuperType());
1093  Record.AddSourceLocation(E->getSuperLoc());
1094  break;
1095  }
1096 
1097  if (E->getMethodDecl()) {
1098  Record.push_back(1);
1099  Record.AddDeclRef(E->getMethodDecl());
1100  } else {
1101  Record.push_back(0);
1102  Record.AddSelectorRef(E->getSelector());
1103  }
1104 
1105  Record.AddSourceLocation(E->getLeftLoc());
1106  Record.AddSourceLocation(E->getRightLoc());
1107 
1108  for (CallExpr::arg_iterator Arg = E->arg_begin(), ArgEnd = E->arg_end();
1109  Arg != ArgEnd; ++Arg)
1110  Record.AddStmt(*Arg);
1111 
1112  SourceLocation *Locs = E->getStoredSelLocs();
1113  for (unsigned i = 0, e = E->getNumStoredSelLocs(); i != e; ++i)
1114  Record.AddSourceLocation(Locs[i]);
1115 
1117 }
1118 
1119 void ASTStmtWriter::VisitObjCForCollectionStmt(ObjCForCollectionStmt *S) {
1120  VisitStmt(S);
1121  Record.AddStmt(S->getElement());
1122  Record.AddStmt(S->getCollection());
1123  Record.AddStmt(S->getBody());
1124  Record.AddSourceLocation(S->getForLoc());
1125  Record.AddSourceLocation(S->getRParenLoc());
1127 }
1128 
1129 void ASTStmtWriter::VisitObjCAtCatchStmt(ObjCAtCatchStmt *S) {
1130  Record.AddStmt(S->getCatchBody());
1131  Record.AddDeclRef(S->getCatchParamDecl());
1132  Record.AddSourceLocation(S->getAtCatchLoc());
1133  Record.AddSourceLocation(S->getRParenLoc());
1135 }
1136 
1137 void ASTStmtWriter::VisitObjCAtFinallyStmt(ObjCAtFinallyStmt *S) {
1138  Record.AddStmt(S->getFinallyBody());
1139  Record.AddSourceLocation(S->getAtFinallyLoc());
1141 }
1142 
1143 void ASTStmtWriter::VisitObjCAutoreleasePoolStmt(ObjCAutoreleasePoolStmt *S) {
1144  Record.AddStmt(S->getSubStmt());
1145  Record.AddSourceLocation(S->getAtLoc());
1147 }
1148 
1149 void ASTStmtWriter::VisitObjCAtTryStmt(ObjCAtTryStmt *S) {
1150  Record.push_back(S->getNumCatchStmts());
1151  Record.push_back(S->getFinallyStmt() != nullptr);
1152  Record.AddStmt(S->getTryBody());
1153  for (unsigned I = 0, N = S->getNumCatchStmts(); I != N; ++I)
1154  Record.AddStmt(S->getCatchStmt(I));
1155  if (S->getFinallyStmt())
1156  Record.AddStmt(S->getFinallyStmt());
1157  Record.AddSourceLocation(S->getAtTryLoc());
1159 }
1160 
1161 void ASTStmtWriter::VisitObjCAtSynchronizedStmt(ObjCAtSynchronizedStmt *S) {
1162  Record.AddStmt(S->getSynchExpr());
1163  Record.AddStmt(S->getSynchBody());
1166 }
1167 
1168 void ASTStmtWriter::VisitObjCAtThrowStmt(ObjCAtThrowStmt *S) {
1169  Record.AddStmt(S->getThrowExpr());
1170  Record.AddSourceLocation(S->getThrowLoc());
1172 }
1173 
1174 void ASTStmtWriter::VisitObjCBoolLiteralExpr(ObjCBoolLiteralExpr *E) {
1175  VisitExpr(E);
1176  Record.push_back(E->getValue());
1177  Record.AddSourceLocation(E->getLocation());
1179 }
1180 
1181 void ASTStmtWriter::VisitObjCAvailabilityCheckExpr(ObjCAvailabilityCheckExpr *E) {
1182  VisitExpr(E);
1183  Record.AddSourceRange(E->getSourceRange());
1184  Record.AddVersionTuple(E->getVersion());
1186 }
1187 
1188 //===----------------------------------------------------------------------===//
1189 // C++ Expressions and Statements.
1190 //===----------------------------------------------------------------------===//
1191 
1192 void ASTStmtWriter::VisitCXXCatchStmt(CXXCatchStmt *S) {
1193  VisitStmt(S);
1194  Record.AddSourceLocation(S->getCatchLoc());
1195  Record.AddDeclRef(S->getExceptionDecl());
1196  Record.AddStmt(S->getHandlerBlock());
1198 }
1199 
1200 void ASTStmtWriter::VisitCXXTryStmt(CXXTryStmt *S) {
1201  VisitStmt(S);
1202  Record.push_back(S->getNumHandlers());
1203  Record.AddSourceLocation(S->getTryLoc());
1204  Record.AddStmt(S->getTryBlock());
1205  for (unsigned i = 0, e = S->getNumHandlers(); i != e; ++i)
1206  Record.AddStmt(S->getHandler(i));
1208 }
1209 
1210 void ASTStmtWriter::VisitCXXForRangeStmt(CXXForRangeStmt *S) {
1211  VisitStmt(S);
1212  Record.AddSourceLocation(S->getForLoc());
1213  Record.AddSourceLocation(S->getCoawaitLoc());
1214  Record.AddSourceLocation(S->getColonLoc());
1215  Record.AddSourceLocation(S->getRParenLoc());
1216  Record.AddStmt(S->getRangeStmt());
1217  Record.AddStmt(S->getBeginStmt());
1218  Record.AddStmt(S->getEndStmt());
1219  Record.AddStmt(S->getCond());
1220  Record.AddStmt(S->getInc());
1221  Record.AddStmt(S->getLoopVarStmt());
1222  Record.AddStmt(S->getBody());
1224 }
1225 
1226 void ASTStmtWriter::VisitMSDependentExistsStmt(MSDependentExistsStmt *S) {
1227  VisitStmt(S);
1228  Record.AddSourceLocation(S->getKeywordLoc());
1229  Record.push_back(S->isIfExists());
1231  Record.AddDeclarationNameInfo(S->getNameInfo());
1232  Record.AddStmt(S->getSubStmt());
1234 }
1235 
1236 void ASTStmtWriter::VisitCXXOperatorCallExpr(CXXOperatorCallExpr *E) {
1237  VisitCallExpr(E);
1238  Record.push_back(E->getOperator());
1239  Record.AddSourceRange(E->Range);
1240  Record.push_back(E->getFPFeatures().getInt());
1242 }
1243 
1244 void ASTStmtWriter::VisitCXXMemberCallExpr(CXXMemberCallExpr *E) {
1245  VisitCallExpr(E);
1247 }
1248 
1249 void ASTStmtWriter::VisitCXXConstructExpr(CXXConstructExpr *E) {
1250  VisitExpr(E);
1251  Record.push_back(E->getNumArgs());
1252  for (unsigned I = 0, N = E->getNumArgs(); I != N; ++I)
1253  Record.AddStmt(E->getArg(I));
1254  Record.AddDeclRef(E->getConstructor());
1255  Record.AddSourceLocation(E->getLocation());
1256  Record.push_back(E->isElidable());
1257  Record.push_back(E->hadMultipleCandidates());
1258  Record.push_back(E->isListInitialization());
1261  Record.push_back(E->getConstructionKind()); // FIXME: stable encoding
1262  Record.AddSourceRange(E->getParenOrBraceRange());
1264 }
1265 
1266 void ASTStmtWriter::VisitCXXInheritedCtorInitExpr(CXXInheritedCtorInitExpr *E) {
1267  VisitExpr(E);
1268  Record.AddDeclRef(E->getConstructor());
1269  Record.AddSourceLocation(E->getLocation());
1270  Record.push_back(E->constructsVBase());
1271  Record.push_back(E->inheritedFromVBase());
1273 }
1274 
1275 void ASTStmtWriter::VisitCXXTemporaryObjectExpr(CXXTemporaryObjectExpr *E) {
1276  VisitCXXConstructExpr(E);
1277  Record.AddTypeSourceInfo(E->getTypeSourceInfo());
1279 }
1280 
1281 void ASTStmtWriter::VisitLambdaExpr(LambdaExpr *E) {
1282  VisitExpr(E);
1283  Record.push_back(E->NumCaptures);
1284  Record.AddSourceRange(E->IntroducerRange);
1285  Record.push_back(E->CaptureDefault); // FIXME: stable encoding
1286  Record.AddSourceLocation(E->CaptureDefaultLoc);
1287  Record.push_back(E->ExplicitParams);
1288  Record.push_back(E->ExplicitResultType);
1289  Record.AddSourceLocation(E->ClosingBrace);
1290 
1291  // Add capture initializers.
1293  CEnd = E->capture_init_end();
1294  C != CEnd; ++C) {
1295  Record.AddStmt(*C);
1296  }
1297 
1299 }
1300 
1301 void ASTStmtWriter::VisitCXXStdInitializerListExpr(CXXStdInitializerListExpr *E) {
1302  VisitExpr(E);
1303  Record.AddStmt(E->getSubExpr());
1305 }
1306 
1307 void ASTStmtWriter::VisitCXXNamedCastExpr(CXXNamedCastExpr *E) {
1308  VisitExplicitCastExpr(E);
1310  Record.AddSourceRange(E->getAngleBrackets());
1311 }
1312 
1313 void ASTStmtWriter::VisitCXXStaticCastExpr(CXXStaticCastExpr *E) {
1314  VisitCXXNamedCastExpr(E);
1316 }
1317 
1318 void ASTStmtWriter::VisitCXXDynamicCastExpr(CXXDynamicCastExpr *E) {
1319  VisitCXXNamedCastExpr(E);
1321 }
1322 
1323 void ASTStmtWriter::VisitCXXReinterpretCastExpr(CXXReinterpretCastExpr *E) {
1324  VisitCXXNamedCastExpr(E);
1326 }
1327 
1328 void ASTStmtWriter::VisitCXXConstCastExpr(CXXConstCastExpr *E) {
1329  VisitCXXNamedCastExpr(E);
1331 }
1332 
1333 void ASTStmtWriter::VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr *E) {
1334  VisitExplicitCastExpr(E);
1335  Record.AddSourceLocation(E->getLParenLoc());
1336  Record.AddSourceLocation(E->getRParenLoc());
1338 }
1339 
1340 void ASTStmtWriter::VisitUserDefinedLiteral(UserDefinedLiteral *E) {
1341  VisitCallExpr(E);
1342  Record.AddSourceLocation(E->UDSuffixLoc);
1344 }
1345 
1346 void ASTStmtWriter::VisitCXXBoolLiteralExpr(CXXBoolLiteralExpr *E) {
1347  VisitExpr(E);
1348  Record.push_back(E->getValue());
1349  Record.AddSourceLocation(E->getLocation());
1351 }
1352 
1353 void ASTStmtWriter::VisitCXXNullPtrLiteralExpr(CXXNullPtrLiteralExpr *E) {
1354  VisitExpr(E);
1355  Record.AddSourceLocation(E->getLocation());
1357 }
1358 
1359 void ASTStmtWriter::VisitCXXTypeidExpr(CXXTypeidExpr *E) {
1360  VisitExpr(E);
1361  Record.AddSourceRange(E->getSourceRange());
1362  if (E->isTypeOperand()) {
1365  } else {
1366  Record.AddStmt(E->getExprOperand());
1368  }
1369 }
1370 
1371 void ASTStmtWriter::VisitCXXThisExpr(CXXThisExpr *E) {
1372  VisitExpr(E);
1373  Record.AddSourceLocation(E->getLocation());
1374  Record.push_back(E->isImplicit());
1376 }
1377 
1378 void ASTStmtWriter::VisitCXXThrowExpr(CXXThrowExpr *E) {
1379  VisitExpr(E);
1380  Record.AddSourceLocation(E->getThrowLoc());
1381  Record.AddStmt(E->getSubExpr());
1382  Record.push_back(E->isThrownVariableInScope());
1384 }
1385 
1386 void ASTStmtWriter::VisitCXXDefaultArgExpr(CXXDefaultArgExpr *E) {
1387  VisitExpr(E);
1388  Record.AddDeclRef(E->getParam());
1389  Record.AddSourceLocation(E->getUsedLocation());
1391 }
1392 
1393 void ASTStmtWriter::VisitCXXDefaultInitExpr(CXXDefaultInitExpr *E) {
1394  VisitExpr(E);
1395  Record.AddDeclRef(E->getField());
1396  Record.AddSourceLocation(E->getExprLoc());
1398 }
1399 
1400 void ASTStmtWriter::VisitCXXBindTemporaryExpr(CXXBindTemporaryExpr *E) {
1401  VisitExpr(E);
1402  Record.AddCXXTemporary(E->getTemporary());
1403  Record.AddStmt(E->getSubExpr());
1405 }
1406 
1407 void ASTStmtWriter::VisitCXXScalarValueInitExpr(CXXScalarValueInitExpr *E) {
1408  VisitExpr(E);
1409  Record.AddTypeSourceInfo(E->getTypeSourceInfo());
1410  Record.AddSourceLocation(E->getRParenLoc());
1412 }
1413 
1414 void ASTStmtWriter::VisitCXXNewExpr(CXXNewExpr *E) {
1415  VisitExpr(E);
1416  Record.push_back(E->isGlobalNew());
1417  Record.push_back(E->isArray());
1418  Record.push_back(E->passAlignment());
1420  Record.push_back(E->getNumPlacementArgs());
1421  Record.push_back(E->StoredInitializationStyle);
1422  Record.AddDeclRef(E->getOperatorNew());
1423  Record.AddDeclRef(E->getOperatorDelete());
1425  Record.AddSourceRange(E->getTypeIdParens());
1426  Record.AddSourceRange(E->getSourceRange());
1427  Record.AddSourceRange(E->getDirectInitRange());
1428  for (CXXNewExpr::arg_iterator I = E->raw_arg_begin(), e = E->raw_arg_end();
1429  I != e; ++I)
1430  Record.AddStmt(*I);
1431 
1433 }
1434 
1435 void ASTStmtWriter::VisitCXXDeleteExpr(CXXDeleteExpr *E) {
1436  VisitExpr(E);
1437  Record.push_back(E->isGlobalDelete());
1438  Record.push_back(E->isArrayForm());
1439  Record.push_back(E->isArrayFormAsWritten());
1441  Record.AddDeclRef(E->getOperatorDelete());
1442  Record.AddStmt(E->getArgument());
1443  Record.AddSourceLocation(E->getSourceRange().getBegin());
1444 
1446 }
1447 
1448 void ASTStmtWriter::VisitCXXPseudoDestructorExpr(CXXPseudoDestructorExpr *E) {
1449  VisitExpr(E);
1450 
1451  Record.AddStmt(E->getBase());
1452  Record.push_back(E->isArrow());
1453  Record.AddSourceLocation(E->getOperatorLoc());
1455  Record.AddTypeSourceInfo(E->getScopeTypeInfo());
1456  Record.AddSourceLocation(E->getColonColonLoc());
1457  Record.AddSourceLocation(E->getTildeLoc());
1458 
1459  // PseudoDestructorTypeStorage.
1461  if (E->getDestroyedTypeIdentifier())
1463  else
1465 
1467 }
1468 
1469 void ASTStmtWriter::VisitExprWithCleanups(ExprWithCleanups *E) {
1470  VisitExpr(E);
1471  Record.push_back(E->getNumObjects());
1472  for (unsigned i = 0, e = E->getNumObjects(); i != e; ++i)
1473  Record.AddDeclRef(E->getObject(i));
1474 
1475  Record.push_back(E->cleanupsHaveSideEffects());
1476  Record.AddStmt(E->getSubExpr());
1478 }
1479 
1480 void
1481 ASTStmtWriter::VisitCXXDependentScopeMemberExpr(CXXDependentScopeMemberExpr *E){
1482  VisitExpr(E);
1483 
1484  // Don't emit anything here, HasTemplateKWAndArgsInfo must be
1485  // emitted first.
1486 
1487  Record.push_back(E->HasTemplateKWAndArgsInfo);
1488  if (E->HasTemplateKWAndArgsInfo) {
1489  const ASTTemplateKWAndArgsInfo &ArgInfo =
1490  *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>();
1491  Record.push_back(ArgInfo.NumTemplateArgs);
1492  AddTemplateKWAndArgsInfo(ArgInfo,
1493  E->getTrailingObjects<TemplateArgumentLoc>());
1494  }
1495 
1496  if (!E->isImplicitAccess())
1497  Record.AddStmt(E->getBase());
1498  else
1499  Record.AddStmt(nullptr);
1500  Record.AddTypeRef(E->getBaseType());
1501  Record.push_back(E->isArrow());
1502  Record.AddSourceLocation(E->getOperatorLoc());
1505  Record.AddDeclarationNameInfo(E->MemberNameInfo);
1507 }
1508 
1509 void
1510 ASTStmtWriter::VisitDependentScopeDeclRefExpr(DependentScopeDeclRefExpr *E) {
1511  VisitExpr(E);
1512 
1513  // Don't emit anything here, HasTemplateKWAndArgsInfo must be
1514  // emitted first.
1515 
1516  Record.push_back(E->HasTemplateKWAndArgsInfo);
1517  if (E->HasTemplateKWAndArgsInfo) {
1518  const ASTTemplateKWAndArgsInfo &ArgInfo =
1519  *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>();
1520  Record.push_back(ArgInfo.NumTemplateArgs);
1521  AddTemplateKWAndArgsInfo(ArgInfo,
1522  E->getTrailingObjects<TemplateArgumentLoc>());
1523  }
1524 
1526  Record.AddDeclarationNameInfo(E->NameInfo);
1528 }
1529 
1530 void
1531 ASTStmtWriter::VisitCXXUnresolvedConstructExpr(CXXUnresolvedConstructExpr *E) {
1532  VisitExpr(E);
1533  Record.push_back(E->arg_size());
1535  ArgI = E->arg_begin(), ArgE = E->arg_end(); ArgI != ArgE; ++ArgI)
1536  Record.AddStmt(*ArgI);
1537  Record.AddTypeSourceInfo(E->getTypeSourceInfo());
1538  Record.AddSourceLocation(E->getLParenLoc());
1539  Record.AddSourceLocation(E->getRParenLoc());
1541 }
1542 
1543 void ASTStmtWriter::VisitOverloadExpr(OverloadExpr *E) {
1544  VisitExpr(E);
1545 
1546  // Don't emit anything here, HasTemplateKWAndArgsInfo must be
1547  // emitted first.
1548 
1550  if (E->HasTemplateKWAndArgsInfo) {
1551  const ASTTemplateKWAndArgsInfo &ArgInfo =
1553  Record.push_back(ArgInfo.NumTemplateArgs);
1555  }
1556 
1557  Record.push_back(E->getNumDecls());
1559  OvI = E->decls_begin(), OvE = E->decls_end(); OvI != OvE; ++OvI) {
1560  Record.AddDeclRef(OvI.getDecl());
1561  Record.push_back(OvI.getAccess());
1562  }
1563 
1564  Record.AddDeclarationNameInfo(E->NameInfo);
1566 }
1567 
1568 void ASTStmtWriter::VisitUnresolvedMemberExpr(UnresolvedMemberExpr *E) {
1569  VisitOverloadExpr(E);
1570  Record.push_back(E->isArrow());
1571  Record.push_back(E->hasUnresolvedUsing());
1572  Record.AddStmt(!E->isImplicitAccess() ? E->getBase() : nullptr);
1573  Record.AddTypeRef(E->getBaseType());
1574  Record.AddSourceLocation(E->getOperatorLoc());
1576 }
1577 
1578 void ASTStmtWriter::VisitUnresolvedLookupExpr(UnresolvedLookupExpr *E) {
1579  VisitOverloadExpr(E);
1580  Record.push_back(E->requiresADL());
1581  Record.push_back(E->isOverloaded());
1582  Record.AddDeclRef(E->getNamingClass());
1584 }
1585 
1586 void ASTStmtWriter::VisitTypeTraitExpr(TypeTraitExpr *E) {
1587  VisitExpr(E);
1588  Record.push_back(E->TypeTraitExprBits.NumArgs);
1589  Record.push_back(E->TypeTraitExprBits.Kind); // FIXME: Stable encoding
1590  Record.push_back(E->TypeTraitExprBits.Value);
1591  Record.AddSourceRange(E->getSourceRange());
1592  for (unsigned I = 0, N = E->getNumArgs(); I != N; ++I)
1593  Record.AddTypeSourceInfo(E->getArg(I));
1595 }
1596 
1597 void ASTStmtWriter::VisitArrayTypeTraitExpr(ArrayTypeTraitExpr *E) {
1598  VisitExpr(E);
1599  Record.push_back(E->getTrait());
1600  Record.push_back(E->getValue());
1601  Record.AddSourceRange(E->getSourceRange());
1603  Record.AddStmt(E->getDimensionExpression());
1605 }
1606 
1607 void ASTStmtWriter::VisitExpressionTraitExpr(ExpressionTraitExpr *E) {
1608  VisitExpr(E);
1609  Record.push_back(E->getTrait());
1610  Record.push_back(E->getValue());
1611  Record.AddSourceRange(E->getSourceRange());
1612  Record.AddStmt(E->getQueriedExpression());
1614 }
1615 
1616 void ASTStmtWriter::VisitCXXNoexceptExpr(CXXNoexceptExpr *E) {
1617  VisitExpr(E);
1618  Record.push_back(E->getValue());
1619  Record.AddSourceRange(E->getSourceRange());
1620  Record.AddStmt(E->getOperand());
1622 }
1623 
1624 void ASTStmtWriter::VisitPackExpansionExpr(PackExpansionExpr *E) {
1625  VisitExpr(E);
1626  Record.AddSourceLocation(E->getEllipsisLoc());
1627  Record.push_back(E->NumExpansions);
1628  Record.AddStmt(E->getPattern());
1630 }
1631 
1632 void ASTStmtWriter::VisitSizeOfPackExpr(SizeOfPackExpr *E) {
1633  VisitExpr(E);
1634  Record.push_back(E->isPartiallySubstituted() ? E->getPartialArguments().size()
1635  : 0);
1636  Record.AddSourceLocation(E->OperatorLoc);
1637  Record.AddSourceLocation(E->PackLoc);
1638  Record.AddSourceLocation(E->RParenLoc);
1639  Record.AddDeclRef(E->Pack);
1640  if (E->isPartiallySubstituted()) {
1641  for (const auto &TA : E->getPartialArguments())
1642  Record.AddTemplateArgument(TA);
1643  } else if (!E->isValueDependent()) {
1644  Record.push_back(E->getPackLength());
1645  }
1647 }
1648 
1649 void ASTStmtWriter::VisitSubstNonTypeTemplateParmExpr(
1651  VisitExpr(E);
1652  Record.AddDeclRef(E->getParameter());
1653  Record.AddSourceLocation(E->getNameLoc());
1654  Record.AddStmt(E->getReplacement());
1656 }
1657 
1658 void ASTStmtWriter::VisitSubstNonTypeTemplateParmPackExpr(
1660  VisitExpr(E);
1661  Record.AddDeclRef(E->getParameterPack());
1662  Record.AddTemplateArgument(E->getArgumentPack());
1665 }
1666 
1667 void ASTStmtWriter::VisitFunctionParmPackExpr(FunctionParmPackExpr *E) {
1668  VisitExpr(E);
1669  Record.push_back(E->getNumExpansions());
1670  Record.AddDeclRef(E->getParameterPack());
1672  for (FunctionParmPackExpr::iterator I = E->begin(), End = E->end();
1673  I != End; ++I)
1674  Record.AddDeclRef(*I);
1676 }
1677 
1678 void ASTStmtWriter::VisitMaterializeTemporaryExpr(MaterializeTemporaryExpr *E) {
1679  VisitExpr(E);
1680  Record.AddStmt(E->getTemporary());
1681  Record.AddDeclRef(E->getExtendingDecl());
1682  Record.push_back(E->getManglingNumber());
1684 }
1685 
1686 void ASTStmtWriter::VisitCXXFoldExpr(CXXFoldExpr *E) {
1687  VisitExpr(E);
1688  Record.AddSourceLocation(E->LParenLoc);
1689  Record.AddSourceLocation(E->EllipsisLoc);
1690  Record.AddSourceLocation(E->RParenLoc);
1691  Record.AddStmt(E->SubExprs[0]);
1692  Record.AddStmt(E->SubExprs[1]);
1693  Record.push_back(E->Opcode);
1695 }
1696 
1697 void ASTStmtWriter::VisitOpaqueValueExpr(OpaqueValueExpr *E) {
1698  VisitExpr(E);
1699  Record.AddStmt(E->getSourceExpr());
1700  Record.AddSourceLocation(E->getLocation());
1702 }
1703 
1704 void ASTStmtWriter::VisitTypoExpr(TypoExpr *E) {
1705  VisitExpr(E);
1706  // TODO: Figure out sane writer behavior for a TypoExpr, if necessary
1707  llvm_unreachable("Cannot write TypoExpr nodes");
1708 }
1709 
1710 //===----------------------------------------------------------------------===//
1711 // CUDA Expressions and Statements.
1712 //===----------------------------------------------------------------------===//
1713 
1714 void ASTStmtWriter::VisitCUDAKernelCallExpr(CUDAKernelCallExpr *E) {
1715  VisitCallExpr(E);
1716  Record.AddStmt(E->getConfig());
1718 }
1719 
1720 //===----------------------------------------------------------------------===//
1721 // OpenCL Expressions and Statements.
1722 //===----------------------------------------------------------------------===//
1723 void ASTStmtWriter::VisitAsTypeExpr(AsTypeExpr *E) {
1724  VisitExpr(E);
1725  Record.AddSourceLocation(E->getBuiltinLoc());
1726  Record.AddSourceLocation(E->getRParenLoc());
1727  Record.AddStmt(E->getSrcExpr());
1729 }
1730 
1731 //===----------------------------------------------------------------------===//
1732 // Microsoft Expressions and Statements.
1733 //===----------------------------------------------------------------------===//
1734 void ASTStmtWriter::VisitMSPropertyRefExpr(MSPropertyRefExpr *E) {
1735  VisitExpr(E);
1736  Record.push_back(E->isArrow());
1737  Record.AddStmt(E->getBaseExpr());
1739  Record.AddSourceLocation(E->getMemberLoc());
1740  Record.AddDeclRef(E->getPropertyDecl());
1742 }
1743 
1744 void ASTStmtWriter::VisitMSPropertySubscriptExpr(MSPropertySubscriptExpr *E) {
1745  VisitExpr(E);
1746  Record.AddStmt(E->getBase());
1747  Record.AddStmt(E->getIdx());
1748  Record.AddSourceLocation(E->getRBracketLoc());
1750 }
1751 
1752 void ASTStmtWriter::VisitCXXUuidofExpr(CXXUuidofExpr *E) {
1753  VisitExpr(E);
1754  Record.AddSourceRange(E->getSourceRange());
1755  Record.AddString(E->getUuidStr());
1756  if (E->isTypeOperand()) {
1759  } else {
1760  Record.AddStmt(E->getExprOperand());
1762  }
1763 }
1764 
1765 void ASTStmtWriter::VisitSEHExceptStmt(SEHExceptStmt *S) {
1766  VisitStmt(S);
1767  Record.AddSourceLocation(S->getExceptLoc());
1768  Record.AddStmt(S->getFilterExpr());
1769  Record.AddStmt(S->getBlock());
1771 }
1772 
1773 void ASTStmtWriter::VisitSEHFinallyStmt(SEHFinallyStmt *S) {
1774  VisitStmt(S);
1775  Record.AddSourceLocation(S->getFinallyLoc());
1776  Record.AddStmt(S->getBlock());
1778 }
1779 
1780 void ASTStmtWriter::VisitSEHTryStmt(SEHTryStmt *S) {
1781  VisitStmt(S);
1782  Record.push_back(S->getIsCXXTry());
1783  Record.AddSourceLocation(S->getTryLoc());
1784  Record.AddStmt(S->getTryBlock());
1785  Record.AddStmt(S->getHandler());
1787 }
1788 
1789 void ASTStmtWriter::VisitSEHLeaveStmt(SEHLeaveStmt *S) {
1790  VisitStmt(S);
1791  Record.AddSourceLocation(S->getLeaveLoc());
1793 }
1794 
1795 //===----------------------------------------------------------------------===//
1796 // OpenMP Clauses.
1797 //===----------------------------------------------------------------------===//
1798 
1799 namespace clang {
1800 class OMPClauseWriter : public OMPClauseVisitor<OMPClauseWriter> {
1801  ASTRecordWriter &Record;
1802 public:
1803  OMPClauseWriter(ASTRecordWriter &Record) : Record(Record) {}
1804 #define OPENMP_CLAUSE(Name, Class) \
1805  void Visit##Class(Class *S);
1806 #include "clang/Basic/OpenMPKinds.def"
1807  void writeClause(OMPClause *C);
1808  void VisitOMPClauseWithPreInit(OMPClauseWithPreInit *C);
1809  void VisitOMPClauseWithPostUpdate(OMPClauseWithPostUpdate *C);
1810 };
1811 }
1812 
1814  Record.push_back(C->getClauseKind());
1815  Visit(C);
1816  Record.AddSourceLocation(C->getLocStart());
1817  Record.AddSourceLocation(C->getLocEnd());
1818 }
1819 
1821  Record.push_back(C->getCaptureRegion());
1822  Record.AddStmt(C->getPreInitStmt());
1823 }
1824 
1826  VisitOMPClauseWithPreInit(C);
1827  Record.AddStmt(C->getPostUpdateExpr());
1828 }
1829 
1830 void OMPClauseWriter::VisitOMPIfClause(OMPIfClause *C) {
1831  VisitOMPClauseWithPreInit(C);
1832  Record.push_back(C->getNameModifier());
1833  Record.AddSourceLocation(C->getNameModifierLoc());
1834  Record.AddSourceLocation(C->getColonLoc());
1835  Record.AddStmt(C->getCondition());
1836  Record.AddSourceLocation(C->getLParenLoc());
1837 }
1838 
1839 void OMPClauseWriter::VisitOMPFinalClause(OMPFinalClause *C) {
1840  Record.AddStmt(C->getCondition());
1841  Record.AddSourceLocation(C->getLParenLoc());
1842 }
1843 
1844 void OMPClauseWriter::VisitOMPNumThreadsClause(OMPNumThreadsClause *C) {
1845  VisitOMPClauseWithPreInit(C);
1846  Record.AddStmt(C->getNumThreads());
1847  Record.AddSourceLocation(C->getLParenLoc());
1848 }
1849 
1850 void OMPClauseWriter::VisitOMPSafelenClause(OMPSafelenClause *C) {
1851  Record.AddStmt(C->getSafelen());
1852  Record.AddSourceLocation(C->getLParenLoc());
1853 }
1854 
1855 void OMPClauseWriter::VisitOMPSimdlenClause(OMPSimdlenClause *C) {
1856  Record.AddStmt(C->getSimdlen());
1857  Record.AddSourceLocation(C->getLParenLoc());
1858 }
1859 
1860 void OMPClauseWriter::VisitOMPCollapseClause(OMPCollapseClause *C) {
1861  Record.AddStmt(C->getNumForLoops());
1862  Record.AddSourceLocation(C->getLParenLoc());
1863 }
1864 
1865 void OMPClauseWriter::VisitOMPDefaultClause(OMPDefaultClause *C) {
1866  Record.push_back(C->getDefaultKind());
1867  Record.AddSourceLocation(C->getLParenLoc());
1868  Record.AddSourceLocation(C->getDefaultKindKwLoc());
1869 }
1870 
1871 void OMPClauseWriter::VisitOMPProcBindClause(OMPProcBindClause *C) {
1872  Record.push_back(C->getProcBindKind());
1873  Record.AddSourceLocation(C->getLParenLoc());
1874  Record.AddSourceLocation(C->getProcBindKindKwLoc());
1875 }
1876 
1877 void OMPClauseWriter::VisitOMPScheduleClause(OMPScheduleClause *C) {
1878  VisitOMPClauseWithPreInit(C);
1879  Record.push_back(C->getScheduleKind());
1880  Record.push_back(C->getFirstScheduleModifier());
1881  Record.push_back(C->getSecondScheduleModifier());
1882  Record.AddStmt(C->getChunkSize());
1883  Record.AddSourceLocation(C->getLParenLoc());
1884  Record.AddSourceLocation(C->getFirstScheduleModifierLoc());
1885  Record.AddSourceLocation(C->getSecondScheduleModifierLoc());
1886  Record.AddSourceLocation(C->getScheduleKindLoc());
1887  Record.AddSourceLocation(C->getCommaLoc());
1888 }
1889 
1890 void OMPClauseWriter::VisitOMPOrderedClause(OMPOrderedClause *C) {
1891  Record.AddStmt(C->getNumForLoops());
1892  Record.AddSourceLocation(C->getLParenLoc());
1893 }
1894 
1895 void OMPClauseWriter::VisitOMPNowaitClause(OMPNowaitClause *) {}
1896 
1897 void OMPClauseWriter::VisitOMPUntiedClause(OMPUntiedClause *) {}
1898 
1899 void OMPClauseWriter::VisitOMPMergeableClause(OMPMergeableClause *) {}
1900 
1901 void OMPClauseWriter::VisitOMPReadClause(OMPReadClause *) {}
1902 
1903 void OMPClauseWriter::VisitOMPWriteClause(OMPWriteClause *) {}
1904 
1905 void OMPClauseWriter::VisitOMPUpdateClause(OMPUpdateClause *) {}
1906 
1907 void OMPClauseWriter::VisitOMPCaptureClause(OMPCaptureClause *) {}
1908 
1909 void OMPClauseWriter::VisitOMPSeqCstClause(OMPSeqCstClause *) {}
1910 
1911 void OMPClauseWriter::VisitOMPThreadsClause(OMPThreadsClause *) {}
1912 
1913 void OMPClauseWriter::VisitOMPSIMDClause(OMPSIMDClause *) {}
1914 
1915 void OMPClauseWriter::VisitOMPNogroupClause(OMPNogroupClause *) {}
1916 
1917 void OMPClauseWriter::VisitOMPPrivateClause(OMPPrivateClause *C) {
1918  Record.push_back(C->varlist_size());
1919  Record.AddSourceLocation(C->getLParenLoc());
1920  for (auto *VE : C->varlists()) {
1921  Record.AddStmt(VE);
1922  }
1923  for (auto *VE : C->private_copies()) {
1924  Record.AddStmt(VE);
1925  }
1926 }
1927 
1928 void OMPClauseWriter::VisitOMPFirstprivateClause(OMPFirstprivateClause *C) {
1929  Record.push_back(C->varlist_size());
1930  VisitOMPClauseWithPreInit(C);
1931  Record.AddSourceLocation(C->getLParenLoc());
1932  for (auto *VE : C->varlists()) {
1933  Record.AddStmt(VE);
1934  }
1935  for (auto *VE : C->private_copies()) {
1936  Record.AddStmt(VE);
1937  }
1938  for (auto *VE : C->inits()) {
1939  Record.AddStmt(VE);
1940  }
1941 }
1942 
1943 void OMPClauseWriter::VisitOMPLastprivateClause(OMPLastprivateClause *C) {
1944  Record.push_back(C->varlist_size());
1945  VisitOMPClauseWithPostUpdate(C);
1946  Record.AddSourceLocation(C->getLParenLoc());
1947  for (auto *VE : C->varlists())
1948  Record.AddStmt(VE);
1949  for (auto *E : C->private_copies())
1950  Record.AddStmt(E);
1951  for (auto *E : C->source_exprs())
1952  Record.AddStmt(E);
1953  for (auto *E : C->destination_exprs())
1954  Record.AddStmt(E);
1955  for (auto *E : C->assignment_ops())
1956  Record.AddStmt(E);
1957 }
1958 
1959 void OMPClauseWriter::VisitOMPSharedClause(OMPSharedClause *C) {
1960  Record.push_back(C->varlist_size());
1961  Record.AddSourceLocation(C->getLParenLoc());
1962  for (auto *VE : C->varlists())
1963  Record.AddStmt(VE);
1964 }
1965 
1966 void OMPClauseWriter::VisitOMPReductionClause(OMPReductionClause *C) {
1967  Record.push_back(C->varlist_size());
1968  VisitOMPClauseWithPostUpdate(C);
1969  Record.AddSourceLocation(C->getLParenLoc());
1970  Record.AddSourceLocation(C->getColonLoc());
1971  Record.AddNestedNameSpecifierLoc(C->getQualifierLoc());
1972  Record.AddDeclarationNameInfo(C->getNameInfo());
1973  for (auto *VE : C->varlists())
1974  Record.AddStmt(VE);
1975  for (auto *VE : C->privates())
1976  Record.AddStmt(VE);
1977  for (auto *E : C->lhs_exprs())
1978  Record.AddStmt(E);
1979  for (auto *E : C->rhs_exprs())
1980  Record.AddStmt(E);
1981  for (auto *E : C->reduction_ops())
1982  Record.AddStmt(E);
1983 }
1984 
1985 void OMPClauseWriter::VisitOMPTaskReductionClause(OMPTaskReductionClause *C) {
1986  Record.push_back(C->varlist_size());
1987  VisitOMPClauseWithPostUpdate(C);
1988  Record.AddSourceLocation(C->getLParenLoc());
1989  Record.AddSourceLocation(C->getColonLoc());
1990  Record.AddNestedNameSpecifierLoc(C->getQualifierLoc());
1991  Record.AddDeclarationNameInfo(C->getNameInfo());
1992  for (auto *VE : C->varlists())
1993  Record.AddStmt(VE);
1994  for (auto *VE : C->privates())
1995  Record.AddStmt(VE);
1996  for (auto *E : C->lhs_exprs())
1997  Record.AddStmt(E);
1998  for (auto *E : C->rhs_exprs())
1999  Record.AddStmt(E);
2000  for (auto *E : C->reduction_ops())
2001  Record.AddStmt(E);
2002 }
2003 
2004 void OMPClauseWriter::VisitOMPInReductionClause(OMPInReductionClause *C) {
2005  Record.push_back(C->varlist_size());
2006  VisitOMPClauseWithPostUpdate(C);
2007  Record.AddSourceLocation(C->getLParenLoc());
2008  Record.AddSourceLocation(C->getColonLoc());
2009  Record.AddNestedNameSpecifierLoc(C->getQualifierLoc());
2010  Record.AddDeclarationNameInfo(C->getNameInfo());
2011  for (auto *VE : C->varlists())
2012  Record.AddStmt(VE);
2013  for (auto *VE : C->privates())
2014  Record.AddStmt(VE);
2015  for (auto *E : C->lhs_exprs())
2016  Record.AddStmt(E);
2017  for (auto *E : C->rhs_exprs())
2018  Record.AddStmt(E);
2019  for (auto *E : C->reduction_ops())
2020  Record.AddStmt(E);
2021  for (auto *E : C->taskgroup_descriptors())
2022  Record.AddStmt(E);
2023 }
2024 
2025 void OMPClauseWriter::VisitOMPLinearClause(OMPLinearClause *C) {
2026  Record.push_back(C->varlist_size());
2027  VisitOMPClauseWithPostUpdate(C);
2028  Record.AddSourceLocation(C->getLParenLoc());
2029  Record.AddSourceLocation(C->getColonLoc());
2030  Record.push_back(C->getModifier());
2031  Record.AddSourceLocation(C->getModifierLoc());
2032  for (auto *VE : C->varlists()) {
2033  Record.AddStmt(VE);
2034  }
2035  for (auto *VE : C->privates()) {
2036  Record.AddStmt(VE);
2037  }
2038  for (auto *VE : C->inits()) {
2039  Record.AddStmt(VE);
2040  }
2041  for (auto *VE : C->updates()) {
2042  Record.AddStmt(VE);
2043  }
2044  for (auto *VE : C->finals()) {
2045  Record.AddStmt(VE);
2046  }
2047  Record.AddStmt(C->getStep());
2048  Record.AddStmt(C->getCalcStep());
2049 }
2050 
2051 void OMPClauseWriter::VisitOMPAlignedClause(OMPAlignedClause *C) {
2052  Record.push_back(C->varlist_size());
2053  Record.AddSourceLocation(C->getLParenLoc());
2054  Record.AddSourceLocation(C->getColonLoc());
2055  for (auto *VE : C->varlists())
2056  Record.AddStmt(VE);
2057  Record.AddStmt(C->getAlignment());
2058 }
2059 
2060 void OMPClauseWriter::VisitOMPCopyinClause(OMPCopyinClause *C) {
2061  Record.push_back(C->varlist_size());
2062  Record.AddSourceLocation(C->getLParenLoc());
2063  for (auto *VE : C->varlists())
2064  Record.AddStmt(VE);
2065  for (auto *E : C->source_exprs())
2066  Record.AddStmt(E);
2067  for (auto *E : C->destination_exprs())
2068  Record.AddStmt(E);
2069  for (auto *E : C->assignment_ops())
2070  Record.AddStmt(E);
2071 }
2072 
2073 void OMPClauseWriter::VisitOMPCopyprivateClause(OMPCopyprivateClause *C) {
2074  Record.push_back(C->varlist_size());
2075  Record.AddSourceLocation(C->getLParenLoc());
2076  for (auto *VE : C->varlists())
2077  Record.AddStmt(VE);
2078  for (auto *E : C->source_exprs())
2079  Record.AddStmt(E);
2080  for (auto *E : C->destination_exprs())
2081  Record.AddStmt(E);
2082  for (auto *E : C->assignment_ops())
2083  Record.AddStmt(E);
2084 }
2085 
2086 void OMPClauseWriter::VisitOMPFlushClause(OMPFlushClause *C) {
2087  Record.push_back(C->varlist_size());
2088  Record.AddSourceLocation(C->getLParenLoc());
2089  for (auto *VE : C->varlists())
2090  Record.AddStmt(VE);
2091 }
2092 
2093 void OMPClauseWriter::VisitOMPDependClause(OMPDependClause *C) {
2094  Record.push_back(C->varlist_size());
2095  Record.AddSourceLocation(C->getLParenLoc());
2096  Record.push_back(C->getDependencyKind());
2097  Record.AddSourceLocation(C->getDependencyLoc());
2098  Record.AddSourceLocation(C->getColonLoc());
2099  for (auto *VE : C->varlists())
2100  Record.AddStmt(VE);
2101  Record.AddStmt(C->getCounterValue());
2102 }
2103 
2104 void OMPClauseWriter::VisitOMPDeviceClause(OMPDeviceClause *C) {
2105  VisitOMPClauseWithPreInit(C);
2106  Record.AddStmt(C->getDevice());
2107  Record.AddSourceLocation(C->getLParenLoc());
2108 }
2109 
2110 void OMPClauseWriter::VisitOMPMapClause(OMPMapClause *C) {
2111  Record.push_back(C->varlist_size());
2112  Record.push_back(C->getUniqueDeclarationsNum());
2113  Record.push_back(C->getTotalComponentListNum());
2114  Record.push_back(C->getTotalComponentsNum());
2115  Record.AddSourceLocation(C->getLParenLoc());
2116  Record.push_back(C->getMapTypeModifier());
2117  Record.push_back(C->getMapType());
2118  Record.AddSourceLocation(C->getMapLoc());
2119  Record.AddSourceLocation(C->getColonLoc());
2120  for (auto *E : C->varlists())
2121  Record.AddStmt(E);
2122  for (auto *D : C->all_decls())
2123  Record.AddDeclRef(D);
2124  for (auto N : C->all_num_lists())
2125  Record.push_back(N);
2126  for (auto N : C->all_lists_sizes())
2127  Record.push_back(N);
2128  for (auto &M : C->all_components()) {
2129  Record.AddStmt(M.getAssociatedExpression());
2130  Record.AddDeclRef(M.getAssociatedDeclaration());
2131  }
2132 }
2133 
2134 void OMPClauseWriter::VisitOMPNumTeamsClause(OMPNumTeamsClause *C) {
2135  VisitOMPClauseWithPreInit(C);
2136  Record.AddStmt(C->getNumTeams());
2137  Record.AddSourceLocation(C->getLParenLoc());
2138 }
2139 
2140 void OMPClauseWriter::VisitOMPThreadLimitClause(OMPThreadLimitClause *C) {
2141  VisitOMPClauseWithPreInit(C);
2142  Record.AddStmt(C->getThreadLimit());
2143  Record.AddSourceLocation(C->getLParenLoc());
2144 }
2145 
2146 void OMPClauseWriter::VisitOMPPriorityClause(OMPPriorityClause *C) {
2147  Record.AddStmt(C->getPriority());
2148  Record.AddSourceLocation(C->getLParenLoc());
2149 }
2150 
2151 void OMPClauseWriter::VisitOMPGrainsizeClause(OMPGrainsizeClause *C) {
2152  Record.AddStmt(C->getGrainsize());
2153  Record.AddSourceLocation(C->getLParenLoc());
2154 }
2155 
2156 void OMPClauseWriter::VisitOMPNumTasksClause(OMPNumTasksClause *C) {
2157  Record.AddStmt(C->getNumTasks());
2158  Record.AddSourceLocation(C->getLParenLoc());
2159 }
2160 
2161 void OMPClauseWriter::VisitOMPHintClause(OMPHintClause *C) {
2162  Record.AddStmt(C->getHint());
2163  Record.AddSourceLocation(C->getLParenLoc());
2164 }
2165 
2166 void OMPClauseWriter::VisitOMPDistScheduleClause(OMPDistScheduleClause *C) {
2167  VisitOMPClauseWithPreInit(C);
2168  Record.push_back(C->getDistScheduleKind());
2169  Record.AddStmt(C->getChunkSize());
2170  Record.AddSourceLocation(C->getLParenLoc());
2171  Record.AddSourceLocation(C->getDistScheduleKindLoc());
2172  Record.AddSourceLocation(C->getCommaLoc());
2173 }
2174 
2175 void OMPClauseWriter::VisitOMPDefaultmapClause(OMPDefaultmapClause *C) {
2176  Record.push_back(C->getDefaultmapKind());
2177  Record.push_back(C->getDefaultmapModifier());
2178  Record.AddSourceLocation(C->getLParenLoc());
2179  Record.AddSourceLocation(C->getDefaultmapModifierLoc());
2180  Record.AddSourceLocation(C->getDefaultmapKindLoc());
2181 }
2182 
2183 void OMPClauseWriter::VisitOMPToClause(OMPToClause *C) {
2184  Record.push_back(C->varlist_size());
2185  Record.push_back(C->getUniqueDeclarationsNum());
2186  Record.push_back(C->getTotalComponentListNum());
2187  Record.push_back(C->getTotalComponentsNum());
2188  Record.AddSourceLocation(C->getLParenLoc());
2189  for (auto *E : C->varlists())
2190  Record.AddStmt(E);
2191  for (auto *D : C->all_decls())
2192  Record.AddDeclRef(D);
2193  for (auto N : C->all_num_lists())
2194  Record.push_back(N);
2195  for (auto N : C->all_lists_sizes())
2196  Record.push_back(N);
2197  for (auto &M : C->all_components()) {
2198  Record.AddStmt(M.getAssociatedExpression());
2199  Record.AddDeclRef(M.getAssociatedDeclaration());
2200  }
2201 }
2202 
2203 void OMPClauseWriter::VisitOMPFromClause(OMPFromClause *C) {
2204  Record.push_back(C->varlist_size());
2205  Record.push_back(C->getUniqueDeclarationsNum());
2206  Record.push_back(C->getTotalComponentListNum());
2207  Record.push_back(C->getTotalComponentsNum());
2208  Record.AddSourceLocation(C->getLParenLoc());
2209  for (auto *E : C->varlists())
2210  Record.AddStmt(E);
2211  for (auto *D : C->all_decls())
2212  Record.AddDeclRef(D);
2213  for (auto N : C->all_num_lists())
2214  Record.push_back(N);
2215  for (auto N : C->all_lists_sizes())
2216  Record.push_back(N);
2217  for (auto &M : C->all_components()) {
2218  Record.AddStmt(M.getAssociatedExpression());
2219  Record.AddDeclRef(M.getAssociatedDeclaration());
2220  }
2221 }
2222 
2223 void OMPClauseWriter::VisitOMPUseDevicePtrClause(OMPUseDevicePtrClause *C) {
2224  Record.push_back(C->varlist_size());
2225  Record.push_back(C->getUniqueDeclarationsNum());
2226  Record.push_back(C->getTotalComponentListNum());
2227  Record.push_back(C->getTotalComponentsNum());
2228  Record.AddSourceLocation(C->getLParenLoc());
2229  for (auto *E : C->varlists())
2230  Record.AddStmt(E);
2231  for (auto *VE : C->private_copies())
2232  Record.AddStmt(VE);
2233  for (auto *VE : C->inits())
2234  Record.AddStmt(VE);
2235  for (auto *D : C->all_decls())
2236  Record.AddDeclRef(D);
2237  for (auto N : C->all_num_lists())
2238  Record.push_back(N);
2239  for (auto N : C->all_lists_sizes())
2240  Record.push_back(N);
2241  for (auto &M : C->all_components()) {
2242  Record.AddStmt(M.getAssociatedExpression());
2243  Record.AddDeclRef(M.getAssociatedDeclaration());
2244  }
2245 }
2246 
2247 void OMPClauseWriter::VisitOMPIsDevicePtrClause(OMPIsDevicePtrClause *C) {
2248  Record.push_back(C->varlist_size());
2249  Record.push_back(C->getUniqueDeclarationsNum());
2250  Record.push_back(C->getTotalComponentListNum());
2251  Record.push_back(C->getTotalComponentsNum());
2252  Record.AddSourceLocation(C->getLParenLoc());
2253  for (auto *E : C->varlists())
2254  Record.AddStmt(E);
2255  for (auto *D : C->all_decls())
2256  Record.AddDeclRef(D);
2257  for (auto N : C->all_num_lists())
2258  Record.push_back(N);
2259  for (auto N : C->all_lists_sizes())
2260  Record.push_back(N);
2261  for (auto &M : C->all_components()) {
2262  Record.AddStmt(M.getAssociatedExpression());
2263  Record.AddDeclRef(M.getAssociatedDeclaration());
2264  }
2265 }
2266 
2267 //===----------------------------------------------------------------------===//
2268 // OpenMP Directives.
2269 //===----------------------------------------------------------------------===//
2270 void ASTStmtWriter::VisitOMPExecutableDirective(OMPExecutableDirective *E) {
2271  Record.AddSourceLocation(E->getLocStart());
2272  Record.AddSourceLocation(E->getLocEnd());
2273  OMPClauseWriter ClauseWriter(Record);
2274  for (unsigned i = 0; i < E->getNumClauses(); ++i) {
2275  ClauseWriter.writeClause(E->getClause(i));
2276  }
2277  if (E->hasAssociatedStmt())
2278  Record.AddStmt(E->getAssociatedStmt());
2279 }
2280 
2281 void ASTStmtWriter::VisitOMPLoopDirective(OMPLoopDirective *D) {
2282  VisitStmt(D);
2283  Record.push_back(D->getNumClauses());
2284  Record.push_back(D->getCollapsedNumber());
2285  VisitOMPExecutableDirective(D);
2286  Record.AddStmt(D->getIterationVariable());
2287  Record.AddStmt(D->getLastIteration());
2288  Record.AddStmt(D->getCalcLastIteration());
2289  Record.AddStmt(D->getPreCond());
2290  Record.AddStmt(D->getCond());
2291  Record.AddStmt(D->getInit());
2292  Record.AddStmt(D->getInc());
2293  Record.AddStmt(D->getPreInits());
2297  Record.AddStmt(D->getIsLastIterVariable());
2298  Record.AddStmt(D->getLowerBoundVariable());
2299  Record.AddStmt(D->getUpperBoundVariable());
2300  Record.AddStmt(D->getStrideVariable());
2301  Record.AddStmt(D->getEnsureUpperBound());
2302  Record.AddStmt(D->getNextLowerBound());
2303  Record.AddStmt(D->getNextUpperBound());
2304  Record.AddStmt(D->getNumIterations());
2305  }
2307  Record.AddStmt(D->getPrevLowerBoundVariable());
2308  Record.AddStmt(D->getPrevUpperBoundVariable());
2309  Record.AddStmt(D->getDistInc());
2310  Record.AddStmt(D->getPrevEnsureUpperBound());
2311  Record.AddStmt(D->getCombinedLowerBoundVariable());
2312  Record.AddStmt(D->getCombinedUpperBoundVariable());
2313  Record.AddStmt(D->getCombinedEnsureUpperBound());
2314  Record.AddStmt(D->getCombinedInit());
2315  Record.AddStmt(D->getCombinedCond());
2316  Record.AddStmt(D->getCombinedNextLowerBound());
2317  Record.AddStmt(D->getCombinedNextUpperBound());
2318  }
2319  for (auto I : D->counters()) {
2320  Record.AddStmt(I);
2321  }
2322  for (auto I : D->private_counters()) {
2323  Record.AddStmt(I);
2324  }
2325  for (auto I : D->inits()) {
2326  Record.AddStmt(I);
2327  }
2328  for (auto I : D->updates()) {
2329  Record.AddStmt(I);
2330  }
2331  for (auto I : D->finals()) {
2332  Record.AddStmt(I);
2333  }
2334 }
2335 
2336 void ASTStmtWriter::VisitOMPParallelDirective(OMPParallelDirective *D) {
2337  VisitStmt(D);
2338  Record.push_back(D->getNumClauses());
2339  VisitOMPExecutableDirective(D);
2340  Record.push_back(D->hasCancel() ? 1 : 0);
2342 }
2343 
2344 void ASTStmtWriter::VisitOMPSimdDirective(OMPSimdDirective *D) {
2345  VisitOMPLoopDirective(D);
2347 }
2348 
2349 void ASTStmtWriter::VisitOMPForDirective(OMPForDirective *D) {
2350  VisitOMPLoopDirective(D);
2351  Record.push_back(D->hasCancel() ? 1 : 0);
2353 }
2354 
2355 void ASTStmtWriter::VisitOMPForSimdDirective(OMPForSimdDirective *D) {
2356  VisitOMPLoopDirective(D);
2358 }
2359 
2360 void ASTStmtWriter::VisitOMPSectionsDirective(OMPSectionsDirective *D) {
2361  VisitStmt(D);
2362  Record.push_back(D->getNumClauses());
2363  VisitOMPExecutableDirective(D);
2364  Record.push_back(D->hasCancel() ? 1 : 0);
2366 }
2367 
2368 void ASTStmtWriter::VisitOMPSectionDirective(OMPSectionDirective *D) {
2369  VisitStmt(D);
2370  VisitOMPExecutableDirective(D);
2371  Record.push_back(D->hasCancel() ? 1 : 0);
2373 }
2374 
2375 void ASTStmtWriter::VisitOMPSingleDirective(OMPSingleDirective *D) {
2376  VisitStmt(D);
2377  Record.push_back(D->getNumClauses());
2378  VisitOMPExecutableDirective(D);
2380 }
2381 
2382 void ASTStmtWriter::VisitOMPMasterDirective(OMPMasterDirective *D) {
2383  VisitStmt(D);
2384  VisitOMPExecutableDirective(D);
2386 }
2387 
2388 void ASTStmtWriter::VisitOMPCriticalDirective(OMPCriticalDirective *D) {
2389  VisitStmt(D);
2390  Record.push_back(D->getNumClauses());
2391  VisitOMPExecutableDirective(D);
2392  Record.AddDeclarationNameInfo(D->getDirectiveName());
2394 }
2395 
2396 void ASTStmtWriter::VisitOMPParallelForDirective(OMPParallelForDirective *D) {
2397  VisitOMPLoopDirective(D);
2398  Record.push_back(D->hasCancel() ? 1 : 0);
2400 }
2401 
2402 void ASTStmtWriter::VisitOMPParallelForSimdDirective(
2404  VisitOMPLoopDirective(D);
2406 }
2407 
2408 void ASTStmtWriter::VisitOMPParallelSectionsDirective(
2410  VisitStmt(D);
2411  Record.push_back(D->getNumClauses());
2412  VisitOMPExecutableDirective(D);
2413  Record.push_back(D->hasCancel() ? 1 : 0);
2415 }
2416 
2417 void ASTStmtWriter::VisitOMPTaskDirective(OMPTaskDirective *D) {
2418  VisitStmt(D);
2419  Record.push_back(D->getNumClauses());
2420  VisitOMPExecutableDirective(D);
2421  Record.push_back(D->hasCancel() ? 1 : 0);
2423 }
2424 
2425 void ASTStmtWriter::VisitOMPAtomicDirective(OMPAtomicDirective *D) {
2426  VisitStmt(D);
2427  Record.push_back(D->getNumClauses());
2428  VisitOMPExecutableDirective(D);
2429  Record.AddStmt(D->getX());
2430  Record.AddStmt(D->getV());
2431  Record.AddStmt(D->getExpr());
2432  Record.AddStmt(D->getUpdateExpr());
2433  Record.push_back(D->isXLHSInRHSPart() ? 1 : 0);
2434  Record.push_back(D->isPostfixUpdate() ? 1 : 0);
2436 }
2437 
2438 void ASTStmtWriter::VisitOMPTargetDirective(OMPTargetDirective *D) {
2439  VisitStmt(D);
2440  Record.push_back(D->getNumClauses());
2441  VisitOMPExecutableDirective(D);
2443 }
2444 
2445 void ASTStmtWriter::VisitOMPTargetDataDirective(OMPTargetDataDirective *D) {
2446  VisitStmt(D);
2447  Record.push_back(D->getNumClauses());
2448  VisitOMPExecutableDirective(D);
2450 }
2451 
2452 void ASTStmtWriter::VisitOMPTargetEnterDataDirective(
2454  VisitStmt(D);
2455  Record.push_back(D->getNumClauses());
2456  VisitOMPExecutableDirective(D);
2458 }
2459 
2460 void ASTStmtWriter::VisitOMPTargetExitDataDirective(
2462  VisitStmt(D);
2463  Record.push_back(D->getNumClauses());
2464  VisitOMPExecutableDirective(D);
2466 }
2467 
2468 void ASTStmtWriter::VisitOMPTargetParallelDirective(
2470  VisitStmt(D);
2471  Record.push_back(D->getNumClauses());
2472  VisitOMPExecutableDirective(D);
2474 }
2475 
2476 void ASTStmtWriter::VisitOMPTargetParallelForDirective(
2478  VisitOMPLoopDirective(D);
2479  Record.push_back(D->hasCancel() ? 1 : 0);
2481 }
2482 
2483 void ASTStmtWriter::VisitOMPTaskyieldDirective(OMPTaskyieldDirective *D) {
2484  VisitStmt(D);
2485  VisitOMPExecutableDirective(D);
2487 }
2488 
2489 void ASTStmtWriter::VisitOMPBarrierDirective(OMPBarrierDirective *D) {
2490  VisitStmt(D);
2491  VisitOMPExecutableDirective(D);
2493 }
2494 
2495 void ASTStmtWriter::VisitOMPTaskwaitDirective(OMPTaskwaitDirective *D) {
2496  VisitStmt(D);
2497  VisitOMPExecutableDirective(D);
2499 }
2500 
2501 void ASTStmtWriter::VisitOMPTaskgroupDirective(OMPTaskgroupDirective *D) {
2502  VisitStmt(D);
2503  Record.push_back(D->getNumClauses());
2504  VisitOMPExecutableDirective(D);
2505  Record.AddStmt(D->getReductionRef());
2507 }
2508 
2509 void ASTStmtWriter::VisitOMPFlushDirective(OMPFlushDirective *D) {
2510  VisitStmt(D);
2511  Record.push_back(D->getNumClauses());
2512  VisitOMPExecutableDirective(D);
2514 }
2515 
2516 void ASTStmtWriter::VisitOMPOrderedDirective(OMPOrderedDirective *D) {
2517  VisitStmt(D);
2518  Record.push_back(D->getNumClauses());
2519  VisitOMPExecutableDirective(D);
2521 }
2522 
2523 void ASTStmtWriter::VisitOMPTeamsDirective(OMPTeamsDirective *D) {
2524  VisitStmt(D);
2525  Record.push_back(D->getNumClauses());
2526  VisitOMPExecutableDirective(D);
2528 }
2529 
2530 void ASTStmtWriter::VisitOMPCancellationPointDirective(
2532  VisitStmt(D);
2533  VisitOMPExecutableDirective(D);
2534  Record.push_back(D->getCancelRegion());
2536 }
2537 
2538 void ASTStmtWriter::VisitOMPCancelDirective(OMPCancelDirective *D) {
2539  VisitStmt(D);
2540  Record.push_back(D->getNumClauses());
2541  VisitOMPExecutableDirective(D);
2542  Record.push_back(D->getCancelRegion());
2544 }
2545 
2546 void ASTStmtWriter::VisitOMPTaskLoopDirective(OMPTaskLoopDirective *D) {
2547  VisitOMPLoopDirective(D);
2549 }
2550 
2551 void ASTStmtWriter::VisitOMPTaskLoopSimdDirective(OMPTaskLoopSimdDirective *D) {
2552  VisitOMPLoopDirective(D);
2554 }
2555 
2556 void ASTStmtWriter::VisitOMPDistributeDirective(OMPDistributeDirective *D) {
2557  VisitOMPLoopDirective(D);
2559 }
2560 
2561 void ASTStmtWriter::VisitOMPTargetUpdateDirective(OMPTargetUpdateDirective *D) {
2562  VisitStmt(D);
2563  Record.push_back(D->getNumClauses());
2564  VisitOMPExecutableDirective(D);
2566 }
2567 
2568 void ASTStmtWriter::VisitOMPDistributeParallelForDirective(
2570  VisitOMPLoopDirective(D);
2572 }
2573 
2574 void ASTStmtWriter::VisitOMPDistributeParallelForSimdDirective(
2576  VisitOMPLoopDirective(D);
2578 }
2579 
2580 void ASTStmtWriter::VisitOMPDistributeSimdDirective(
2582  VisitOMPLoopDirective(D);
2584 }
2585 
2586 void ASTStmtWriter::VisitOMPTargetParallelForSimdDirective(
2588  VisitOMPLoopDirective(D);
2590 }
2591 
2592 void ASTStmtWriter::VisitOMPTargetSimdDirective(OMPTargetSimdDirective *D) {
2593  VisitOMPLoopDirective(D);
2595 }
2596 
2597 void ASTStmtWriter::VisitOMPTeamsDistributeDirective(
2599  VisitOMPLoopDirective(D);
2601 }
2602 
2603 void ASTStmtWriter::VisitOMPTeamsDistributeSimdDirective(
2605  VisitOMPLoopDirective(D);
2607 }
2608 
2609 void ASTStmtWriter::VisitOMPTeamsDistributeParallelForSimdDirective(
2611  VisitOMPLoopDirective(D);
2613 }
2614 
2615 void ASTStmtWriter::VisitOMPTeamsDistributeParallelForDirective(
2617  VisitOMPLoopDirective(D);
2619 }
2620 
2621 void ASTStmtWriter::VisitOMPTargetTeamsDirective(OMPTargetTeamsDirective *D) {
2622  VisitStmt(D);
2623  Record.push_back(D->getNumClauses());
2624  VisitOMPExecutableDirective(D);
2626 }
2627 
2628 void ASTStmtWriter::VisitOMPTargetTeamsDistributeDirective(
2630  VisitOMPLoopDirective(D);
2632 }
2633 
2634 void ASTStmtWriter::VisitOMPTargetTeamsDistributeParallelForDirective(
2636  VisitOMPLoopDirective(D);
2638 }
2639 
2640 void ASTStmtWriter::VisitOMPTargetTeamsDistributeParallelForSimdDirective(
2642  VisitOMPLoopDirective(D);
2643  Code = serialization::
2645 }
2646 
2647 void ASTStmtWriter::VisitOMPTargetTeamsDistributeSimdDirective(
2649  VisitOMPLoopDirective(D);
2651 }
2652 
2653 //===----------------------------------------------------------------------===//
2654 // ASTWriter Implementation
2655 //===----------------------------------------------------------------------===//
2656 
2658  assert(SwitchCaseIDs.find(S) == SwitchCaseIDs.end() &&
2659  "SwitchCase recorded twice");
2660  unsigned NextID = SwitchCaseIDs.size();
2661  SwitchCaseIDs[S] = NextID;
2662  return NextID;
2663 }
2664 
2666  assert(SwitchCaseIDs.find(S) != SwitchCaseIDs.end() &&
2667  "SwitchCase hasn't been seen yet");
2668  return SwitchCaseIDs[S];
2669 }
2670 
2672  SwitchCaseIDs.clear();
2673 }
2674 
2675 /// \brief Write the given substatement or subexpression to the
2676 /// bitstream.
2677 void ASTWriter::WriteSubStmt(Stmt *S) {
2678  RecordData Record;
2679  ASTStmtWriter Writer(*this, Record);
2680  ++NumStatements;
2681 
2682  if (!S) {
2683  Stream.EmitRecord(serialization::STMT_NULL_PTR, Record);
2684  return;
2685  }
2686 
2687  llvm::DenseMap<Stmt *, uint64_t>::iterator I = SubStmtEntries.find(S);
2688  if (I != SubStmtEntries.end()) {
2689  Record.push_back(I->second);
2690  Stream.EmitRecord(serialization::STMT_REF_PTR, Record);
2691  return;
2692  }
2693 
2694 #ifndef NDEBUG
2695  assert(!ParentStmts.count(S) && "There is a Stmt cycle!");
2696 
2697  struct ParentStmtInserterRAII {
2698  Stmt *S;
2699  llvm::DenseSet<Stmt *> &ParentStmts;
2700 
2701  ParentStmtInserterRAII(Stmt *S, llvm::DenseSet<Stmt *> &ParentStmts)
2702  : S(S), ParentStmts(ParentStmts) {
2703  ParentStmts.insert(S);
2704  }
2705  ~ParentStmtInserterRAII() {
2706  ParentStmts.erase(S);
2707  }
2708  };
2709 
2710  ParentStmtInserterRAII ParentStmtInserter(S, ParentStmts);
2711 #endif
2712 
2713  Writer.Visit(S);
2714 
2715  uint64_t Offset = Writer.Emit();
2716  SubStmtEntries[S] = Offset;
2717 }
2718 
2719 /// \brief Flush all of the statements that have been added to the
2720 /// queue via AddStmt().
2721 void ASTRecordWriter::FlushStmts() {
2722  // We expect to be the only consumer of the two temporary statement maps,
2723  // assert that they are empty.
2724  assert(Writer->SubStmtEntries.empty() && "unexpected entries in sub-stmt map");
2725  assert(Writer->ParentStmts.empty() && "unexpected entries in parent stmt map");
2726 
2727  for (unsigned I = 0, N = StmtsToEmit.size(); I != N; ++I) {
2728  Writer->WriteSubStmt(StmtsToEmit[I]);
2729 
2730  assert(N == StmtsToEmit.size() && "record modified while being written!");
2731 
2732  // Note that we are at the end of a full expression. Any
2733  // expression records that follow this one are part of a different
2734  // expression.
2735  Writer->Stream.EmitRecord(serialization::STMT_STOP, ArrayRef<uint32_t>());
2736 
2737  Writer->SubStmtEntries.clear();
2738  Writer->ParentStmts.clear();
2739  }
2740 
2741  StmtsToEmit.clear();
2742 }
2743 
2744 void ASTRecordWriter::FlushSubStmts() {
2745  // For a nested statement, write out the substatements in reverse order (so
2746  // that a simple stack machine can be used when loading), and don't emit a
2747  // STMT_STOP after each one.
2748  for (unsigned I = 0, N = StmtsToEmit.size(); I != N; ++I) {
2749  Writer->WriteSubStmt(StmtsToEmit[N - I - 1]);
2750  assert(N == StmtsToEmit.size() && "record modified while being written!");
2751  }
2752 
2753  StmtsToEmit.clear();
2754 }
SourceLocation getRParenLoc() const
Definition: Stmt.h:1158
Expr * getInc()
Definition: Stmt.h:1213
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
Definition: ExprObjC.h:539
unsigned getNumSemanticExprs() const
Definition: Expr.h:5034
A PredefinedExpr record.
Definition: ASTBitCodes.h:1284
A call to an overloaded operator written using operator syntax.
Definition: ExprCXX.h:52
ObjCIndirectCopyRestoreExpr - Represents the passing of a function argument by indirect copy-restore ...
Definition: ExprObjC.h:1464
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:303
The receiver is the instance of the superclass object.
Definition: ExprObjC.h:1009
Represents a single C99 designator.
Definition: Expr.h:4182
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
Definition: Expr.h:1140
SourceLocation getStartLoc() const
Definition: Stmt.h:492
SourceLocation getRBracLoc() const
Definition: Stmt.h:654
Defines the clang::ASTContext interface.
A CompoundLiteralExpr record.
Definition: ASTBitCodes.h:1324
This represents &#39;#pragma omp distribute simd&#39; composite directive.
Definition: StmtOpenMP.h:3171
const BlockDecl * getBlockDecl() const
Definition: Expr.h:4866
Expr * getNextUpperBound() const
Definition: StmtOpenMP.h:818
IdentifierInfo * getInputIdentifier(unsigned i) const
Definition: Stmt.h:1709
This represents &#39;#pragma omp master&#39; directive.
Definition: StmtOpenMP.h:1364
ParmVarDecl *const * iterator
Iterators over the parameters which the parameter pack expanded into.
Definition: ExprCXX.h:3909
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
Definition: ExprCXX.h:835
SourceLocation getRParenLoc() const
Definition: Stmt.h:1613
The null pointer literal (C++11 [lex.nullptr])
Definition: ExprCXX.h:520
unsigned getNumDecls() const
Gets the number of declarations in the unresolved set.
Definition: ExprCXX.h:2565
This represents &#39;#pragma omp task&#39; directive.
Definition: StmtOpenMP.h:1704
This represents a GCC inline-assembly statement extension.
Definition: Stmt.h:1591
Represents a &#39;co_await&#39; expression while the type of the promise is dependent.
Definition: ExprCXX.h:4237
SourceLocation getForLoc() const
Definition: StmtCXX.h:193
NamedDecl * getFoundDecl()
Get the NamedDecl through which this reference occurred.
Definition: Expr.h:1078
bool getValue() const
Definition: ExprObjC.h:71
helper_expr_const_range reduction_ops() const
This represents &#39;thread_limit&#39; clause in the &#39;#pragma omp ...&#39; directive.
The receiver is an object instance.
Definition: ExprObjC.h:1005
Expr * getLHS() const
Definition: Expr.h:3315
const Stmt * getElse() const
Definition: Stmt.h:945
SourceRange getSourceRange() const LLVM_READONLY
Definition: ExprCXX.h:3541
Expr * getUpperBoundVariable() const
Definition: StmtOpenMP.h:786
unsigned getNumInputs() const
Definition: Stmt.h:1510
SourceLocation getOpLoc() const
Definition: ExprObjC.h:1418
Expr * getSyntacticForm()
Return the syntactic form of this expression, i.e.
Definition: Expr.h:5014
SourceLocation getRParenLoc() const
Definition: Expr.h:2345
ObjCDictionaryElement getKeyValueElement(unsigned Index) const
Definition: ExprObjC.h:309
CompoundStmt * getBlock() const
Definition: Stmt.h:1936
An IndirectGotoStmt record.
Definition: ASTBitCodes.h:1268
helper_expr_const_range lhs_exprs() const
const_all_decls_range all_decls() const
SourceLocation getForLoc() const
Definition: Stmt.h:1226
This represents clause &#39;copyin&#39; in the &#39;#pragma omp ...&#39; directives.
SourceLocation getUsedLocation() const
Retrieve the location where this default argument was actually used.
Definition: ExprCXX.h:1022
uint64_t getValue() const
Definition: ExprCXX.h:2389
StringKind getKind() const
Definition: Expr.h:1597
An AddrLabelExpr record.
Definition: ASTBitCodes.h:1344
ValueDecl * getMemberDecl() const
Retrieve the member declaration to which this expression refers.
Definition: Expr.h:2483
NameKind
NameKind - The kind of name this object contains.
Expr * getCond() const
Definition: Expr.h:3710
ObjCMethodDecl * getAtIndexMethodDecl() const
Definition: ExprObjC.h:813
Selector getSelector() const
Definition: ExprObjC.cpp:306
void AddToken(const Token &Tok, RecordDataImpl &Record)
Emit a token.
Definition: ASTWriter.cpp:4388
SourceLocation getEllipsisLoc() const
Definition: Stmt.h:733
SourceLocation getLParen() const
Get the location of the left parentheses &#39;(&#39;.
Definition: Expr.h:1689
const Expr * getSubExpr() const
Definition: ExprCXX.h:948
SourceLocation getCommaLoc()
Get location of &#39;,&#39;.
Definition: OpenMPClause.h:876
Expr * getCond()
Definition: Stmt.h:1101
Expr * getExpr(unsigned Index)
getExpr - Return the Expr at the specified index.
Definition: Expr.h:3574
A CXXStaticCastExpr record.
Definition: ASTBitCodes.h:1434
unsigned getNumSubExprs() const
getNumSubExprs - Return the size of the SubExprs array.
Definition: Expr.h:3568
unsigned getResultIndex() const
The zero-based index of the result expression&#39;s generic association in the generic selection&#39;s associ...
Definition: Expr.h:4754
bool isSuperReceiver() const
Definition: ExprObjC.h:700
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
Definition: ExprCXX.h:2256
SourceLocation TemplateKWLoc
The source location of the template keyword; this is used as part of the representation of qualified ...
Definition: TemplateBase.h:627
An AttributedStmt record.
Definition: ASTBitCodes.h:1254
CompoundStmt * getSubStmt()
Definition: Expr.h:3505
A CXXReinterpretCastExpr record.
Definition: ASTBitCodes.h:1438
const Expr * getInit(unsigned Init) const
Definition: Expr.h:3921
helper_expr_const_range rhs_exprs() const
unsigned getNumAsmToks()
Definition: Stmt.h:1801
An ObjCBoolLiteralExpr record.
Definition: ASTBitCodes.h:1410
private_copies_range private_copies()
SourceLocation getRParenLoc() const
Definition: StmtObjC.h:104
bool isThrownVariableInScope() const
Determines whether the variable thrown by this expression (if any!) is within the innermost try block...
Definition: ExprCXX.h:958
Expr *const * semantics_iterator
Definition: Expr.h:5036
ObjCProtocolDecl * getProtocol() const
Definition: ExprObjC.h:453
Represents a &#39;co_return&#39; statement in the C++ Coroutines TS.
Definition: StmtCXX.h:432
Stmt - This represents one statement.
Definition: Stmt.h:60
Expr * getLowerBoundVariable() const
Definition: StmtOpenMP.h:778
This represents clause &#39;in_reduction&#39; in the &#39;#pragma omp task&#39; directives.
unsigned getNumArgs() const
getNumArgs - Return the number of actual arguments to this call.
Definition: Expr.h:2266
Expr * getDimensionExpression() const
Definition: ExprCXX.h:2391
const ObjCAtFinallyStmt * getFinallyStmt() const
Retrieve the @finally statement, if any.
Definition: StmtObjC.h:224
CXXCatchStmt * getHandler(unsigned i)
Definition: StmtCXX.h:104
bool isArrayFormAsWritten() const
Definition: ExprCXX.h:2027
IfStmt - This represents an if/then/else.
Definition: Stmt.h:905
SourceLocation getOperatorLoc() const
getOperatorLoc - Return the location of the operator.
Definition: Expr.h:1961
SourceLocation getRParenLoc() const
Definition: Expr.h:3555
SourceLocation getLocation() const
Definition: Expr.h:1439
Class that handles pre-initialization statement for some clauses, like &#39;shedule&#39;, &#39;firstprivate&#39; etc...
Definition: OpenMPClause.h:76
ObjCMethodDecl * setAtIndexMethodDecl() const
Definition: ExprObjC.h:817
void AddNestedNameSpecifierLoc(NestedNameSpecifierLoc NNS)
Emit a nested name specifier with source-location information.
Definition: ASTWriter.cpp:5640
unsigned getNumOutputs() const
Definition: Stmt.h:1488
This represents &#39;#pragma omp for simd&#39; directive.
Definition: StmtOpenMP.h:1114
SourceLocation getLParenLoc() const
Returns the location of &#39;(&#39;.
Definition: OpenMPClause.h:502
Expr * getBase() const
Definition: Expr.h:2477
const StringLiteral * getAsmString() const
Definition: Stmt.h:1618
TypeSourceInfo * getTypeSourceInfo() const
Definition: Expr.h:2673
helper_expr_const_range rhs_exprs() const
An ImplicitValueInitExpr record.
Definition: ASTBitCodes.h:1340
iterator end()
Definition: DeclGroup.h:108
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:81
This represents &#39;grainsize&#39; clause in the &#39;#pragma omp ...&#39; directive.
This represents &#39;#pragma omp teams distribute parallel for&#39; composite directive.
Definition: StmtOpenMP.h:3582
An ImplicitCastExpr record.
Definition: ASTBitCodes.h:1320
Stmt * getHandlerBlock() const
Definition: StmtCXX.h:52
llvm::APFloat getValue() const
Definition: Expr.h:1405
ObjCMethodDecl * getImplicitPropertySetter() const
Definition: ExprObjC.h:643
Represents the index of the current element of an array being initialized by an ArrayInitLoopExpr.
Definition: Expr.h:4546
FunctionDecl * getOperatorNew() const
Definition: ExprCXX.h:1867
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
Definition: ExprCXX.h:2655
This represents &#39;if&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:207
OpenMPDirectiveKind getCaptureRegion()
Get capture region for the stmt in the clause.
Definition: OpenMPClause.h:100
DeclarationNameInfo getNameInfo() const
Retrieve the name of the entity we&#39;re testing for, along with location information.
Definition: StmtCXX.h:276
const Expr * getSubExpr() const
Definition: Expr.h:3797
Defines the C++ template declaration subclasses.
Opcode getOpcode() const
Definition: Expr.h:3027
unsigned getNumSubExprs() const
Retrieve the total number of subexpressions in this designated initializer expression, including the actual initialized value and any expressions that occur within array and array-range designators.
Definition: Expr.h:4353
SourceLocation getIdentLoc() const
Definition: Stmt.h:829
Represents an attribute applied to a statement.
Definition: Stmt.h:854
ParenExpr - This represents a parethesized expression, e.g.
Definition: Expr.h:1665
NamedDecl * getDecl() const
A CXXOperatorCallExpr record.
Definition: ASTBitCodes.h:1424
helper_expr_const_range assignment_ops() const
bool hasQualifier() const
Determines whether this member expression actually had a C++ nested-name-specifier prior to the name ...
Definition: Expr.h:2497
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies this name, if any.
Definition: StmtCXX.h:272
Expr * getLowerBound()
Get lower bound of array section.
Definition: ExprOpenMP.h:91
This represents &#39;priority&#39; clause in the &#39;#pragma omp ...&#39; directive.
This represents &#39;#pragma omp target teams distribute&#39; combined directive.
Definition: StmtOpenMP.h:3709
helper_expr_const_range lhs_exprs() const
A CXXTemporaryObjectExpr record.
Definition: ASTBitCodes.h:1432
Represents Objective-C&#39;s @throw statement.
Definition: StmtObjC.h:313
bool requiresZeroInitialization() const
Whether this construction first requires zero-initialization before the initializer is called...
Definition: ExprCXX.h:1267
SourceLocation getLocation() const
Definition: ExprCXX.h:534
const RecordDecl * getCapturedRecordDecl() const
Retrieve the record declaration for captured variables.
Definition: Stmt.h:2149
SourceLocation getRParenLoc() const
Definition: Expr.h:2101
SourceLocation getKeywordLoc() const
Definition: ExprCXX.h:4266
Represents a call to a C++ constructor.
Definition: ExprCXX.h:1177
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
Definition: ExprObjC.h:760
TypeSourceInfo * getTypeInfoAsWritten() const
getTypeInfoAsWritten - Returns the type source info for the type that this expression is casting to...
Definition: Expr.h:2907
FPOptions getFPFeatures() const
Definition: Expr.h:3158
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent...
Definition: ExprCXX.h:2340
bool getIsCXXTry() const
Definition: Stmt.h:1975
SourceLocation getLParenLoc() const
Definition: Expr.h:2949
Expr * getCondition() const
Returns condition.
Definition: OpenMPClause.h:331
This represents &#39;update&#39; clause in the &#39;#pragma omp atomic&#39; directive.
Expr * getCondition() const
Returns condition.
Definition: OpenMPClause.h:273
This represents &#39;#pragma omp parallel for&#39; directive.
Definition: StmtOpenMP.h:1485
MS property subscript expression.
Definition: ExprCXX.h:743
SourceLocation getGotoLoc() const
Definition: Stmt.h:1299
SourceLocation getRParenLoc() const
Definition: ExprCXX.h:1763
This represents &#39;#pragma omp target teams distribute parallel for&#39; combined directive.
Definition: StmtOpenMP.h:3777
Expr * getCombinedEnsureUpperBound() const
Definition: StmtOpenMP.h:870
Represents a prvalue temporary that is written into memory so that a reference can bind to it...
Definition: ExprCXX.h:3951
float __ovld __cnfn distance(float p0, float p1)
Returns the distance between p0 and p1.
SourceLocation getAccessorLoc() const
Definition: Expr.h:4816
Expr * getAlignment()
Returns alignment.
Expr * getNumForLoops() const
Return the number of associated for-loops.
Definition: OpenMPClause.h:937
SourceLocation getRParenLoc() const
getRParenLoc - Return the location of final right parenthesis.
Definition: Expr.h:3640
SourceLocation getSecondScheduleModifierLoc() const
Get the second modifier location.
Definition: OpenMPClause.h:871
unsigned getDeclRefExprAbbrev() const
Definition: ASTWriter.h:667
const Expr * getSubExpr() const
Definition: Expr.h:1475
VarDecl * getConditionVariable() const
Retrieve the variable declared in this "while" statement, if any.
Definition: Stmt.cpp:877
SourceLocation getAtLoc() const
Definition: ExprObjC.h:44
SourceLocation getCoawaitLoc() const
Definition: StmtCXX.h:194
Expr * getIndexExpr(unsigned Idx)
Definition: Expr.h:1989
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:1689
This represents &#39;#pragma omp target exit data&#39; directive.
Definition: StmtOpenMP.h:2396
Stmt * getSubStmt()
Definition: Stmt.h:784
SourceLocation getDependencyLoc() const
Get dependency type location.
This represents &#39;read&#39; clause in the &#39;#pragma omp atomic&#39; directive.
SourceRange getSourceRange() const LLVM_READONLY
Definition: ExprCXX.h:1974
helper_expr_const_range assignment_ops() const
This represents clause &#39;private&#39; in the &#39;#pragma omp ...&#39; directives.
const VarDecl * getNRVOCandidate() const
Retrieve the variable that might be used for the named return value optimization. ...
Definition: Stmt.h:1419
SourceLocation getLParenLoc() const
Definition: Stmt.h:1228
bool hasTemplateKWAndArgsInfo() const
Definition: Expr.h:1088
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:2579
ObjCIsaExpr - Represent X->isa and X.isa when X is an ObjC &#39;id&#39; type.
Definition: ExprObjC.h:1383
This represents &#39;num_threads&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:349
CompoundLiteralExpr - [C99 6.5.2.5].
Definition: Expr.h:2637
SourceRange getSourceRange() const LLVM_READONLY
Definition: ExprCXX.h:657
SourceLocation getOperatorLoc() const
Retrieve the location of the &#39;.&#39; or &#39;->&#39; operator.
Definition: ExprCXX.h:2180
varlist_range varlists()
Definition: OpenMPClause.h:174
SourceLocation getAtLoc() const
Definition: ExprObjC.h:412
unsigned getNumArgs() const
Determine the number of arguments to this type trait.
Definition: ExprCXX.h:2301
This represents &#39;defaultmap&#39; clause in the &#39;#pragma omp ...&#39; directive.
ObjCInterfaceDecl * getClassReceiver() const
Definition: ExprObjC.h:696
Expr * getCombinedUpperBoundVariable() const
Definition: StmtOpenMP.h:864
SourceLocation getColonLoc() const
Definition: Expr.h:3260
bool isArrow() const
Definition: ExprObjC.h:1410
SourceLocation getLeftLoc() const
Definition: ExprObjC.h:1310
SourceLocation getColonLoc() const
Return the location of &#39;:&#39;.
Definition: OpenMPClause.h:270
Expr * getCalcLastIteration() const
Definition: StmtOpenMP.h:746
Implicit construction of a std::initializer_list<T> object from an array temporary within list-initia...
Definition: ExprCXX.h:548
SourceLocation getIfLoc() const
Definition: Stmt.h:952
unsigned getNumPlacementArgs() const
Definition: ExprCXX.h:1880
TypeSourceInfo * getArgumentTypeInfo() const
Definition: Expr.h:2071
This represents implicit clause &#39;flush&#39; for the &#39;#pragma omp flush&#39; directive.
bool requiresADL() const
True if this declaration should be extended by argument-dependent lookup.
Definition: ExprCXX.h:2731
SourceRange getSourceRange() const LLVM_READONLY
Retrieve the source range that covers this offsetof node.
Definition: Expr.h:1907
capture_iterator capture_begin()
Retrieve an iterator pointing to the first capture.
Definition: Stmt.h:2174
A CXXConstructExpr record.
Definition: ASTBitCodes.h:1428
unsigned getNumExpressions() const
Definition: Expr.h:2004
SourceLocation getLocation() const
Retrieve the location of the literal.
Definition: Expr.h:1321
const DeclarationNameInfo & getNameInfo() const
Gets the name info for specified reduction identifier.
raw_arg_iterator raw_arg_begin()
Definition: ExprCXX.h:1960
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will call.
Definition: ExprCXX.h:1373
A C++ throw-expression (C++ [except.throw]).
Definition: ExprCXX.h:928
unsigned getTotalComponentsNum() const
Return the total number of components in all lists derived from the clause.
Expr * getExprOperand() const
Definition: ExprCXX.h:645
Represents an expression – generally a full-expression – that introduces cleanups to be run at the ...
Definition: ExprCXX.h:2920
TypeSourceInfo * getArg(unsigned I) const
Retrieve the Ith argument.
Definition: ExprCXX.h:2304
SourceRange getSourceRange() const LLVM_READONLY
Definition: ExprObjC.h:119
SourceLocation getRParenLoc() const
Definition: Expr.h:4716
VarDecl * getConditionVariable() const
Retrieve the variable declared in this "switch" statement, if any.
Definition: Stmt.cpp:843
SourceLocation getLParenLoc() const
Returns the location of &#39;(&#39;.
void AddString(StringRef Str)
Emit a string.
Definition: ASTWriter.h:918
iterator begin() const
Definition: ExprCXX.h:3910
bool isXLHSInRHSPart() const
Return true if helper update expression has form &#39;OpaqueValueExpr(x) binop OpaqueValueExpr(expr)&#39; and...
Definition: StmtOpenMP.h:2193
void AddSourceRange(SourceRange Range)
Emit a source range.
Definition: ASTWriter.h:825
Expr * getGrainsize() const
Return safe iteration space distance.
This represents &#39;nogroup&#39; clause in the &#39;#pragma omp ...&#39; directive.
A ShuffleVectorExpr record.
Definition: ASTBitCodes.h:1352
SourceLocation getBuiltinLoc() const
Definition: Expr.h:3717
This represents &#39;safelen&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:416
ObjCPropertyDecl * getExplicitProperty() const
Definition: ExprObjC.h:633
SourceLocation getLParenLoc() const
Returns the location of &#39;(&#39;.
Definition: OpenMPClause.h:697
A C++ static_cast expression (C++ [expr.static.cast]).
Definition: ExprCXX.h:269
void AddTypeSourceInfo(TypeSourceInfo *TInfo)
Emits a reference to a declarator info.
Definition: ASTWriter.cpp:5343
Expr * getExprOperand() const
Definition: ExprCXX.h:845
const Stmt * getSubStmt() const
Definition: StmtObjC.h:356
SourceLocation getRParenLoc() const
Retrieve the location of the closing parenthesis.
Definition: ExprCXX.h:246
LabelStmt - Represents a label, which has a substatement.
Definition: Stmt.h:813
Represents a C99 designated initializer expression.
Definition: Expr.h:4107
unsigned varlist_size() const
Definition: OpenMPClause.h:171
SourceLocation getAtLoc() const
Definition: ExprObjC.h:457
An OffsetOfExpr record.
Definition: ASTBitCodes.h:1304
DeclarationName getDeclName() const
getDeclName - Get the actual, stored name of the declaration, which may be a special name...
Definition: Decl.h:258
TypeSourceInfo * getEncodedTypeSourceInfo() const
Definition: ExprObjC.h:378
TypeSourceInfo * getScopeTypeInfo() const
Retrieve the scope type in a qualified pseudo-destructor expression.
Definition: ExprCXX.h:2191
SourceLocation getKeywordLoc() const
Definition: StmtCXX.h:452
SourceLocation getLParenLoc() const
Returns the location of &#39;(&#39;.
Stmt * getBody()
Definition: Stmt.h:1149
An ObjCAtThrowStmt record.
Definition: ASTBitCodes.h:1406
SourceLocation getTildeLoc() const
Retrieve the location of the &#39;~&#39;.
Definition: ExprCXX.h:2198
FieldDecl * getField() const
For a field offsetof node, returns the field.
Definition: Expr.h:1886
SourceLocation getRParenLoc() const
Definition: Expr.h:5195
void AddTypeRef(QualType T)
Emit a reference to a type.
Definition: ASTWriter.h:856
An element in an Objective-C dictionary literal.
Definition: ExprObjC.h:212
A DesignatedInitExpr record.
Definition: ASTBitCodes.h:1330
This represents &#39;#pragma omp parallel&#39; directive.
Definition: StmtOpenMP.h:251
ShuffleVectorExpr - clang-specific builtin-in function __builtin_shufflevector.
Definition: Expr.h:3534
bool cleanupsHaveSideEffects() const
Definition: ExprCXX.h:2962
QualType getComputationResultType() const
Definition: Expr.h:3218
SourceLocation getColonLoc() const
Gets location of &#39;:&#39; symbol in clause.
SourceLocation getRParen() const
Get the location of the right parentheses &#39;)&#39;.
Definition: Expr.h:1693
This represents &#39;simd&#39; clause in the &#39;#pragma omp ...&#39; directive.
bool isFileScope() const
Definition: Expr.h:2667
SourceLocation getAmpAmpLoc() const
Definition: Expr.h:3459
Expr * getEnsureUpperBound() const
Definition: StmtOpenMP.h:802
SourceLocation getEndLoc() const
Definition: Stmt.h:494
FieldDecl - An instance of this class is created by Sema::ActOnField to represent a member of a struc...
Definition: Decl.h:2382
This represents clause &#39;lastprivate&#39; in the &#39;#pragma omp ...&#39; directives.
Expr * getBase()
Retrieve the base object of this member expressions, e.g., the x in x.m.
Definition: ExprCXX.h:3423
Represents a place-holder for an object not to be initialized by anything.
Definition: Expr.h:4401
NonTypeTemplateParmDecl * getParameter() const
Definition: ExprCXX.h:3789
SourceLocation getLParenLoc() const
Returns the location of &#39;(&#39;.
Definition: OpenMPClause.h:558
StringLiteral * getString()
Definition: ExprObjC.h:40
unsigned getArrayExprIndex() const
For an array element node, returns the index into the array of expressions.
Definition: Expr.h:1880
const Expr * getRetValue() const
Definition: Stmt.cpp:905
Expr * getInc() const
Definition: StmtOpenMP.h:762
SourceLocation getLabelLoc() const
Definition: Expr.h:3461
Expr * getChunkSize()
Get chunk size.
SourceLocation getRBraceLoc() const
Definition: Expr.h:4020
SourceLocation getOperatorLoc() const
Definition: Expr.h:2098
GNUNullExpr - Implements the GNU __null extension, which is a name for a null pointer constant that h...
Definition: Expr.h:3745
ArrayRef< Expr * > updates()
Definition: StmtOpenMP.h:929
This represents clause &#39;map&#39; in the &#39;#pragma omp ...&#39; directives.
SourceLocation getRParenLoc() const
Definition: Expr.h:2952
SourceLocation getDefaultKindKwLoc() const
Returns location of clause kind.
Definition: OpenMPClause.h:630
The iterator over UnresolvedSets.
Definition: UnresolvedSet.h:27
This represents clause &#39;to&#39; in the &#39;#pragma omp ...&#39; directives.
This represents &#39;#pragma omp target simd&#39; directive.
Definition: StmtOpenMP.h:3307
Expr * getSourceExpr() const
The source expression of an opaque value expression is the expression which originally generated the ...
Definition: Expr.h:926
Represents a C++ member access expression for which lookup produced a set of overloaded functions...
Definition: ExprCXX.h:3355
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
Definition: Expr.h:4791
const DeclGroupRef getDeclGroup() const
Definition: Stmt.h:488
OpenMPDirectiveKind getDirectiveKind() const
Definition: StmtOpenMP.h:221
Expr * getSafelen() const
Return safe iteration space distance.
Definition: OpenMPClause.h:450
bool isAllEnumCasesCovered() const
Returns true if the SwitchStmt is a switch of an enum value and all cases have been explicitly covere...
Definition: Stmt.h:1053
Expr * getSubExpr()
Definition: Expr.h:2762
This represents &#39;#pragma omp barrier&#39; directive.
Definition: StmtOpenMP.h:1816
SourceLocation getQuestionLoc() const
Definition: Expr.h:3259
ObjCArrayLiteral - used for objective-c array containers; as in: @["Hello", NSApp, [NSNumber numberWithInt:42]];.
Definition: ExprObjC.h:144
Expr * getCounterValue()
Get the loop counter value.
This is a common base class for loop directives (&#39;omp simd&#39;, &#39;omp for&#39;, &#39;omp for simd&#39; etc...
Definition: StmtOpenMP.h:313
Expr * getNumTeams()
Return NumTeams number.
Represents a reference to a non-type template parameter pack that has been substituted with a non-tem...
Definition: ExprCXX.h:3811
This represents &#39;#pragma omp critical&#39; directive.
Definition: StmtOpenMP.h:1411
OpenMPDirectiveKind getCancelRegion() const
Get cancellation region for the current cancellation point.
Definition: StmtOpenMP.h:2695
bool hadArrayRangeDesignator() const
Definition: Expr.h:4041
SourceLocation getCatchLoc() const
Definition: StmtCXX.h:49
Selector getSelector() const
Definition: ExprObjC.h:409
void AddIdentifierRef(const IdentifierInfo *II)
Emit a reference to an identifier.
Definition: ASTWriter.h:839
Represents Objective-C&#39;s @catch statement.
Definition: StmtObjC.h:74
SourceLocation getOpLoc() const
Definition: ExprObjC.h:526
This represents clause &#39;copyprivate&#39; in the &#39;#pragma omp ...&#39; directives.
IndirectGotoStmt - This represents an indirect goto.
Definition: Stmt.h:1284
Describes an C or C++ initializer list.
Definition: Expr.h:3873
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
Definition: ExprCXX.h:590
This represents &#39;#pragma omp distribute parallel for&#39; composite directive.
Definition: StmtOpenMP.h:3032
bool isArrow() const
Definition: ExprObjC.h:513
ArrayRef< Stmt const * > getParamMoves() const
Definition: StmtCXX.h:399
This represents &#39;#pragma omp teams distribute parallel for simd&#39; composite directive.
Definition: StmtOpenMP.h:3511
Expr * getKeyExpr() const
Definition: ExprObjC.h:810
SourceLocation getLocEnd() const
Returns ending location of directive.
Definition: StmtOpenMP.h:170
ASTWriter::RecordDataImpl & getRecordData() const
Extract the underlying record storage.
Definition: ASTWriter.h:764
unsigned getNumExpansions() const
Get the number of parameters in this parameter pack.
Definition: ExprCXX.h:3914
ForStmt - This represents a &#39;for (init;cond;inc)&#39; stmt.
Definition: Stmt.h:1179
ArrayRef< Expr * > finals()
Definition: StmtOpenMP.h:935
void append(InputIterator begin, InputIterator end)
Definition: ASTWriter.h:770
Expr * getIsLastIterVariable() const
Definition: StmtOpenMP.h:770
NestedNameSpecifierLoc getQualifierLoc() const
Gets the nested name specifier.
FunctionDecl * getOperatorDelete() const
Definition: ExprCXX.h:2037
Expr * getBaseExpr() const
Definition: ExprObjC.h:807
TemplateArgument getArgumentPack() const
Retrieve the template argument pack containing the substituted template arguments.
Definition: ExprCXX.cpp:1339
bool isElidable() const
Whether this construction is elidable.
Definition: ExprCXX.h:1246
Expr * getOperand() const
Definition: ExprCXX.h:3537
unsigned getIntegerLiteralAbbrev() const
Definition: ASTWriter.h:669
const Expr * getThrowExpr() const
Definition: StmtObjC.h:325
SourceLocation getDefaultmapKindLoc()
Get kind location.
bool isGlobalNew() const
Definition: ExprCXX.h:1897
SourceLocation getParameterPackLocation() const
Retrieve the location of the parameter pack name.
Definition: ExprCXX.h:3840
uint32_t Offset
Definition: CacheTokens.cpp:43
bool doesUsualArrayDeleteWantSize() const
Answers whether the usual array deallocation function for the allocated type expects the size of the ...
Definition: ExprCXX.h:2033
LabelDecl * getDecl() const
Definition: Stmt.h:830
Expr * getX()
Get &#39;x&#39; part of the associated expression/statement.
Definition: StmtOpenMP.h:2177
APFloatSemantics getRawSemantics() const
Get a raw enumeration value representing the floating-point semantics of this literal (32-bit IEEE...
Definition: Expr.h:1415
SourceLocation getLBracLoc() const
Definition: Stmt.h:653
SourceLocation getLocStart() const
Returns the starting location of the clause.
Definition: OpenMPClause.h:47
A reference to a previously [de]serialized Stmt record.
Definition: ASTBitCodes.h:1242
capture_init_iterator capture_init_begin()
Retrieve the first initialization argument for this lambda expression (which initializes the first ca...
Definition: ExprCXX.h:1660
SourceLocation getRParenLoc() const
Definition: StmtCXX.h:196
ExprValueKind getValueKind() const
getValueKind - The value kind that this expression produces.
Definition: Expr.h:405
path_iterator path_begin()
Definition: Expr.h:2778
SourceLocation getIsaMemberLoc() const
getMemberLoc - Return the location of the "member", in X->F, it is the location of &#39;F&#39;...
Definition: ExprObjC.h:1415
const Stmt * getPreInitStmt() const
Get pre-initialization statement for the clause.
Definition: OpenMPClause.h:96
Stmt * getBody()
Definition: Stmt.h:1214
semantics_iterator semantics_end()
Definition: Expr.h:5044
Expr * getIterationVariable() const
Definition: StmtOpenMP.h:738
A builtin binary operation expression such as "x + y" or "x <= y".
Definition: Expr.h:2986
SourceLocation getColonLoc() const
Gets location of &#39;:&#39; symbol in clause.
bool constructsVBase() const
Determine whether this constructor is actually constructing a base class (rather than a complete obje...
Definition: ExprCXX.h:1377
const Expr * getAssocExpr(unsigned i) const
Definition: Expr.h:4718
Stmt * getInit()
Definition: Stmt.h:1193
Expr * getOutputExpr(unsigned i)
Definition: Stmt.cpp:397
iterator begin()
Definition: DeclGroup.h:102
bool hadMultipleCandidates() const
Returns true if this member expression refers to a method that was resolved from an overloaded set ha...
Definition: Expr.h:2602
unsigned getCharacterLiteralAbbrev() const
Definition: ASTWriter.h:668
SourceLocation getThrowLoc() const
Definition: ExprCXX.h:951
unsigned getResultExprIndex() const
Return the index of the result-bearing expression into the semantics expressions, or PseudoObjectExpr...
Definition: Expr.h:5019
const StringLiteral * getInputConstraintLiteral(unsigned i) const
Definition: Stmt.h:1722
CXXForRangeStmt - This represents C++0x [stmt.ranged]&#39;s ranged for statement, represented as &#39;for (ra...
Definition: StmtCXX.h:128
bool isArrow() const
Definition: Expr.h:2582
Class that handles post-update expression for some clauses, like &#39;lastprivate&#39;, &#39;reduction&#39; etc...
Definition: OpenMPClause.h:107
This represents &#39;#pragma omp cancellation point&#39; directive.
Definition: StmtOpenMP.h:2651
This represents &#39;default&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:578
ObjCStringLiteral, used for Objective-C string literals i.e.
Definition: ExprObjC.h:29
SourceLocation getEqualOrColonLoc() const
Retrieve the location of the &#39;=&#39; that precedes the initializer value itself, if present.
Definition: Expr.h:4332
const CallExpr * getConfig() const
Definition: ExprCXX.h:188
bool isArrow() const
Definition: ExprCXX.h:725
FPOptions getFPFeatures() const
Definition: ExprCXX.h:116
TypoExpr - Internal placeholder for expressions where typo correction still needs to be performed and...
Definition: Expr.h:5233
This represents &#39;final&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:295
This represents &#39;mergeable&#39; clause in the &#39;#pragma omp ...&#39; directive.
Expr * getCond()
Definition: Stmt.h:1212
SourceLocation getContinueLoc() const
Definition: Stmt.h:1336
This represents &#39;#pragma omp teams&#39; directive.
Definition: StmtOpenMP.h:2594
unsigned getInt() const
Used to serialize this.
Definition: LangOptions.h:233
Expr * getInit() const
Definition: StmtOpenMP.h:758
OpenMPDependClauseKind getDependencyKind() const
Get dependency type.
const Expr * getControllingExpr() const
Definition: Expr.h:4743
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
Definition: Expr.h:2710
This represents clause &#39;reduction&#39; in the &#39;#pragma omp ...&#39; directives.
FieldDecl * getField()
Get the field whose initializer will be used.
Definition: ExprCXX.h:1073
Helper class for OffsetOfExpr.
Definition: Expr.h:1822
A marker record that indicates that we are at the end of an expression.
Definition: ASTBitCodes.h:1238
This represents &#39;#pragma omp teams distribute simd&#39; combined directive.
Definition: StmtOpenMP.h:3441
Represents binding an expression to a temporary.
Definition: ExprCXX.h:1134
StringLiteral * getClobberStringLiteral(unsigned i)
Definition: Stmt.h:1755
OpaqueValueExpr * getOpaqueValue() const
getOpaqueValue - Return the opaque value placeholder.
Definition: ExprCXX.h:4174
Expr * Key
The key for the dictionary element.
Definition: ExprObjC.h:214
SourceLocation getBuiltinLoc() const
Definition: Expr.h:3808
CXXTemporary * getTemporary()
Definition: ExprCXX.h:1154
bool isOpenMPWorksharingDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a worksharing directive.
ObjCMethodDecl * getArrayWithObjectsMethod() const
Definition: ExprObjC.h:196
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
Definition: ExprCXX.h:1519
SourceLocation getDefaultmapModifierLoc() const
Get the modifier location.
NestedNameSpecifierLoc getQualifierLoc() const
If the name was qualified, retrieves the nested-name-specifier that precedes the name, with source-location information.
Definition: Expr.h:1060
bool isTypeDependent() const
isTypeDependent - Determines whether this expression is type-dependent (C++ [temp.dep.expr]), which means that its type could change from one template instantiation to the next.
Definition: Expr.h:167
helper_expr_const_range source_exprs() const
SourceLocation getTryLoc() const
Definition: Stmt.h:1972
Represents a C++ member access expression where the actual member referenced could not be resolved be...
Definition: ExprCXX.h:3117
This represents clause &#39;is_device_ptr&#39; in the &#39;#pragma omp ...&#39; directives.
VarDecl * getConditionVariable() const
Retrieve the variable declared in this "for" statement, if any.
Definition: Stmt.cpp:815
SourceLocation getOperatorLoc() const
getOperatorLoc - Return the location of the operator.
Definition: Expr.h:1748
unsigned getUniqueDeclarationsNum() const
Return the number of unique base declarations in this clause.
SourceLocation getNameLoc() const
Definition: ExprCXX.h:3783
TypeSourceInfo * getTypeSourceInfo() const
Definition: ExprCXX.h:1759
NameKind getNameKind() const
getNameKind - Determine what kind of name this is.
SourceLocation getLocation() const
Definition: ExprObjC.h:77
helper_expr_const_range source_exprs() const
A default argument (C++ [dcl.fct.default]).
Definition: ExprCXX.h:982
Stmt * getInit()
Definition: Stmt.h:938
bool isExact() const
Definition: Expr.h:1431
bool isTypeOperand() const
Definition: ExprCXX.h:828
SourceLocation getTokenLocation() const
getTokenLocation - The location of the __null token.
Definition: Expr.h:3759
Iterator for iterating over Stmt * arrays that contain only Expr *.
Definition: Stmt.h:315
helper_expr_const_range privates() const
NamedDecl * getFirstQualifierFoundInScope() const
Retrieve the first part of the nested-name-specifier that was found in the scope of the member access...
Definition: ExprCXX.h:3234
private_copies_range private_copies()
This represents clause &#39;from&#39; in the &#39;#pragma omp ...&#39; directives.
Represents the this expression in C++.
Definition: ExprCXX.h:888
ObjCMethodDecl * getDictWithObjectsMethod() const
Definition: ExprObjC.h:323
arg_iterator arg_end()
Definition: Expr.h:2309
ObjCIvarDecl * getDecl()
Definition: ExprObjC.h:505
SourceLocation getLParenLoc() const
Returns the location of &#39;(&#39;.
Definition: OpenMPClause.h:189
SourceLocation getRParenLoc() const
Retrieve the location of the right parentheses (&#39;)&#39;) that follows the argument list.
Definition: ExprCXX.h:3056
TypeSourceInfo * getAllocatedTypeSourceInfo() const
Definition: ExprCXX.h:1846
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>".
Definition: TemplateBase.h:616
NestedNameSpecifierLoc getQualifierLoc() const
If the member name was qualified, retrieves the nested-name-specifier that precedes the member name...
Definition: Expr.h:2502
TypeSourceInfo * getQueriedTypeSourceInfo() const
Definition: ExprCXX.h:2387
SourceLocation getLocStart() const
Returns starting location of directive kind.
Definition: StmtOpenMP.h:168
bool isArrayForm() const
Definition: ExprCXX.h:2026
unsigned RecordSwitchCaseID(SwitchCase *S)
Record an ID for the given switch-case statement.
const ObjCAtCatchStmt * getCatchStmt(unsigned I) const
Retrieve a @catch statement.
Definition: StmtObjC.h:206
SourceLocation getOperatorLoc() const LLVM_READONLY
Definition: Expr.h:2580
helper_expr_const_range reduction_ops() const
This represents &#39;#pragma omp target parallel for simd&#39; directive.
Definition: StmtOpenMP.h:3239
ArrayRef< Expr * > private_counters()
Definition: StmtOpenMP.h:917
OpenMP 4.0 [2.4, Array Sections].
Definition: ExprOpenMP.h:45
ConditionalOperator - The ?: ternary operator.
Definition: Expr.h:3270
const ValueDecl * getExtendingDecl() const
Get the declaration which triggered the lifetime-extension of this temporary, if any.
Definition: ExprCXX.h:4014
TypeSourceInfo * getTypeSourceInfo() const
Definition: ExprCXX.h:1486
bool isStdInitListInitialization() const
Whether this constructor call was written as list-initialization, but was interpreted as forming a st...
Definition: ExprCXX.h:1262
Represents a C++ pseudo-destructor (C++ [expr.pseudo]).
Definition: ExprCXX.h:2113
ASTTemplateKWAndArgsInfo * getTrailingASTTemplateKWAndArgsInfo()
Return the optional template keyword and arguments info.
Definition: ExprCXX.h:3490
CompoundStmt - This represents a group of statements like { stmt stmt }.
Definition: Stmt.h:575
OpenMPDefaultClauseKind getDefaultKind() const
Returns kind of the clause.
Definition: OpenMPClause.h:627
unsigned NumTemplateArgs
The number of template arguments in TemplateArgs.
Definition: TemplateBase.h:630
SourceLocation getRBracket() const
Definition: ExprObjC.h:795
bool isMicrosoftABI() const
Returns whether this is really a Win64 ABI va_arg expression.
Definition: Expr.h:3802
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:1294
This represents &#39;threads&#39; clause in the &#39;#pragma omp ...&#39; directive.
void AddDeclarationNameLoc(const DeclarationNameLoc &DNLoc, DeclarationName Name)
Definition: ASTWriter.cpp:5549
Expr ** getSubExprs()
Definition: Expr.h:5171
CompoundStmt * getSubStmt() const
Retrieve the compound statement that will be included in the program only if the existence of the sym...
Definition: StmtCXX.h:280
This represents &#39;#pragma omp taskgroup&#39; directive.
Definition: StmtOpenMP.h:1904
helper_expr_const_range destination_exprs() const
Expr * getSimdlen() const
Return safe iteration space distance.
Definition: OpenMPClause.h:505
void AddCXXTemporary(const CXXTemporary *Temp)
Emit a CXXTemporary.
Definition: ASTWriter.cpp:5298
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will (ultimately) call.
Definition: ExprCXX.h:1240
helper_expr_const_range source_exprs() const
QualType getComputationLHSType() const
Definition: Expr.h:3215
This represents clause &#39;aligned&#39; in the &#39;#pragma omp ...&#39; directives.
OpenMPClauseKind getClauseKind() const
Returns kind of OpenMP clause (private, shared, reduction, etc.).
Definition: OpenMPClause.h:57
SourceRange getSourceRange() const LLVM_READONLY
Definition: ExprObjC.h:169
SourceLocation getRParenLoc() const
Definition: ExprObjC.h:413
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand...
Definition: Expr.h:2031
SourceLocation getTryLoc() const
Definition: StmtCXX.h:91
bool isConstexpr() const
Definition: Stmt.h:957
Expr * getCombinedLowerBoundVariable() const
Definition: StmtOpenMP.h:858
helper_expr_const_range private_copies() const
SourceLocation getLocation() const
Definition: ExprCXX.h:1242
SourceLocation getRBracketLoc() const
Definition: ExprCXX.h:778
This represents clause &#39;task_reduction&#39; in the &#39;#pragma omp taskgroup&#39; directives.
SourceLocation getLocation() const
Definition: Expr.h:1049
unsigned getSwitchCaseID(SwitchCase *S)
Retrieve the ID for the given switch-case statement.
InitListExpr * getUpdater() const
Definition: Expr.h:4459
SourceLocation getLParenLoc() const
Returns the location of &#39;(&#39;.
Represents a call to the builtin function __builtin_va_arg.
Definition: Expr.h:3779
bool HasTemplateKWAndArgsInfo
Whether the name includes info for explicit template keyword and arguments.
Definition: ExprCXX.h:2484
helper_expr_const_range destination_exprs() const
OpenMPProcBindClauseKind getProcBindKind() const
Returns kind of the clause.
Definition: OpenMPClause.h:700
SourceLocation getLabelLoc() const
Definition: Stmt.h:1266
SourceLocation getThrowLoc() const LLVM_READONLY
Definition: StmtObjC.h:329
static unsigned getNumSubExprs(AtomicOp Op)
Determine the number of arguments the specified atomic builtin should have.
Definition: Expr.cpp:4001
unsigned getValue() const
Definition: Expr.h:1372
This represents &#39;#pragma omp distribute&#39; directive.
Definition: StmtOpenMP.h:2905
This represents implicit clause &#39;depend&#39; for the &#39;#pragma omp task&#39; directive.
Expr * getSrcExpr() const
getSrcExpr - Return the Expr to be converted.
Definition: Expr.h:4920
SourceLocation getDestroyedTypeLoc() const
Retrieve the starting location of the type being destroyed.
Definition: ExprCXX.h:2222
ObjCMethodDecl * getBoxingMethod() const
Definition: ExprObjC.h:111
const_all_num_lists_range all_num_lists() const
SourceLocation getFinallyLoc() const
Definition: Stmt.h:1933
An expression "T()" which creates a value-initialized rvalue of type T, which is a non-class type...
Definition: ExprCXX.h:1740
SourceLocation getOperatorLoc() const
Retrieve the location of the &#39;->&#39; or &#39;.&#39; operator.
Definition: ExprCXX.h:3443
Expr * getCond() const
Definition: Expr.h:3304
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:1548
llvm::MutableArrayRef< Designator > designators()
Definition: Expr.h:4310
This represents &#39;proc_bind&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:650
This represents &#39;capture&#39; clause in the &#39;#pragma omp atomic&#39; directive.
DeclAccessPair getFoundDecl() const
Retrieves the declaration found by lookup.
Definition: Expr.h:2487
Expr - This represents one expression.
Definition: Expr.h:106
SourceLocation getElseLoc() const
Definition: Stmt.h:954
DeclStmt * getEndStmt()
Definition: StmtCXX.h:158
SourceLocation End
IdentifierInfo * getFieldName() const
For a field or identifier offsetof node, returns the name of the field.
Definition: Expr.cpp:1391
CXXBaseSpecifier * getBase() const
For a base class node, returns the base specifier.
Definition: Expr.h:1896
SourceLocation getMapLoc() const LLVM_READONLY
Fetches location of clause mapping kind.
bool isArrow() const
Determine whether this member expression used the &#39;->&#39; operator; otherwise, it used the &#39;...
Definition: ExprCXX.h:3440
StringRef getClobber(unsigned i) const
Definition: Stmt.h:1850
This represents &#39;simdlen&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:471
Expr * getNumTasks() const
Return safe iteration space distance.
SourceLocation getScheduleKindLoc()
Get kind location.
Definition: OpenMPClause.h:863
bool isImplicitAccess() const
True if this is an implicit access, i.e., one in which the member being accessed was not written in t...
Definition: ExprCXX.cpp:1240
SourceLocation getWhileLoc() const
Definition: Stmt.h:1108
unsigned getPackLength() const
Retrieve the length of the parameter pack.
Definition: ExprCXX.h:3719
Represents a C++ functional cast expression that builds a temporary object.
Definition: ExprCXX.h:1469
const Stmt * getThen() const
Definition: Stmt.h:943
SourceLocation getLParenLoc() const
Returns the location of &#39;(&#39;.
A C++ const_cast expression (C++ [expr.const.cast]).
Definition: ExprCXX.h:387
const TypeSourceInfo * getAssocTypeSourceInfo(unsigned i) const
Definition: Expr.h:4728
SourceLocation getLocation() const
Definition: ExprCXX.h:904
BlockExpr - Adaptor class for mixing a BlockDecl with expressions.
Definition: Expr.h:4852
Field designator where only the field name is known.
Definition: ASTBitCodes.h:1569
VarDecl * getExceptionDecl() const
Definition: StmtCXX.h:50
IdentifierInfo * getDestroyedTypeIdentifier() const
In a dependent pseudo-destructor expression for which we do not have full type information on the des...
Definition: ExprCXX.h:2214
unsigned getNumInits() const
Definition: Expr.h:3903
bool isImplicitAccess() const
True if this is an implicit access, i.e.
Definition: ExprCXX.cpp:1186
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:1098
This represents &#39;#pragma omp target teams distribute parallel for simd&#39; combined directive.
Definition: StmtOpenMP.h:3850
const Expr * getCallee() const
Definition: Expr.h:2249
raw_arg_iterator raw_arg_end()
Definition: ExprCXX.h:1961
bool isArrow() const
Determine whether this pseudo-destructor expression was written using an &#39;->&#39; (otherwise, it used a &#39;.
Definition: ExprCXX.h:2177
Stmt * getBody()
Definition: Stmt.h:1104
ObjCDictionaryLiteral - AST node to represent objective-c dictionary literals; as in:"name" : NSUserN...
Definition: ExprObjC.h:257
const CompoundStmt * getSynchBody() const
Definition: StmtObjC.h:282
Expr * getRHS()
Definition: Stmt.h:739
bool hasQualifier() const
Determine whether this declaration reference was preceded by a C++ nested-name-specifier, e.g., N::foo.
Definition: Expr.h:1056
Represents Objective-C&#39;s @synchronized statement.
Definition: StmtObjC.h:262
ObjCSelectorExpr used for @selector in Objective-C.
Definition: ExprObjC.h:397
A CXXStdInitializerListExpr record.
Definition: ASTBitCodes.h:1446
TypeSourceInfo * getTypeSourceInfo() const
Definition: Expr.h:1968
Represents an expression that computes the length of a parameter pack.
Definition: ExprCXX.h:3642
SourceLocation getRBracketLoc() const
Definition: ExprOpenMP.h:112
CXXTryStmt - A C++ try block, including all handlers.
Definition: StmtCXX.h:65
AsTypeExpr - Clang builtin function __builtin_astype [OpenCL 6.2.4.2] This AST node provides support ...
Definition: Expr.h:4897
OpenMPDistScheduleClauseKind getDistScheduleKind() const
Get kind of the clause.
An ArraySubscriptExpr record.
Definition: ASTBitCodes.h:1308
SourceLocation getAtTryLoc() const
Retrieve the location of the @ in the @try.
Definition: StmtObjC.h:193
OMPClauseWriter(ASTRecordWriter &Record)
bool refersToEnclosingVariableOrCapture() const
Does this DeclRefExpr refer to an enclosing local or a captured variable?
Definition: Expr.h:1165
IdentifierInfo & getAccessor() const
Definition: Expr.h:4813
This represents &#39;#pragma omp target teams distribute simd&#39; combined directive.
Definition: StmtOpenMP.h:3923
helper_expr_const_range rhs_exprs() const
ArrayTypeTrait getTrait() const
Definition: ExprCXX.h:2383
decls_iterator decls_begin() const
Definition: ExprCXX.h:2556
This represents &#39;ordered&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:902
unsigned size() const
Definition: Stmt.h:600
unsigned getNumClauses() const
Get number of clauses.
Definition: StmtOpenMP.h:184
An ArrayInitLoopExpr record.
Definition: ASTBitCodes.h:1336
Expr * getDistInc() const
Definition: StmtOpenMP.h:846
A PseudoObjectExpr record.
Definition: ASTBitCodes.h:1360
SourceRange getAngleBrackets() const LLVM_READONLY
Definition: ExprCXX.h:250
Expr * getNextLowerBound() const
Definition: StmtOpenMP.h:810
Kind getKind() const
Determine what kind of offsetof node this is.
Definition: Expr.h:1876
SourceLocation getLAngleLoc() const
Retrieve the location of the left angle bracket starting the explicit template argument list followin...
Definition: Expr.h:2525
QualType getType() const
Definition: Expr.h:128
SourceLocation getColonLoc() const
Get colon location.
Expr * getPrevEnsureUpperBound() const
Definition: StmtOpenMP.h:852
SourceLocation getKeywordLoc() const
Retrieve the location of the __if_exists or __if_not_exists keyword.
Definition: StmtCXX.h:262
capture_init_range capture_inits()
Definition: Stmt.h:2196
This represents &#39;#pragma omp for&#39; directive.
Definition: StmtOpenMP.h:1037
An ObjCIndirectCopyRestoreExpr record.
Definition: ASTBitCodes.h:1393
Expr * getElement(unsigned Index)
getExpr - Return the Expr at the specified index.
Definition: ExprObjC.h:187
Optional< unsigned > NumExpansions
The number of elements this pack expansion will expand to, if this is a pack expansion and is known...
Definition: ExprObjC.h:224
SourceLocation getSwitchLoc() const
Definition: Stmt.h:1033
LabelDecl * getLabel() const
Definition: Stmt.h:1261
const Stmt * getTryBody() const
Retrieve the @try body.
Definition: StmtObjC.h:197
Represents a folding of a pack over an operator.
Definition: ExprCXX.h:4060
ReturnStmt - This represents a return, optionally of an expression: return; return 4;...
Definition: Stmt.h:1392
This represents &#39;#pragma omp target teams&#39; directive.
Definition: StmtOpenMP.h:3650
SourceLocation getRParenLoc() const
getRParenLoc - Return the location of final right parenthesis.
Definition: Expr.h:4926
An expression that sends a message to the given Objective-C object or class.
Definition: ExprObjC.h:860
void AddDeclRef(const Decl *D)
Emit a reference to a declaration.
Definition: ASTWriter.h:878
This represents a Microsoft inline-assembly statement extension.
Definition: Stmt.h:1770
SourceLocation getDoLoc() const
Definition: Stmt.h:1153
SourceLocation getAtLoc() const
Definition: StmtObjC.h:363
ObjCMethodDecl * getImplicitPropertyGetter() const
Definition: ExprObjC.h:638
A DesignatedInitUpdateExpr record.
Definition: ASTBitCodes.h:1332
SourceLocation getRBracketLoc() const
Definition: Expr.h:2183
void AddStmt(Stmt *S)
Add the given statement or expression to the queue of statements to emit.
Definition: ASTWriter.h:811
SourceLocation getEnd() const
UnaryOperator - This represents the unary-expression&#39;s (except sizeof and alignof), the postinc/postdec operators from postfix-expression, and various extensions.
Definition: Expr.h:1717
Expr * getInputExpr(unsigned i)
Definition: Stmt.cpp:682
Expr * getOutputExpr(unsigned i)
Definition: Stmt.cpp:678
bool isOpenMPTaskLoopDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a taskloop directive.
void AddSelectorRef(Selector S)
Emit a Selector (which is a smart pointer reference).
Definition: ASTWriter.cpp:5275
SourceLocation getMemberLoc() const
getMemberLoc - Return the location of the "member", in X->F, it is the location of &#39;F&#39;...
Definition: Expr.h:2587
ReceiverKind getReceiverKind() const
Determine the kind of receiver that this message is being sent to.
Definition: ExprObjC.h:1136
bool usesGNUSyntax() const
Determines whether this designated initializer used the deprecated GNU syntax for designated initiali...
Definition: Expr.h:4337
AtomicOp getOp() const
Definition: Expr.h:5168
A member reference to an MSPropertyDecl.
Definition: ExprCXX.h:678
Represents a reference to a non-type template parameter that has been substituted with a template arg...
Definition: ExprCXX.h:3756
const OffsetOfNode & getComponent(unsigned Idx) const
Definition: Expr.h:1975
Expr * getDevice()
Return device number.
This represents &#39;#pragma omp cancel&#39; directive.
Definition: StmtOpenMP.h:2709
This represents &#39;collapse&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:526
Expr * getTrueExpr() const
getTrueExpr - Return the subexpression which will be evaluated if the condition evaluates to true; th...
Definition: Expr.h:3395
This represents clause &#39;firstprivate&#39; in the &#39;#pragma omp ...&#39; directives.
SourceLocation getCommaLoc()
Get location of &#39;,&#39;.
ValueDecl * getDecl()
Definition: Expr.h:1041
An ObjCAvailabilityCheckExpr record.
Definition: ASTBitCodes.h:1412
SourceLocation getLocation() const
Definition: Expr.h:1217
SourceLocation getRParenLoc() const
Definition: Expr.h:3811
SourceLocation getForLoc() const
Definition: StmtObjC.h:53
const Expr * getSubExpr() const
Definition: Expr.h:1681
ObjCBridgeCastKind getBridgeKind() const
Determine which kind of bridge is being performed via this cast.
Definition: ExprObjC.h:1546
SourceRange getSourceRange() const LLVM_READONLY
Definition: ExprCXX.h:860
const Expr * getSubExpr() const
Definition: ExprCXX.h:1158
CStyleCastExpr - An explicit cast in C (C99 6.5.4) or a C-style cast in C++ (C++ [expr.cast]), which uses the syntax (Type)expr.
Definition: Expr.h:2923
Expr * getLHS()
An array access can be written A[4] or 4[A] (both are equivalent).
Definition: Expr.h:2154
bool getValue() const
Definition: ExprCXX.h:498
bool hadMultipleCandidates() const
Returns true if this expression refers to a function that was resolved from an overloaded set having ...
Definition: Expr.h:1153
ImaginaryLiteral - We support imaginary integer and floating point literals, like "1...
Definition: Expr.h:1463
This represents &#39;#pragma omp flush&#39; directive.
Definition: StmtOpenMP.h:1977
An ObjCForCollectionStmt record.
Definition: ASTBitCodes.h:1396
This represents &#39;#pragma omp parallel for simd&#39; directive.
Definition: StmtOpenMP.h:1565
ExprObjectKind getObjectKind() const
getObjectKind - The object kind that this expression produces.
Definition: Expr.h:412
DoStmt - This represents a &#39;do/while&#39; stmt.
Definition: Stmt.h:1128
AsmStmt is the base class for GCCAsmStmt and MSAsmStmt.
Definition: Stmt.h:1440
This represents &#39;seq_cst&#39; clause in the &#39;#pragma omp atomic&#39; directive.
SourceLocation getOperatorLoc() const
Retrieve the location of the &#39;->&#39; or &#39;.&#39; operator.
Definition: ExprCXX.h:3210
helper_expr_const_range assignment_ops() const
This represents &#39;untied&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:984
SourceLocation getLParenLoc() const
Retrieve the location of the left parentheses (&#39;(&#39;) that precedes the argument list.
Definition: ExprCXX.h:3051
A MS-style AsmStmt record.
Definition: ASTBitCodes.h:1282
void push_back(uint64_t N)
Minimal vector-like interface.
Definition: ASTWriter.h:768
Expr * getLastIteration() const
Definition: StmtOpenMP.h:742
bool isPostfixUpdate() const
Return true if &#39;v&#39; expression must be updated to original value of &#39;x&#39;, false if &#39;v&#39; must be updated ...
Definition: StmtOpenMP.h:2196
Expr * getArgument()
Definition: ExprCXX.h:2039
This represents &#39;#pragma omp target enter data&#39; directive.
Definition: StmtOpenMP.h:2337
SourceLocation getLParenLoc()
Get location of &#39;(&#39;.
Definition: OpenMPClause.h:860
Expr * getStrideVariable() const
Definition: StmtOpenMP.h:794
SourceLocation getColonLoc() const
Returns the location of &#39;:&#39;.
This represents &#39;num_teams&#39; clause in the &#39;#pragma omp ...&#39; directive.
bool getValue() const
Definition: ExprCXX.h:3543
A C++ dynamic_cast expression (C++ [expr.dynamic.cast]).
Definition: ExprCXX.h:305
OpaqueValueExpr - An expression referring to an opaque object of a fixed type and value class...
Definition: Expr.h:868
Expr * getBase() const
Definition: Expr.h:4456
ConvertVectorExpr - Clang builtin function __builtin_convertvector This AST node provides support for...
Definition: Expr.h:3602
unsigned getNumArgs() const
Return the number of actual arguments in this message, not counting the receiver. ...
Definition: ExprObjC.h:1277
const Stmt * getPreInits() const
Definition: StmtOpenMP.h:766
#define false
Definition: stdbool.h:33
SourceLocation getLParenLoc() const
Definition: Expr.h:2670
A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr...
Definition: ExprCXX.h:2467
A field in a dependent type, known only by its name.
Definition: Expr.h:1831
This captures a statement into a function.
Definition: Stmt.h:2032
Represents a call to an inherited base class constructor from an inheriting constructor.
Definition: ExprCXX.h:1340
ExpressionTrait getTrait() const
Definition: ExprCXX.h:2446
unsigned path_size() const
Definition: Expr.h:2777
Token * getAsmToks()
Definition: Stmt.h:1802
SourceLocation getLParenLoc()
Get location of &#39;(&#39;.
PseudoObjectExpr - An expression which accesses a pseudo-object l-value.
Definition: Expr.h:4970
bool isImplicitProperty() const
Definition: ExprObjC.h:630
bool isInstantiationDependent() const
Whether this expression is instantiation-dependent, meaning that it depends in some way on a template...
Definition: Expr.h:191
helper_expr_const_range taskgroup_descriptors() const
unsigned getTotalComponentListNum() const
Return the number of lists derived from the clause expressions.
bool inheritedFromVBase() const
Determine whether the inherited constructor is inherited from a virtual base of the object we constru...
Definition: ExprCXX.h:1387
SourceLocation getRAngleLoc() const
Retrieve the location of the right angle bracket ending the explicit template argument list following...
Definition: Expr.h:2532
This represents &#39;#pragma omp single&#39; directive.
Definition: StmtOpenMP.h:1309
Encodes a location in the source.
body_range body()
Definition: Stmt.h:605
This represents &#39;hint&#39; clause in the &#39;#pragma omp ...&#39; directive.
StringRef getOutputConstraint(unsigned i) const
Definition: Stmt.h:1812
SourceLocation getOperatorLoc() const
Definition: Expr.h:3024
const Stmt * getCatchBody() const
Definition: StmtObjC.h:90
unsigned getNumHandlers() const
Definition: StmtCXX.h:103
Expr * getSubExpr() const
Definition: Expr.h:1744
NestedNameSpecifierLoc getQualifierLoc() const
Retrieves the nested-name-specifier that qualifies the type name, with source-location information...
Definition: ExprCXX.h:2166
This is a basic class for representing single OpenMP executable directive.
Definition: StmtOpenMP.h:33
SourceLocation getBuiltinLoc() const
getBuiltinLoc - Return the location of the __builtin_astype token.
Definition: Expr.h:4923
bool hasUnresolvedUsing() const
Determine whether the lookup results contain an unresolved using declaration.
Definition: ExprCXX.h:3436
CastKind getCastKind() const
Definition: Expr.h:2758
Expr * getSubExpr(unsigned Idx) const
Definition: Expr.h:4355
private_copies_range private_copies()
const SwitchCase * getSwitchCaseList() const
Definition: Stmt.h:1022
SourceLocation getOperatorLoc() const
Retrieve the location of the cast operator keyword, e.g., static_cast.
Definition: ExprCXX.h:243
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)"...
Definition: ExprCXX.h:1780
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c dictionary literal.
Definition: ExprObjC.h:307
OMPClause * getClause(unsigned i) const
Returns specified clause.
Definition: StmtOpenMP.h:190
Expr * getLHS()
Definition: Stmt.h:738
A call to a literal operator (C++11 [over.literal]) written as a user-defined literal (C++11 [lit...
Definition: ExprCXX.h:424
ArrayRef< const Attr * > getAttrs() const
Definition: Stmt.h:886
This represents &#39;schedule&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:722
SourceLocation getEllipsisLoc() const
Retrieve the location of the ellipsis that describes this pack expansion.
Definition: ExprCXX.h:3606
Expr * getExpr()
Get &#39;expr&#39; part of the associated expression/statement.
Definition: StmtOpenMP.h:2203
Represents a call to a member function that may be written either with member call syntax (e...
Definition: ExprCXX.h:136
SourceLocation getExceptLoc() const
Definition: Stmt.h:1893
SourceRange getSourceRange() const LLVM_READONLY
Definition: ExprObjC.h:328
DeclStmt - Adaptor class for mixing declarations with statements and expressions. ...
Definition: Stmt.h:467
SourceLocation getLParenLoc() const
Returns the location of &#39;(&#39;.
This represents clause &#39;shared&#39; in the &#39;#pragma omp ...&#39; directives.
SourceLocation getProcBindKindKwLoc() const
Returns location of clause kind.
Definition: OpenMPClause.h:703
DeclarationNameInfo getDirectiveName() const
Return name of the directive.
Definition: StmtOpenMP.h:1469
SourceLocation getLBraceLoc() const
Definition: Stmt.h:1794
A CXXFunctionalCastExpr record.
Definition: ASTBitCodes.h:1442
SourceLocation getStrTokenLoc(unsigned TokNum) const
Definition: Expr.h:1619
Expr * getPriority()
Return Priority number.
StmtVisitor - This class implements a simple visitor for Stmt subclasses.
Definition: StmtVisitor.h:180
SourceLocation getColonLoc() const
Definition: ExprOpenMP.h:109
SourceLocation RAngleLoc
The source location of the right angle bracket (&#39;>&#39;).
Definition: TemplateBase.h:621
SourceLocation getRParenLoc() const
Definition: Expr.h:3514
void AddTemplateArgument(const TemplateArgument &Arg)
Emit a template argument.
Definition: ASTWriter.cpp:5746
An ObjCEncodeExpr record.
Definition: ASTBitCodes.h:1375
SourceLocation getRParenLoc() const
Definition: ExprObjC.h:373
SourceLocation getSuperLoc() const
Retrieve the location of the &#39;super&#39; keyword for a class or instance message to &#39;super&#39;, otherwise an invalid source location.
Definition: ExprObjC.h:1196
This represents &#39;#pragma omp taskwait&#39; directive.
Definition: StmtOpenMP.h:1860
SourceLocation getAtLoc() const
Definition: ExprObjC.h:371
OpenMPMapClauseKind getMapType() const LLVM_READONLY
Fetches mapping kind for the clause.
SourceRange getSourceRange() const
Definition: ExprObjC.h:1596
bool isPascal() const
Definition: Expr.h:1605
This is a basic class for representing single OpenMP clause.
Definition: OpenMPClause.h:33
AtomicExpr - Variadic atomic builtins: __atomic_exchange, __atomic_fetch_*, __atomic_load, __atomic_store, and __atomic_compare_exchange_*, for the similarly-named C++11 instructions, and __c11 variants for <stdatomic.h>, and corresponding __opencl_atomic_* for OpenCL 2.0.
Definition: Expr.h:5104
UnaryExprOrTypeTrait getKind() const
Definition: Expr.h:2062
bool isArray() const
Definition: ExprCXX.h:1872
bool isOpenMPLoopBoundSharingDirective(OpenMPDirectiveKind Kind)
Checks if the specified directive kind is one of the composite or combined directives that need loop ...
ObjCProtocolExpr used for protocol expression in Objective-C.
Definition: ExprObjC.h:441
bool isValueDependent() const
isValueDependent - Determines whether this expression is value-dependent (C++ [temp.dep.constexpr]).
Definition: Expr.h:149
SourceLocation getLParenLoc() const
Definition: Expr.h:3512
SourceLocation getGotoLoc() const
Definition: Stmt.h:1264
SourceLocation getAtFinallyLoc() const
Definition: StmtObjC.h:141
AccessSpecifier getAccess() const
StringLiteral * getFunctionName()
Definition: Expr.cpp:469
SourceLocation getNameModifierLoc() const
Return the location of directive name modifier.
Definition: OpenMPClause.h:278
An ObjCIsa Expr record.
Definition: ASTBitCodes.h:1391
const StringLiteral * getOutputConstraintLiteral(unsigned i) const
Definition: Stmt.h:1694
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
Definition: Expr.h:2823
Stmt * getCapturedStmt()
Retrieve the statement being captured.
Definition: Stmt.h:2132
OpenMPMapClauseKind getMapTypeModifier() const LLVM_READONLY
Fetches the map type modifier for the clause.
void AddAttributes(ArrayRef< const Attr *> Attrs)
Emit a list of attributes.
Definition: ASTWriter.cpp:4376
SourceLocation getAtCatchLoc() const
Definition: StmtObjC.h:102
CharacterKind getKind() const
Definition: Expr.h:1365
This represents &#39;#pragma omp target&#39; directive.
Definition: StmtOpenMP.h:2221
Expr * getInputExpr(unsigned i)
Definition: Stmt.cpp:408
void AddSourceLocation(SourceLocation Loc)
Emit a source location.
Definition: ASTWriter.h:820
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:1759
Expr * getNumForLoops() const
Return the number of associated for-loops.
Definition: OpenMPClause.h:561
Expr * getV()
Get &#39;v&#39; part of the associated expression/statement.
Definition: StmtOpenMP.h:2198
IdentType getIdentType() const
Definition: Expr.h:1215
SourceLocation getEndLoc() const
Definition: Stmt.h:1796
Expr * getSubExpr()
Definition: ExprObjC.h:108
An expression trait intrinsic.
Definition: ExprCXX.h:2412
const ObjCMethodDecl * getMethodDecl() const
Definition: ExprObjC.h:1251
An AtomicExpr record.
Definition: ASTBitCodes.h:1362
This represents &#39;#pragma omp ordered&#39; directive.
Definition: StmtOpenMP.h:2032
const_all_lists_sizes_range all_lists_sizes() const
StmtExpr - This is the GNU Statement Expression extension: ({int X=4; X;}).
Definition: Expr.h:3489
void AddAPFloat(const llvm::APFloat &Value)
Emit a floating-point value.
Definition: ASTWriter.cpp:5229
This represents &#39;#pragma omp target update&#39; directive.
Definition: StmtOpenMP.h:2973
ObjCBoxedExpr - used for generalized expression boxing.
Definition: ExprObjC.h:94
bool isArgumentType() const
Definition: Expr.h:2067
SourceLocation getKeywordLoc() const
Definition: Stmt.h:694
Expr * getArrayFiller()
If this initializer list initializes an array with more elements than there are initializers in the l...
Definition: Expr.h:3967
SourceLocation getStarLoc() const
Definition: Stmt.h:1301
SourceLocation getLParenLoc() const
Returns the location of &#39;(&#39;.
Definition: OpenMPClause.h:391
bool passAlignment() const
Indicates whether the required alignment should be implicitly passed to the allocation function...
Definition: ExprCXX.h:1924
helper_expr_const_range lhs_exprs() const
FunctionDecl * getOperatorDelete() const
Definition: ExprCXX.h:1869
Representation of a Microsoft __if_exists or __if_not_exists statement with a dependent name...
Definition: StmtCXX.h:240
unsigned getExprImplicitCastAbbrev() const
Definition: ASTWriter.h:670
SourceLocation getExprLoc() const LLVM_READONLY
getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic exp...
Definition: Expr.cpp:216
void AddDeclarationNameInfo(const DeclarationNameInfo &NameInfo)
Definition: ASTWriter.cpp:5580
void VisitStmt(Stmt *S)
A qualified reference to a name whose declaration cannot yet be resolved.
Definition: ExprCXX.h:2775
Expr * Value
The value of the dictionary element.
Definition: ExprObjC.h:217
const Expr * getInitializer() const
Definition: Expr.h:2663
Expr * getLHS() const
Definition: Expr.h:3030
void AddTemplateKWAndArgsInfo(const ASTTemplateKWAndArgsInfo &ArgInfo, const TemplateArgumentLoc *Args)
CompoundAssignOperator - For compound assignments (e.g.
Definition: Expr.h:3192
SourceLocation getLocation() const LLVM_READONLY
Definition: ExprCXX.h:1389
A POD class for pairing a NamedDecl* with an access specifier.
SourceLocation getLocEnd() const
Returns the ending location of the clause.
Definition: OpenMPClause.h:49
Represents a C11 generic selection.
Definition: Expr.h:4685
ArrayRef< TemplateArgument > getPartialArguments() const
Get.
Definition: ExprCXX.h:3735
void VisitOMPClauseWithPreInit(OMPClauseWithPreInit *C)
const Expr * getBase() const
Definition: Expr.h:4809
Expr * getInstanceReceiver()
Returns the object expression (receiver) for an instance message, or null for a message that is not a...
Definition: ExprObjC.h:1155
AddrLabelExpr - The GNU address of label extension, representing &&label.
Definition: Expr.h:3445
An Objective-C "bridged" cast expression, which casts between Objective-C pointers and C pointers...
Definition: ExprObjC.h:1519
Represents a reference to a function parameter pack that has been substituted but not yet expanded...
Definition: ExprCXX.h:3873
OpaqueValueExpr * getOpaqueValue() const
getOpaqueValue - Return the opaque value placeholder.
Definition: Expr.h:3386
void VisitOMPClauseWithPostUpdate(OMPClauseWithPostUpdate *C)
unsigned getManglingNumber() const
Definition: ExprCXX.h:4021
SourceLocation getMemberLoc() const
Definition: ExprCXX.h:726
TypeSourceInfo * getDestroyedTypeInfo() const
Retrieve the source location information for the type being destroyed.
Definition: ExprCXX.h:2207
arg_iterator arg_end()
Definition: ExprObjC.h:1366
VarDecl * getConditionVariable() const
Retrieve the variable declared in this "if" statement, if any.
Definition: Stmt.cpp:780
Expr * getFalseExpr() const
getFalseExpr - Return the subexpression which will be evaluated if the condnition evaluates to false;...
Definition: Expr.h:3402
NullStmt - This is the null statement ";": C99 6.8.3p3.
Definition: Stmt.h:535
bool isTypeOperand() const
Definition: ExprCXX.h:628
StringRef getInputConstraint(unsigned i) const
Definition: Stmt.h:1825
SourceLocation getLocation() const
Definition: ExprCXX.h:504
unsigned getNumAssocs() const
Definition: Expr.h:4712
void writeClause(OMPClause *C)
Dataflow Directional Tag Classes.
Expr * getPrevUpperBoundVariable() const
Definition: StmtOpenMP.h:840
bool isResultDependent() const
Whether this generic selection is result-dependent.
Definition: Expr.h:4749
SourceLocation getColonLoc() const
Get colon location.
This represents &#39;device&#39; clause in the &#39;#pragma omp ...&#39; directive.
bool isVolatile() const
Definition: Stmt.h:1475
An InitListExpr record.
Definition: ASTBitCodes.h:1328
OpenMPDefaultmapClauseKind getDefaultmapKind() const
Get kind of the clause.
const TemplateArgumentLoc * getTemplateArgs() const
Retrieve the template arguments provided as part of this template-id.
Definition: Expr.h:2554
[C99 6.4.2.2] - A predefined identifier such as func.
Definition: Expr.h:1188
SourceLocation getLocation() const
Definition: ExprObjC.h:689
A CXXBoolLiteralExpr record.
Definition: ASTBitCodes.h:1448
Represents a delete expression for memory deallocation and destructor calls, e.g. ...
Definition: ExprCXX.h:1992
IdentifierInfo * getOutputIdentifier(unsigned i) const
Definition: Stmt.h:1681
bool isSimple() const
Definition: Stmt.h:1472
OverloadedOperatorKind getOperator() const
Returns the kind of overloaded operator that this expression refers to.
Definition: ExprCXX.h:75
helper_expr_const_range privates() const
NonTypeTemplateParmDecl * getParameterPack() const
Retrieve the non-type template parameter pack being substituted.
Definition: ExprCXX.h:3837
MSPropertyDecl * getPropertyDecl() const
Definition: ExprCXX.h:724
const Stmt * getFinallyBody() const
Definition: StmtObjC.h:132
An ExtVectorElementExpr record.
Definition: ASTBitCodes.h:1326
bool isImplicit() const
Definition: ExprCXX.h:910
Expr * getCond() const
Definition: StmtOpenMP.h:754
This represents &#39;#pragma omp section&#39; directive.
Definition: StmtOpenMP.h:1247
This represents &#39;#pragma omp teams distribute&#39; directive.
Definition: StmtOpenMP.h:3373
QualType getSuperType() const
Retrieve the type referred to by &#39;super&#39;.
Definition: ExprObjC.h:1231
const_all_components_range all_components() const
SourceLocation EllipsisLoc
The location of the ellipsis, if this is a pack expansion.
Definition: ExprObjC.h:220
TypeSourceInfo * getTypeSourceInfo() const
Retrieve the type source information for the type being constructed.
Definition: ExprCXX.h:3047
A runtime availability query.
Definition: ExprObjC.h:1579
A C++ reinterpret_cast expression (C++ [expr.reinterpret.cast]).
Definition: ExprCXX.h:347
This represents &#39;#pragma omp simd&#39; directive.
Definition: StmtOpenMP.h:972
Stmt * getHandler() const
Definition: Stmt.h:1981
Represents a &#39;co_yield&#39; expression.
Definition: ExprCXX.h:4281
SourceLocation getLBraceLoc() const
Definition: Expr.h:4018
SourceLocation getSemiLoc() const
Definition: Stmt.h:553
An ObjCAutoreleasePoolStmt record.
Definition: ASTBitCodes.h:1408
Expr * getOperand() const
Retrieve the operand of the &#39;co_return&#39; statement.
Definition: StmtCXX.h:456
const Expr * getReductionRef() const
Returns reference to the task_reduction return variable.
Definition: StmtOpenMP.h:1955
SourceLocation getLParenLoc()
Get location of &#39;(&#39;.
Represents a C++11 pack expansion that produces a sequence of expressions.
Definition: ExprCXX.h:3570
bool isListInitialization() const
Whether this constructor call was written as list-initialization.
Definition: ExprCXX.h:1255
bool isImplicit() const
Definition: ExprCXX.h:4227
A CXXDynamicCastExpr record.
Definition: ASTBitCodes.h:1436
This represents clause &#39;linear&#39; in the &#39;#pragma omp ...&#39; directives.
const Expr * getSynchExpr() const
Definition: StmtObjC.h:290
Expr * getUpdateExpr()
Get helper expression of the form &#39;OpaqueValueExpr(x) binop OpaqueValueExpr(expr)&#39; or &#39;OpaqueValueExp...
Definition: StmtOpenMP.h:2184
SourceLocation getParameterPackLocation() const
Get the location of the parameter pack.
Definition: ExprCXX.h:3905
semantics_iterator semantics_begin()
Definition: Expr.h:5038
bool isIfExists() const
Determine whether this is an __if_exists statement.
Definition: StmtCXX.h:265
NestedNameSpecifierLoc getQualifierLoc() const
Definition: ExprCXX.h:727
ExplicitCastExpr - An explicit cast written in the source code.
Definition: Expr.h:2889
OpenMPDefaultmapClauseModifier getDefaultmapModifier() const
Get the modifier of the clause.
This represents &#39;#pragma omp atomic&#39; directive.
Definition: StmtOpenMP.h:2087
child_range children()
Definition: ExprCXX.h:4193
Expr * getCombinedInit() const
Definition: StmtOpenMP.h:876
SourceLocation getLParenLoc() const
Returns the location of &#39;(&#39;.
SourceLocation getLParenLoc() const
Definition: ExprObjC.h:1543
void AddVersionTuple(const VersionTuple &Version)
Emit a version tuple.
Definition: ASTWriter.h:928
An ObjCAtFinallyStmt record.
Definition: ASTBitCodes.h:1400
SourceLocation getRParenLoc() const
Definition: ExprObjC.h:458
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
Definition: ExprCXX.h:635
const Stmt * getBody() const
Definition: Stmt.h:1021
llvm::APInt getValue() const
Definition: Expr.h:1279
Represents a __leave statement.
Definition: Stmt.h:1998
CXXRecordDecl * getNamingClass() const
Gets the &#39;naming class&#39; (in the sense of C++0x [class.access.base]p5) of the lookup.
Definition: ExprCXX.h:2739
unsigned getCollapsedNumber() const
Get number of collapsed loops.
Definition: StmtOpenMP.h:736
Expr * getCombinedNextLowerBound() const
Definition: StmtOpenMP.h:888
ArrayRef< Expr * > counters()
Definition: StmtOpenMP.h:911
LabelDecl * getLabel() const
Definition: Expr.h:3467
path_iterator path_end()
Definition: Expr.h:2779
helper_expr_const_range privates() const
iterator end() const
Definition: ExprCXX.h:3911
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
Definition: ExprCXX.h:3515
SwitchStmt - This represents a &#39;switch&#39; stmt.
Definition: Stmt.h:983
unsigned getByteLength() const
Definition: Expr.h:1589
SourceLocation getColonColonLoc() const
Retrieve the location of the &#39;::&#39; in a qualified pseudo-destructor expression.
Definition: ExprCXX.h:2195
Expr * getCombinedNextUpperBound() const
Definition: StmtOpenMP.h:894
arg_iterator arg_begin()
Definition: ExprObjC.h:1365
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source location information.
Definition: ExprCXX.h:2825
SourceLocation getRParenLoc() const
Definition: StmtObjC.h:55
Represents the body of a coroutine.
Definition: StmtCXX.h:299
TemplateArgumentLoc * getTrailingTemplateArgumentLoc()
Return the optional template arguments.
Definition: ExprCXX.h:3502
Location wrapper for a TemplateArgument.
Definition: TemplateBase.h:428
Expr * getBase() const
Definition: ExprObjC.h:1408
bool isOpenMPDistributeDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a distribute directive.
SourceLocation getBuiltinLoc() const
Definition: Expr.h:3552
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
Definition: Expr.h:2121
SourceLocation getLParenLoc() const
Returns the location of &#39;(&#39;.
Definition: OpenMPClause.h:624
OpenMPDirectiveKind getNameModifier() const
Return directive name modifier associated with the clause.
Definition: OpenMPClause.h:275
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c array literal.
Definition: ExprObjC.h:184
SourceLocation getLeaveLoc() const
Definition: Stmt.h:2007
Represents Objective-C&#39;s collection statement.
Definition: StmtObjC.h:24
An ObjCAtSynchronizedStmt record.
Definition: ASTBitCodes.h:1404
arg_iterator arg_begin()
Definition: Expr.h:2308
ArrayRef< Expr * > inits()
Definition: StmtOpenMP.h:923
unsigned getNumObjects() const
Definition: ExprCXX.h:2953
ObjCEncodeExpr, used for @encode in Objective-C.
Definition: ExprObjC.h:355
SourceLocation getLocation() const
Retrieve the location of this expression.
Definition: Expr.h:897
helper_expr_const_range destination_exprs() const
SourceLocation getLocation() const
Definition: ExprObjC.h:518
An implicit indirection through a C++ base class, when the field found is in a base class...
Definition: Expr.h:1834
Expr * getCond() const
getCond - Return the condition expression; this is defined in terms of the opaque value...
Definition: Expr.h:3390
Represents a call to a CUDA kernel function.
Definition: ExprCXX.h:175
SourceLocation getRParenLoc() const
Definition: Expr.h:3720
Represents a &#39;co_await&#39; expression.
Definition: ExprCXX.h:4204
SourceLocation getLParenLoc() const
Returns the location of &#39;(&#39;.
Definition: OpenMPClause.h:328
TypeTraitExprBitfields TypeTraitExprBits
Definition: Stmt.h:279
bool isDelegateInitCall() const
isDelegateInitCall - Answers whether this message send has been tagged as a "delegate init call"...
Definition: ExprObjC.h:1307
Stmt * getInit()
Definition: Stmt.h:1017
A CXXMemberCallExpr record.
Definition: ASTBitCodes.h:1426
bool doesUsualArrayDeleteWantSize() const
Answers whether the usual array deallocation function for the allocated type expects the size of the ...
Definition: ExprCXX.h:1931
SourceLocation getColonLoc() const
Gets location of &#39;:&#39; symbol in clause.
SourceRange getDirectInitRange() const
Definition: ExprCXX.h:1972
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the member name, with source location information...
Definition: ExprCXX.h:3220
Expr * getNumIterations() const
Definition: StmtOpenMP.h:826
Opcode getOpcode() const
Definition: Expr.h:1741
Expr * getArg(unsigned Arg)
Return the specified argument.
Definition: ExprCXX.h:1303
StringRef getBytes() const
Allow access to clients that need the byte representation, such as ASTWriterStmt::VisitStringLiteral(...
Definition: Expr.h:1565
Represents Objective-C&#39;s @finally statement.
Definition: StmtObjC.h:120
SourceLocation getDefaultLoc() const
Definition: Expr.h:4715
StringRef getAsmString() const
Definition: Stmt.h:1805
SourceLocation getDistScheduleKindLoc()
Get kind location.
bool hasAssociatedStmt() const
Returns true if directive has associated statement.
Definition: StmtOpenMP.h:193
Expr * getPrevLowerBoundVariable() const
Definition: StmtOpenMP.h:834
uint64_t EmitStmt(unsigned Code, unsigned Abbrev=0)
Emit the record to the stream, preceded by its substatements.
Definition: ASTWriter.h:790
const Expr * getBase() const
Definition: ExprObjC.h:509
bool isArrow() const
Determine whether this member expression used the &#39;->&#39; operator; otherwise, it used the &#39;...
Definition: ExprCXX.h:3207
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
Definition: Expr.h:2563
const DeclarationNameInfo & getNameInfo() const
Gets the name info for specified reduction identifier.
SourceLocation getColonLoc() const
Definition: Stmt.h:696
Represents a base class of a C++ class.
Definition: DeclCXX.h:157
This represents &#39;write&#39; clause in the &#39;#pragma omp atomic&#39; directive.
unsigned getNumClobbers() const
Definition: Stmt.h:1520
bool isImplicit() const
Definition: StmtCXX.h:465
SourceLocation getRParenLoc() const
Definition: Stmt.h:1230
ObjCIvarRefExpr - A reference to an ObjC instance variable.
Definition: ExprObjC.h:479
child_range children()
Definition: ExprCXX.h:4273
bool isPartiallySubstituted() const
Determine whether this represents a partially-substituted sizeof...
Definition: ExprCXX.h:3730
Represents an expression that might suspend coroutine execution; either a co_await or co_yield expres...
Definition: ExprCXX.h:4128
DeclStmt * getRangeStmt()
Definition: StmtCXX.h:154
A ConvertVectorExpr record.
Definition: ASTBitCodes.h:1354
unsigned arg_size() const
Retrieve the number of arguments.
Definition: ExprCXX.h:3065
SourceLocation getLParenLoc() const
Returns the location of &#39;(&#39;.
Expr * getRHS() const
Definition: Expr.h:3714
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
Definition: ExprCXX.h:3005
SourceLocation getAsmLoc() const
Definition: Stmt.h:1469
GotoStmt - This represents a direct goto.
Definition: Stmt.h:1250
A use of a default initializer in a constructor or in aggregate initialization.
Definition: ExprCXX.h:1052
Expr * getTarget()
Definition: Stmt.h:1303
Expr * getSrcExpr() const
getSrcExpr - Return the Expr to be converted.
Definition: Expr.h:3626
const SwitchCase * getNextSwitchCase() const
Definition: Stmt.h:688
SourceLocation getLParenLoc() const
Returns the location of &#39;(&#39;.
Definition: OpenMPClause.h:934
CapturedDecl * getCapturedDecl()
Retrieve the outlined function declaration.
Definition: Stmt.cpp:1090
StringRef getUuidStr() const
Definition: ExprCXX.h:856
bool isFreeIvar() const
Definition: ExprObjC.h:514
Expr * getCond()
Definition: Stmt.h:1146
QualType getSuperReceiverType() const
Definition: ExprObjC.h:692
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate.h) and friends (in DeclFriend.h).
const DeclarationNameInfo & getNameInfo() const
Gets the name info for specified reduction identifier.
ASTStmtWriter(ASTWriter &Writer, ASTWriter::RecordData &Record)
OpenMPScheduleClauseModifier getSecondScheduleModifier() const
Get the second modifier of the clause.
Definition: OpenMPClause.h:855
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
Definition: Expr.h:2387
GNU array range designator.
Definition: ASTBitCodes.h:1576
SourceLocation getWhileLoc() const
Definition: Stmt.h:1155
An ArrayInitIndexExpr record.
Definition: ASTBitCodes.h:1338
A GCC-style AsmStmt record.
Definition: ASTBitCodes.h:1280
This represents &#39;#pragma omp target parallel&#39; directive.
Definition: StmtOpenMP.h:2454
This represents &#39;nowait&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:953
ContinueStmt - This represents a continue.
Definition: Stmt.h:1328
OpenMPScheduleClauseModifier getFirstScheduleModifier() const
Get the first modifier of the clause.
Definition: OpenMPClause.h:850
Expr * getPromiseCall() const
Retrieve the promise call that results from this &#39;co_return&#39; statement.
Definition: StmtCXX.h:461
Represents a loop initializing the elements of an array.
Definition: Expr.h:4491
This represents &#39;num_tasks&#39; clause in the &#39;#pragma omp ...&#39; directive.
SourceLocation getColonLoc() const
Definition: StmtCXX.h:195
ChooseExpr - GNU builtin-in function __builtin_choose_expr.
Definition: Expr.h:3665
Expr * getFilterExpr() const
Definition: Stmt.h:1896
SourceLocation getAttrLoc() const
Definition: Stmt.h:885