clang  8.0.0
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 /// 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->NullStmtBits.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.push_back(S->caseStmtIsGNURange());
100  Record.AddStmt(S->getLHS());
101  Record.AddStmt(S->getSubStmt());
102  if (S->caseStmtIsGNURange()) {
103  Record.AddStmt(S->getRHS());
104  Record.AddSourceLocation(S->getEllipsisLoc());
105  }
107 }
108 
109 void ASTStmtWriter::VisitDefaultStmt(DefaultStmt *S) {
110  VisitSwitchCase(S);
111  Record.AddStmt(S->getSubStmt());
113 }
114 
115 void ASTStmtWriter::VisitLabelStmt(LabelStmt *S) {
116  VisitStmt(S);
117  Record.AddDeclRef(S->getDecl());
118  Record.AddStmt(S->getSubStmt());
119  Record.AddSourceLocation(S->getIdentLoc());
121 }
122 
123 void ASTStmtWriter::VisitAttributedStmt(AttributedStmt *S) {
124  VisitStmt(S);
125  Record.push_back(S->getAttrs().size());
126  Record.AddAttributes(S->getAttrs());
127  Record.AddStmt(S->getSubStmt());
128  Record.AddSourceLocation(S->getAttrLoc());
130 }
131 
132 void ASTStmtWriter::VisitIfStmt(IfStmt *S) {
133  VisitStmt(S);
134 
135  bool HasElse = S->getElse() != nullptr;
136  bool HasVar = S->getConditionVariableDeclStmt() != nullptr;
137  bool HasInit = S->getInit() != nullptr;
138 
139  Record.push_back(S->isConstexpr());
140  Record.push_back(HasElse);
141  Record.push_back(HasVar);
142  Record.push_back(HasInit);
143 
144  Record.AddStmt(S->getCond());
145  Record.AddStmt(S->getThen());
146  if (HasElse)
147  Record.AddStmt(S->getElse());
148  if (HasVar)
149  Record.AddDeclRef(S->getConditionVariable());
150  if (HasInit)
151  Record.AddStmt(S->getInit());
152 
153  Record.AddSourceLocation(S->getIfLoc());
154  if (HasElse)
155  Record.AddSourceLocation(S->getElseLoc());
156 
157  Code = serialization::STMT_IF;
158 }
159 
160 void ASTStmtWriter::VisitSwitchStmt(SwitchStmt *S) {
161  VisitStmt(S);
162 
163  bool HasInit = S->getInit() != nullptr;
164  bool HasVar = S->getConditionVariableDeclStmt() != nullptr;
165  Record.push_back(HasInit);
166  Record.push_back(HasVar);
167  Record.push_back(S->isAllEnumCasesCovered());
168 
169  Record.AddStmt(S->getCond());
170  Record.AddStmt(S->getBody());
171  if (HasInit)
172  Record.AddStmt(S->getInit());
173  if (HasVar)
174  Record.AddDeclRef(S->getConditionVariable());
175 
176  Record.AddSourceLocation(S->getSwitchLoc());
177 
178  for (SwitchCase *SC = S->getSwitchCaseList(); SC;
179  SC = SC->getNextSwitchCase())
180  Record.push_back(Writer.RecordSwitchCaseID(SC));
182 }
183 
184 void ASTStmtWriter::VisitWhileStmt(WhileStmt *S) {
185  VisitStmt(S);
186 
187  bool HasVar = S->getConditionVariableDeclStmt() != nullptr;
188  Record.push_back(HasVar);
189 
190  Record.AddStmt(S->getCond());
191  Record.AddStmt(S->getBody());
192  if (HasVar)
193  Record.AddDeclRef(S->getConditionVariable());
194 
195  Record.AddSourceLocation(S->getWhileLoc());
197 }
198 
199 void ASTStmtWriter::VisitDoStmt(DoStmt *S) {
200  VisitStmt(S);
201  Record.AddStmt(S->getCond());
202  Record.AddStmt(S->getBody());
203  Record.AddSourceLocation(S->getDoLoc());
204  Record.AddSourceLocation(S->getWhileLoc());
205  Record.AddSourceLocation(S->getRParenLoc());
206  Code = serialization::STMT_DO;
207 }
208 
209 void ASTStmtWriter::VisitForStmt(ForStmt *S) {
210  VisitStmt(S);
211  Record.AddStmt(S->getInit());
212  Record.AddStmt(S->getCond());
213  Record.AddDeclRef(S->getConditionVariable());
214  Record.AddStmt(S->getInc());
215  Record.AddStmt(S->getBody());
216  Record.AddSourceLocation(S->getForLoc());
217  Record.AddSourceLocation(S->getLParenLoc());
218  Record.AddSourceLocation(S->getRParenLoc());
220 }
221 
222 void ASTStmtWriter::VisitGotoStmt(GotoStmt *S) {
223  VisitStmt(S);
224  Record.AddDeclRef(S->getLabel());
225  Record.AddSourceLocation(S->getGotoLoc());
226  Record.AddSourceLocation(S->getLabelLoc());
228 }
229 
230 void ASTStmtWriter::VisitIndirectGotoStmt(IndirectGotoStmt *S) {
231  VisitStmt(S);
232  Record.AddSourceLocation(S->getGotoLoc());
233  Record.AddSourceLocation(S->getStarLoc());
234  Record.AddStmt(S->getTarget());
236 }
237 
238 void ASTStmtWriter::VisitContinueStmt(ContinueStmt *S) {
239  VisitStmt(S);
240  Record.AddSourceLocation(S->getContinueLoc());
242 }
243 
244 void ASTStmtWriter::VisitBreakStmt(BreakStmt *S) {
245  VisitStmt(S);
246  Record.AddSourceLocation(S->getBreakLoc());
248 }
249 
250 void ASTStmtWriter::VisitReturnStmt(ReturnStmt *S) {
251  VisitStmt(S);
252 
253  bool HasNRVOCandidate = S->getNRVOCandidate() != nullptr;
254  Record.push_back(HasNRVOCandidate);
255 
256  Record.AddStmt(S->getRetValue());
257  if (HasNRVOCandidate)
258  Record.AddDeclRef(S->getNRVOCandidate());
259 
260  Record.AddSourceLocation(S->getReturnLoc());
262 }
263 
264 void ASTStmtWriter::VisitDeclStmt(DeclStmt *S) {
265  VisitStmt(S);
266  Record.AddSourceLocation(S->getBeginLoc());
267  Record.AddSourceLocation(S->getEndLoc());
268  DeclGroupRef DG = S->getDeclGroup();
269  for (DeclGroupRef::iterator D = DG.begin(), DEnd = DG.end(); D != DEnd; ++D)
270  Record.AddDeclRef(*D);
272 }
273 
274 void ASTStmtWriter::VisitAsmStmt(AsmStmt *S) {
275  VisitStmt(S);
276  Record.push_back(S->getNumOutputs());
277  Record.push_back(S->getNumInputs());
278  Record.push_back(S->getNumClobbers());
279  Record.AddSourceLocation(S->getAsmLoc());
280  Record.push_back(S->isVolatile());
281  Record.push_back(S->isSimple());
282 }
283 
284 void ASTStmtWriter::VisitGCCAsmStmt(GCCAsmStmt *S) {
285  VisitAsmStmt(S);
286  Record.AddSourceLocation(S->getRParenLoc());
287  Record.AddStmt(S->getAsmString());
288 
289  // Outputs
290  for (unsigned I = 0, N = S->getNumOutputs(); I != N; ++I) {
292  Record.AddStmt(S->getOutputConstraintLiteral(I));
293  Record.AddStmt(S->getOutputExpr(I));
294  }
295 
296  // Inputs
297  for (unsigned I = 0, N = S->getNumInputs(); I != N; ++I) {
298  Record.AddIdentifierRef(S->getInputIdentifier(I));
299  Record.AddStmt(S->getInputConstraintLiteral(I));
300  Record.AddStmt(S->getInputExpr(I));
301  }
302 
303  // Clobbers
304  for (unsigned I = 0, N = S->getNumClobbers(); I != N; ++I)
305  Record.AddStmt(S->getClobberStringLiteral(I));
306 
308 }
309 
310 void ASTStmtWriter::VisitMSAsmStmt(MSAsmStmt *S) {
311  VisitAsmStmt(S);
312  Record.AddSourceLocation(S->getLBraceLoc());
313  Record.AddSourceLocation(S->getEndLoc());
314  Record.push_back(S->getNumAsmToks());
315  Record.AddString(S->getAsmString());
316 
317  // Tokens
318  for (unsigned I = 0, N = S->getNumAsmToks(); I != N; ++I) {
319  // FIXME: Move this to ASTRecordWriter?
320  Writer.AddToken(S->getAsmToks()[I], Record.getRecordData());
321  }
322 
323  // Clobbers
324  for (unsigned I = 0, N = S->getNumClobbers(); I != N; ++I) {
325  Record.AddString(S->getClobber(I));
326  }
327 
328  // Outputs
329  for (unsigned I = 0, N = S->getNumOutputs(); I != N; ++I) {
330  Record.AddStmt(S->getOutputExpr(I));
331  Record.AddString(S->getOutputConstraint(I));
332  }
333 
334  // Inputs
335  for (unsigned I = 0, N = S->getNumInputs(); I != N; ++I) {
336  Record.AddStmt(S->getInputExpr(I));
337  Record.AddString(S->getInputConstraint(I));
338  }
339 
341 }
342 
343 void ASTStmtWriter::VisitCoroutineBodyStmt(CoroutineBodyStmt *CoroStmt) {
344  VisitStmt(CoroStmt);
345  Record.push_back(CoroStmt->getParamMoves().size());
346  for (Stmt *S : CoroStmt->children())
347  Record.AddStmt(S);
349 }
350 
351 void ASTStmtWriter::VisitCoreturnStmt(CoreturnStmt *S) {
352  VisitStmt(S);
353  Record.AddSourceLocation(S->getKeywordLoc());
354  Record.AddStmt(S->getOperand());
355  Record.AddStmt(S->getPromiseCall());
356  Record.push_back(S->isImplicit());
358 }
359 
360 void ASTStmtWriter::VisitCoroutineSuspendExpr(CoroutineSuspendExpr *E) {
361  VisitExpr(E);
362  Record.AddSourceLocation(E->getKeywordLoc());
363  for (Stmt *S : E->children())
364  Record.AddStmt(S);
365  Record.AddStmt(E->getOpaqueValue());
366 }
367 
368 void ASTStmtWriter::VisitCoawaitExpr(CoawaitExpr *E) {
369  VisitCoroutineSuspendExpr(E);
370  Record.push_back(E->isImplicit());
372 }
373 
374 void ASTStmtWriter::VisitCoyieldExpr(CoyieldExpr *E) {
375  VisitCoroutineSuspendExpr(E);
377 }
378 
379 void ASTStmtWriter::VisitDependentCoawaitExpr(DependentCoawaitExpr *E) {
380  VisitExpr(E);
381  Record.AddSourceLocation(E->getKeywordLoc());
382  for (Stmt *S : E->children())
383  Record.AddStmt(S);
385 }
386 
387 void ASTStmtWriter::VisitCapturedStmt(CapturedStmt *S) {
388  VisitStmt(S);
389  // NumCaptures
390  Record.push_back(std::distance(S->capture_begin(), S->capture_end()));
391 
392  // CapturedDecl and captured region kind
393  Record.AddDeclRef(S->getCapturedDecl());
394  Record.push_back(S->getCapturedRegionKind());
395 
396  Record.AddDeclRef(S->getCapturedRecordDecl());
397 
398  // Capture inits
399  for (auto *I : S->capture_inits())
400  Record.AddStmt(I);
401 
402  // Body
403  Record.AddStmt(S->getCapturedStmt());
404 
405  // Captures
406  for (const auto &I : S->captures()) {
407  if (I.capturesThis() || I.capturesVariableArrayType())
408  Record.AddDeclRef(nullptr);
409  else
410  Record.AddDeclRef(I.getCapturedVar());
411  Record.push_back(I.getCaptureKind());
412  Record.AddSourceLocation(I.getLocation());
413  }
414 
416 }
417 
418 void ASTStmtWriter::VisitExpr(Expr *E) {
419  VisitStmt(E);
420  Record.AddTypeRef(E->getType());
421  Record.push_back(E->isTypeDependent());
422  Record.push_back(E->isValueDependent());
423  Record.push_back(E->isInstantiationDependent());
425  Record.push_back(E->getValueKind());
426  Record.push_back(E->getObjectKind());
427 }
428 
429 void ASTStmtWriter::VisitConstantExpr(ConstantExpr *E) {
430  VisitExpr(E);
431  Record.AddStmt(E->getSubExpr());
433 }
434 
435 void ASTStmtWriter::VisitPredefinedExpr(PredefinedExpr *E) {
436  VisitExpr(E);
437 
438  bool HasFunctionName = E->getFunctionName() != nullptr;
439  Record.push_back(HasFunctionName);
440  Record.push_back(E->getIdentKind()); // FIXME: stable encoding
441  Record.AddSourceLocation(E->getLocation());
442  if (HasFunctionName)
443  Record.AddStmt(E->getFunctionName());
445 }
446 
447 void ASTStmtWriter::VisitDeclRefExpr(DeclRefExpr *E) {
448  VisitExpr(E);
449 
450  Record.push_back(E->hasQualifier());
451  Record.push_back(E->getDecl() != E->getFoundDecl());
452  Record.push_back(E->hasTemplateKWAndArgsInfo());
453  Record.push_back(E->hadMultipleCandidates());
455 
456  if (E->hasTemplateKWAndArgsInfo()) {
457  unsigned NumTemplateArgs = E->getNumTemplateArgs();
458  Record.push_back(NumTemplateArgs);
459  }
460 
462 
463  if ((!E->hasTemplateKWAndArgsInfo()) && (!E->hasQualifier()) &&
464  (E->getDecl() == E->getFoundDecl()) &&
466  AbbrevToUse = Writer.getDeclRefExprAbbrev();
467  }
468 
469  if (E->hasQualifier())
471 
472  if (E->getDecl() != E->getFoundDecl())
473  Record.AddDeclRef(E->getFoundDecl());
474 
475  if (E->hasTemplateKWAndArgsInfo())
476  AddTemplateKWAndArgsInfo(*E->getTrailingObjects<ASTTemplateKWAndArgsInfo>(),
477  E->getTrailingObjects<TemplateArgumentLoc>());
478 
479  Record.AddDeclRef(E->getDecl());
480  Record.AddSourceLocation(E->getLocation());
481  Record.AddDeclarationNameLoc(E->DNLoc, E->getDecl()->getDeclName());
483 }
484 
485 void ASTStmtWriter::VisitIntegerLiteral(IntegerLiteral *E) {
486  VisitExpr(E);
487  Record.AddSourceLocation(E->getLocation());
488  Record.AddAPInt(E->getValue());
489 
490  if (E->getValue().getBitWidth() == 32) {
491  AbbrevToUse = Writer.getIntegerLiteralAbbrev();
492  }
493 
495 }
496 
497 void ASTStmtWriter::VisitFixedPointLiteral(FixedPointLiteral *E) {
498  VisitExpr(E);
499  Record.AddSourceLocation(E->getLocation());
500  Record.AddAPInt(E->getValue());
502 }
503 
504 void ASTStmtWriter::VisitFloatingLiteral(FloatingLiteral *E) {
505  VisitExpr(E);
506  Record.push_back(E->getRawSemantics());
507  Record.push_back(E->isExact());
508  Record.AddAPFloat(E->getValue());
509  Record.AddSourceLocation(E->getLocation());
511 }
512 
513 void ASTStmtWriter::VisitImaginaryLiteral(ImaginaryLiteral *E) {
514  VisitExpr(E);
515  Record.AddStmt(E->getSubExpr());
517 }
518 
519 void ASTStmtWriter::VisitStringLiteral(StringLiteral *E) {
520  VisitExpr(E);
521 
522  // Store the various bits of data of StringLiteral.
523  Record.push_back(E->getNumConcatenated());
524  Record.push_back(E->getLength());
525  Record.push_back(E->getCharByteWidth());
526  Record.push_back(E->getKind());
527  Record.push_back(E->isPascal());
528 
529  // Store the trailing array of SourceLocation.
530  for (unsigned I = 0, N = E->getNumConcatenated(); I != N; ++I)
531  Record.AddSourceLocation(E->getStrTokenLoc(I));
532 
533  // Store the trailing array of char holding the string data.
534  StringRef StrData = E->getBytes();
535  for (unsigned I = 0, N = E->getByteLength(); I != N; ++I)
536  Record.push_back(StrData[I]);
537 
539 }
540 
541 void ASTStmtWriter::VisitCharacterLiteral(CharacterLiteral *E) {
542  VisitExpr(E);
543  Record.push_back(E->getValue());
544  Record.AddSourceLocation(E->getLocation());
545  Record.push_back(E->getKind());
546 
547  AbbrevToUse = Writer.getCharacterLiteralAbbrev();
548 
550 }
551 
552 void ASTStmtWriter::VisitParenExpr(ParenExpr *E) {
553  VisitExpr(E);
554  Record.AddSourceLocation(E->getLParen());
555  Record.AddSourceLocation(E->getRParen());
556  Record.AddStmt(E->getSubExpr());
558 }
559 
560 void ASTStmtWriter::VisitParenListExpr(ParenListExpr *E) {
561  VisitExpr(E);
562  Record.push_back(E->getNumExprs());
563  for (auto *SubStmt : E->exprs())
564  Record.AddStmt(SubStmt);
565  Record.AddSourceLocation(E->getLParenLoc());
566  Record.AddSourceLocation(E->getRParenLoc());
568 }
569 
570 void ASTStmtWriter::VisitUnaryOperator(UnaryOperator *E) {
571  VisitExpr(E);
572  Record.AddStmt(E->getSubExpr());
573  Record.push_back(E->getOpcode()); // FIXME: stable encoding
574  Record.AddSourceLocation(E->getOperatorLoc());
575  Record.push_back(E->canOverflow());
577 }
578 
579 void ASTStmtWriter::VisitOffsetOfExpr(OffsetOfExpr *E) {
580  VisitExpr(E);
581  Record.push_back(E->getNumComponents());
582  Record.push_back(E->getNumExpressions());
583  Record.AddSourceLocation(E->getOperatorLoc());
584  Record.AddSourceLocation(E->getRParenLoc());
586  for (unsigned I = 0, N = E->getNumComponents(); I != N; ++I) {
587  const OffsetOfNode &ON = E->getComponent(I);
588  Record.push_back(ON.getKind()); // FIXME: Stable encoding
590  Record.AddSourceLocation(ON.getSourceRange().getEnd());
591  switch (ON.getKind()) {
592  case OffsetOfNode::Array:
593  Record.push_back(ON.getArrayExprIndex());
594  break;
595 
596  case OffsetOfNode::Field:
597  Record.AddDeclRef(ON.getField());
598  break;
599 
601  Record.AddIdentifierRef(ON.getFieldName());
602  break;
603 
604  case OffsetOfNode::Base:
605  Record.AddCXXBaseSpecifier(*ON.getBase());
606  break;
607  }
608  }
609  for (unsigned I = 0, N = E->getNumExpressions(); I != N; ++I)
610  Record.AddStmt(E->getIndexExpr(I));
612 }
613 
614 void ASTStmtWriter::VisitUnaryExprOrTypeTraitExpr(UnaryExprOrTypeTraitExpr *E) {
615  VisitExpr(E);
616  Record.push_back(E->getKind());
617  if (E->isArgumentType())
619  else {
620  Record.push_back(0);
621  Record.AddStmt(E->getArgumentExpr());
622  }
623  Record.AddSourceLocation(E->getOperatorLoc());
624  Record.AddSourceLocation(E->getRParenLoc());
626 }
627 
628 void ASTStmtWriter::VisitArraySubscriptExpr(ArraySubscriptExpr *E) {
629  VisitExpr(E);
630  Record.AddStmt(E->getLHS());
631  Record.AddStmt(E->getRHS());
632  Record.AddSourceLocation(E->getRBracketLoc());
634 }
635 
636 void ASTStmtWriter::VisitOMPArraySectionExpr(OMPArraySectionExpr *E) {
637  VisitExpr(E);
638  Record.AddStmt(E->getBase());
639  Record.AddStmt(E->getLowerBound());
640  Record.AddStmt(E->getLength());
641  Record.AddSourceLocation(E->getColonLoc());
642  Record.AddSourceLocation(E->getRBracketLoc());
644 }
645 
646 void ASTStmtWriter::VisitCallExpr(CallExpr *E) {
647  VisitExpr(E);
648  Record.push_back(E->getNumArgs());
649  Record.AddSourceLocation(E->getRParenLoc());
650  Record.AddStmt(E->getCallee());
651  for (CallExpr::arg_iterator Arg = E->arg_begin(), ArgEnd = E->arg_end();
652  Arg != ArgEnd; ++Arg)
653  Record.AddStmt(*Arg);
654  Record.push_back(static_cast<unsigned>(E->getADLCallKind()));
656 }
657 
658 void ASTStmtWriter::VisitMemberExpr(MemberExpr *E) {
659  // Don't call VisitExpr, we'll write everything here.
660 
661  Record.push_back(E->hasQualifier());
662  if (E->hasQualifier())
664 
665  Record.push_back(E->hasTemplateKWAndArgsInfo());
666  if (E->hasTemplateKWAndArgsInfo()) {
668  unsigned NumTemplateArgs = E->getNumTemplateArgs();
669  Record.push_back(NumTemplateArgs);
670  Record.AddSourceLocation(E->getLAngleLoc());
671  Record.AddSourceLocation(E->getRAngleLoc());
672  for (unsigned i=0; i != NumTemplateArgs; ++i)
673  Record.AddTemplateArgumentLoc(E->getTemplateArgs()[i]);
674  }
675 
676  Record.push_back(E->hadMultipleCandidates());
677 
678  DeclAccessPair FoundDecl = E->getFoundDecl();
679  Record.AddDeclRef(FoundDecl.getDecl());
680  Record.push_back(FoundDecl.getAccess());
681 
682  Record.AddTypeRef(E->getType());
683  Record.push_back(E->getValueKind());
684  Record.push_back(E->getObjectKind());
685  Record.AddStmt(E->getBase());
686  Record.AddDeclRef(E->getMemberDecl());
687  Record.AddSourceLocation(E->getMemberLoc());
688  Record.push_back(E->isArrow());
689  Record.AddSourceLocation(E->getOperatorLoc());
690  Record.AddDeclarationNameLoc(E->MemberDNLoc,
691  E->getMemberDecl()->getDeclName());
693 }
694 
695 void ASTStmtWriter::VisitObjCIsaExpr(ObjCIsaExpr *E) {
696  VisitExpr(E);
697  Record.AddStmt(E->getBase());
698  Record.AddSourceLocation(E->getIsaMemberLoc());
699  Record.AddSourceLocation(E->getOpLoc());
700  Record.push_back(E->isArrow());
702 }
703 
704 void ASTStmtWriter::
705 VisitObjCIndirectCopyRestoreExpr(ObjCIndirectCopyRestoreExpr *E) {
706  VisitExpr(E);
707  Record.AddStmt(E->getSubExpr());
708  Record.push_back(E->shouldCopy());
710 }
711 
712 void ASTStmtWriter::VisitObjCBridgedCastExpr(ObjCBridgedCastExpr *E) {
713  VisitExplicitCastExpr(E);
714  Record.AddSourceLocation(E->getLParenLoc());
716  Record.push_back(E->getBridgeKind()); // FIXME: Stable encoding
718 }
719 
720 void ASTStmtWriter::VisitCastExpr(CastExpr *E) {
721  VisitExpr(E);
722  Record.push_back(E->path_size());
723  Record.AddStmt(E->getSubExpr());
724  Record.push_back(E->getCastKind()); // FIXME: stable encoding
725 
727  PI = E->path_begin(), PE = E->path_end(); PI != PE; ++PI)
728  Record.AddCXXBaseSpecifier(**PI);
729 }
730 
731 void ASTStmtWriter::VisitBinaryOperator(BinaryOperator *E) {
732  VisitExpr(E);
733  Record.AddStmt(E->getLHS());
734  Record.AddStmt(E->getRHS());
735  Record.push_back(E->getOpcode()); // FIXME: stable encoding
736  Record.AddSourceLocation(E->getOperatorLoc());
737  Record.push_back(E->getFPFeatures().getInt());
739 }
740 
741 void ASTStmtWriter::VisitCompoundAssignOperator(CompoundAssignOperator *E) {
742  VisitBinaryOperator(E);
743  Record.AddTypeRef(E->getComputationLHSType());
746 }
747 
748 void ASTStmtWriter::VisitConditionalOperator(ConditionalOperator *E) {
749  VisitExpr(E);
750  Record.AddStmt(E->getCond());
751  Record.AddStmt(E->getLHS());
752  Record.AddStmt(E->getRHS());
753  Record.AddSourceLocation(E->getQuestionLoc());
754  Record.AddSourceLocation(E->getColonLoc());
756 }
757 
758 void
759 ASTStmtWriter::VisitBinaryConditionalOperator(BinaryConditionalOperator *E) {
760  VisitExpr(E);
761  Record.AddStmt(E->getOpaqueValue());
762  Record.AddStmt(E->getCommon());
763  Record.AddStmt(E->getCond());
764  Record.AddStmt(E->getTrueExpr());
765  Record.AddStmt(E->getFalseExpr());
766  Record.AddSourceLocation(E->getQuestionLoc());
767  Record.AddSourceLocation(E->getColonLoc());
769 }
770 
771 void ASTStmtWriter::VisitImplicitCastExpr(ImplicitCastExpr *E) {
772  VisitCastExpr(E);
773  Record.push_back(E->isPartOfExplicitCast());
774 
775  if (E->path_size() == 0)
776  AbbrevToUse = Writer.getExprImplicitCastAbbrev();
777 
779 }
780 
781 void ASTStmtWriter::VisitExplicitCastExpr(ExplicitCastExpr *E) {
782  VisitCastExpr(E);
784 }
785 
786 void ASTStmtWriter::VisitCStyleCastExpr(CStyleCastExpr *E) {
787  VisitExplicitCastExpr(E);
788  Record.AddSourceLocation(E->getLParenLoc());
789  Record.AddSourceLocation(E->getRParenLoc());
791 }
792 
793 void ASTStmtWriter::VisitCompoundLiteralExpr(CompoundLiteralExpr *E) {
794  VisitExpr(E);
795  Record.AddSourceLocation(E->getLParenLoc());
797  Record.AddStmt(E->getInitializer());
798  Record.push_back(E->isFileScope());
800 }
801 
802 void ASTStmtWriter::VisitExtVectorElementExpr(ExtVectorElementExpr *E) {
803  VisitExpr(E);
804  Record.AddStmt(E->getBase());
805  Record.AddIdentifierRef(&E->getAccessor());
806  Record.AddSourceLocation(E->getAccessorLoc());
808 }
809 
810 void ASTStmtWriter::VisitInitListExpr(InitListExpr *E) {
811  VisitExpr(E);
812  // NOTE: only add the (possibly null) syntactic form.
813  // No need to serialize the isSemanticForm flag and the semantic form.
814  Record.AddStmt(E->getSyntacticForm());
815  Record.AddSourceLocation(E->getLBraceLoc());
816  Record.AddSourceLocation(E->getRBraceLoc());
817  bool isArrayFiller = E->ArrayFillerOrUnionFieldInit.is<Expr*>();
818  Record.push_back(isArrayFiller);
819  if (isArrayFiller)
820  Record.AddStmt(E->getArrayFiller());
821  else
823  Record.push_back(E->hadArrayRangeDesignator());
824  Record.push_back(E->getNumInits());
825  if (isArrayFiller) {
826  // ArrayFiller may have filled "holes" due to designated initializer.
827  // Replace them by 0 to indicate that the filler goes in that place.
828  Expr *filler = E->getArrayFiller();
829  for (unsigned I = 0, N = E->getNumInits(); I != N; ++I)
830  Record.AddStmt(E->getInit(I) != filler ? E->getInit(I) : nullptr);
831  } else {
832  for (unsigned I = 0, N = E->getNumInits(); I != N; ++I)
833  Record.AddStmt(E->getInit(I));
834  }
836 }
837 
838 void ASTStmtWriter::VisitDesignatedInitExpr(DesignatedInitExpr *E) {
839  VisitExpr(E);
840  Record.push_back(E->getNumSubExprs());
841  for (unsigned I = 0, N = E->getNumSubExprs(); I != N; ++I)
842  Record.AddStmt(E->getSubExpr(I));
844  Record.push_back(E->usesGNUSyntax());
845  for (const DesignatedInitExpr::Designator &D : E->designators()) {
846  if (D.isFieldDesignator()) {
847  if (FieldDecl *Field = D.getField()) {
849  Record.AddDeclRef(Field);
850  } else {
852  Record.AddIdentifierRef(D.getFieldName());
853  }
854  Record.AddSourceLocation(D.getDotLoc());
855  Record.AddSourceLocation(D.getFieldLoc());
856  } else if (D.isArrayDesignator()) {
858  Record.push_back(D.getFirstExprIndex());
859  Record.AddSourceLocation(D.getLBracketLoc());
860  Record.AddSourceLocation(D.getRBracketLoc());
861  } else {
862  assert(D.isArrayRangeDesignator() && "Unknown designator");
864  Record.push_back(D.getFirstExprIndex());
865  Record.AddSourceLocation(D.getLBracketLoc());
866  Record.AddSourceLocation(D.getEllipsisLoc());
867  Record.AddSourceLocation(D.getRBracketLoc());
868  }
869  }
871 }
872 
873 void ASTStmtWriter::VisitDesignatedInitUpdateExpr(DesignatedInitUpdateExpr *E) {
874  VisitExpr(E);
875  Record.AddStmt(E->getBase());
876  Record.AddStmt(E->getUpdater());
878 }
879 
880 void ASTStmtWriter::VisitNoInitExpr(NoInitExpr *E) {
881  VisitExpr(E);
883 }
884 
885 void ASTStmtWriter::VisitArrayInitLoopExpr(ArrayInitLoopExpr *E) {
886  VisitExpr(E);
887  Record.AddStmt(E->SubExprs[0]);
888  Record.AddStmt(E->SubExprs[1]);
890 }
891 
892 void ASTStmtWriter::VisitArrayInitIndexExpr(ArrayInitIndexExpr *E) {
893  VisitExpr(E);
895 }
896 
897 void ASTStmtWriter::VisitImplicitValueInitExpr(ImplicitValueInitExpr *E) {
898  VisitExpr(E);
900 }
901 
902 void ASTStmtWriter::VisitVAArgExpr(VAArgExpr *E) {
903  VisitExpr(E);
904  Record.AddStmt(E->getSubExpr());
906  Record.AddSourceLocation(E->getBuiltinLoc());
907  Record.AddSourceLocation(E->getRParenLoc());
908  Record.push_back(E->isMicrosoftABI());
910 }
911 
912 void ASTStmtWriter::VisitAddrLabelExpr(AddrLabelExpr *E) {
913  VisitExpr(E);
914  Record.AddSourceLocation(E->getAmpAmpLoc());
915  Record.AddSourceLocation(E->getLabelLoc());
916  Record.AddDeclRef(E->getLabel());
918 }
919 
920 void ASTStmtWriter::VisitStmtExpr(StmtExpr *E) {
921  VisitExpr(E);
922  Record.AddStmt(E->getSubStmt());
923  Record.AddSourceLocation(E->getLParenLoc());
924  Record.AddSourceLocation(E->getRParenLoc());
926 }
927 
928 void ASTStmtWriter::VisitChooseExpr(ChooseExpr *E) {
929  VisitExpr(E);
930  Record.AddStmt(E->getCond());
931  Record.AddStmt(E->getLHS());
932  Record.AddStmt(E->getRHS());
933  Record.AddSourceLocation(E->getBuiltinLoc());
934  Record.AddSourceLocation(E->getRParenLoc());
935  Record.push_back(E->isConditionDependent() ? false : E->isConditionTrue());
937 }
938 
939 void ASTStmtWriter::VisitGNUNullExpr(GNUNullExpr *E) {
940  VisitExpr(E);
941  Record.AddSourceLocation(E->getTokenLocation());
943 }
944 
945 void ASTStmtWriter::VisitShuffleVectorExpr(ShuffleVectorExpr *E) {
946  VisitExpr(E);
947  Record.push_back(E->getNumSubExprs());
948  for (unsigned I = 0, N = E->getNumSubExprs(); I != N; ++I)
949  Record.AddStmt(E->getExpr(I));
950  Record.AddSourceLocation(E->getBuiltinLoc());
951  Record.AddSourceLocation(E->getRParenLoc());
953 }
954 
955 void ASTStmtWriter::VisitConvertVectorExpr(ConvertVectorExpr *E) {
956  VisitExpr(E);
957  Record.AddSourceLocation(E->getBuiltinLoc());
958  Record.AddSourceLocation(E->getRParenLoc());
960  Record.AddStmt(E->getSrcExpr());
962 }
963 
964 void ASTStmtWriter::VisitBlockExpr(BlockExpr *E) {
965  VisitExpr(E);
966  Record.AddDeclRef(E->getBlockDecl());
968 }
969 
970 void ASTStmtWriter::VisitGenericSelectionExpr(GenericSelectionExpr *E) {
971  VisitExpr(E);
972  Record.push_back(E->getNumAssocs());
973 
974  Record.AddStmt(E->getControllingExpr());
975  for (unsigned I = 0, N = E->getNumAssocs(); I != N; ++I) {
977  Record.AddStmt(E->getAssocExpr(I));
978  }
979  Record.push_back(E->isResultDependent() ? -1U : E->getResultIndex());
980 
981  Record.AddSourceLocation(E->getGenericLoc());
982  Record.AddSourceLocation(E->getDefaultLoc());
983  Record.AddSourceLocation(E->getRParenLoc());
985 }
986 
987 void ASTStmtWriter::VisitPseudoObjectExpr(PseudoObjectExpr *E) {
988  VisitExpr(E);
989  Record.push_back(E->getNumSemanticExprs());
990 
991  // Push the result index. Currently, this needs to exactly match
992  // the encoding used internally for ResultIndex.
993  unsigned result = E->getResultExprIndex();
994  result = (result == PseudoObjectExpr::NoResult ? 0 : result + 1);
995  Record.push_back(result);
996 
997  Record.AddStmt(E->getSyntacticForm());
999  i = E->semantics_begin(), e = E->semantics_end(); i != e; ++i) {
1000  Record.AddStmt(*i);
1001  }
1003 }
1004 
1005 void ASTStmtWriter::VisitAtomicExpr(AtomicExpr *E) {
1006  VisitExpr(E);
1007  Record.push_back(E->getOp());
1008  for (unsigned I = 0, N = E->getNumSubExprs(); I != N; ++I)
1009  Record.AddStmt(E->getSubExprs()[I]);
1010  Record.AddSourceLocation(E->getBuiltinLoc());
1011  Record.AddSourceLocation(E->getRParenLoc());
1013 }
1014 
1015 //===----------------------------------------------------------------------===//
1016 // Objective-C Expressions and Statements.
1017 //===----------------------------------------------------------------------===//
1018 
1019 void ASTStmtWriter::VisitObjCStringLiteral(ObjCStringLiteral *E) {
1020  VisitExpr(E);
1021  Record.AddStmt(E->getString());
1022  Record.AddSourceLocation(E->getAtLoc());
1024 }
1025 
1026 void ASTStmtWriter::VisitObjCBoxedExpr(ObjCBoxedExpr *E) {
1027  VisitExpr(E);
1028  Record.AddStmt(E->getSubExpr());
1029  Record.AddDeclRef(E->getBoxingMethod());
1030  Record.AddSourceRange(E->getSourceRange());
1032 }
1033 
1034 void ASTStmtWriter::VisitObjCArrayLiteral(ObjCArrayLiteral *E) {
1035  VisitExpr(E);
1036  Record.push_back(E->getNumElements());
1037  for (unsigned i = 0; i < E->getNumElements(); i++)
1038  Record.AddStmt(E->getElement(i));
1040  Record.AddSourceRange(E->getSourceRange());
1042 }
1043 
1044 void ASTStmtWriter::VisitObjCDictionaryLiteral(ObjCDictionaryLiteral *E) {
1045  VisitExpr(E);
1046  Record.push_back(E->getNumElements());
1047  Record.push_back(E->HasPackExpansions);
1048  for (unsigned i = 0; i < E->getNumElements(); i++) {
1049  ObjCDictionaryElement Element = E->getKeyValueElement(i);
1050  Record.AddStmt(Element.Key);
1051  Record.AddStmt(Element.Value);
1052  if (E->HasPackExpansions) {
1053  Record.AddSourceLocation(Element.EllipsisLoc);
1054  unsigned NumExpansions = 0;
1055  if (Element.NumExpansions)
1056  NumExpansions = *Element.NumExpansions + 1;
1057  Record.push_back(NumExpansions);
1058  }
1059  }
1060 
1061  Record.AddDeclRef(E->getDictWithObjectsMethod());
1062  Record.AddSourceRange(E->getSourceRange());
1064 }
1065 
1066 void ASTStmtWriter::VisitObjCEncodeExpr(ObjCEncodeExpr *E) {
1067  VisitExpr(E);
1069  Record.AddSourceLocation(E->getAtLoc());
1070  Record.AddSourceLocation(E->getRParenLoc());
1072 }
1073 
1074 void ASTStmtWriter::VisitObjCSelectorExpr(ObjCSelectorExpr *E) {
1075  VisitExpr(E);
1076  Record.AddSelectorRef(E->getSelector());
1077  Record.AddSourceLocation(E->getAtLoc());
1078  Record.AddSourceLocation(E->getRParenLoc());
1080 }
1081 
1082 void ASTStmtWriter::VisitObjCProtocolExpr(ObjCProtocolExpr *E) {
1083  VisitExpr(E);
1084  Record.AddDeclRef(E->getProtocol());
1085  Record.AddSourceLocation(E->getAtLoc());
1086  Record.AddSourceLocation(E->ProtoLoc);
1087  Record.AddSourceLocation(E->getRParenLoc());
1089 }
1090 
1091 void ASTStmtWriter::VisitObjCIvarRefExpr(ObjCIvarRefExpr *E) {
1092  VisitExpr(E);
1093  Record.AddDeclRef(E->getDecl());
1094  Record.AddSourceLocation(E->getLocation());
1095  Record.AddSourceLocation(E->getOpLoc());
1096  Record.AddStmt(E->getBase());
1097  Record.push_back(E->isArrow());
1098  Record.push_back(E->isFreeIvar());
1100 }
1101 
1102 void ASTStmtWriter::VisitObjCPropertyRefExpr(ObjCPropertyRefExpr *E) {
1103  VisitExpr(E);
1104  Record.push_back(E->SetterAndMethodRefFlags.getInt());
1105  Record.push_back(E->isImplicitProperty());
1106  if (E->isImplicitProperty()) {
1109  } else {
1110  Record.AddDeclRef(E->getExplicitProperty());
1111  }
1112  Record.AddSourceLocation(E->getLocation());
1114  if (E->isObjectReceiver()) {
1115  Record.push_back(0);
1116  Record.AddStmt(E->getBase());
1117  } else if (E->isSuperReceiver()) {
1118  Record.push_back(1);
1119  Record.AddTypeRef(E->getSuperReceiverType());
1120  } else {
1121  Record.push_back(2);
1122  Record.AddDeclRef(E->getClassReceiver());
1123  }
1124 
1126 }
1127 
1128 void ASTStmtWriter::VisitObjCSubscriptRefExpr(ObjCSubscriptRefExpr *E) {
1129  VisitExpr(E);
1130  Record.AddSourceLocation(E->getRBracket());
1131  Record.AddStmt(E->getBaseExpr());
1132  Record.AddStmt(E->getKeyExpr());
1133  Record.AddDeclRef(E->getAtIndexMethodDecl());
1134  Record.AddDeclRef(E->setAtIndexMethodDecl());
1135 
1137 }
1138 
1139 void ASTStmtWriter::VisitObjCMessageExpr(ObjCMessageExpr *E) {
1140  VisitExpr(E);
1141  Record.push_back(E->getNumArgs());
1142  Record.push_back(E->getNumStoredSelLocs());
1143  Record.push_back(E->SelLocsKind);
1144  Record.push_back(E->isDelegateInitCall());
1145  Record.push_back(E->IsImplicit);
1146  Record.push_back((unsigned)E->getReceiverKind()); // FIXME: stable encoding
1147  switch (E->getReceiverKind()) {
1149  Record.AddStmt(E->getInstanceReceiver());
1150  break;
1151 
1154  break;
1155 
1158  Record.AddTypeRef(E->getSuperType());
1159  Record.AddSourceLocation(E->getSuperLoc());
1160  break;
1161  }
1162 
1163  if (E->getMethodDecl()) {
1164  Record.push_back(1);
1165  Record.AddDeclRef(E->getMethodDecl());
1166  } else {
1167  Record.push_back(0);
1168  Record.AddSelectorRef(E->getSelector());
1169  }
1170 
1171  Record.AddSourceLocation(E->getLeftLoc());
1172  Record.AddSourceLocation(E->getRightLoc());
1173 
1174  for (CallExpr::arg_iterator Arg = E->arg_begin(), ArgEnd = E->arg_end();
1175  Arg != ArgEnd; ++Arg)
1176  Record.AddStmt(*Arg);
1177 
1178  SourceLocation *Locs = E->getStoredSelLocs();
1179  for (unsigned i = 0, e = E->getNumStoredSelLocs(); i != e; ++i)
1180  Record.AddSourceLocation(Locs[i]);
1181 
1183 }
1184 
1185 void ASTStmtWriter::VisitObjCForCollectionStmt(ObjCForCollectionStmt *S) {
1186  VisitStmt(S);
1187  Record.AddStmt(S->getElement());
1188  Record.AddStmt(S->getCollection());
1189  Record.AddStmt(S->getBody());
1190  Record.AddSourceLocation(S->getForLoc());
1191  Record.AddSourceLocation(S->getRParenLoc());
1193 }
1194 
1195 void ASTStmtWriter::VisitObjCAtCatchStmt(ObjCAtCatchStmt *S) {
1196  Record.AddStmt(S->getCatchBody());
1197  Record.AddDeclRef(S->getCatchParamDecl());
1198  Record.AddSourceLocation(S->getAtCatchLoc());
1199  Record.AddSourceLocation(S->getRParenLoc());
1201 }
1202 
1203 void ASTStmtWriter::VisitObjCAtFinallyStmt(ObjCAtFinallyStmt *S) {
1204  Record.AddStmt(S->getFinallyBody());
1205  Record.AddSourceLocation(S->getAtFinallyLoc());
1207 }
1208 
1209 void ASTStmtWriter::VisitObjCAutoreleasePoolStmt(ObjCAutoreleasePoolStmt *S) {
1210  Record.AddStmt(S->getSubStmt());
1211  Record.AddSourceLocation(S->getAtLoc());
1213 }
1214 
1215 void ASTStmtWriter::VisitObjCAtTryStmt(ObjCAtTryStmt *S) {
1216  Record.push_back(S->getNumCatchStmts());
1217  Record.push_back(S->getFinallyStmt() != nullptr);
1218  Record.AddStmt(S->getTryBody());
1219  for (unsigned I = 0, N = S->getNumCatchStmts(); I != N; ++I)
1220  Record.AddStmt(S->getCatchStmt(I));
1221  if (S->getFinallyStmt())
1222  Record.AddStmt(S->getFinallyStmt());
1223  Record.AddSourceLocation(S->getAtTryLoc());
1225 }
1226 
1227 void ASTStmtWriter::VisitObjCAtSynchronizedStmt(ObjCAtSynchronizedStmt *S) {
1228  Record.AddStmt(S->getSynchExpr());
1229  Record.AddStmt(S->getSynchBody());
1232 }
1233 
1234 void ASTStmtWriter::VisitObjCAtThrowStmt(ObjCAtThrowStmt *S) {
1235  Record.AddStmt(S->getThrowExpr());
1236  Record.AddSourceLocation(S->getThrowLoc());
1238 }
1239 
1240 void ASTStmtWriter::VisitObjCBoolLiteralExpr(ObjCBoolLiteralExpr *E) {
1241  VisitExpr(E);
1242  Record.push_back(E->getValue());
1243  Record.AddSourceLocation(E->getLocation());
1245 }
1246 
1247 void ASTStmtWriter::VisitObjCAvailabilityCheckExpr(ObjCAvailabilityCheckExpr *E) {
1248  VisitExpr(E);
1249  Record.AddSourceRange(E->getSourceRange());
1250  Record.AddVersionTuple(E->getVersion());
1252 }
1253 
1254 //===----------------------------------------------------------------------===//
1255 // C++ Expressions and Statements.
1256 //===----------------------------------------------------------------------===//
1257 
1258 void ASTStmtWriter::VisitCXXCatchStmt(CXXCatchStmt *S) {
1259  VisitStmt(S);
1260  Record.AddSourceLocation(S->getCatchLoc());
1261  Record.AddDeclRef(S->getExceptionDecl());
1262  Record.AddStmt(S->getHandlerBlock());
1264 }
1265 
1266 void ASTStmtWriter::VisitCXXTryStmt(CXXTryStmt *S) {
1267  VisitStmt(S);
1268  Record.push_back(S->getNumHandlers());
1269  Record.AddSourceLocation(S->getTryLoc());
1270  Record.AddStmt(S->getTryBlock());
1271  for (unsigned i = 0, e = S->getNumHandlers(); i != e; ++i)
1272  Record.AddStmt(S->getHandler(i));
1274 }
1275 
1276 void ASTStmtWriter::VisitCXXForRangeStmt(CXXForRangeStmt *S) {
1277  VisitStmt(S);
1278  Record.AddSourceLocation(S->getForLoc());
1279  Record.AddSourceLocation(S->getCoawaitLoc());
1280  Record.AddSourceLocation(S->getColonLoc());
1281  Record.AddSourceLocation(S->getRParenLoc());
1282  Record.AddStmt(S->getInit());
1283  Record.AddStmt(S->getRangeStmt());
1284  Record.AddStmt(S->getBeginStmt());
1285  Record.AddStmt(S->getEndStmt());
1286  Record.AddStmt(S->getCond());
1287  Record.AddStmt(S->getInc());
1288  Record.AddStmt(S->getLoopVarStmt());
1289  Record.AddStmt(S->getBody());
1291 }
1292 
1293 void ASTStmtWriter::VisitMSDependentExistsStmt(MSDependentExistsStmt *S) {
1294  VisitStmt(S);
1295  Record.AddSourceLocation(S->getKeywordLoc());
1296  Record.push_back(S->isIfExists());
1298  Record.AddDeclarationNameInfo(S->getNameInfo());
1299  Record.AddStmt(S->getSubStmt());
1301 }
1302 
1303 void ASTStmtWriter::VisitCXXOperatorCallExpr(CXXOperatorCallExpr *E) {
1304  VisitCallExpr(E);
1305  Record.push_back(E->getOperator());
1306  Record.push_back(E->getFPFeatures().getInt());
1307  Record.AddSourceRange(E->Range);
1309 }
1310 
1311 void ASTStmtWriter::VisitCXXMemberCallExpr(CXXMemberCallExpr *E) {
1312  VisitCallExpr(E);
1314 }
1315 
1316 void ASTStmtWriter::VisitCXXConstructExpr(CXXConstructExpr *E) {
1317  VisitExpr(E);
1318 
1319  Record.push_back(E->getNumArgs());
1320  Record.push_back(E->isElidable());
1321  Record.push_back(E->hadMultipleCandidates());
1322  Record.push_back(E->isListInitialization());
1325  Record.push_back(E->getConstructionKind()); // FIXME: stable encoding
1326  Record.AddSourceLocation(E->getLocation());
1327  Record.AddDeclRef(E->getConstructor());
1328  Record.AddSourceRange(E->getParenOrBraceRange());
1329 
1330  for (unsigned I = 0, N = E->getNumArgs(); I != N; ++I)
1331  Record.AddStmt(E->getArg(I));
1332 
1334 }
1335 
1336 void ASTStmtWriter::VisitCXXInheritedCtorInitExpr(CXXInheritedCtorInitExpr *E) {
1337  VisitExpr(E);
1338  Record.AddDeclRef(E->getConstructor());
1339  Record.AddSourceLocation(E->getLocation());
1340  Record.push_back(E->constructsVBase());
1341  Record.push_back(E->inheritedFromVBase());
1343 }
1344 
1345 void ASTStmtWriter::VisitCXXTemporaryObjectExpr(CXXTemporaryObjectExpr *E) {
1346  VisitCXXConstructExpr(E);
1347  Record.AddTypeSourceInfo(E->getTypeSourceInfo());
1349 }
1350 
1351 void ASTStmtWriter::VisitLambdaExpr(LambdaExpr *E) {
1352  VisitExpr(E);
1353  Record.push_back(E->NumCaptures);
1354  Record.AddSourceRange(E->IntroducerRange);
1355  Record.push_back(E->CaptureDefault); // FIXME: stable encoding
1356  Record.AddSourceLocation(E->CaptureDefaultLoc);
1357  Record.push_back(E->ExplicitParams);
1358  Record.push_back(E->ExplicitResultType);
1359  Record.AddSourceLocation(E->ClosingBrace);
1360 
1361  // Add capture initializers.
1363  CEnd = E->capture_init_end();
1364  C != CEnd; ++C) {
1365  Record.AddStmt(*C);
1366  }
1367 
1369 }
1370 
1371 void ASTStmtWriter::VisitCXXStdInitializerListExpr(CXXStdInitializerListExpr *E) {
1372  VisitExpr(E);
1373  Record.AddStmt(E->getSubExpr());
1375 }
1376 
1377 void ASTStmtWriter::VisitCXXNamedCastExpr(CXXNamedCastExpr *E) {
1378  VisitExplicitCastExpr(E);
1380  Record.AddSourceRange(E->getAngleBrackets());
1381 }
1382 
1383 void ASTStmtWriter::VisitCXXStaticCastExpr(CXXStaticCastExpr *E) {
1384  VisitCXXNamedCastExpr(E);
1386 }
1387 
1388 void ASTStmtWriter::VisitCXXDynamicCastExpr(CXXDynamicCastExpr *E) {
1389  VisitCXXNamedCastExpr(E);
1391 }
1392 
1393 void ASTStmtWriter::VisitCXXReinterpretCastExpr(CXXReinterpretCastExpr *E) {
1394  VisitCXXNamedCastExpr(E);
1396 }
1397 
1398 void ASTStmtWriter::VisitCXXConstCastExpr(CXXConstCastExpr *E) {
1399  VisitCXXNamedCastExpr(E);
1401 }
1402 
1403 void ASTStmtWriter::VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr *E) {
1404  VisitExplicitCastExpr(E);
1405  Record.AddSourceLocation(E->getLParenLoc());
1406  Record.AddSourceLocation(E->getRParenLoc());
1408 }
1409 
1410 void ASTStmtWriter::VisitUserDefinedLiteral(UserDefinedLiteral *E) {
1411  VisitCallExpr(E);
1412  Record.AddSourceLocation(E->UDSuffixLoc);
1414 }
1415 
1416 void ASTStmtWriter::VisitCXXBoolLiteralExpr(CXXBoolLiteralExpr *E) {
1417  VisitExpr(E);
1418  Record.push_back(E->getValue());
1419  Record.AddSourceLocation(E->getLocation());
1421 }
1422 
1423 void ASTStmtWriter::VisitCXXNullPtrLiteralExpr(CXXNullPtrLiteralExpr *E) {
1424  VisitExpr(E);
1425  Record.AddSourceLocation(E->getLocation());
1427 }
1428 
1429 void ASTStmtWriter::VisitCXXTypeidExpr(CXXTypeidExpr *E) {
1430  VisitExpr(E);
1431  Record.AddSourceRange(E->getSourceRange());
1432  if (E->isTypeOperand()) {
1435  } else {
1436  Record.AddStmt(E->getExprOperand());
1438  }
1439 }
1440 
1441 void ASTStmtWriter::VisitCXXThisExpr(CXXThisExpr *E) {
1442  VisitExpr(E);
1443  Record.AddSourceLocation(E->getLocation());
1444  Record.push_back(E->isImplicit());
1446 }
1447 
1448 void ASTStmtWriter::VisitCXXThrowExpr(CXXThrowExpr *E) {
1449  VisitExpr(E);
1450  Record.AddSourceLocation(E->getThrowLoc());
1451  Record.AddStmt(E->getSubExpr());
1452  Record.push_back(E->isThrownVariableInScope());
1454 }
1455 
1456 void ASTStmtWriter::VisitCXXDefaultArgExpr(CXXDefaultArgExpr *E) {
1457  VisitExpr(E);
1458  Record.AddDeclRef(E->getParam());
1459  Record.AddSourceLocation(E->getUsedLocation());
1461 }
1462 
1463 void ASTStmtWriter::VisitCXXDefaultInitExpr(CXXDefaultInitExpr *E) {
1464  VisitExpr(E);
1465  Record.AddDeclRef(E->getField());
1466  Record.AddSourceLocation(E->getExprLoc());
1468 }
1469 
1470 void ASTStmtWriter::VisitCXXBindTemporaryExpr(CXXBindTemporaryExpr *E) {
1471  VisitExpr(E);
1472  Record.AddCXXTemporary(E->getTemporary());
1473  Record.AddStmt(E->getSubExpr());
1475 }
1476 
1477 void ASTStmtWriter::VisitCXXScalarValueInitExpr(CXXScalarValueInitExpr *E) {
1478  VisitExpr(E);
1479  Record.AddTypeSourceInfo(E->getTypeSourceInfo());
1480  Record.AddSourceLocation(E->getRParenLoc());
1482 }
1483 
1484 void ASTStmtWriter::VisitCXXNewExpr(CXXNewExpr *E) {
1485  VisitExpr(E);
1486 
1487  Record.push_back(E->isArray());
1488  Record.push_back(E->hasInitializer());
1489  Record.push_back(E->getNumPlacementArgs());
1490  Record.push_back(E->isParenTypeId());
1491 
1492  Record.push_back(E->isGlobalNew());
1493  Record.push_back(E->passAlignment());
1495  Record.push_back(E->CXXNewExprBits.StoredInitializationStyle);
1496 
1497  Record.AddDeclRef(E->getOperatorNew());
1498  Record.AddDeclRef(E->getOperatorDelete());
1500  if (E->isParenTypeId())
1501  Record.AddSourceRange(E->getTypeIdParens());
1502  Record.AddSourceRange(E->getSourceRange());
1503  Record.AddSourceRange(E->getDirectInitRange());
1504 
1505  for (CXXNewExpr::arg_iterator I = E->raw_arg_begin(), N = E->raw_arg_end();
1506  I != N; ++I)
1507  Record.AddStmt(*I);
1508 
1510 }
1511 
1512 void ASTStmtWriter::VisitCXXDeleteExpr(CXXDeleteExpr *E) {
1513  VisitExpr(E);
1514  Record.push_back(E->isGlobalDelete());
1515  Record.push_back(E->isArrayForm());
1516  Record.push_back(E->isArrayFormAsWritten());
1518  Record.AddDeclRef(E->getOperatorDelete());
1519  Record.AddStmt(E->getArgument());
1520  Record.AddSourceLocation(E->getBeginLoc());
1521 
1523 }
1524 
1525 void ASTStmtWriter::VisitCXXPseudoDestructorExpr(CXXPseudoDestructorExpr *E) {
1526  VisitExpr(E);
1527 
1528  Record.AddStmt(E->getBase());
1529  Record.push_back(E->isArrow());
1530  Record.AddSourceLocation(E->getOperatorLoc());
1532  Record.AddTypeSourceInfo(E->getScopeTypeInfo());
1533  Record.AddSourceLocation(E->getColonColonLoc());
1534  Record.AddSourceLocation(E->getTildeLoc());
1535 
1536  // PseudoDestructorTypeStorage.
1538  if (E->getDestroyedTypeIdentifier())
1540  else
1542 
1544 }
1545 
1546 void ASTStmtWriter::VisitExprWithCleanups(ExprWithCleanups *E) {
1547  VisitExpr(E);
1548  Record.push_back(E->getNumObjects());
1549  for (unsigned i = 0, e = E->getNumObjects(); i != e; ++i)
1550  Record.AddDeclRef(E->getObject(i));
1551 
1552  Record.push_back(E->cleanupsHaveSideEffects());
1553  Record.AddStmt(E->getSubExpr());
1555 }
1556 
1557 void ASTStmtWriter::VisitCXXDependentScopeMemberExpr(
1559  VisitExpr(E);
1560 
1561  // Don't emit anything here (or if you do you will have to update
1562  // the corresponding deserialization function).
1563 
1564  Record.push_back(E->hasTemplateKWAndArgsInfo());
1565  Record.push_back(E->getNumTemplateArgs());
1566  Record.push_back(E->hasFirstQualifierFoundInScope());
1567 
1568  if (E->hasTemplateKWAndArgsInfo()) {
1569  const ASTTemplateKWAndArgsInfo &ArgInfo =
1570  *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>();
1571  AddTemplateKWAndArgsInfo(ArgInfo,
1572  E->getTrailingObjects<TemplateArgumentLoc>());
1573  }
1574 
1575  Record.push_back(E->isArrow());
1576  Record.AddSourceLocation(E->getOperatorLoc());
1577  Record.AddTypeRef(E->getBaseType());
1579  if (!E->isImplicitAccess())
1580  Record.AddStmt(E->getBase());
1581  else
1582  Record.AddStmt(nullptr);
1583 
1584  if (E->hasFirstQualifierFoundInScope())
1586 
1587  Record.AddDeclarationNameInfo(E->MemberNameInfo);
1589 }
1590 
1591 void
1592 ASTStmtWriter::VisitDependentScopeDeclRefExpr(DependentScopeDeclRefExpr *E) {
1593  VisitExpr(E);
1594 
1595  // Don't emit anything here, HasTemplateKWAndArgsInfo must be
1596  // emitted first.
1597 
1598  Record.push_back(E->DependentScopeDeclRefExprBits.HasTemplateKWAndArgsInfo);
1599  if (E->DependentScopeDeclRefExprBits.HasTemplateKWAndArgsInfo) {
1600  const ASTTemplateKWAndArgsInfo &ArgInfo =
1601  *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>();
1602  Record.push_back(ArgInfo.NumTemplateArgs);
1603  AddTemplateKWAndArgsInfo(ArgInfo,
1604  E->getTrailingObjects<TemplateArgumentLoc>());
1605  }
1606 
1608  Record.AddDeclarationNameInfo(E->NameInfo);
1610 }
1611 
1612 void
1613 ASTStmtWriter::VisitCXXUnresolvedConstructExpr(CXXUnresolvedConstructExpr *E) {
1614  VisitExpr(E);
1615  Record.push_back(E->arg_size());
1617  ArgI = E->arg_begin(), ArgE = E->arg_end(); ArgI != ArgE; ++ArgI)
1618  Record.AddStmt(*ArgI);
1619  Record.AddTypeSourceInfo(E->getTypeSourceInfo());
1620  Record.AddSourceLocation(E->getLParenLoc());
1621  Record.AddSourceLocation(E->getRParenLoc());
1623 }
1624 
1625 void ASTStmtWriter::VisitOverloadExpr(OverloadExpr *E) {
1626  VisitExpr(E);
1627 
1628  Record.push_back(E->getNumDecls());
1629  Record.push_back(E->hasTemplateKWAndArgsInfo());
1630  if (E->hasTemplateKWAndArgsInfo()) {
1631  const ASTTemplateKWAndArgsInfo &ArgInfo =
1633  Record.push_back(ArgInfo.NumTemplateArgs);
1635  }
1636 
1637  for (OverloadExpr::decls_iterator OvI = E->decls_begin(),
1638  OvE = E->decls_end();
1639  OvI != OvE; ++OvI) {
1640  Record.AddDeclRef(OvI.getDecl());
1641  Record.push_back(OvI.getAccess());
1642  }
1643 
1644  Record.AddDeclarationNameInfo(E->getNameInfo());
1646 }
1647 
1648 void ASTStmtWriter::VisitUnresolvedMemberExpr(UnresolvedMemberExpr *E) {
1649  VisitOverloadExpr(E);
1650  Record.push_back(E->isArrow());
1651  Record.push_back(E->hasUnresolvedUsing());
1652  Record.AddStmt(!E->isImplicitAccess() ? E->getBase() : nullptr);
1653  Record.AddTypeRef(E->getBaseType());
1654  Record.AddSourceLocation(E->getOperatorLoc());
1656 }
1657 
1658 void ASTStmtWriter::VisitUnresolvedLookupExpr(UnresolvedLookupExpr *E) {
1659  VisitOverloadExpr(E);
1660  Record.push_back(E->requiresADL());
1661  Record.push_back(E->isOverloaded());
1662  Record.AddDeclRef(E->getNamingClass());
1664 }
1665 
1666 void ASTStmtWriter::VisitTypeTraitExpr(TypeTraitExpr *E) {
1667  VisitExpr(E);
1668  Record.push_back(E->TypeTraitExprBits.NumArgs);
1669  Record.push_back(E->TypeTraitExprBits.Kind); // FIXME: Stable encoding
1670  Record.push_back(E->TypeTraitExprBits.Value);
1671  Record.AddSourceRange(E->getSourceRange());
1672  for (unsigned I = 0, N = E->getNumArgs(); I != N; ++I)
1673  Record.AddTypeSourceInfo(E->getArg(I));
1675 }
1676 
1677 void ASTStmtWriter::VisitArrayTypeTraitExpr(ArrayTypeTraitExpr *E) {
1678  VisitExpr(E);
1679  Record.push_back(E->getTrait());
1680  Record.push_back(E->getValue());
1681  Record.AddSourceRange(E->getSourceRange());
1683  Record.AddStmt(E->getDimensionExpression());
1685 }
1686 
1687 void ASTStmtWriter::VisitExpressionTraitExpr(ExpressionTraitExpr *E) {
1688  VisitExpr(E);
1689  Record.push_back(E->getTrait());
1690  Record.push_back(E->getValue());
1691  Record.AddSourceRange(E->getSourceRange());
1692  Record.AddStmt(E->getQueriedExpression());
1694 }
1695 
1696 void ASTStmtWriter::VisitCXXNoexceptExpr(CXXNoexceptExpr *E) {
1697  VisitExpr(E);
1698  Record.push_back(E->getValue());
1699  Record.AddSourceRange(E->getSourceRange());
1700  Record.AddStmt(E->getOperand());
1702 }
1703 
1704 void ASTStmtWriter::VisitPackExpansionExpr(PackExpansionExpr *E) {
1705  VisitExpr(E);
1706  Record.AddSourceLocation(E->getEllipsisLoc());
1707  Record.push_back(E->NumExpansions);
1708  Record.AddStmt(E->getPattern());
1710 }
1711 
1712 void ASTStmtWriter::VisitSizeOfPackExpr(SizeOfPackExpr *E) {
1713  VisitExpr(E);
1714  Record.push_back(E->isPartiallySubstituted() ? E->getPartialArguments().size()
1715  : 0);
1716  Record.AddSourceLocation(E->OperatorLoc);
1717  Record.AddSourceLocation(E->PackLoc);
1718  Record.AddSourceLocation(E->RParenLoc);
1719  Record.AddDeclRef(E->Pack);
1720  if (E->isPartiallySubstituted()) {
1721  for (const auto &TA : E->getPartialArguments())
1722  Record.AddTemplateArgument(TA);
1723  } else if (!E->isValueDependent()) {
1724  Record.push_back(E->getPackLength());
1725  }
1727 }
1728 
1729 void ASTStmtWriter::VisitSubstNonTypeTemplateParmExpr(
1731  VisitExpr(E);
1732  Record.AddDeclRef(E->getParameter());
1733  Record.AddSourceLocation(E->getNameLoc());
1734  Record.AddStmt(E->getReplacement());
1736 }
1737 
1738 void ASTStmtWriter::VisitSubstNonTypeTemplateParmPackExpr(
1740  VisitExpr(E);
1741  Record.AddDeclRef(E->getParameterPack());
1742  Record.AddTemplateArgument(E->getArgumentPack());
1745 }
1746 
1747 void ASTStmtWriter::VisitFunctionParmPackExpr(FunctionParmPackExpr *E) {
1748  VisitExpr(E);
1749  Record.push_back(E->getNumExpansions());
1750  Record.AddDeclRef(E->getParameterPack());
1752  for (FunctionParmPackExpr::iterator I = E->begin(), End = E->end();
1753  I != End; ++I)
1754  Record.AddDeclRef(*I);
1756 }
1757 
1758 void ASTStmtWriter::VisitMaterializeTemporaryExpr(MaterializeTemporaryExpr *E) {
1759  VisitExpr(E);
1760  Record.AddStmt(E->getTemporary());
1761  Record.AddDeclRef(E->getExtendingDecl());
1762  Record.push_back(E->getManglingNumber());
1764 }
1765 
1766 void ASTStmtWriter::VisitCXXFoldExpr(CXXFoldExpr *E) {
1767  VisitExpr(E);
1768  Record.AddSourceLocation(E->LParenLoc);
1769  Record.AddSourceLocation(E->EllipsisLoc);
1770  Record.AddSourceLocation(E->RParenLoc);
1771  Record.AddStmt(E->SubExprs[0]);
1772  Record.AddStmt(E->SubExprs[1]);
1773  Record.push_back(E->Opcode);
1775 }
1776 
1777 void ASTStmtWriter::VisitOpaqueValueExpr(OpaqueValueExpr *E) {
1778  VisitExpr(E);
1779  Record.AddStmt(E->getSourceExpr());
1780  Record.AddSourceLocation(E->getLocation());
1781  Record.push_back(E->isUnique());
1783 }
1784 
1785 void ASTStmtWriter::VisitTypoExpr(TypoExpr *E) {
1786  VisitExpr(E);
1787  // TODO: Figure out sane writer behavior for a TypoExpr, if necessary
1788  llvm_unreachable("Cannot write TypoExpr nodes");
1789 }
1790 
1791 //===----------------------------------------------------------------------===//
1792 // CUDA Expressions and Statements.
1793 //===----------------------------------------------------------------------===//
1794 
1795 void ASTStmtWriter::VisitCUDAKernelCallExpr(CUDAKernelCallExpr *E) {
1796  VisitCallExpr(E);
1797  Record.AddStmt(E->getConfig());
1799 }
1800 
1801 //===----------------------------------------------------------------------===//
1802 // OpenCL Expressions and Statements.
1803 //===----------------------------------------------------------------------===//
1804 void ASTStmtWriter::VisitAsTypeExpr(AsTypeExpr *E) {
1805  VisitExpr(E);
1806  Record.AddSourceLocation(E->getBuiltinLoc());
1807  Record.AddSourceLocation(E->getRParenLoc());
1808  Record.AddStmt(E->getSrcExpr());
1810 }
1811 
1812 //===----------------------------------------------------------------------===//
1813 // Microsoft Expressions and Statements.
1814 //===----------------------------------------------------------------------===//
1815 void ASTStmtWriter::VisitMSPropertyRefExpr(MSPropertyRefExpr *E) {
1816  VisitExpr(E);
1817  Record.push_back(E->isArrow());
1818  Record.AddStmt(E->getBaseExpr());
1820  Record.AddSourceLocation(E->getMemberLoc());
1821  Record.AddDeclRef(E->getPropertyDecl());
1823 }
1824 
1825 void ASTStmtWriter::VisitMSPropertySubscriptExpr(MSPropertySubscriptExpr *E) {
1826  VisitExpr(E);
1827  Record.AddStmt(E->getBase());
1828  Record.AddStmt(E->getIdx());
1829  Record.AddSourceLocation(E->getRBracketLoc());
1831 }
1832 
1833 void ASTStmtWriter::VisitCXXUuidofExpr(CXXUuidofExpr *E) {
1834  VisitExpr(E);
1835  Record.AddSourceRange(E->getSourceRange());
1836  Record.AddString(E->getUuidStr());
1837  if (E->isTypeOperand()) {
1840  } else {
1841  Record.AddStmt(E->getExprOperand());
1843  }
1844 }
1845 
1846 void ASTStmtWriter::VisitSEHExceptStmt(SEHExceptStmt *S) {
1847  VisitStmt(S);
1848  Record.AddSourceLocation(S->getExceptLoc());
1849  Record.AddStmt(S->getFilterExpr());
1850  Record.AddStmt(S->getBlock());
1852 }
1853 
1854 void ASTStmtWriter::VisitSEHFinallyStmt(SEHFinallyStmt *S) {
1855  VisitStmt(S);
1856  Record.AddSourceLocation(S->getFinallyLoc());
1857  Record.AddStmt(S->getBlock());
1859 }
1860 
1861 void ASTStmtWriter::VisitSEHTryStmt(SEHTryStmt *S) {
1862  VisitStmt(S);
1863  Record.push_back(S->getIsCXXTry());
1864  Record.AddSourceLocation(S->getTryLoc());
1865  Record.AddStmt(S->getTryBlock());
1866  Record.AddStmt(S->getHandler());
1868 }
1869 
1870 void ASTStmtWriter::VisitSEHLeaveStmt(SEHLeaveStmt *S) {
1871  VisitStmt(S);
1872  Record.AddSourceLocation(S->getLeaveLoc());
1874 }
1875 
1876 //===----------------------------------------------------------------------===//
1877 // OpenMP Directives.
1878 //===----------------------------------------------------------------------===//
1879 void ASTStmtWriter::VisitOMPExecutableDirective(OMPExecutableDirective *E) {
1880  Record.AddSourceLocation(E->getBeginLoc());
1881  Record.AddSourceLocation(E->getEndLoc());
1882  OMPClauseWriter ClauseWriter(Record);
1883  for (unsigned i = 0; i < E->getNumClauses(); ++i) {
1884  ClauseWriter.writeClause(E->getClause(i));
1885  }
1886  if (E->hasAssociatedStmt())
1887  Record.AddStmt(E->getAssociatedStmt());
1888 }
1889 
1890 void ASTStmtWriter::VisitOMPLoopDirective(OMPLoopDirective *D) {
1891  VisitStmt(D);
1892  Record.push_back(D->getNumClauses());
1893  Record.push_back(D->getCollapsedNumber());
1894  VisitOMPExecutableDirective(D);
1895  Record.AddStmt(D->getIterationVariable());
1896  Record.AddStmt(D->getLastIteration());
1897  Record.AddStmt(D->getCalcLastIteration());
1898  Record.AddStmt(D->getPreCond());
1899  Record.AddStmt(D->getCond());
1900  Record.AddStmt(D->getInit());
1901  Record.AddStmt(D->getInc());
1902  Record.AddStmt(D->getPreInits());
1906  Record.AddStmt(D->getIsLastIterVariable());
1907  Record.AddStmt(D->getLowerBoundVariable());
1908  Record.AddStmt(D->getUpperBoundVariable());
1909  Record.AddStmt(D->getStrideVariable());
1910  Record.AddStmt(D->getEnsureUpperBound());
1911  Record.AddStmt(D->getNextLowerBound());
1912  Record.AddStmt(D->getNextUpperBound());
1913  Record.AddStmt(D->getNumIterations());
1914  }
1916  Record.AddStmt(D->getPrevLowerBoundVariable());
1917  Record.AddStmt(D->getPrevUpperBoundVariable());
1918  Record.AddStmt(D->getDistInc());
1919  Record.AddStmt(D->getPrevEnsureUpperBound());
1922  Record.AddStmt(D->getCombinedEnsureUpperBound());
1923  Record.AddStmt(D->getCombinedInit());
1924  Record.AddStmt(D->getCombinedCond());
1925  Record.AddStmt(D->getCombinedNextLowerBound());
1926  Record.AddStmt(D->getCombinedNextUpperBound());
1927  Record.AddStmt(D->getCombinedDistCond());
1928  Record.AddStmt(D->getCombinedParForInDistCond());
1929  }
1930  for (auto I : D->counters()) {
1931  Record.AddStmt(I);
1932  }
1933  for (auto I : D->private_counters()) {
1934  Record.AddStmt(I);
1935  }
1936  for (auto I : D->inits()) {
1937  Record.AddStmt(I);
1938  }
1939  for (auto I : D->updates()) {
1940  Record.AddStmt(I);
1941  }
1942  for (auto I : D->finals()) {
1943  Record.AddStmt(I);
1944  }
1945 }
1946 
1947 void ASTStmtWriter::VisitOMPParallelDirective(OMPParallelDirective *D) {
1948  VisitStmt(D);
1949  Record.push_back(D->getNumClauses());
1950  VisitOMPExecutableDirective(D);
1951  Record.push_back(D->hasCancel() ? 1 : 0);
1953 }
1954 
1955 void ASTStmtWriter::VisitOMPSimdDirective(OMPSimdDirective *D) {
1956  VisitOMPLoopDirective(D);
1958 }
1959 
1960 void ASTStmtWriter::VisitOMPForDirective(OMPForDirective *D) {
1961  VisitOMPLoopDirective(D);
1962  Record.push_back(D->hasCancel() ? 1 : 0);
1964 }
1965 
1966 void ASTStmtWriter::VisitOMPForSimdDirective(OMPForSimdDirective *D) {
1967  VisitOMPLoopDirective(D);
1969 }
1970 
1971 void ASTStmtWriter::VisitOMPSectionsDirective(OMPSectionsDirective *D) {
1972  VisitStmt(D);
1973  Record.push_back(D->getNumClauses());
1974  VisitOMPExecutableDirective(D);
1975  Record.push_back(D->hasCancel() ? 1 : 0);
1977 }
1978 
1979 void ASTStmtWriter::VisitOMPSectionDirective(OMPSectionDirective *D) {
1980  VisitStmt(D);
1981  VisitOMPExecutableDirective(D);
1982  Record.push_back(D->hasCancel() ? 1 : 0);
1984 }
1985 
1986 void ASTStmtWriter::VisitOMPSingleDirective(OMPSingleDirective *D) {
1987  VisitStmt(D);
1988  Record.push_back(D->getNumClauses());
1989  VisitOMPExecutableDirective(D);
1991 }
1992 
1993 void ASTStmtWriter::VisitOMPMasterDirective(OMPMasterDirective *D) {
1994  VisitStmt(D);
1995  VisitOMPExecutableDirective(D);
1997 }
1998 
1999 void ASTStmtWriter::VisitOMPCriticalDirective(OMPCriticalDirective *D) {
2000  VisitStmt(D);
2001  Record.push_back(D->getNumClauses());
2002  VisitOMPExecutableDirective(D);
2005 }
2006 
2007 void ASTStmtWriter::VisitOMPParallelForDirective(OMPParallelForDirective *D) {
2008  VisitOMPLoopDirective(D);
2009  Record.push_back(D->hasCancel() ? 1 : 0);
2011 }
2012 
2013 void ASTStmtWriter::VisitOMPParallelForSimdDirective(
2015  VisitOMPLoopDirective(D);
2017 }
2018 
2019 void ASTStmtWriter::VisitOMPParallelSectionsDirective(
2021  VisitStmt(D);
2022  Record.push_back(D->getNumClauses());
2023  VisitOMPExecutableDirective(D);
2024  Record.push_back(D->hasCancel() ? 1 : 0);
2026 }
2027 
2028 void ASTStmtWriter::VisitOMPTaskDirective(OMPTaskDirective *D) {
2029  VisitStmt(D);
2030  Record.push_back(D->getNumClauses());
2031  VisitOMPExecutableDirective(D);
2032  Record.push_back(D->hasCancel() ? 1 : 0);
2034 }
2035 
2036 void ASTStmtWriter::VisitOMPAtomicDirective(OMPAtomicDirective *D) {
2037  VisitStmt(D);
2038  Record.push_back(D->getNumClauses());
2039  VisitOMPExecutableDirective(D);
2040  Record.AddStmt(D->getX());
2041  Record.AddStmt(D->getV());
2042  Record.AddStmt(D->getExpr());
2043  Record.AddStmt(D->getUpdateExpr());
2044  Record.push_back(D->isXLHSInRHSPart() ? 1 : 0);
2045  Record.push_back(D->isPostfixUpdate() ? 1 : 0);
2047 }
2048 
2049 void ASTStmtWriter::VisitOMPTargetDirective(OMPTargetDirective *D) {
2050  VisitStmt(D);
2051  Record.push_back(D->getNumClauses());
2052  VisitOMPExecutableDirective(D);
2054 }
2055 
2056 void ASTStmtWriter::VisitOMPTargetDataDirective(OMPTargetDataDirective *D) {
2057  VisitStmt(D);
2058  Record.push_back(D->getNumClauses());
2059  VisitOMPExecutableDirective(D);
2061 }
2062 
2063 void ASTStmtWriter::VisitOMPTargetEnterDataDirective(
2065  VisitStmt(D);
2066  Record.push_back(D->getNumClauses());
2067  VisitOMPExecutableDirective(D);
2069 }
2070 
2071 void ASTStmtWriter::VisitOMPTargetExitDataDirective(
2073  VisitStmt(D);
2074  Record.push_back(D->getNumClauses());
2075  VisitOMPExecutableDirective(D);
2077 }
2078 
2079 void ASTStmtWriter::VisitOMPTargetParallelDirective(
2081  VisitStmt(D);
2082  Record.push_back(D->getNumClauses());
2083  VisitOMPExecutableDirective(D);
2085 }
2086 
2087 void ASTStmtWriter::VisitOMPTargetParallelForDirective(
2089  VisitOMPLoopDirective(D);
2090  Record.push_back(D->hasCancel() ? 1 : 0);
2092 }
2093 
2094 void ASTStmtWriter::VisitOMPTaskyieldDirective(OMPTaskyieldDirective *D) {
2095  VisitStmt(D);
2096  VisitOMPExecutableDirective(D);
2098 }
2099 
2100 void ASTStmtWriter::VisitOMPBarrierDirective(OMPBarrierDirective *D) {
2101  VisitStmt(D);
2102  VisitOMPExecutableDirective(D);
2104 }
2105 
2106 void ASTStmtWriter::VisitOMPTaskwaitDirective(OMPTaskwaitDirective *D) {
2107  VisitStmt(D);
2108  VisitOMPExecutableDirective(D);
2110 }
2111 
2112 void ASTStmtWriter::VisitOMPTaskgroupDirective(OMPTaskgroupDirective *D) {
2113  VisitStmt(D);
2114  Record.push_back(D->getNumClauses());
2115  VisitOMPExecutableDirective(D);
2116  Record.AddStmt(D->getReductionRef());
2118 }
2119 
2120 void ASTStmtWriter::VisitOMPFlushDirective(OMPFlushDirective *D) {
2121  VisitStmt(D);
2122  Record.push_back(D->getNumClauses());
2123  VisitOMPExecutableDirective(D);
2125 }
2126 
2127 void ASTStmtWriter::VisitOMPOrderedDirective(OMPOrderedDirective *D) {
2128  VisitStmt(D);
2129  Record.push_back(D->getNumClauses());
2130  VisitOMPExecutableDirective(D);
2132 }
2133 
2134 void ASTStmtWriter::VisitOMPTeamsDirective(OMPTeamsDirective *D) {
2135  VisitStmt(D);
2136  Record.push_back(D->getNumClauses());
2137  VisitOMPExecutableDirective(D);
2139 }
2140 
2141 void ASTStmtWriter::VisitOMPCancellationPointDirective(
2143  VisitStmt(D);
2144  VisitOMPExecutableDirective(D);
2145  Record.push_back(D->getCancelRegion());
2147 }
2148 
2149 void ASTStmtWriter::VisitOMPCancelDirective(OMPCancelDirective *D) {
2150  VisitStmt(D);
2151  Record.push_back(D->getNumClauses());
2152  VisitOMPExecutableDirective(D);
2153  Record.push_back(D->getCancelRegion());
2155 }
2156 
2157 void ASTStmtWriter::VisitOMPTaskLoopDirective(OMPTaskLoopDirective *D) {
2158  VisitOMPLoopDirective(D);
2160 }
2161 
2162 void ASTStmtWriter::VisitOMPTaskLoopSimdDirective(OMPTaskLoopSimdDirective *D) {
2163  VisitOMPLoopDirective(D);
2165 }
2166 
2167 void ASTStmtWriter::VisitOMPDistributeDirective(OMPDistributeDirective *D) {
2168  VisitOMPLoopDirective(D);
2170 }
2171 
2172 void ASTStmtWriter::VisitOMPTargetUpdateDirective(OMPTargetUpdateDirective *D) {
2173  VisitStmt(D);
2174  Record.push_back(D->getNumClauses());
2175  VisitOMPExecutableDirective(D);
2177 }
2178 
2179 void ASTStmtWriter::VisitOMPDistributeParallelForDirective(
2181  VisitOMPLoopDirective(D);
2182  Record.push_back(D->hasCancel() ? 1 : 0);
2184 }
2185 
2186 void ASTStmtWriter::VisitOMPDistributeParallelForSimdDirective(
2188  VisitOMPLoopDirective(D);
2190 }
2191 
2192 void ASTStmtWriter::VisitOMPDistributeSimdDirective(
2194  VisitOMPLoopDirective(D);
2196 }
2197 
2198 void ASTStmtWriter::VisitOMPTargetParallelForSimdDirective(
2200  VisitOMPLoopDirective(D);
2202 }
2203 
2204 void ASTStmtWriter::VisitOMPTargetSimdDirective(OMPTargetSimdDirective *D) {
2205  VisitOMPLoopDirective(D);
2207 }
2208 
2209 void ASTStmtWriter::VisitOMPTeamsDistributeDirective(
2211  VisitOMPLoopDirective(D);
2213 }
2214 
2215 void ASTStmtWriter::VisitOMPTeamsDistributeSimdDirective(
2217  VisitOMPLoopDirective(D);
2219 }
2220 
2221 void ASTStmtWriter::VisitOMPTeamsDistributeParallelForSimdDirective(
2223  VisitOMPLoopDirective(D);
2225 }
2226 
2227 void ASTStmtWriter::VisitOMPTeamsDistributeParallelForDirective(
2229  VisitOMPLoopDirective(D);
2230  Record.push_back(D->hasCancel() ? 1 : 0);
2232 }
2233 
2234 void ASTStmtWriter::VisitOMPTargetTeamsDirective(OMPTargetTeamsDirective *D) {
2235  VisitStmt(D);
2236  Record.push_back(D->getNumClauses());
2237  VisitOMPExecutableDirective(D);
2239 }
2240 
2241 void ASTStmtWriter::VisitOMPTargetTeamsDistributeDirective(
2243  VisitOMPLoopDirective(D);
2245 }
2246 
2247 void ASTStmtWriter::VisitOMPTargetTeamsDistributeParallelForDirective(
2249  VisitOMPLoopDirective(D);
2250  Record.push_back(D->hasCancel() ? 1 : 0);
2252 }
2253 
2254 void ASTStmtWriter::VisitOMPTargetTeamsDistributeParallelForSimdDirective(
2256  VisitOMPLoopDirective(D);
2257  Code = serialization::
2259 }
2260 
2261 void ASTStmtWriter::VisitOMPTargetTeamsDistributeSimdDirective(
2263  VisitOMPLoopDirective(D);
2265 }
2266 
2267 //===----------------------------------------------------------------------===//
2268 // ASTWriter Implementation
2269 //===----------------------------------------------------------------------===//
2270 
2272  assert(SwitchCaseIDs.find(S) == SwitchCaseIDs.end() &&
2273  "SwitchCase recorded twice");
2274  unsigned NextID = SwitchCaseIDs.size();
2275  SwitchCaseIDs[S] = NextID;
2276  return NextID;
2277 }
2278 
2280  assert(SwitchCaseIDs.find(S) != SwitchCaseIDs.end() &&
2281  "SwitchCase hasn't been seen yet");
2282  return SwitchCaseIDs[S];
2283 }
2284 
2286  SwitchCaseIDs.clear();
2287 }
2288 
2289 /// Write the given substatement or subexpression to the
2290 /// bitstream.
2291 void ASTWriter::WriteSubStmt(Stmt *S) {
2292  RecordData Record;
2293  ASTStmtWriter Writer(*this, Record);
2294  ++NumStatements;
2295 
2296  if (!S) {
2297  Stream.EmitRecord(serialization::STMT_NULL_PTR, Record);
2298  return;
2299  }
2300 
2301  llvm::DenseMap<Stmt *, uint64_t>::iterator I = SubStmtEntries.find(S);
2302  if (I != SubStmtEntries.end()) {
2303  Record.push_back(I->second);
2304  Stream.EmitRecord(serialization::STMT_REF_PTR, Record);
2305  return;
2306  }
2307 
2308 #ifndef NDEBUG
2309  assert(!ParentStmts.count(S) && "There is a Stmt cycle!");
2310 
2311  struct ParentStmtInserterRAII {
2312  Stmt *S;
2313  llvm::DenseSet<Stmt *> &ParentStmts;
2314 
2315  ParentStmtInserterRAII(Stmt *S, llvm::DenseSet<Stmt *> &ParentStmts)
2316  : S(S), ParentStmts(ParentStmts) {
2317  ParentStmts.insert(S);
2318  }
2319  ~ParentStmtInserterRAII() {
2320  ParentStmts.erase(S);
2321  }
2322  };
2323 
2324  ParentStmtInserterRAII ParentStmtInserter(S, ParentStmts);
2325 #endif
2326 
2327  Writer.Visit(S);
2328 
2329  uint64_t Offset = Writer.Emit();
2330  SubStmtEntries[S] = Offset;
2331 }
2332 
2333 /// Flush all of the statements that have been added to the
2334 /// queue via AddStmt().
2335 void ASTRecordWriter::FlushStmts() {
2336  // We expect to be the only consumer of the two temporary statement maps,
2337  // assert that they are empty.
2338  assert(Writer->SubStmtEntries.empty() && "unexpected entries in sub-stmt map");
2339  assert(Writer->ParentStmts.empty() && "unexpected entries in parent stmt map");
2340 
2341  for (unsigned I = 0, N = StmtsToEmit.size(); I != N; ++I) {
2342  Writer->WriteSubStmt(StmtsToEmit[I]);
2343 
2344  assert(N == StmtsToEmit.size() && "record modified while being written!");
2345 
2346  // Note that we are at the end of a full expression. Any
2347  // expression records that follow this one are part of a different
2348  // expression.
2349  Writer->Stream.EmitRecord(serialization::STMT_STOP, ArrayRef<uint32_t>());
2350 
2351  Writer->SubStmtEntries.clear();
2352  Writer->ParentStmts.clear();
2353  }
2354 
2355  StmtsToEmit.clear();
2356 }
2357 
2358 void ASTRecordWriter::FlushSubStmts() {
2359  // For a nested statement, write out the substatements in reverse order (so
2360  // that a simple stack machine can be used when loading), and don't emit a
2361  // STMT_STOP after each one.
2362  for (unsigned I = 0, N = StmtsToEmit.size(); I != N; ++I) {
2363  Writer->WriteSubStmt(StmtsToEmit[N - I - 1]);
2364  assert(N == StmtsToEmit.size() && "record modified while being written!");
2365  }
2366 
2367  StmtsToEmit.clear();
2368 }
SourceLocation getRParenLoc() const
Definition: Stmt.h:2218
Expr * getInc()
Definition: Stmt.h:2270
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
Definition: ExprObjC.h:577
unsigned getNumSemanticExprs() const
Definition: Expr.h:5363
A PredefinedExpr record.
Definition: ASTBitCodes.h:1629
const Expr * getSubExpr() const
Definition: Expr.h:890
A call to an overloaded operator written using operator syntax.
Definition: ExprCXX.h:78
ObjCIndirectCopyRestoreExpr - Represents the passing of a function argument by indirect copy-restore ...
Definition: ExprObjC.h:1518
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:328
The receiver is the instance of the superclass object.
Definition: ExprObjC.h:1061
Represents a single C99 designator.
Definition: Expr.h:4494
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
Definition: Expr.h:1215
SourceLocation getRBracLoc() const
Definition: Stmt.h:1334
Defines the clang::ASTContext interface.
A CompoundLiteralExpr record.
Definition: ASTBitCodes.h:1689
This represents &#39;#pragma omp distribute simd&#39; composite directive.
Definition: StmtOpenMP.h:3248
const BlockDecl * getBlockDecl() const
Definition: Expr.h:5191
Expr * getNextUpperBound() const
Definition: StmtOpenMP.h:865
IdentifierInfo * getInputIdentifier(unsigned i) const
Definition: Stmt.h:2789
This represents &#39;#pragma omp master&#39; directive.
Definition: StmtOpenMP.h:1431
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
Definition: ExprCXX.h:923
SourceLocation getRParenLoc() const
Definition: Stmt.h:2696
The null pointer literal (C++11 [lex.nullptr])
Definition: ExprCXX.h:596
unsigned getNumDecls() const
Gets the number of declarations in the unresolved set.
Definition: ExprCXX.h:2738
This represents &#39;#pragma omp task&#39; directive.
Definition: StmtOpenMP.h:1771
This represents a GCC inline-assembly statement extension.
Definition: Stmt.h:2675
Represents a &#39;co_await&#39; expression while the type of the promise is dependent.
Definition: ExprCXX.h:4455
SourceLocation getForLoc() const
Definition: StmtCXX.h:194
NamedDecl * getFoundDecl()
Get the NamedDecl through which this reference occurred.
Definition: Expr.h:1151
bool getValue() const
Definition: ExprObjC.h:94
The receiver is an object instance.
Definition: ExprObjC.h:1055
Expr * getLHS() const
Definition: Expr.h:3627
Expr * getUpperBoundVariable() const
Definition: StmtOpenMP.h:833
unsigned getNumInputs() const
Definition: Stmt.h:2591
SourceLocation getOpLoc() const
Definition: ExprObjC.h:1473
Expr * getSyntacticForm()
Return the syntactic form of this expression, i.e.
Definition: Expr.h:5343
SourceLocation getRParenLoc() const
Definition: Expr.h:2635
ObjCDictionaryElement getKeyValueElement(unsigned Index) const
Definition: ExprObjC.h:344
CompoundStmt * getBlock() const
Definition: Stmt.h:3010
An IndirectGotoStmt record.
Definition: ASTBitCodes.h:1602
SourceLocation getForLoc() const
Definition: Stmt.h:2283
SourceLocation getUsedLocation() const
Retrieve the location where this default argument was actually used.
Definition: ExprCXX.h:1110
uint64_t getValue() const
Definition: ExprCXX.h:2559
StringKind getKind() const
Definition: Expr.h:1681
An AddrLabelExpr record.
Definition: ASTBitCodes.h:1719
ValueDecl * getMemberDecl() const
Retrieve the member declaration to which this expression refers.
Definition: Expr.h:2773
NameKind
The kind of the name stored in this DeclarationName.
Expr * getCond() const
Definition: Expr.h:4022
ObjCMethodDecl * getAtIndexMethodDecl() const
Definition: ExprObjC.h:854
Selector getSelector() const
Definition: ExprObjC.cpp:312
SourceRange getSourceRange() const
Definition: ExprCXX.h:3743
void AddToken(const Token &Tok, RecordDataImpl &Record)
Emit a token.
Definition: ASTWriter.cpp:4486
SourceLocation getEllipsisLoc() const
Get the location of the ... in a case statement of the form LHS ... RHS.
Definition: Stmt.h:1469
SourceLocation getLParen() const
Get the location of the left parentheses &#39;(&#39;.
Definition: Expr.h:1868
const Expr * getSubExpr() const
Definition: ExprCXX.h:1037
Expr * getCond()
Definition: Stmt.h:2112
Expr * getExpr(unsigned Index)
getExpr - Return the Expr at the specified index.
Definition: Expr.h:3886
A CXXStaticCastExpr record.
Definition: ASTBitCodes.h:1841
unsigned getNumSubExprs() const
getNumSubExprs - Return the size of the SubExprs array.
Definition: Expr.h:3880
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:5079
bool isSuperReceiver() const
Definition: ExprObjC.h:739
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
Definition: ExprCXX.h:2430
SourceLocation TemplateKWLoc
The source location of the template keyword; this is used as part of the representation of qualified ...
Definition: TemplateBase.h:662
An AttributedStmt record.
Definition: ASTBitCodes.h:1581
CompoundStmt * getSubStmt()
Definition: Expr.h:3817
A CXXReinterpretCastExpr record.
Definition: ASTBitCodes.h:1847
const Expr * getInit(unsigned Init) const
Definition: Expr.h:4233
unsigned getNumAsmToks()
Definition: Stmt.h:2880
An ObjCBoolLiteralExpr record.
Definition: ASTBitCodes.h:1809
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:1047
Expr *const * semantics_iterator
Definition: Expr.h:5365
ObjCProtocolDecl * getProtocol() const
Definition: ExprObjC.h:490
Represents a &#39;co_return&#39; statement in the C++ Coroutines TS.
Definition: StmtCXX.h:435
Stmt - This represents one statement.
Definition: Stmt.h:66
Expr * getLowerBoundVariable() const
Definition: StmtOpenMP.h:825
unsigned getNumArgs() const
getNumArgs - Return the number of actual arguments to this call.
Definition: Expr.h:2540
Expr * getDimensionExpression() const
Definition: ExprCXX.h:2561
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:2198
IfStmt - This represents an if/then/else.
Definition: Stmt.h:1687
SourceLocation getOperatorLoc() const
getOperatorLoc - Return the location of the operator.
Definition: Expr.h:2152
SourceLocation getRParenLoc() const
Definition: Expr.h:3867
SourceLocation getLocation() const
Definition: Expr.h:1493
ObjCMethodDecl * setAtIndexMethodDecl() const
Definition: ExprObjC.h:858
void AddNestedNameSpecifierLoc(NestedNameSpecifierLoc NNS)
Emit a nested name specifier with source-location information.
Definition: ASTWriter.cpp:5753
unsigned getNumOutputs() const
Definition: Stmt.h:2569
This represents &#39;#pragma omp for simd&#39; directive.
Definition: StmtOpenMP.h:1181
Expr * getBase() const
Definition: Expr.h:2767
const StringLiteral * getAsmString() const
Definition: Stmt.h:2701
TypeSourceInfo * getTypeSourceInfo() const
Definition: Expr.h:2961
An ImplicitValueInitExpr record.
Definition: ASTBitCodes.h:1713
iterator end()
Definition: DeclGroup.h:106
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:87
This represents &#39;#pragma omp teams distribute parallel for&#39; composite directive.
Definition: StmtOpenMP.h:3659
An ImplicitCastExpr record.
Definition: ASTBitCodes.h:1683
Stmt * getHandlerBlock() const
Definition: StmtCXX.h:52
SourceLocation getBeginLoc() const
Returns starting location of directive kind.
Definition: StmtOpenMP.h:168
llvm::APFloat getValue() const
Definition: Expr.h:1459
ObjCMethodDecl * getImplicitPropertySetter() const
Definition: ExprObjC.h:680
Represents the index of the current element of an array being initialized by an ArrayInitLoopExpr.
Definition: Expr.h:4858
FunctionDecl * getOperatorNew() const
Definition: ExprCXX.h:2033
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
Definition: ExprCXX.h:2828
DeclarationNameInfo getNameInfo() const
Retrieve the name of the entity we&#39;re testing for, along with location information.
Definition: StmtCXX.h:277
const Expr * getSubExpr() const
Definition: Expr.h:4109
Defines the C++ template declaration subclasses.
Opcode getOpcode() const
Definition: Expr.h:3322
unsigned getNumSubExprs() const
Retrieve the total number of subexpressions in this designated initializer expression, including the actual initialized value and any expressions that occur within array and array-range designators.
Definition: Expr.h:4665
SourceLocation getIdentLoc() const
Definition: Stmt.h:1607
Represents an attribute applied to a statement.
Definition: Stmt.h:1633
ParenExpr - This represents a parethesized expression, e.g.
Definition: Expr.h:1844
NamedDecl * getDecl() const
A CXXOperatorCallExpr record.
Definition: ASTBitCodes.h:1826
bool hasQualifier() const
Determines whether this member expression actually had a C++ nested-name-specifier prior to the name ...
Definition: Expr.h:2787
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies this name, if any.
Definition: StmtCXX.h:273
Expr * getLowerBound()
Get lower bound of array section.
Definition: ExprOpenMP.h:91
This represents &#39;#pragma omp target teams distribute&#39; combined directive.
Definition: StmtOpenMP.h:3796
A CXXTemporaryObjectExpr record.
Definition: ASTBitCodes.h:1838
Represents Objective-C&#39;s @throw statement.
Definition: StmtObjC.h:313
bool requiresZeroInitialization() const
Whether this construction first requires zero-initialization before the initializer is called...
Definition: ExprCXX.h:1373
SourceLocation getLocation() const
Definition: ExprCXX.h:610
const RecordDecl * getCapturedRecordDecl() const
Retrieve the record declaration for captured variables.
Definition: Stmt.h:3223
SourceLocation getRParenLoc() const
Definition: Expr.h:2292
SourceLocation getKeywordLoc() const
Definition: ExprCXX.h:4486
Represents a call to a C++ constructor.
Definition: ExprCXX.h:1262
SourceLocation getBeginLoc() const LLVM_READONLY
Definition: Stmt.h:1169
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
Definition: ExprObjC.h:803
TypeSourceInfo * getTypeInfoAsWritten() const
getTypeInfoAsWritten - Returns the type source info for the type that this expression is casting to...
Definition: Expr.h:3208
FPOptions getFPFeatures() const
Definition: Expr.h:3461
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent...
Definition: ExprCXX.h:2514
bool getIsCXXTry() const
Definition: Stmt.h:3048
SourceLocation getLParenLoc() const
Definition: Expr.h:3250
A constant expression context.
Definition: ASTBitCodes.h:1626
Expr * getCombinedParForInDistCond() const
Definition: StmtOpenMP.h:953
This represents &#39;#pragma omp parallel for&#39; directive.
Definition: StmtOpenMP.h:1552
MS property subscript expression.
Definition: ExprCXX.h:828
IdentKind getIdentKind() const
Definition: Expr.h:1806
SourceLocation getGotoLoc() const
Definition: Stmt.h:2355
SourceLocation getRParenLoc() const
Definition: ExprCXX.h:1895
This represents &#39;#pragma omp target teams distribute parallel for&#39; combined directive.
Definition: StmtOpenMP.h:3864
Expr * getCombinedEnsureUpperBound() const
Definition: StmtOpenMP.h:917
Represents a prvalue temporary that is written into memory so that a reference can bind to it...
Definition: ExprCXX.h:4156
float __ovld __cnfn distance(float p0, float p1)
Returns the distance between p0 and p1.
SourceLocation getAccessorLoc() const
Definition: Expr.h:5141
SourceLocation getRParenLoc() const
getRParenLoc - Return the location of final right parenthesis.
Definition: Expr.h:3952
unsigned getDeclRefExprAbbrev() const
Definition: ASTWriter.h:693
const Expr * getSubExpr() const
Definition: Expr.h:1529
SourceLocation getAtLoc() const
Definition: ExprObjC.h:67
SourceLocation getCoawaitLoc() const
Definition: StmtCXX.h:195
Expr * getIndexExpr(unsigned Idx)
Definition: Expr.h:2180
SourceLocation getEndLoc() const
Returns ending location of directive.
Definition: StmtOpenMP.h:170
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:1756
This represents &#39;#pragma omp target exit data&#39; directive.
Definition: StmtOpenMP.h:2463
Stmt * getSubStmt()
Definition: Stmt.h:1555
const VarDecl * getNRVOCandidate() const
Retrieve the variable that might be used for the named return value optimization. ...
Definition: Stmt.h:2485
SourceLocation getLParenLoc() const
Definition: Stmt.h:2285
bool hasTemplateKWAndArgsInfo() const
Definition: Expr.h:1161
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:2646
ObjCIsaExpr - Represent X->isa and X.isa when X is an ObjC &#39;id&#39; type.
Definition: ExprObjC.h:1437
CompoundLiteralExpr - [C99 6.5.2.5].
Definition: Expr.h:2925
SourceRange getSourceRange() const LLVM_READONLY
Definition: ExprCXX.h:738
SourceLocation getOperatorLoc() const
Retrieve the location of the &#39;.&#39; or &#39;->&#39; operator.
Definition: ExprCXX.h:2352
SourceLocation getAtLoc() const
Definition: ExprObjC.h:445
unsigned getNumArgs() const
Determine the number of arguments to this type trait.
Definition: ExprCXX.h:2479
SourceRange getSourceRange() const
Definition: ExprCXX.h:2158
ObjCInterfaceDecl * getClassReceiver() const
Definition: ExprObjC.h:734
Expr * getCombinedUpperBoundVariable() const
Definition: StmtOpenMP.h:911
SourceLocation getColonLoc() const
Definition: Expr.h:3572
bool isArrow() const
Definition: ExprObjC.h:1465
SourceLocation getLeftLoc() const
Definition: ExprObjC.h:1363
Expr * getCalcLastIteration() const
Definition: StmtOpenMP.h:793
Implicit construction of a std::initializer_list<T> object from an array temporary within list-initia...
Definition: ExprCXX.h:624
Stmt * getThen()
Definition: Stmt.h:1774
SourceLocation getIfLoc() const
Definition: Stmt.h:1846
unsigned getNumPlacementArgs() const
Definition: ExprCXX.h:2051
TypeSourceInfo * getArgumentTypeInfo() const
Definition: Expr.h:2262
bool requiresADL() const
True if this declaration should be extended by argument-dependent lookup.
Definition: ExprCXX.h:2896
SourceRange getSourceRange() const LLVM_READONLY
Retrieve the source range that covers this offsetof node.
Definition: Expr.h:2098
capture_iterator capture_begin()
Retrieve an iterator pointing to the first capture.
Definition: Stmt.h:3248
A CXXConstructExpr record.
Definition: ASTBitCodes.h:1832
unsigned getNumExpressions() const
Definition: Expr.h:2195
SourceLocation getLocation() const
Retrieve the location of the literal.
Definition: Expr.h:1334
raw_arg_iterator raw_arg_begin()
Definition: ExprCXX.h:2143
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will call.
Definition: ExprCXX.h:1483
A C++ throw-expression (C++ [except.throw]).
Definition: ExprCXX.h:1015
Expr * getExprOperand() const
Definition: ExprCXX.h:726
Represents an expression – generally a full-expression – that introduces cleanups to be run at the ...
Definition: ExprCXX.h:3089
TypeSourceInfo * getArg(unsigned I) const
Retrieve the Ith argument.
Definition: ExprCXX.h:2482
SourceRange getSourceRange() const LLVM_READONLY
Definition: ExprObjC.h:147
SourceLocation getRParenLoc() const
Definition: Expr.h:5041
SourceLocation getLocation() const
Retrieve the location of the literal.
Definition: Expr.h:1373
void AddString(StringRef Str)
Emit a string.
Definition: ASTWriter.h:945
iterator begin() const
Definition: ExprCXX.h:4115
bool isXLHSInRHSPart() const
Return true if helper update expression has form &#39;OpaqueValueExpr(x) binop OpaqueValueExpr(expr)&#39; and...
Definition: StmtOpenMP.h:2260
void AddSourceRange(SourceRange Range)
Emit a source range.
Definition: ASTWriter.h:852
A ShuffleVectorExpr record.
Definition: ASTBitCodes.h:1731
SourceLocation getBuiltinLoc() const
Definition: Expr.h:4029
ObjCPropertyDecl * getExplicitProperty() const
Definition: ExprObjC.h:670
A C++ static_cast expression (C++ [expr.static.cast]).
Definition: ExprCXX.h:326
void AddTypeSourceInfo(TypeSourceInfo *TInfo)
Emits a reference to a declarator info.
Definition: ASTWriter.cpp:5455
Expr * getExprOperand() const
Definition: ExprCXX.h:933
const Stmt * getSubStmt() const
Definition: StmtObjC.h:356
SourceLocation getRParenLoc() const
Retrieve the location of the closing parenthesis.
Definition: ExprCXX.h:303
LabelStmt - Represents a label, which has a substatement.
Definition: Stmt.h:1593
Represents a C99 designated initializer expression.
Definition: Expr.h:4419
SourceLocation getAtLoc() const
Definition: ExprObjC.h:494
An OffsetOfExpr record.
Definition: ASTBitCodes.h:1659
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
Definition: Decl.h:298
TypeSourceInfo * getEncodedTypeSourceInfo() const
Definition: ExprObjC.h:409
TypeSourceInfo * getScopeTypeInfo() const
Retrieve the scope type in a qualified pseudo-destructor expression.
Definition: ExprCXX.h:2363
SourceLocation getKeywordLoc() const
Definition: StmtCXX.h:455
Stmt * getBody()
Definition: Stmt.h:2210
An ObjCAtThrowStmt record.
Definition: ASTBitCodes.h:1803
SourceLocation getTildeLoc() const
Retrieve the location of the &#39;~&#39;.
Definition: ExprCXX.h:2370
FieldDecl * getField() const
For a field offsetof node, returns the field.
Definition: Expr.h:2077
SourceLocation getRParenLoc() const
Definition: Expr.h:5524
void AddTypeRef(QualType T)
Emit a reference to a type.
Definition: ASTWriter.h:883
An element in an Objective-C dictionary literal.
Definition: ExprObjC.h:239
A DesignatedInitExpr record.
Definition: ASTBitCodes.h:1698
This represents &#39;#pragma omp parallel&#39; directive.
Definition: StmtOpenMP.h:276
ShuffleVectorExpr - clang-specific builtin-in function __builtin_shufflevector.
Definition: Expr.h:3846
bool cleanupsHaveSideEffects() const
Definition: ExprCXX.h:3127
QualType getComputationResultType() const
Definition: Expr.h:3530
SourceLocation getRParen() const
Get the location of the right parentheses &#39;)&#39;.
Definition: Expr.h:1872
DeclStmt * getConditionVariableDeclStmt()
If this SwitchStmt has a condition variable, return the faux DeclStmt associated with the creation of...
Definition: Stmt.h:2003
bool isFileScope() const
Definition: Expr.h:2955
SourceLocation getAmpAmpLoc() const
Definition: Expr.h:3771
Expr * getEnsureUpperBound() const
Definition: StmtOpenMP.h:849
NameKind getNameKind() const
Determine what kind of name this is.
SourceLocation getEndLoc() const
Definition: Stmt.h:1166
Represents a member of a struct/union/class.
Definition: Decl.h:2579
Expr * getBase()
Retrieve the base object of this member expressions, e.g., the x in x.m.
Definition: ExprCXX.h:3615
Represents a place-holder for an object not to be initialized by anything.
Definition: Expr.h:4713
NonTypeTemplateParmDecl * getParameter() const
Definition: ExprCXX.h:3992
const DeclarationNameInfo & getNameInfo() const
Gets the full name info.
Definition: ExprCXX.h:2741
StringLiteral * getString()
Definition: ExprObjC.h:63
unsigned getArrayExprIndex() const
For an array element node, returns the index into the array of expressions.
Definition: Expr.h:2071
Expr * getInc() const
Definition: StmtOpenMP.h:809
SourceLocation getLabelLoc() const
Definition: Expr.h:3773
SourceLocation getRBraceLoc() const
Definition: Expr.h:4332
SourceLocation getOperatorLoc() const
Definition: Expr.h:2289
GNUNullExpr - Implements the GNU __null extension, which is a name for a null pointer constant that h...
Definition: Expr.h:4057
ArrayRef< Expr * > updates()
Definition: StmtOpenMP.h:989
SourceLocation getRParenLoc() const
Definition: Expr.h:3253
The iterator over UnresolvedSets.
Definition: UnresolvedSet.h:32
This represents &#39;#pragma omp target simd&#39; directive.
Definition: StmtOpenMP.h:3384
Expr * getSourceExpr() const
The source expression of an opaque value expression is the expression which originally generated the ...
Definition: Expr.h:1003
Represents a C++ member access expression for which lookup produced a set of overloaded functions...
Definition: ExprCXX.h:3538
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
Definition: Expr.h:5116
const DeclGroupRef getDeclGroup() const
Definition: Stmt.h:1161
OpenMPDirectiveKind getDirectiveKind() const
Definition: StmtOpenMP.h:244
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:2040
Expr * getSubExpr()
Definition: Expr.h:3050
This represents &#39;#pragma omp barrier&#39; directive.
Definition: StmtOpenMP.h:1883
SourceLocation getQuestionLoc() const
Definition: Expr.h:3571
ObjCArrayLiteral - used for objective-c array containers; as in: @["Hello", NSApp, [NSNumber numberWithInt:42]];.
Definition: ExprObjC.h:171
unsigned getCharByteWidth() const
Definition: Expr.h:1679
This is a common base class for loop directives (&#39;omp simd&#39;, &#39;omp for&#39;, &#39;omp for simd&#39; etc...
Definition: StmtOpenMP.h:338
Represents a reference to a non-type template parameter pack that has been substituted with a non-tem...
Definition: ExprCXX.h:4014
This represents &#39;#pragma omp critical&#39; directive.
Definition: StmtOpenMP.h:1478
OpenMPDirectiveKind getCancelRegion() const
Get cancellation region for the current cancellation point.
Definition: StmtOpenMP.h:2762
bool hadArrayRangeDesignator() const
Definition: Expr.h:4353
SourceLocation getCatchLoc() const
Definition: StmtCXX.h:49
Selector getSelector() const
Definition: ExprObjC.h:442
void AddIdentifierRef(const IdentifierInfo *II)
Emit a reference to an identifier.
Definition: ASTWriter.h:866
Represents Objective-C&#39;s @catch statement.
Definition: StmtObjC.h:74
SourceLocation getOpLoc() const
Definition: ExprObjC.h:564
IndirectGotoStmt - This represents an indirect goto.
Definition: Stmt.h:2339
Describes an C or C++ initializer list.
Definition: Expr.h:4185
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
Definition: ExprCXX.h:669
This represents &#39;#pragma omp distribute parallel for&#39; composite directive.
Definition: StmtOpenMP.h:3099
bool isArrow() const
Definition: ExprObjC.h:551
ArrayRef< Stmt const * > getParamMoves() const
Definition: StmtCXX.h:402
This represents &#39;#pragma omp teams distribute parallel for simd&#39; composite directive.
Definition: StmtOpenMP.h:3588
Expr * getKeyExpr() const
Definition: ExprObjC.h:851
ASTWriter::RecordDataImpl & getRecordData() const
Extract the underlying record storage.
Definition: ASTWriter.h:791
unsigned getNumExpansions() const
Get the number of parameters in this parameter pack.
Definition: ExprCXX.h:4119
unsigned getLength() const
Definition: Expr.h:1678
ForStmt - This represents a &#39;for (init;cond;inc)&#39; stmt.
Definition: Stmt.h:2237
ArrayRef< Expr * > finals()
Definition: StmtOpenMP.h:995
Expr * getIsLastIterVariable() const
Definition: StmtOpenMP.h:817
FunctionDecl * getOperatorDelete() const
Definition: ExprCXX.h:2210
Expr * getBaseExpr() const
Definition: ExprObjC.h:848
TemplateArgument getArgumentPack() const
Retrieve the template argument pack containing the substituted template arguments.
Definition: ExprCXX.cpp:1533
bool isElidable() const
Whether this construction is elidable.
Definition: ExprCXX.h:1340
Expr * getOperand() const
Definition: ExprCXX.h:3739
unsigned getIntegerLiteralAbbrev() const
Definition: ASTWriter.h:695
const Expr * getThrowExpr() const
Definition: StmtObjC.h:325
bool isGlobalNew() const
Definition: ExprCXX.h:2074
SourceLocation getParameterPackLocation() const
Retrieve the location of the parameter pack name.
Definition: ExprCXX.h:4045
bool doesUsualArrayDeleteWantSize() const
Answers whether the usual array deallocation function for the allocated type expects the size of the ...
Definition: ExprCXX.h:2206
LabelDecl * getDecl() const
Definition: Stmt.h:1610
Expr * getX()
Get &#39;x&#39; part of the associated expression/statement.
Definition: StmtOpenMP.h:2244
APFloatSemantics getRawSemantics() const
Get a raw enumeration value representing the floating-point semantics of this literal (32-bit IEEE...
Definition: Expr.h:1469
SourceLocation getLBracLoc() const
Definition: Stmt.h:1333
A reference to a previously [de]serialized Stmt record.
Definition: ASTBitCodes.h:1563
capture_init_iterator capture_init_begin()
Retrieve the first initialization argument for this lambda expression (which initializes the first ca...
Definition: ExprCXX.h:1794
SourceLocation getRParenLoc() const
Definition: StmtCXX.h:197
ExprValueKind getValueKind() const
getValueKind - The value kind that this expression produces.
Definition: Expr.h:405
path_iterator path_begin()
Definition: Expr.h:3070
SourceLocation getIsaMemberLoc() const
getMemberLoc - Return the location of the "member", in X->F, it is the location of &#39;F&#39;...
Definition: ExprObjC.h:1470
Stmt * getBody()
Definition: Stmt.h:2271
semantics_iterator semantics_end()
Definition: Expr.h:5373
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
Definition: ExprCXX.h:3486
Expr * getIterationVariable() const
Definition: StmtOpenMP.h:785
A builtin binary operation expression such as "x + y" or "x <= y".
Definition: Expr.h:3287
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:3163
bool constructsVBase() const
Determine whether this constructor is actually constructing a base class (rather than a complete obje...
Definition: ExprCXX.h:1487
const Expr * getAssocExpr(unsigned i) const
Definition: Expr.h:5043
Stmt * getInit()
Definition: Stmt.h:2250
Expr * getOutputExpr(unsigned i)
Definition: Stmt.cpp:436
iterator begin()
Definition: DeclGroup.h:100
bool hadMultipleCandidates() const
Returns true if this member expression refers to a method that was resolved from an overloaded set ha...
Definition: Expr.h:2894
unsigned getCharacterLiteralAbbrev() const
Definition: ASTWriter.h:694
SourceLocation getThrowLoc() const
Definition: ExprCXX.h:1040
unsigned getResultExprIndex() const
Return the index of the result-bearing expression into the semantics expressions, or PseudoObjectExpr...
Definition: Expr.h:5348
const StringLiteral * getInputConstraintLiteral(unsigned i) const
Definition: Stmt.h:2802
CXXForRangeStmt - This represents C++0x [stmt.ranged]&#39;s ranged for statement, represented as &#39;for (ra...
Definition: StmtCXX.h:127
bool isArrow() const
Definition: Expr.h:2874
This represents &#39;#pragma omp cancellation point&#39; directive.
Definition: StmtOpenMP.h:2718
ObjCStringLiteral, used for Objective-C string literals i.e.
Definition: ExprObjC.h:51
SourceLocation getEqualOrColonLoc() const
Retrieve the location of the &#39;=&#39; that precedes the initializer value itself, if present.
Definition: Expr.h:4644
const CallExpr * getConfig() const
Definition: ExprCXX.h:240
bool isArrow() const
Definition: ExprCXX.h:812
FPOptions getFPFeatures() const
Definition: ExprCXX.h:152
CaseStmt - Represent a case statement.
Definition: Stmt.h:1394
TypoExpr - Internal placeholder for expressions where typo correction still needs to be performed and...
Definition: Expr.h:5562
Expr * getCond()
Definition: Stmt.h:2269
SourceLocation getContinueLoc() const
Definition: Stmt.h:2393
This represents &#39;#pragma omp teams&#39; directive.
Definition: StmtOpenMP.h:2661
unsigned getInt() const
Used to serialize this.
Definition: LangOptions.h:352
Expr * getInit() const
Definition: StmtOpenMP.h:805
const Expr * getControllingExpr() const
Definition: Expr.h:5068
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
Definition: Expr.h:2998
FieldDecl * getField()
Get the field whose initializer will be used.
Definition: ExprCXX.h:1158
Helper class for OffsetOfExpr.
Definition: Expr.h:2013
A marker record that indicates that we are at the end of an expression.
Definition: ASTBitCodes.h:1557
This represents &#39;#pragma omp teams distribute simd&#39; combined directive.
Definition: StmtOpenMP.h:3518
Represents binding an expression to a temporary.
Definition: ExprCXX.h:1217
StringLiteral * getClobberStringLiteral(unsigned i)
Definition: Stmt.h:2836
OpaqueValueExpr * getOpaqueValue() const
getOpaqueValue - Return the opaque value placeholder.
Definition: ExprCXX.h:4388
Expr * Key
The key for the dictionary element.
Definition: ExprObjC.h:241
SourceLocation getBuiltinLoc() const
Definition: Expr.h:4120
CXXTemporary * getTemporary()
Definition: ExprCXX.h:1236
bool isOpenMPWorksharingDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a worksharing directive.
ObjCMethodDecl * getArrayWithObjectsMethod() const
Definition: ExprObjC.h:222
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
Definition: ExprCXX.h:1649
CXXRecordDecl * getNamingClass()
Gets the &#39;naming class&#39; (in the sense of C++0x [class.access.base]p5) of the lookup.
Definition: ExprCXX.h:2904
NestedNameSpecifierLoc getQualifierLoc() const
If the name was qualified, retrieves the nested-name-specifier that precedes the name, with source-location information.
Definition: Expr.h:1133
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
SourceLocation getTryLoc() const
Definition: Stmt.h:3045
Represents a C++ member access expression where the actual member referenced could not be resolved be...
Definition: ExprCXX.h:3284
VarDecl * getConditionVariable() const
Retrieve the variable declared in this "for" statement, if any.
Definition: Stmt.cpp:902
SourceLocation getOperatorLoc() const
getOperatorLoc - Return the location of the operator.
Definition: Expr.h:1930
SourceLocation getNameLoc() const
Definition: ExprCXX.h:3984
TypeSourceInfo * getTypeSourceInfo() const
Definition: ExprCXX.h:1891
Stmt * getBody()
Definition: Stmt.h:1958
SourceLocation getLocation() const
Definition: ExprObjC.h:100
A default argument (C++ [dcl.fct.default]).
Definition: ExprCXX.h:1073
Stmt * getInit()
Definition: Stmt.h:1830
bool isExact() const
Definition: Expr.h:1485
bool isTypeOperand() const
Definition: ExprCXX.h:916
SourceLocation getTokenLocation() const
getTokenLocation - The location of the __null token.
Definition: Expr.h:4071
Iterator for iterating over Stmt * arrays that contain only Expr *.
Definition: Stmt.h:983
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:3418
Represents the this expression in C++.
Definition: ExprCXX.h:976
ObjCMethodDecl * getDictWithObjectsMethod() const
Definition: ExprObjC.h:358
arg_iterator arg_end()
Definition: Expr.h:2593
ObjCIvarDecl * getDecl()
Definition: ExprObjC.h:543
SourceLocation getRParenLoc() const
Retrieve the location of the right parentheses (&#39;)&#39;) that follows the argument list.
Definition: ExprCXX.h:3217
TypeSourceInfo * getAllocatedTypeSourceInfo() const
Definition: ExprCXX.h:2012
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>".
Definition: TemplateBase.h:651
NestedNameSpecifierLoc getQualifierLoc() const
If the member name was qualified, retrieves the nested-name-specifier that precedes the member name...
Definition: Expr.h:2792
TypeSourceInfo * getQueriedTypeSourceInfo() const
Definition: ExprCXX.h:2557
bool isArrayForm() const
Definition: ExprCXX.h:2197
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
This represents &#39;#pragma omp target parallel for simd&#39; directive.
Definition: StmtOpenMP.h:3316
ArrayRef< Expr * > private_counters()
Definition: StmtOpenMP.h:977
OpenMP 4.0 [2.4, Array Sections].
Definition: ExprOpenMP.h:45
ConditionalOperator - The ?: ternary operator.
Definition: Expr.h:3582
const ValueDecl * getExtendingDecl() const
Get the declaration which triggered the lifetime-extension of this temporary, if any.
Definition: ExprCXX.h:4219
TypeSourceInfo * getTypeSourceInfo() const
Definition: ExprCXX.h:1610
bool isStdInitListInitialization() const
Whether this constructor call was written as list-initialization, but was interpreted as forming a st...
Definition: ExprCXX.h:1364
Represents a C++ pseudo-destructor (C++ [expr.pseudo]).
Definition: ExprCXX.h:2286
ASTTemplateKWAndArgsInfo * getTrailingASTTemplateKWAndArgsInfo()
Return the optional template keyword and arguments info.
Definition: ExprCXX.h:3692
CompoundStmt - This represents a group of statements like { stmt stmt }.
Definition: Stmt.h:1241
unsigned NumTemplateArgs
The number of template arguments in TemplateArgs.
Definition: TemplateBase.h:665
SourceLocation getRBracket() const
Definition: ExprObjC.h:839
bool isMicrosoftABI() const
Returns whether this is really a Win64 ABI va_arg expression.
Definition: Expr.h:4114
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:1361
void AddDeclarationNameLoc(const DeclarationNameLoc &DNLoc, DeclarationName Name)
Definition: ASTWriter.cpp:5662
Expr ** getSubExprs()
Definition: Expr.h:5500
CompoundStmt * getSubStmt() const
Retrieve the compound statement that will be included in the program only if the existence of the sym...
Definition: StmtCXX.h:281
This represents &#39;#pragma omp taskgroup&#39; directive.
Definition: StmtOpenMP.h:1971
void AddCXXTemporary(const CXXTemporary *Temp)
Emit a CXXTemporary.
Definition: ASTWriter.cpp:5410
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will (ultimately) call.
Definition: ExprCXX.h:1334
QualType getComputationLHSType() const
Definition: Expr.h:3527
SourceRange getSourceRange() const LLVM_READONLY
Definition: ExprObjC.h:199
SourceLocation getRParenLoc() const
Definition: ExprObjC.h:446
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand...
Definition: Expr.h:2222
SourceLocation getTryLoc() const
Definition: StmtCXX.h:91
bool isConstexpr() const
Definition: Stmt.h:1860
Expr * getCombinedLowerBoundVariable() const
Definition: StmtOpenMP.h:905
SourceLocation getLocation() const
Definition: ExprCXX.h:1336
SourceLocation getRBracketLoc() const
Definition: ExprCXX.h:866
SourceLocation getLocation() const
Definition: Expr.h:1122
unsigned getSwitchCaseID(SwitchCase *S)
Retrieve the ID for the given switch-case statement.
InitListExpr * getUpdater() const
Definition: Expr.h:4771
ConstantExpr - An expression that occurs in a constant context.
Definition: Expr.h:904
Represents a call to the builtin function __builtin_va_arg.
Definition: Expr.h:4091
SourceLocation getLabelLoc() const
Definition: Stmt.h:2322
bool isImplicitAccess() const
True if this is an implicit access, i.e.
Definition: ExprCXX.h:3374
SourceLocation getThrowLoc() const LLVM_READONLY
Definition: StmtObjC.h:329
unsigned Offset
Definition: Format.cpp:1631
static unsigned getNumSubExprs(AtomicOp Op)
Determine the number of arguments the specified atomic builtin should have.
Definition: Expr.cpp:4189
unsigned getValue() const
Definition: Expr.h:1426
This represents &#39;#pragma omp distribute&#39; directive.
Definition: StmtOpenMP.h:2972
Expr * getSrcExpr() const
getSrcExpr - Return the Expr to be converted.
Definition: Expr.h:5249
SourceLocation getDestroyedTypeLoc() const
Retrieve the starting location of the type being destroyed.
Definition: ExprCXX.h:2394
ObjCMethodDecl * getBoxingMethod() const
Definition: ExprObjC.h:138
SourceLocation getFinallyLoc() const
Definition: Stmt.h:3007
An expression "T()" which creates a value-initialized rvalue of type T, which is a non-class type...
Definition: ExprCXX.h:1871
ADLCallKind getADLCallKind() const
Definition: Expr.h:2518
const Stmt * getAssociatedStmt() const
Returns statement associated with the directive.
Definition: StmtOpenMP.h:196
SourceLocation getOperatorLoc() const
Retrieve the location of the &#39;->&#39; or &#39;.&#39; operator.
Definition: ExprCXX.h:3637
Expr * getCond() const
Definition: Expr.h:3616
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:1615
llvm::MutableArrayRef< Designator > designators()
Definition: Expr.h:4622
DeclAccessPair getFoundDecl() const
Retrieves the declaration found by lookup.
Definition: Expr.h:2777
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:3722
This represents one expression.
Definition: Expr.h:106
SourceLocation getElseLoc() const
Definition: Stmt.h:1849
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:1493
CXXBaseSpecifier * getBase() const
For a base class node, returns the base specifier.
Definition: Expr.h:2087
bool isArrow() const
Determine whether this member expression used the &#39;->&#39; operator; otherwise, it used the &#39;...
Definition: ExprCXX.h:3634
StringRef getClobber(unsigned i) const
Definition: Stmt.h:2931
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:1435
SourceLocation getWhileLoc() const
Definition: Stmt.h:2164
unsigned getPackLength() const
Retrieve the length of the parameter pack.
Definition: ExprCXX.h:3921
Represents a C++ functional cast expression that builds a temporary object.
Definition: ExprCXX.h:1581
A C++ const_cast expression (C++ [expr.const.cast]).
Definition: ExprCXX.h:444
const TypeSourceInfo * getAssocTypeSourceInfo(unsigned i) const
Definition: Expr.h:5053
SourceLocation getLocation() const
Definition: ExprCXX.h:991
BlockExpr - Adaptor class for mixing a BlockDecl with expressions.
Definition: Expr.h:5177
Field designator where only the field name is known.
Definition: ASTBitCodes.h:1984
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:2386
Expr * getCallee()
Definition: Expr.h:2514
unsigned getNumInits() const
Definition: Expr.h:4215
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:1165
This represents &#39;#pragma omp target teams distribute parallel for simd&#39; combined directive.
Definition: StmtOpenMP.h:3948
raw_arg_iterator raw_arg_end()
Definition: ExprCXX.h:2144
bool isArrow() const
Determine whether this pseudo-destructor expression was written using an &#39;->&#39; (otherwise, it used a &#39;.
Definition: ExprCXX.h:2349
Stmt * getBody()
Definition: Stmt.h:2124
ObjCDictionaryLiteral - AST node to represent objective-c dictionary literals; as in:"name" : NSUserN...
Definition: ExprObjC.h:288
const CompoundStmt * getSynchBody() const
Definition: StmtObjC.h:282
SourceLocation getLParenLoc() const
Definition: Expr.h:4964
Expr * getRHS()
Definition: Stmt.h:1495
bool hasQualifier() const
Determine whether this declaration reference was preceded by a C++ nested-name-specifier, e.g., N::foo.
Definition: Expr.h:1129
Represents Objective-C&#39;s @synchronized statement.
Definition: StmtObjC.h:262
ObjCSelectorExpr used for @selector in Objective-C.
Definition: ExprObjC.h:429
A CXXStdInitializerListExpr record.
Definition: ASTBitCodes.h:1859
TypeSourceInfo * getTypeSourceInfo() const
Definition: Expr.h:2159
Represents an expression that computes the length of a parameter pack.
Definition: ExprCXX.h:3844
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:5226
An ArraySubscriptExpr record.
Definition: ASTBitCodes.h:1665
SourceLocation getAtTryLoc() const
Retrieve the location of the @ in the @try.
Definition: StmtObjC.h:193
bool refersToEnclosingVariableOrCapture() const
Does this DeclRefExpr refer to an enclosing local or a captured variable?
Definition: Expr.h:1239
IdentifierInfo & getAccessor() const
Definition: Expr.h:5138
This represents &#39;#pragma omp target teams distribute simd&#39; combined directive.
Definition: StmtOpenMP.h:4021
ArrayTypeTrait getTrait() const
Definition: ExprCXX.h:2553
decls_iterator decls_begin() const
Definition: ExprCXX.h:2727
unsigned size() const
Definition: Stmt.h:1269
unsigned getNumClauses() const
Get number of clauses.
Definition: StmtOpenMP.h:184
An ArrayInitLoopExpr record.
Definition: ASTBitCodes.h:1707
Expr * getDistInc() const
Definition: StmtOpenMP.h:893
A PseudoObjectExpr record.
Definition: ASTBitCodes.h:1743
SourceRange getAngleBrackets() const LLVM_READONLY
Definition: ExprCXX.h:307
Expr * getNextLowerBound() const
Definition: StmtOpenMP.h:857
Kind getKind() const
Determine what kind of offsetof node this is.
Definition: Expr.h:2067
SourceLocation getLAngleLoc() const
Retrieve the location of the left angle bracket starting the explicit template argument list followin...
Definition: Expr.h:2815
QualType getType() const
Definition: Expr.h:128
Expr * getPrevEnsureUpperBound() const
Definition: StmtOpenMP.h:899
SourceLocation getKeywordLoc() const
Retrieve the location of the __if_exists or __if_not_exists keyword.
Definition: StmtCXX.h:263
capture_init_range capture_inits()
Definition: Stmt.h:3270
This represents &#39;#pragma omp for&#39; directive.
Definition: StmtOpenMP.h:1104
An ObjCIndirectCopyRestoreExpr record.
Definition: ASTBitCodes.h:1785
Expr * getElement(unsigned Index)
getElement - Return the Element at the specified index.
Definition: ExprObjC.h:213
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:251
SourceLocation getSwitchLoc() const
Definition: Stmt.h:2019
LabelDecl * getLabel() const
Definition: Stmt.h:2317
bool hasInitializer() const
Whether this new-expression has any initializer at all.
Definition: ExprCXX.h:2077
const Stmt * getTryBody() const
Retrieve the @try body.
Definition: StmtObjC.h:197
Represents a folding of a pack over an operator.
Definition: ExprCXX.h:4266
ReturnStmt - This represents a return, optionally of an expression: return; return 4;...
Definition: Stmt.h:2443
This represents &#39;#pragma omp target teams&#39; directive.
Definition: StmtOpenMP.h:3737
SourceLocation getRParenLoc() const
getRParenLoc - Return the location of final right parenthesis.
Definition: Expr.h:5255
An expression that sends a message to the given Objective-C object or class.
Definition: ExprObjC.h:904
void AddDeclRef(const Decl *D)
Emit a reference to a declaration.
Definition: ASTWriter.h:905
This represents a Microsoft inline-assembly statement extension.
Definition: Stmt.h:2850
SourceLocation getDoLoc() const
Definition: Stmt.h:2214
SwitchCase * getSwitchCaseList()
Definition: Stmt.h:2015
SourceLocation getAtLoc() const
Definition: StmtObjC.h:365
ObjCMethodDecl * getImplicitPropertyGetter() const
Definition: ExprObjC.h:675
A DesignatedInitUpdateExpr record.
Definition: ASTBitCodes.h:1701
SourceLocation getRBracketLoc() const
Definition: Expr.h:2366
void AddStmt(Stmt *S)
Add the given statement or expression to the queue of statements to emit.
Definition: ASTWriter.h:838
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:1896
Expr * getInputExpr(unsigned i)
Definition: Stmt.cpp:722
Expr * getOutputExpr(unsigned i)
Definition: Stmt.cpp:718
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:5387
SourceLocation getMemberLoc() const
getMemberLoc - Return the location of the "member", in X->F, it is the location of &#39;F&#39;...
Definition: Expr.h:2879
ReceiverKind getReceiverKind() const
Determine the kind of receiver that this message is being sent to.
Definition: ExprObjC.h:1188
bool usesGNUSyntax() const
Determines whether this designated initializer used the deprecated GNU syntax for designated initiali...
Definition: Expr.h:4649
AtomicOp getOp() const
Definition: Expr.h:5497
A member reference to an MSPropertyDecl.
Definition: ExprCXX.h:759
Represents a reference to a non-type template parameter that has been substituted with a template arg...
Definition: ExprCXX.h:3958
const OffsetOfNode & getComponent(unsigned Idx) const
Definition: Expr.h:2166
This represents &#39;#pragma omp cancel&#39; directive.
Definition: StmtOpenMP.h:2776
Expr * getTrueExpr() const
getTrueExpr - Return the subexpression which will be evaluated if the condition evaluates to true; th...
Definition: Expr.h:3707
Expr * getCond()
Definition: Stmt.h:1762
ValueDecl * getDecl()
Definition: Expr.h:1114
An ObjCAvailabilityCheckExpr record.
Definition: ASTBitCodes.h:1812
SourceLocation getLocation() const
Definition: Expr.h:1810
SourceLocation getRParenLoc() const
Definition: Expr.h:4123
SourceLocation getForLoc() const
Definition: StmtObjC.h:53
const Expr * getSubExpr() const
Definition: Expr.h:1860
ObjCBridgeCastKind getBridgeKind() const
Determine which kind of bridge is being performed via this cast.
Definition: ExprObjC.h:1602
SourceRange getSourceRange() const LLVM_READONLY
Definition: ExprCXX.h:948
ParmVarDecl *const * iterator
Iterators over the parameters which the parameter pack expanded into.
Definition: ExprCXX.h:4114
const Expr * getSubExpr() const
Definition: ExprCXX.h:1240
CStyleCastExpr - An explicit cast in C (C99 6.5.4) or a C-style cast in C++ (C++ [expr.cast]), which uses the syntax (Type)expr.
Definition: Expr.h:3224
Expr * getLHS()
An array access can be written A[4] or 4[A] (both are equivalent).
Definition: Expr.h:2347
bool getValue() const
Definition: ExprCXX.h:574
bool hadMultipleCandidates() const
Returns true if this expression refers to a function that was resolved from an overloaded set having ...
Definition: Expr.h:1227
ImaginaryLiteral - We support imaginary integer and floating point literals, like "1...
Definition: Expr.h:1517
This represents &#39;#pragma omp flush&#39; directive.
Definition: StmtOpenMP.h:2044
An ObjCForCollectionStmt record.
Definition: ASTBitCodes.h:1788
This represents &#39;#pragma omp parallel for simd&#39; directive.
Definition: StmtOpenMP.h:1632
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:2185
AsmStmt is the base class for GCCAsmStmt and MSAsmStmt.
Definition: Stmt.h:2520
SourceLocation getOperatorLoc() const
Retrieve the location of the &#39;->&#39; or &#39;.&#39; operator.
Definition: ExprCXX.h:3394
SourceLocation getLParenLoc() const
Retrieve the location of the left parentheses (&#39;(&#39;) that precedes the argument list.
Definition: ExprCXX.h:3212
A MS-style AsmStmt record.
Definition: ASTBitCodes.h:1623
void push_back(uint64_t N)
Minimal vector-like interface.
Definition: ASTWriter.h:795
Expr * getLastIteration() const
Definition: StmtOpenMP.h:789
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:2263
Expr * getArgument()
Definition: ExprCXX.h:2212
This represents &#39;#pragma omp target enter data&#39; directive.
Definition: StmtOpenMP.h:2404
Expr * getStrideVariable() const
Definition: StmtOpenMP.h:841
bool getValue() const
Definition: ExprCXX.h:3745
A C++ dynamic_cast expression (C++ [expr.dynamic.cast]).
Definition: ExprCXX.h:362
OpaqueValueExpr - An expression referring to an opaque object of a fixed type and value class...
Definition: Expr.h:945
Expr * getBase() const
Definition: Expr.h:4768
ConvertVectorExpr - Clang builtin function __builtin_convertvector This AST node provides support for...
Definition: Expr.h:3914
unsigned getNumArgs() const
Return the number of actual arguments in this message, not counting the receiver. ...
Definition: ExprObjC.h:1329
Expr * getCombinedDistCond() const
Definition: StmtOpenMP.h:947
const Stmt * getPreInits() const
Definition: StmtOpenMP.h:813
#define false
Definition: stdbool.h:33
SourceLocation getLParenLoc() const
Definition: Expr.h:2958
A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr...
Definition: ExprCXX.h:2635
A field in a dependent type, known only by its name.
Definition: Expr.h:2022
This captures a statement into a function.
Definition: Stmt.h:3105
Represents a call to an inherited base class constructor from an inheriting constructor.
Definition: ExprCXX.h:1448
ExpressionTrait getTrait() const
Definition: ExprCXX.h:2617
unsigned path_size() const
Definition: Expr.h:3069
Token * getAsmToks()
Definition: Stmt.h:2881
PseudoObjectExpr - An expression which accesses a pseudo-object l-value.
Definition: Expr.h:5299
bool isImplicitProperty() const
Definition: ExprObjC.h:667
bool isInstantiationDependent() const
Whether this expression is instantiation-dependent, meaning that it depends in some way on a template...
Definition: Expr.h:191
bool inheritedFromVBase() const
Determine whether the inherited constructor is inherited from a virtual base of the object we constru...
Definition: ExprCXX.h:1497
SourceLocation getRAngleLoc() const
Retrieve the location of the right angle bracket ending the explicit template argument list following...
Definition: Expr.h:2823
StringLiteral * getFunctionName()
Definition: Expr.h:1813
unsigned getNumExprs() const
Return the number of expressions in this paren list.
Definition: Expr.h:4945
This represents &#39;#pragma omp single&#39; directive.
Definition: StmtOpenMP.h:1376
Encodes a location in the source.
body_range body()
Definition: Stmt.h:1274
Expr * getRetValue()
Definition: Stmt.h:2476
StringRef getOutputConstraint(unsigned i) const
Definition: Stmt.h:2891
SourceLocation getOperatorLoc() const
Definition: Expr.h:3319
const Stmt * getCatchBody() const
Definition: StmtObjC.h:90
unsigned getNumHandlers() const
Definition: StmtCXX.h:103
Expr * getSubExpr() const
Definition: Expr.h:1926
NestedNameSpecifierLoc getQualifierLoc() const
Retrieves the nested-name-specifier that qualifies the type name, with source-location information...
Definition: ExprCXX.h:2338
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:5252
bool hasUnresolvedUsing() const
Determine whether the lookup results contain an unresolved using declaration.
Definition: ExprCXX.h:3628
CastKind getCastKind() const
Definition: Expr.h:3044
Expr * getSubExpr(unsigned Idx) const
Definition: Expr.h:4667
SourceLocation getOperatorLoc() const
Retrieve the location of the cast operator keyword, e.g., static_cast.
Definition: ExprCXX.h:300
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)"...
Definition: ExprCXX.h:1914
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c dictionary literal.
Definition: ExprObjC.h:342
OMPClause * getClause(unsigned i) const
Returns specified clause.
Definition: StmtOpenMP.h:190
Expr * getLHS()
Definition: Stmt.h:1483
A call to a literal operator (C++11 [over.literal]) written as a user-defined literal (C++11 [lit...
Definition: ExprCXX.h:481
SourceLocation getEllipsisLoc() const
Retrieve the location of the ellipsis that describes this pack expansion.
Definition: ExprCXX.h:3808
Expr * getExpr()
Get &#39;expr&#39; part of the associated expression/statement.
Definition: StmtOpenMP.h:2270
Represents a call to a member function that may be written either with member call syntax (e...
Definition: ExprCXX.h:171
SourceLocation getExceptLoc() const
Definition: Stmt.h:2970
SourceRange getSourceRange() const LLVM_READONLY
Definition: ExprObjC.h:364
Stmt * getElse()
Definition: Stmt.h:1783
DeclStmt - Adaptor class for mixing declarations with statements and expressions. ...
Definition: Stmt.h:1143
DeclarationNameInfo getDirectiveName() const
Return name of the directive.
Definition: StmtOpenMP.h:1536
SourceLocation getLBraceLoc() const
Definition: Stmt.h:2873
A CXXFunctionalCastExpr record.
Definition: ASTBitCodes.h:1853
Expr * getCond()
Definition: Stmt.h:1946
SourceLocation getStrTokenLoc(unsigned TokNum) const
Get one of the string literal token.
Definition: Expr.h:1713
StmtVisitor - This class implements a simple visitor for Stmt subclasses.
Definition: StmtVisitor.h:183
bool canOverflow() const
Returns true if the unary operator can cause an overflow.
Definition: Expr.h:1939
SourceLocation getColonLoc() const
Definition: ExprOpenMP.h:109
SourceLocation RAngleLoc
The source location of the right angle bracket (&#39;>&#39;).
Definition: TemplateBase.h:656
SourceLocation getRParenLoc() const
Definition: Expr.h:3826
void AddTemplateArgument(const TemplateArgument &Arg)
Emit a template argument.
Definition: ASTWriter.cpp:5860
An ObjCEncodeExpr record.
Definition: ASTBitCodes.h:1758
SourceLocation getRParenLoc() const
Definition: ExprObjC.h:404
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:1248
This represents &#39;#pragma omp taskwait&#39; directive.
Definition: StmtOpenMP.h:1927
SourceLocation getAtLoc() const
Definition: ExprObjC.h:402
SourceRange getSourceRange() const
Definition: ExprObjC.h:1654
bool isPascal() const
Definition: Expr.h:1690
AtomicExpr - Variadic atomic builtins: __atomic_exchange, __atomic_fetch_*, __atomic_load, __atomic_store, and __atomic_compare_exchange_*, for the similarly-named C++11 instructions, and __c11 variants for <stdatomic.h>, and corresponding __opencl_atomic_* for OpenCL 2.0.
Definition: Expr.h:5433
UnaryExprOrTypeTrait getKind() const
Definition: Expr.h:2253
bool isArray() const
Definition: ExprCXX.h:2038
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:474
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:3824
SourceLocation getGotoLoc() const
Definition: Stmt.h:2320
SourceLocation getAtFinallyLoc() const
Definition: StmtObjC.h:141
AccessSpecifier getAccess() const
An ObjCIsa Expr record.
Definition: ASTBitCodes.h:1782
const StringLiteral * getOutputConstraintLiteral(unsigned i) const
Definition: Stmt.h:2774
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
Definition: Expr.h:3115
Stmt * getCapturedStmt()
Retrieve the statement being captured.
Definition: Stmt.h:3206
void AddAttributes(ArrayRef< const Attr *> Attrs)
Emit a list of attributes.
Definition: ASTWriter.cpp:4480
SourceLocation getAtCatchLoc() const
Definition: StmtObjC.h:102
CharacterKind getKind() const
Definition: Expr.h:1419
This represents &#39;#pragma omp target&#39; directive.
Definition: StmtOpenMP.h:2288
Expr * getInputExpr(unsigned i)
Definition: Stmt.cpp:447
void AddSourceLocation(SourceLocation Loc)
Emit a source location.
Definition: ASTWriter.h:847
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:1826
Expr * getV()
Get &#39;v&#39; part of the associated expression/statement.
Definition: StmtOpenMP.h:2265
bool isParenTypeId() const
Definition: ExprCXX.h:2068
SourceLocation getEndLoc() const
Definition: Stmt.h:2875
NullStmtBitfields NullStmtBits
Definition: Stmt.h:888
Expr * getSubExpr()
Definition: ExprObjC.h:135
An expression trait intrinsic.
Definition: ExprCXX.h:2580
ArrayRef< Expr * > exprs()
Definition: Expr.h:4960
const ObjCMethodDecl * getMethodDecl() const
Definition: ExprObjC.h:1303
An AtomicExpr record.
Definition: ASTBitCodes.h:1746
VarDecl * getConditionVariable()
Retrieve the variable declared in this "switch" statement, if any.
Definition: Stmt.cpp:965
DeclStmt * getConditionVariableDeclStmt()
If this WhileStmt has a condition variable, return the faux DeclStmt associated with the creation of ...
Definition: Stmt.h:2152
This represents &#39;#pragma omp ordered&#39; directive.
Definition: StmtOpenMP.h:2099
StmtExpr - This is the GNU Statement Expression extension: ({int X=4; X;}).
Definition: Expr.h:3801
void AddAPFloat(const llvm::APFloat &Value)
Emit a floating-point value.
Definition: ASTWriter.cpp:5341
This represents &#39;#pragma omp target update&#39; directive.
Definition: StmtOpenMP.h:3040
ObjCBoxedExpr - used for generalized expression boxing.
Definition: ExprObjC.h:117
bool isArgumentType() const
Definition: Expr.h:2258
SourceLocation getKeywordLoc() const
Definition: Stmt.h:1373
Expr * getArrayFiller()
If this initializer list initializes an array with more elements than there are initializers in the l...
Definition: Expr.h:4279
SourceLocation getStarLoc() const
Definition: Stmt.h:2357
bool passAlignment() const
Indicates whether the required alignment should be implicitly passed to the allocation function...
Definition: ExprCXX.h:2108
bool isPartOfExplicitCast() const
Definition: Expr.h:3134
FunctionDecl * getOperatorDelete() const
Definition: ExprCXX.h:2035
Representation of a Microsoft __if_exists or __if_not_exists statement with a dependent name...
Definition: StmtCXX.h:241
unsigned getExprImplicitCastAbbrev() const
Definition: ASTWriter.h:696
SourceLocation getExprLoc() const LLVM_READONLY
getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic exp...
Definition: Expr.cpp:215
void AddDeclarationNameInfo(const DeclarationNameInfo &NameInfo)
Definition: ASTWriter.cpp:5693
void VisitStmt(Stmt *S)
A qualified reference to a name whose declaration cannot yet be resolved.
Definition: ExprCXX.h:2942
Expr * Value
The value of the dictionary element.
Definition: ExprObjC.h:244
const Expr * getInitializer() const
Definition: Expr.h:2951
Expr * getLHS() const
Definition: Expr.h:3327
void AddTemplateKWAndArgsInfo(const ASTTemplateKWAndArgsInfo &ArgInfo, const TemplateArgumentLoc *Args)
CompoundAssignOperator - For compound assignments (e.g.
Definition: Expr.h:3504
SourceLocation getLocation() const LLVM_READONLY
Definition: ExprCXX.h:1499
A POD class for pairing a NamedDecl* with an access specifier.
Represents a C11 generic selection.
Definition: Expr.h:5010
ArrayRef< TemplateArgument > getPartialArguments() const
Get.
Definition: ExprCXX.h:3937
const Expr * getBase() const
Definition: Expr.h:5134
Expr * getInstanceReceiver()
Returns the object expression (receiver) for an instance message, or null for a message that is not a...
Definition: ExprObjC.h:1207
AddrLabelExpr - The GNU address of label extension, representing &&label.
Definition: Expr.h:3757
An Objective-C "bridged" cast expression, which casts between Objective-C pointers and C pointers...
Definition: ExprObjC.h:1575
Represents a reference to a function parameter pack that has been substituted but not yet expanded...
Definition: ExprCXX.h:4078
OpaqueValueExpr * getOpaqueValue() const
getOpaqueValue - Return the opaque value placeholder.
Definition: Expr.h:3698
unsigned getManglingNumber() const
Definition: ExprCXX.h:4226
SourceLocation getMemberLoc() const
Definition: ExprCXX.h:813
TypeSourceInfo * getDestroyedTypeInfo() const
Retrieve the source location information for the type being destroyed.
Definition: ExprCXX.h:2379
arg_iterator arg_end()
Definition: ExprObjC.h:1418
Expr * getFalseExpr() const
getFalseExpr - Return the subexpression which will be evaluated if the condnition evaluates to false;...
Definition: Expr.h:3714
NullStmt - This is the null statement ";": C99 6.8.3p3.
Definition: Stmt.h:1210
bool isTypeOperand() const
Definition: ExprCXX.h:709
StringRef getInputConstraint(unsigned i) const
Definition: Stmt.h:2904
SourceLocation getLocation() const
Definition: ExprCXX.h:580
unsigned getNumAssocs() const
Definition: Expr.h:5037
void writeClause(OMPClause *C)
Definition: ASTWriter.cpp:6475
Dataflow Directional Tag Classes.
Expr * getPrevUpperBoundVariable() const
Definition: StmtOpenMP.h:887
bool isResultDependent() const
Whether this generic selection is result-dependent.
Definition: Expr.h:5074
bool isVolatile() const
Definition: Stmt.h:2556
An InitListExpr record.
Definition: ASTBitCodes.h:1695
const TemplateArgumentLoc * getTemplateArgs() const
Retrieve the template arguments provided as part of this template-id.
Definition: Expr.h:2846
VarDecl * getConditionVariable()
Retrieve the variable declared in this "while" statement, if any.
Definition: Stmt.cpp:1021
[C99 6.4.2.2] - A predefined identifier such as func.
Definition: Expr.h:1758
SourceLocation getLocation() const
Definition: ExprObjC.h:726
A CXXBoolLiteralExpr record.
Definition: ASTBitCodes.h:1862
Represents a delete expression for memory deallocation and destructor calls, e.g. ...
Definition: ExprCXX.h:2170
IdentifierInfo * getOutputIdentifier(unsigned i) const
Definition: Stmt.h:2763
bool isSimple() const
Definition: Stmt.h:2553
OverloadedOperatorKind getOperator() const
Returns the kind of overloaded operator that this expression refers to.
Definition: ExprCXX.h:107
NonTypeTemplateParmDecl * getParameterPack() const
Retrieve the non-type template parameter pack being substituted.
Definition: ExprCXX.h:4042
MSPropertyDecl * getPropertyDecl() const
Definition: ExprCXX.h:811
const Stmt * getFinallyBody() const
Definition: StmtObjC.h:132
An ExtVectorElementExpr record.
Definition: ASTBitCodes.h:1692
ArrayRef< const Attr * > getAttrs() const
Definition: Stmt.h:1669
bool isImplicit() const
Definition: ExprCXX.h:997
Expr * getCond() const
Definition: StmtOpenMP.h:801
This represents &#39;#pragma omp section&#39; directive.
Definition: StmtOpenMP.h:1314
This represents &#39;#pragma omp teams distribute&#39; directive.
Definition: StmtOpenMP.h:3450
QualType getSuperType() const
Retrieve the type referred to by &#39;super&#39;.
Definition: ExprObjC.h:1283
SourceLocation EllipsisLoc
The location of the ellipsis, if this is a pack expansion.
Definition: ExprObjC.h:247
TypeSourceInfo * getTypeSourceInfo() const
Retrieve the type source information for the type being constructed.
Definition: ExprCXX.h:3208
A runtime availability query.
Definition: ExprObjC.h:1636
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:3931
A C++ reinterpret_cast expression (C++ [expr.reinterpret.cast]).
Definition: ExprCXX.h:404
This represents &#39;#pragma omp simd&#39; directive.
Definition: StmtOpenMP.h:1039
Stmt * getHandler() const
Definition: Stmt.h:3054
Represents a &#39;co_yield&#39; expression.
Definition: ExprCXX.h:4502
SourceLocation getLBraceLoc() const
Definition: Expr.h:4330
SourceLocation getSemiLoc() const
Definition: Stmt.h:1221
An ObjCAutoreleasePoolStmt record.
Definition: ASTBitCodes.h:1806
Expr * getOperand() const
Retrieve the operand of the &#39;co_return&#39; statement.
Definition: StmtCXX.h:459
const Expr * getReductionRef() const
Returns reference to the task_reduction return variable.
Definition: StmtOpenMP.h:2022
Represents a C++11 pack expansion that produces a sequence of expressions.
Definition: ExprCXX.h:3772
bool isListInitialization() const
Whether this constructor call was written as list-initialization.
Definition: ExprCXX.h:1353
bool isImplicit() const
Definition: ExprCXX.h:4445
A CXXDynamicCastExpr record.
Definition: ASTBitCodes.h:1844
DependentScopeDeclRefExprBitfields DependentScopeDeclRefExprBits
Definition: Stmt.h:933
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:2251
SourceLocation getParameterPackLocation() const
Get the location of the parameter pack.
Definition: ExprCXX.h:4110
semantics_iterator semantics_begin()
Definition: Expr.h:5367
bool isIfExists() const
Determine whether this is an __if_exists statement.
Definition: StmtCXX.h:266
NestedNameSpecifierLoc getQualifierLoc() const
Definition: ExprCXX.h:814
ExplicitCastExpr - An explicit cast written in the source code.
Definition: Expr.h:3190
This represents &#39;#pragma omp atomic&#39; directive.
Definition: StmtOpenMP.h:2154
child_range children()
Definition: ExprCXX.h:4408
Expr * getCombinedInit() const
Definition: StmtOpenMP.h:923
SourceLocation getLParenLoc() const
Definition: ExprObjC.h:1599
DeclStmt * getConditionVariableDeclStmt()
If this IfStmt has a condition variable, return the faux DeclStmt associated with the creation of tha...
Definition: Stmt.h:1818
void AddVersionTuple(const VersionTuple &Version)
Emit a version tuple.
Definition: ASTWriter.h:955
An ObjCAtFinallyStmt record.
Definition: ASTBitCodes.h:1794
SourceLocation getRParenLoc() const
Definition: ExprObjC.h:495
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
Definition: ExprCXX.h:716
CXXNewExprBitfields CXXNewExprBits
Definition: Stmt.h:930
llvm::APInt getValue() const
Definition: Expr.h:1292
Represents a __leave statement.
Definition: Stmt.h:3070
unsigned getCollapsedNumber() const
Get number of collapsed loops.
Definition: StmtOpenMP.h:783
Expr * getCombinedNextLowerBound() const
Definition: StmtOpenMP.h:935
ArrayRef< Expr * > counters()
Definition: StmtOpenMP.h:971
LabelDecl * getLabel() const
Definition: Expr.h:3779
path_iterator path_end()
Definition: Expr.h:3071
iterator end() const
Definition: ExprCXX.h:4116
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
Definition: ExprCXX.h:3719
SwitchStmt - This represents a &#39;switch&#39; stmt.
Definition: Stmt.h:1886
unsigned getByteLength() const
Definition: Expr.h:1677
SourceLocation getColonColonLoc() const
Retrieve the location of the &#39;::&#39; in a qualified pseudo-destructor expression.
Definition: ExprCXX.h:2367
Expr * getCombinedNextUpperBound() const
Definition: StmtOpenMP.h:941
SourceLocation getBeginLoc() const
Definition: ExprCXX.h:2221
arg_iterator arg_begin()
Definition: ExprObjC.h:1416
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source location information.
Definition: ExprCXX.h:2994
SourceLocation getRParenLoc() const
Definition: StmtObjC.h:55
Represents the body of a coroutine.
Definition: StmtCXX.h:302
TemplateArgumentLoc * getTrailingTemplateArgumentLoc()
Return the optional template arguments.
Definition: ExprCXX.h:3702
Location wrapper for a TemplateArgument.
Definition: TemplateBase.h:450
Expr * getBase() const
Definition: ExprObjC.h:1463
bool isOpenMPDistributeDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a distribute directive.
SourceLocation getBuiltinLoc() const
Definition: Expr.h:3864
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
Definition: Expr.h:2312
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c array literal.
Definition: ExprObjC.h:210
SourceLocation getLeaveLoc() const
Definition: Stmt.h:3080
Represents Objective-C&#39;s collection statement.
Definition: StmtObjC.h:24
An ObjCAtSynchronizedStmt record.
Definition: ASTBitCodes.h:1800
arg_iterator arg_begin()
Definition: Expr.h:2590
ArrayRef< Expr * > inits()
Definition: StmtOpenMP.h:983
unsigned getNumObjects() const
Definition: ExprCXX.h:3120
ObjCEncodeExpr, used for @encode in Objective-C.
Definition: ExprObjC.h:386
SourceLocation getLocation() const
Retrieve the location of this expression.
Definition: Expr.h:975
SourceLocation getLocation() const
Definition: ExprObjC.h:556
An implicit indirection through a C++ base class, when the field found is in a base class...
Definition: Expr.h:2025
Expr * getCond() const
getCond - Return the condition expression; this is defined in terms of the opaque value...
Definition: Expr.h:3702
Represents a call to a CUDA kernel function.
Definition: ExprCXX.h:219
SourceLocation getRParenLoc() const
Definition: Expr.h:4032
Represents a &#39;co_await&#39; expression.
Definition: ExprCXX.h:4419
bool isUnique() const
Definition: Expr.h:1011
TypeTraitExprBitfields TypeTraitExprBits
Definition: Stmt.h:932
bool isDelegateInitCall() const
isDelegateInitCall - Answers whether this message send has been tagged as a "delegate init call"...
Definition: ExprObjC.h:1360
Stmt * getInit()
Definition: Stmt.h:1967
A CXXMemberCallExpr record.
Definition: ASTBitCodes.h:1829
bool doesUsualArrayDeleteWantSize() const
Answers whether the usual array deallocation function for the allocated type expects the size of the ...
Definition: ExprCXX.h:2113
SourceRange getDirectInitRange() const
Definition: ExprCXX.h:2157
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the member name, with source location information...
Definition: ExprCXX.h:3405
Expr * getNumIterations() const
Definition: StmtOpenMP.h:873
Opcode getOpcode() const
Definition: Expr.h:1921
Expr * getArg(unsigned Arg)
Return the specified argument.
Definition: ExprCXX.h:1413
StringRef getBytes() const
Allow access to clients that need the byte representation, such as ASTWriterStmt::VisitStringLiteral(...
Definition: Expr.h:1657
Represents Objective-C&#39;s @finally statement.
Definition: StmtObjC.h:120
SourceLocation getDefaultLoc() const
Definition: Expr.h:5040
StringRef getAsmString() const
Definition: Stmt.h:2884
bool hasAssociatedStmt() const
Returns true if directive has associated statement.
Definition: StmtOpenMP.h:193
Expr * getPrevLowerBoundVariable() const
Definition: StmtOpenMP.h:881
uint64_t EmitStmt(unsigned Code, unsigned Abbrev=0)
Emit the record to the stream, preceded by its substatements.
Definition: ASTWriter.h:817
const Expr * getBase() const
Definition: ExprObjC.h:547
bool isArrow() const
Determine whether this member expression used the &#39;->&#39; operator; otherwise, it used the &#39;...
Definition: ExprCXX.h:3391
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
Definition: Expr.h:2855
SourceLocation getColonLoc() const
Definition: Stmt.h:1375
Represents a base class of a C++ class.
Definition: DeclCXX.h:192
unsigned getNumClobbers() const
Definition: Stmt.h:2601
bool isImplicit() const
Definition: StmtCXX.h:468
SourceLocation getRParenLoc() const
Definition: Stmt.h:2287
ObjCIvarRefExpr - A reference to an ObjC instance variable.
Definition: ExprObjC.h:513
child_range children()
Definition: ExprCXX.h:4494
bool isPartiallySubstituted() const
Determine whether this represents a partially-substituted sizeof...
Definition: ExprCXX.h:3932
Represents an expression that might suspend coroutine execution; either a co_await or co_yield expres...
Definition: ExprCXX.h:4336
DeclStmt * getRangeStmt()
Definition: StmtCXX.h:154
A ConvertVectorExpr record.
Definition: ASTBitCodes.h:1734
unsigned arg_size() const
Retrieve the number of arguments.
Definition: ExprCXX.h:3226
Expr * getRHS() const
Definition: Expr.h:4026
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
Definition: ExprCXX.h:3169
SourceLocation getAsmLoc() const
Definition: Stmt.h:2550
GotoStmt - This represents a direct goto.
Definition: Stmt.h:2304
A use of a default initializer in a constructor or in aggregate initialization.
Definition: ExprCXX.h:1137
Expr * getTarget()
Definition: Stmt.h:2359
Expr * getSrcExpr() const
getSrcExpr - Return the Expr to be converted.
Definition: Expr.h:3938
const SwitchCase * getNextSwitchCase() const
Definition: Stmt.h:1369
CapturedDecl * getCapturedDecl()
Retrieve the outlined function declaration.
Definition: Stmt.cpp:1265
StringRef getUuidStr() const
Definition: ExprCXX.h:944
bool isFreeIvar() const
Definition: ExprObjC.h:552
Expr * getCond()
Definition: Stmt.h:2203
QualType getSuperReceiverType() const
Definition: ExprObjC.h:730
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate.h) and friends (in DeclFriend.h).
VarDecl * getConditionVariable()
Retrieve the variable declared in this "if" statement, if any.
Definition: Stmt.cpp:864
ASTStmtWriter(ASTWriter &Writer, ASTWriter::RecordData &Record)
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
Definition: Expr.h:2682
GNU array range designator.
Definition: ASTBitCodes.h:1994
SourceLocation getWhileLoc() const
Definition: Stmt.h:2216
An ArrayInitIndexExpr record.
Definition: ASTBitCodes.h:1710
A GCC-style AsmStmt record.
Definition: ASTBitCodes.h:1620
This represents &#39;#pragma omp target parallel&#39; directive.
Definition: StmtOpenMP.h:2521
ContinueStmt - This represents a continue.
Definition: Stmt.h:2384
Expr * getPromiseCall() const
Retrieve the promise call that results from this &#39;co_return&#39; statement.
Definition: StmtCXX.h:464
Represents a loop initializing the elements of an array.
Definition: Expr.h:4803
SourceLocation getColonLoc() const
Definition: StmtCXX.h:196
ChooseExpr - GNU builtin-in function __builtin_choose_expr.
Definition: Expr.h:3977
Expr * getFilterExpr() const
Definition: Stmt.h:2973
SourceLocation getAttrLoc() const
Definition: Stmt.h:1668
BinaryConditionalOperator - The GNU extension to the conditional operator which allows the middle ope...
Definition: Expr.h:3655
CXXCatchStmt - This represents a C++ catch block.
Definition: StmtCXX.h:29
An index into an array.
Definition: Expr.h:2018
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr.type.conv]).
Definition: ExprCXX.h:1519
SourceLocation getRParenLoc() const
Definition: Expr.h:4965
An object for streaming information to a record.
Definition: ASTWriter.h:747
An ObjCAtCatchStmt record.
Definition: ASTBitCodes.h:1791
Expr * getRHS() const
Definition: Expr.h:3628
Expr * getCombinedCond() const
Definition: StmtOpenMP.h:929
WhileStmt - This represents a &#39;while&#39; stmt.
Definition: Stmt.h:2063
SourceRange getParenOrBraceRange() const
Definition: ExprCXX.h:1430
CleanupObject getObject(unsigned i) const
Definition: ExprCXX.h:3122
Field designator where the field has been resolved to a declaration.
Definition: ASTBitCodes.h:1988
unsigned getNumConcatenated() const
getNumConcatenated - Get the number of string literal tokens that were concatenated in translation ph...
Definition: Expr.h:1708
SourceLocation getLParenLoc() const
Definition: ExprCXX.h:1550
bool containsUnexpandedParameterPack() const
Whether this expression contains an unexpanded parameter pack (for C++11 variadic templates)...
Definition: Expr.h:214
child_range children()
Definition: StmtCXX.h:414
SourceLocation getAtSynchronizedLoc() const
Definition: StmtObjC.h:279
A CXXInheritedCtorInitExpr record.
Definition: ASTBitCodes.h:1835
CompoundStmt * getTryBlock()
Definition: StmtCXX.h:96
Writes an AST file containing the contents of a translation unit.
Definition: ASTWriter.h:104
SourceLocation getBreakLoc() const
Definition: Stmt.h:2419
bool shouldCopy() const
shouldCopy - True if we should do the &#39;copy&#39; part of the copy-restore.
Definition: ExprObjC.h:1548
The receiver is a class.
Definition: ExprObjC.h:1052
Represents Objective-C&#39;s @try ... @catch ... @finally statement.
Definition: StmtObjC.h:154
capture_iterator capture_end() const
Retrieve an iterator pointing past the end of the sequence of captures.
Definition: Stmt.h:3253
void AddCXXBaseSpecifier(const CXXBaseSpecifier &Base)
Emit a C++ base specifier.
Definition: ASTWriter.cpp:5942
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
Definition: Stmt.cpp:276
bool isGlobalDelete() const
Definition: ExprCXX.h:2196
This represents &#39;#pragma omp taskloop simd&#39; directive.
Definition: StmtOpenMP.h:2906
void AddAPInt(const llvm::APInt &Value)
Emit an integral value.
Definition: ASTWriter.cpp:5330
SourceLocation getBuiltinLoc() const
getBuiltinLoc - Return the location of the __builtin_convertvector token.
Definition: Expr.h:3949
unsigned getNumCatchStmts() const
Retrieve the number of @catch statements in this try-catch-finally block.
Definition: StmtObjC.h:203
Expr * getBase() const
Retrieve the base object of this member expressions, e.g., the x in x.m.
Definition: ExprCXX.h:3382
StringLiteral - This represents a string literal expression, e.g.
Definition: Expr.h:1566
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Definition: Expr.h:2396
SourceRange getTypeIdParens() const
Definition: ExprCXX.h:2069
Expr * getPattern()
Retrieve the pattern of the pack expansion.
Definition: ExprCXX.h:3801
Expr * getPreCond() const
Definition: StmtOpenMP.h:797
RetTy Visit(PTR(Stmt) S, ParamTys... P)
Definition: StmtVisitor.h:43
Expr * getLHS() const
Definition: Expr.h:4024
bool hasTemplateKWAndArgsInfo() const
Definition: ExprCXX.h:2679
Abstract class common to all of the C++ "named"/"keyword" casts.
Definition: ExprCXX.h:270
This represents &#39;#pragma omp sections&#39; directive.
Definition: StmtOpenMP.h:1246
ObjCBoolLiteralExpr - Objective-C Boolean Literal.
Definition: ExprObjC.h:82
bool isObjectReceiver() const
Definition: ExprObjC.h:738
unsigned getNumComponents() const
Definition: Expr.h:2176
This represents &#39;#pragma omp target data&#39; directive.
Definition: StmtOpenMP.h:2346
const ParmVarDecl * getParam() const
Definition: ExprCXX.h:1102
OpenMPDirectiveKind getCancelRegion() const
Get cancellation region for the current cancellation point.
Definition: StmtOpenMP.h:2825
capture_init_iterator capture_init_end()
Retrieve the iterator pointing one past the last initialization argument for this lambda expression...
Definition: ExprCXX.h:1806
capture_range captures()
Definition: Stmt.h:3240
A reference to a declared variable, function, enum, etc.
Definition: Expr.h:1041
Expr * getRHS() const
Definition: Expr.h:3329
NestedNameSpecifierLoc getQualifierLoc() const
Fetches the nested-name qualifier with source-location information, if one was given.
Definition: ExprCXX.h:2756
BreakStmt - This represents a break.
Definition: Stmt.h:2410
SourceLocation getReceiverLocation() const
Definition: ExprObjC.h:728
const VarDecl * getCatchParamDecl() const
Definition: StmtObjC.h:94
SourceLocation getLocation() const
Definition: Expr.h:1418
FieldDecl * getInitializedFieldInUnion()
If this initializes a union, specifies which field in the union to initialize.
Definition: Expr.h:4297
bool isConditionDependent() const
Definition: Expr.h:4012
Stmt * getSubStmt()
Definition: Stmt.h:1614
SourceLocation getBridgeKeywordLoc() const
The location of the bridge keyword.
Definition: ExprObjC.h:1610
bool hadMultipleCandidates() const
Whether the referred constructor was resolved from an overloaded set having size greater than 1...
Definition: ExprCXX.h:1345
void AddTemplateArgumentLoc(const TemplateArgumentLoc &Arg)
Emits a template argument location.
Definition: ASTWriter.cpp:5442
DeclStmt * getLoopVarStmt()
Definition: StmtCXX.h:161
ParmVarDecl * getParameterPack() const
Get the parameter pack which this expression refers to.
Definition: ExprCXX.h:4107
unsigned getNumArgs() const
Return the number of arguments to the constructor call.
Definition: ExprCXX.h:1410
const Expr * getBase() const
Definition: ExprObjC.h:719
A trivial tuple used to represent a source range.
This represents &#39;#pragma omp taskyield&#39; directive.
Definition: StmtOpenMP.h:1839
This represents &#39;#pragma omp distribute parallel for simd&#39; composite directive.
Definition: StmtOpenMP.h:3179
A boolean literal, per ([C++ lex.bool] Boolean literals).
Definition: ExprCXX.h:562
SourceLocation getTemplateKeywordLoc() const
Retrieve the location of the template keyword preceding the member name, if any.
Definition: Expr.h:2807
OffsetOfExpr - [C99 7.17] - This represents an expression of the form offsetof(record-type, member-designator).
Definition: Expr.h:2117
Expr * getQueriedExpression() const
Definition: ExprCXX.h:2619
This represents &#39;#pragma omp parallel sections&#39; directive.
Definition: StmtOpenMP.h:1700
SourceLocation getBuiltinLoc() const
Definition: Expr.h:5523
A Microsoft C++ __uuidof expression, which gets the _GUID that corresponds to the supplied type or ex...
Definition: ExprCXX.h:887
SourceLocation getRParenLoc() const
Definition: ExprCXX.h:1552
Expr * getCommon() const
getCommon - Return the common expression, written to the left of the condition.
Definition: Expr.h:3695
TypeSourceInfo * getWrittenTypeInfo() const
Definition: Expr.h:4117
DeclStmt * getBeginStmt()
Definition: StmtCXX.h:155
SourceLocation getRightLoc() const
Definition: ExprObjC.h:1364
The receiver is a superclass.
Definition: ExprObjC.h:1058
SourceLocation getGenericLoc() const
Definition: Expr.h:5039
SourceLocation LAngleLoc
The source location of the left angle bracket (&#39;<&#39;).
Definition: TemplateBase.h:653
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:1301
SourceLocation getBegin() const
TypeSourceInfo * getTypeSourceInfo() const
getTypeSourceInfo - Return the destination type.
Definition: Expr.h:3941
SourceLocation getRParenLoc() const
Return the location of the right parentheses.
Definition: Expr.h:2156
Represents Objective-C&#39;s @autoreleasepool Statement.
Definition: StmtObjC.h:345
bool isConditionTrue() const
isConditionTrue - Return whether the condition is true (i.e.
Definition: Expr.h:4005
decls_iterator decls_end() const
Definition: ExprCXX.h:2730
SourceLocation getKeywordLoc() const
Definition: ExprCXX.h:4381
bool caseStmtIsGNURange() const
True if this case statement is of the form case LHS ...
Definition: Stmt.h:1463
StmtCode
Record codes for each kind of statement or expression.
Definition: ASTBitCodes.h:1554
CompoundStmt * getTryBlock() const
Definition: Stmt.h:3050
Stmt * getSubStmt()
Definition: Stmt.h:1673
QualType getBaseType() const
Definition: ExprCXX.h:3624
InitListExpr * getSyntacticForm() const
Definition: Expr.h:4342
Expr * getBaseExpr() const
Definition: ExprCXX.h:810
Represents an implicitly-generated value initialization of an object of a given type.
Definition: Expr.h:4893
CompoundStmt * getBlock() const
Definition: Stmt.h:2977
SourceLocation getReturnLoc() const
Definition: Stmt.h:2499
CapturedRegionKind getCapturedRegionKind() const
Retrieve the captured region kind.
Definition: Stmt.cpp:1280
A GenericSelectionExpr record.
Definition: ASTBitCodes.h:1740
This represents &#39;#pragma omp target parallel for&#39; directive.
Definition: StmtOpenMP.h:2581
Expr * getLength()
Get length of array section.
Definition: ExprOpenMP.h:99
SourceLocation getOperatorLoc() const
Definition: Expr.h:2872
ConstructionKind getConstructionKind() const
Determine whether this constructor is actually constructing a base class (rather than a complete obje...
Definition: ExprCXX.h:1382
TypeSourceInfo * getClassReceiverTypeInfo() const
Returns a type-source information of a class message send, or nullptr if the message is not a class m...
Definition: ExprObjC.h:1235
Expr * getBase()
An array section can be written only as Base[LowerBound:Length].
Definition: ExprOpenMP.h:82
Stmt * getSubStmt()
Definition: Stmt.h:1513
bool isOverloaded() const
True if this lookup is overloaded.
Definition: ExprCXX.h:2899
This represents &#39;#pragma omp taskloop&#39; directive.
Definition: StmtOpenMP.h:2841