clang  10.0.0svn
ASTWriterStmt.cpp
Go to the documentation of this file.
1 //===--- ASTWriterStmt.cpp - Statement and Expression Serialization -------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 ///
9 /// \file
10 /// Implements serialization for Statements and Expressions.
11 ///
12 //===----------------------------------------------------------------------===//
13 
15 #include "clang/AST/ASTContext.h"
16 #include "clang/AST/DeclCXX.h"
17 #include "clang/AST/DeclObjC.h"
18 #include "clang/AST/DeclTemplate.h"
19 #include "clang/AST/StmtVisitor.h"
20 #include "clang/Lex/Token.h"
21 #include "llvm/Bitstream/BitstreamWriter.h"
22 using namespace clang;
23 
24 //===----------------------------------------------------------------------===//
25 // Statement/expression serialization
26 //===----------------------------------------------------------------------===//
27 
28 namespace clang {
29 
30  class ASTStmtWriter : public StmtVisitor<ASTStmtWriter, void> {
31  ASTWriter &Writer;
32  ASTRecordWriter Record;
33 
35  unsigned AbbrevToUse;
36 
37  public:
39  : Writer(Writer), Record(Writer, Record),
40  Code(serialization::STMT_NULL_PTR), AbbrevToUse(0) {}
41 
42  ASTStmtWriter(const ASTStmtWriter&) = delete;
43 
44  uint64_t Emit() {
45  assert(Code != serialization::STMT_NULL_PTR &&
46  "unhandled sub-statement writing AST file");
47  return Record.EmitStmt(Code, AbbrevToUse);
48  }
49 
51  const TemplateArgumentLoc *Args);
52 
53  void VisitStmt(Stmt *S);
54 #define STMT(Type, Base) \
55  void Visit##Type(Type *);
56 #include "clang/AST/StmtNodes.inc"
57  };
58 }
59 
61  const ASTTemplateKWAndArgsInfo &ArgInfo, const TemplateArgumentLoc *Args) {
62  Record.AddSourceLocation(ArgInfo.TemplateKWLoc);
63  Record.AddSourceLocation(ArgInfo.LAngleLoc);
64  Record.AddSourceLocation(ArgInfo.RAngleLoc);
65  for (unsigned i = 0; i != ArgInfo.NumTemplateArgs; ++i)
66  Record.AddTemplateArgumentLoc(Args[i]);
67 }
68 
70  Record.push_back(S->StmtBits.IsOMPStructuredBlock);
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.push_back(S->getNumLabels());
287  Record.AddSourceLocation(S->getRParenLoc());
288  Record.AddStmt(S->getAsmString());
289 
290  // Outputs
291  for (unsigned I = 0, N = S->getNumOutputs(); I != N; ++I) {
293  Record.AddStmt(S->getOutputConstraintLiteral(I));
294  Record.AddStmt(S->getOutputExpr(I));
295  }
296 
297  // Inputs
298  for (unsigned I = 0, N = S->getNumInputs(); I != N; ++I) {
299  Record.AddIdentifierRef(S->getInputIdentifier(I));
300  Record.AddStmt(S->getInputConstraintLiteral(I));
301  Record.AddStmt(S->getInputExpr(I));
302  }
303 
304  // Clobbers
305  for (unsigned I = 0, N = S->getNumClobbers(); I != N; ++I)
306  Record.AddStmt(S->getClobberStringLiteral(I));
307 
308  // Labels
309  for (auto *E : S->labels()) Record.AddStmt(E);
310 
312 }
313 
314 void ASTStmtWriter::VisitMSAsmStmt(MSAsmStmt *S) {
315  VisitAsmStmt(S);
316  Record.AddSourceLocation(S->getLBraceLoc());
317  Record.AddSourceLocation(S->getEndLoc());
318  Record.push_back(S->getNumAsmToks());
319  Record.AddString(S->getAsmString());
320 
321  // Tokens
322  for (unsigned I = 0, N = S->getNumAsmToks(); I != N; ++I) {
323  // FIXME: Move this to ASTRecordWriter?
324  Writer.AddToken(S->getAsmToks()[I], Record.getRecordData());
325  }
326 
327  // Clobbers
328  for (unsigned I = 0, N = S->getNumClobbers(); I != N; ++I) {
329  Record.AddString(S->getClobber(I));
330  }
331 
332  // Outputs
333  for (unsigned I = 0, N = S->getNumOutputs(); I != N; ++I) {
334  Record.AddStmt(S->getOutputExpr(I));
335  Record.AddString(S->getOutputConstraint(I));
336  }
337 
338  // Inputs
339  for (unsigned I = 0, N = S->getNumInputs(); I != N; ++I) {
340  Record.AddStmt(S->getInputExpr(I));
341  Record.AddString(S->getInputConstraint(I));
342  }
343 
345 }
346 
347 void ASTStmtWriter::VisitCoroutineBodyStmt(CoroutineBodyStmt *CoroStmt) {
348  VisitStmt(CoroStmt);
349  Record.push_back(CoroStmt->getParamMoves().size());
350  for (Stmt *S : CoroStmt->children())
351  Record.AddStmt(S);
353 }
354 
355 void ASTStmtWriter::VisitCoreturnStmt(CoreturnStmt *S) {
356  VisitStmt(S);
357  Record.AddSourceLocation(S->getKeywordLoc());
358  Record.AddStmt(S->getOperand());
359  Record.AddStmt(S->getPromiseCall());
360  Record.push_back(S->isImplicit());
362 }
363 
364 void ASTStmtWriter::VisitCoroutineSuspendExpr(CoroutineSuspendExpr *E) {
365  VisitExpr(E);
366  Record.AddSourceLocation(E->getKeywordLoc());
367  for (Stmt *S : E->children())
368  Record.AddStmt(S);
369  Record.AddStmt(E->getOpaqueValue());
370 }
371 
372 void ASTStmtWriter::VisitCoawaitExpr(CoawaitExpr *E) {
373  VisitCoroutineSuspendExpr(E);
374  Record.push_back(E->isImplicit());
376 }
377 
378 void ASTStmtWriter::VisitCoyieldExpr(CoyieldExpr *E) {
379  VisitCoroutineSuspendExpr(E);
381 }
382 
383 void ASTStmtWriter::VisitDependentCoawaitExpr(DependentCoawaitExpr *E) {
384  VisitExpr(E);
385  Record.AddSourceLocation(E->getKeywordLoc());
386  for (Stmt *S : E->children())
387  Record.AddStmt(S);
389 }
390 
391 void ASTStmtWriter::VisitCapturedStmt(CapturedStmt *S) {
392  VisitStmt(S);
393  // NumCaptures
394  Record.push_back(std::distance(S->capture_begin(), S->capture_end()));
395 
396  // CapturedDecl and captured region kind
397  Record.AddDeclRef(S->getCapturedDecl());
398  Record.push_back(S->getCapturedRegionKind());
399 
400  Record.AddDeclRef(S->getCapturedRecordDecl());
401 
402  // Capture inits
403  for (auto *I : S->capture_inits())
404  Record.AddStmt(I);
405 
406  // Body
407  Record.AddStmt(S->getCapturedStmt());
408 
409  // Captures
410  for (const auto &I : S->captures()) {
411  if (I.capturesThis() || I.capturesVariableArrayType())
412  Record.AddDeclRef(nullptr);
413  else
414  Record.AddDeclRef(I.getCapturedVar());
415  Record.push_back(I.getCaptureKind());
416  Record.AddSourceLocation(I.getLocation());
417  }
418 
420 }
421 
422 void ASTStmtWriter::VisitExpr(Expr *E) {
423  VisitStmt(E);
424  Record.AddTypeRef(E->getType());
425  Record.push_back(E->isTypeDependent());
426  Record.push_back(E->isValueDependent());
427  Record.push_back(E->isInstantiationDependent());
429  Record.push_back(E->getValueKind());
430  Record.push_back(E->getObjectKind());
431 }
432 
433 void ASTStmtWriter::VisitConstantExpr(ConstantExpr *E) {
434  VisitExpr(E);
435  Record.push_back(static_cast<uint64_t>(E->ConstantExprBits.ResultKind));
436  switch (E->ConstantExprBits.ResultKind) {
438  Record.push_back(E->Int64Result());
439  Record.push_back(E->ConstantExprBits.IsUnsigned |
440  E->ConstantExprBits.BitWidth << 1);
441  break;
443  Record.AddAPValue(E->APValueResult());
444  }
445  Record.AddStmt(E->getSubExpr());
447 }
448 
449 void ASTStmtWriter::VisitPredefinedExpr(PredefinedExpr *E) {
450  VisitExpr(E);
451 
452  bool HasFunctionName = E->getFunctionName() != nullptr;
453  Record.push_back(HasFunctionName);
454  Record.push_back(E->getIdentKind()); // FIXME: stable encoding
455  Record.AddSourceLocation(E->getLocation());
456  if (HasFunctionName)
457  Record.AddStmt(E->getFunctionName());
459 }
460 
461 void ASTStmtWriter::VisitDeclRefExpr(DeclRefExpr *E) {
462  VisitExpr(E);
463 
464  Record.push_back(E->hasQualifier());
465  Record.push_back(E->getDecl() != E->getFoundDecl());
466  Record.push_back(E->hasTemplateKWAndArgsInfo());
467  Record.push_back(E->hadMultipleCandidates());
469  Record.push_back(E->isNonOdrUse());
470 
471  if (E->hasTemplateKWAndArgsInfo()) {
472  unsigned NumTemplateArgs = E->getNumTemplateArgs();
473  Record.push_back(NumTemplateArgs);
474  }
475 
477 
478  if ((!E->hasTemplateKWAndArgsInfo()) && (!E->hasQualifier()) &&
479  (E->getDecl() == E->getFoundDecl()) &&
482  AbbrevToUse = Writer.getDeclRefExprAbbrev();
483  }
484 
485  if (E->hasQualifier())
487 
488  if (E->getDecl() != E->getFoundDecl())
489  Record.AddDeclRef(E->getFoundDecl());
490 
491  if (E->hasTemplateKWAndArgsInfo())
492  AddTemplateKWAndArgsInfo(*E->getTrailingObjects<ASTTemplateKWAndArgsInfo>(),
493  E->getTrailingObjects<TemplateArgumentLoc>());
494 
495  Record.AddDeclRef(E->getDecl());
496  Record.AddSourceLocation(E->getLocation());
497  Record.AddDeclarationNameLoc(E->DNLoc, E->getDecl()->getDeclName());
499 }
500 
501 void ASTStmtWriter::VisitIntegerLiteral(IntegerLiteral *E) {
502  VisitExpr(E);
503  Record.AddSourceLocation(E->getLocation());
504  Record.AddAPInt(E->getValue());
505 
506  if (E->getValue().getBitWidth() == 32) {
507  AbbrevToUse = Writer.getIntegerLiteralAbbrev();
508  }
509 
511 }
512 
513 void ASTStmtWriter::VisitFixedPointLiteral(FixedPointLiteral *E) {
514  VisitExpr(E);
515  Record.AddSourceLocation(E->getLocation());
516  Record.AddAPInt(E->getValue());
518 }
519 
520 void ASTStmtWriter::VisitFloatingLiteral(FloatingLiteral *E) {
521  VisitExpr(E);
522  Record.push_back(E->getRawSemantics());
523  Record.push_back(E->isExact());
524  Record.AddAPFloat(E->getValue());
525  Record.AddSourceLocation(E->getLocation());
527 }
528 
529 void ASTStmtWriter::VisitImaginaryLiteral(ImaginaryLiteral *E) {
530  VisitExpr(E);
531  Record.AddStmt(E->getSubExpr());
533 }
534 
535 void ASTStmtWriter::VisitStringLiteral(StringLiteral *E) {
536  VisitExpr(E);
537 
538  // Store the various bits of data of StringLiteral.
539  Record.push_back(E->getNumConcatenated());
540  Record.push_back(E->getLength());
541  Record.push_back(E->getCharByteWidth());
542  Record.push_back(E->getKind());
543  Record.push_back(E->isPascal());
544 
545  // Store the trailing array of SourceLocation.
546  for (unsigned I = 0, N = E->getNumConcatenated(); I != N; ++I)
547  Record.AddSourceLocation(E->getStrTokenLoc(I));
548 
549  // Store the trailing array of char holding the string data.
550  StringRef StrData = E->getBytes();
551  for (unsigned I = 0, N = E->getByteLength(); I != N; ++I)
552  Record.push_back(StrData[I]);
553 
555 }
556 
557 void ASTStmtWriter::VisitCharacterLiteral(CharacterLiteral *E) {
558  VisitExpr(E);
559  Record.push_back(E->getValue());
560  Record.AddSourceLocation(E->getLocation());
561  Record.push_back(E->getKind());
562 
563  AbbrevToUse = Writer.getCharacterLiteralAbbrev();
564 
566 }
567 
568 void ASTStmtWriter::VisitParenExpr(ParenExpr *E) {
569  VisitExpr(E);
570  Record.AddSourceLocation(E->getLParen());
571  Record.AddSourceLocation(E->getRParen());
572  Record.AddStmt(E->getSubExpr());
574 }
575 
576 void ASTStmtWriter::VisitParenListExpr(ParenListExpr *E) {
577  VisitExpr(E);
578  Record.push_back(E->getNumExprs());
579  for (auto *SubStmt : E->exprs())
580  Record.AddStmt(SubStmt);
581  Record.AddSourceLocation(E->getLParenLoc());
582  Record.AddSourceLocation(E->getRParenLoc());
584 }
585 
586 void ASTStmtWriter::VisitUnaryOperator(UnaryOperator *E) {
587  VisitExpr(E);
588  Record.AddStmt(E->getSubExpr());
589  Record.push_back(E->getOpcode()); // FIXME: stable encoding
590  Record.AddSourceLocation(E->getOperatorLoc());
591  Record.push_back(E->canOverflow());
593 }
594 
595 void ASTStmtWriter::VisitOffsetOfExpr(OffsetOfExpr *E) {
596  VisitExpr(E);
597  Record.push_back(E->getNumComponents());
598  Record.push_back(E->getNumExpressions());
599  Record.AddSourceLocation(E->getOperatorLoc());
600  Record.AddSourceLocation(E->getRParenLoc());
602  for (unsigned I = 0, N = E->getNumComponents(); I != N; ++I) {
603  const OffsetOfNode &ON = E->getComponent(I);
604  Record.push_back(ON.getKind()); // FIXME: Stable encoding
606  Record.AddSourceLocation(ON.getSourceRange().getEnd());
607  switch (ON.getKind()) {
608  case OffsetOfNode::Array:
609  Record.push_back(ON.getArrayExprIndex());
610  break;
611 
612  case OffsetOfNode::Field:
613  Record.AddDeclRef(ON.getField());
614  break;
615 
617  Record.AddIdentifierRef(ON.getFieldName());
618  break;
619 
620  case OffsetOfNode::Base:
621  Record.AddCXXBaseSpecifier(*ON.getBase());
622  break;
623  }
624  }
625  for (unsigned I = 0, N = E->getNumExpressions(); I != N; ++I)
626  Record.AddStmt(E->getIndexExpr(I));
628 }
629 
630 void ASTStmtWriter::VisitUnaryExprOrTypeTraitExpr(UnaryExprOrTypeTraitExpr *E) {
631  VisitExpr(E);
632  Record.push_back(E->getKind());
633  if (E->isArgumentType())
635  else {
636  Record.push_back(0);
637  Record.AddStmt(E->getArgumentExpr());
638  }
639  Record.AddSourceLocation(E->getOperatorLoc());
640  Record.AddSourceLocation(E->getRParenLoc());
642 }
643 
644 void ASTStmtWriter::VisitArraySubscriptExpr(ArraySubscriptExpr *E) {
645  VisitExpr(E);
646  Record.AddStmt(E->getLHS());
647  Record.AddStmt(E->getRHS());
648  Record.AddSourceLocation(E->getRBracketLoc());
650 }
651 
652 void ASTStmtWriter::VisitOMPArraySectionExpr(OMPArraySectionExpr *E) {
653  VisitExpr(E);
654  Record.AddStmt(E->getBase());
655  Record.AddStmt(E->getLowerBound());
656  Record.AddStmt(E->getLength());
657  Record.AddSourceLocation(E->getColonLoc());
658  Record.AddSourceLocation(E->getRBracketLoc());
660 }
661 
662 void ASTStmtWriter::VisitCallExpr(CallExpr *E) {
663  VisitExpr(E);
664  Record.push_back(E->getNumArgs());
665  Record.AddSourceLocation(E->getRParenLoc());
666  Record.AddStmt(E->getCallee());
667  for (CallExpr::arg_iterator Arg = E->arg_begin(), ArgEnd = E->arg_end();
668  Arg != ArgEnd; ++Arg)
669  Record.AddStmt(*Arg);
670  Record.push_back(static_cast<unsigned>(E->getADLCallKind()));
672 }
673 
674 void ASTStmtWriter::VisitMemberExpr(MemberExpr *E) {
675  VisitExpr(E);
676 
677  bool HasQualifier = E->hasQualifier();
678  bool HasFoundDecl =
679  E->hasQualifierOrFoundDecl() &&
680  (E->getFoundDecl().getDecl() != E->getMemberDecl() ||
681  E->getFoundDecl().getAccess() != E->getMemberDecl()->getAccess());
682  bool HasTemplateInfo = E->hasTemplateKWAndArgsInfo();
683  unsigned NumTemplateArgs = E->getNumTemplateArgs();
684 
685  // Write these first for easy access when deserializing, as they affect the
686  // size of the MemberExpr.
687  Record.push_back(HasQualifier);
688  Record.push_back(HasFoundDecl);
689  Record.push_back(HasTemplateInfo);
690  Record.push_back(NumTemplateArgs);
691 
692  Record.AddStmt(E->getBase());
693  Record.AddDeclRef(E->getMemberDecl());
694  Record.AddDeclarationNameLoc(E->MemberDNLoc,
695  E->getMemberDecl()->getDeclName());
696  Record.AddSourceLocation(E->getMemberLoc());
697  Record.push_back(E->isArrow());
698  Record.push_back(E->hadMultipleCandidates());
699  Record.push_back(E->isNonOdrUse());
700  Record.AddSourceLocation(E->getOperatorLoc());
701 
702  if (HasFoundDecl) {
703  DeclAccessPair FoundDecl = E->getFoundDecl();
704  Record.AddDeclRef(FoundDecl.getDecl());
705  Record.push_back(FoundDecl.getAccess());
706  }
707 
708  if (HasQualifier)
710 
711  if (HasTemplateInfo)
712  AddTemplateKWAndArgsInfo(*E->getTrailingObjects<ASTTemplateKWAndArgsInfo>(),
713  E->getTrailingObjects<TemplateArgumentLoc>());
714 
716 }
717 
718 void ASTStmtWriter::VisitObjCIsaExpr(ObjCIsaExpr *E) {
719  VisitExpr(E);
720  Record.AddStmt(E->getBase());
721  Record.AddSourceLocation(E->getIsaMemberLoc());
722  Record.AddSourceLocation(E->getOpLoc());
723  Record.push_back(E->isArrow());
725 }
726 
727 void ASTStmtWriter::
728 VisitObjCIndirectCopyRestoreExpr(ObjCIndirectCopyRestoreExpr *E) {
729  VisitExpr(E);
730  Record.AddStmt(E->getSubExpr());
731  Record.push_back(E->shouldCopy());
733 }
734 
735 void ASTStmtWriter::VisitObjCBridgedCastExpr(ObjCBridgedCastExpr *E) {
736  VisitExplicitCastExpr(E);
737  Record.AddSourceLocation(E->getLParenLoc());
739  Record.push_back(E->getBridgeKind()); // FIXME: Stable encoding
741 }
742 
743 void ASTStmtWriter::VisitCastExpr(CastExpr *E) {
744  VisitExpr(E);
745  Record.push_back(E->path_size());
746  Record.AddStmt(E->getSubExpr());
747  Record.push_back(E->getCastKind()); // FIXME: stable encoding
748 
750  PI = E->path_begin(), PE = E->path_end(); PI != PE; ++PI)
751  Record.AddCXXBaseSpecifier(**PI);
752 }
753 
754 void ASTStmtWriter::VisitBinaryOperator(BinaryOperator *E) {
755  VisitExpr(E);
756  Record.AddStmt(E->getLHS());
757  Record.AddStmt(E->getRHS());
758  Record.push_back(E->getOpcode()); // FIXME: stable encoding
759  Record.AddSourceLocation(E->getOperatorLoc());
760  Record.push_back(E->getFPFeatures().getInt());
762 }
763 
764 void ASTStmtWriter::VisitCompoundAssignOperator(CompoundAssignOperator *E) {
765  VisitBinaryOperator(E);
766  Record.AddTypeRef(E->getComputationLHSType());
769 }
770 
771 void ASTStmtWriter::VisitConditionalOperator(ConditionalOperator *E) {
772  VisitExpr(E);
773  Record.AddStmt(E->getCond());
774  Record.AddStmt(E->getLHS());
775  Record.AddStmt(E->getRHS());
776  Record.AddSourceLocation(E->getQuestionLoc());
777  Record.AddSourceLocation(E->getColonLoc());
779 }
780 
781 void
782 ASTStmtWriter::VisitBinaryConditionalOperator(BinaryConditionalOperator *E) {
783  VisitExpr(E);
784  Record.AddStmt(E->getOpaqueValue());
785  Record.AddStmt(E->getCommon());
786  Record.AddStmt(E->getCond());
787  Record.AddStmt(E->getTrueExpr());
788  Record.AddStmt(E->getFalseExpr());
789  Record.AddSourceLocation(E->getQuestionLoc());
790  Record.AddSourceLocation(E->getColonLoc());
792 }
793 
794 void ASTStmtWriter::VisitImplicitCastExpr(ImplicitCastExpr *E) {
795  VisitCastExpr(E);
796  Record.push_back(E->isPartOfExplicitCast());
797 
798  if (E->path_size() == 0)
799  AbbrevToUse = Writer.getExprImplicitCastAbbrev();
800 
802 }
803 
804 void ASTStmtWriter::VisitExplicitCastExpr(ExplicitCastExpr *E) {
805  VisitCastExpr(E);
807 }
808 
809 void ASTStmtWriter::VisitCStyleCastExpr(CStyleCastExpr *E) {
810  VisitExplicitCastExpr(E);
811  Record.AddSourceLocation(E->getLParenLoc());
812  Record.AddSourceLocation(E->getRParenLoc());
814 }
815 
816 void ASTStmtWriter::VisitCompoundLiteralExpr(CompoundLiteralExpr *E) {
817  VisitExpr(E);
818  Record.AddSourceLocation(E->getLParenLoc());
820  Record.AddStmt(E->getInitializer());
821  Record.push_back(E->isFileScope());
823 }
824 
825 void ASTStmtWriter::VisitExtVectorElementExpr(ExtVectorElementExpr *E) {
826  VisitExpr(E);
827  Record.AddStmt(E->getBase());
828  Record.AddIdentifierRef(&E->getAccessor());
829  Record.AddSourceLocation(E->getAccessorLoc());
831 }
832 
833 void ASTStmtWriter::VisitInitListExpr(InitListExpr *E) {
834  VisitExpr(E);
835  // NOTE: only add the (possibly null) syntactic form.
836  // No need to serialize the isSemanticForm flag and the semantic form.
837  Record.AddStmt(E->getSyntacticForm());
838  Record.AddSourceLocation(E->getLBraceLoc());
839  Record.AddSourceLocation(E->getRBraceLoc());
840  bool isArrayFiller = E->ArrayFillerOrUnionFieldInit.is<Expr*>();
841  Record.push_back(isArrayFiller);
842  if (isArrayFiller)
843  Record.AddStmt(E->getArrayFiller());
844  else
846  Record.push_back(E->hadArrayRangeDesignator());
847  Record.push_back(E->getNumInits());
848  if (isArrayFiller) {
849  // ArrayFiller may have filled "holes" due to designated initializer.
850  // Replace them by 0 to indicate that the filler goes in that place.
851  Expr *filler = E->getArrayFiller();
852  for (unsigned I = 0, N = E->getNumInits(); I != N; ++I)
853  Record.AddStmt(E->getInit(I) != filler ? E->getInit(I) : nullptr);
854  } else {
855  for (unsigned I = 0, N = E->getNumInits(); I != N; ++I)
856  Record.AddStmt(E->getInit(I));
857  }
859 }
860 
861 void ASTStmtWriter::VisitDesignatedInitExpr(DesignatedInitExpr *E) {
862  VisitExpr(E);
863  Record.push_back(E->getNumSubExprs());
864  for (unsigned I = 0, N = E->getNumSubExprs(); I != N; ++I)
865  Record.AddStmt(E->getSubExpr(I));
867  Record.push_back(E->usesGNUSyntax());
868  for (const DesignatedInitExpr::Designator &D : E->designators()) {
869  if (D.isFieldDesignator()) {
870  if (FieldDecl *Field = D.getField()) {
872  Record.AddDeclRef(Field);
873  } else {
875  Record.AddIdentifierRef(D.getFieldName());
876  }
877  Record.AddSourceLocation(D.getDotLoc());
878  Record.AddSourceLocation(D.getFieldLoc());
879  } else if (D.isArrayDesignator()) {
881  Record.push_back(D.getFirstExprIndex());
882  Record.AddSourceLocation(D.getLBracketLoc());
883  Record.AddSourceLocation(D.getRBracketLoc());
884  } else {
885  assert(D.isArrayRangeDesignator() && "Unknown designator");
887  Record.push_back(D.getFirstExprIndex());
888  Record.AddSourceLocation(D.getLBracketLoc());
889  Record.AddSourceLocation(D.getEllipsisLoc());
890  Record.AddSourceLocation(D.getRBracketLoc());
891  }
892  }
894 }
895 
896 void ASTStmtWriter::VisitDesignatedInitUpdateExpr(DesignatedInitUpdateExpr *E) {
897  VisitExpr(E);
898  Record.AddStmt(E->getBase());
899  Record.AddStmt(E->getUpdater());
901 }
902 
903 void ASTStmtWriter::VisitNoInitExpr(NoInitExpr *E) {
904  VisitExpr(E);
906 }
907 
908 void ASTStmtWriter::VisitArrayInitLoopExpr(ArrayInitLoopExpr *E) {
909  VisitExpr(E);
910  Record.AddStmt(E->SubExprs[0]);
911  Record.AddStmt(E->SubExprs[1]);
913 }
914 
915 void ASTStmtWriter::VisitArrayInitIndexExpr(ArrayInitIndexExpr *E) {
916  VisitExpr(E);
918 }
919 
920 void ASTStmtWriter::VisitImplicitValueInitExpr(ImplicitValueInitExpr *E) {
921  VisitExpr(E);
923 }
924 
925 void ASTStmtWriter::VisitVAArgExpr(VAArgExpr *E) {
926  VisitExpr(E);
927  Record.AddStmt(E->getSubExpr());
929  Record.AddSourceLocation(E->getBuiltinLoc());
930  Record.AddSourceLocation(E->getRParenLoc());
931  Record.push_back(E->isMicrosoftABI());
933 }
934 
935 void ASTStmtWriter::VisitSourceLocExpr(SourceLocExpr *E) {
936  VisitExpr(E);
937  Record.AddDeclRef(cast_or_null<Decl>(E->getParentContext()));
938  Record.AddSourceLocation(E->getBeginLoc());
939  Record.AddSourceLocation(E->getEndLoc());
940  Record.push_back(E->getIdentKind());
942 }
943 
944 void ASTStmtWriter::VisitAddrLabelExpr(AddrLabelExpr *E) {
945  VisitExpr(E);
946  Record.AddSourceLocation(E->getAmpAmpLoc());
947  Record.AddSourceLocation(E->getLabelLoc());
948  Record.AddDeclRef(E->getLabel());
950 }
951 
952 void ASTStmtWriter::VisitStmtExpr(StmtExpr *E) {
953  VisitExpr(E);
954  Record.AddStmt(E->getSubStmt());
955  Record.AddSourceLocation(E->getLParenLoc());
956  Record.AddSourceLocation(E->getRParenLoc());
958 }
959 
960 void ASTStmtWriter::VisitChooseExpr(ChooseExpr *E) {
961  VisitExpr(E);
962  Record.AddStmt(E->getCond());
963  Record.AddStmt(E->getLHS());
964  Record.AddStmt(E->getRHS());
965  Record.AddSourceLocation(E->getBuiltinLoc());
966  Record.AddSourceLocation(E->getRParenLoc());
967  Record.push_back(E->isConditionDependent() ? false : E->isConditionTrue());
969 }
970 
971 void ASTStmtWriter::VisitGNUNullExpr(GNUNullExpr *E) {
972  VisitExpr(E);
973  Record.AddSourceLocation(E->getTokenLocation());
975 }
976 
977 void ASTStmtWriter::VisitShuffleVectorExpr(ShuffleVectorExpr *E) {
978  VisitExpr(E);
979  Record.push_back(E->getNumSubExprs());
980  for (unsigned I = 0, N = E->getNumSubExprs(); I != N; ++I)
981  Record.AddStmt(E->getExpr(I));
982  Record.AddSourceLocation(E->getBuiltinLoc());
983  Record.AddSourceLocation(E->getRParenLoc());
985 }
986 
987 void ASTStmtWriter::VisitConvertVectorExpr(ConvertVectorExpr *E) {
988  VisitExpr(E);
989  Record.AddSourceLocation(E->getBuiltinLoc());
990  Record.AddSourceLocation(E->getRParenLoc());
992  Record.AddStmt(E->getSrcExpr());
994 }
995 
996 void ASTStmtWriter::VisitBlockExpr(BlockExpr *E) {
997  VisitExpr(E);
998  Record.AddDeclRef(E->getBlockDecl());
1000 }
1001 
1002 void ASTStmtWriter::VisitGenericSelectionExpr(GenericSelectionExpr *E) {
1003  VisitExpr(E);
1004 
1005  Record.push_back(E->getNumAssocs());
1006  Record.push_back(E->ResultIndex);
1007  Record.AddSourceLocation(E->getGenericLoc());
1008  Record.AddSourceLocation(E->getDefaultLoc());
1009  Record.AddSourceLocation(E->getRParenLoc());
1010 
1011  Stmt **Stmts = E->getTrailingObjects<Stmt *>();
1012  // Add 1 to account for the controlling expression which is the first
1013  // expression in the trailing array of Stmt *. This is not needed for
1014  // the trailing array of TypeSourceInfo *.
1015  for (unsigned I = 0, N = E->getNumAssocs() + 1; I < N; ++I)
1016  Record.AddStmt(Stmts[I]);
1017 
1018  TypeSourceInfo **TSIs = E->getTrailingObjects<TypeSourceInfo *>();
1019  for (unsigned I = 0, N = E->getNumAssocs(); I < N; ++I)
1020  Record.AddTypeSourceInfo(TSIs[I]);
1021 
1023 }
1024 
1025 void ASTStmtWriter::VisitPseudoObjectExpr(PseudoObjectExpr *E) {
1026  VisitExpr(E);
1027  Record.push_back(E->getNumSemanticExprs());
1028 
1029  // Push the result index. Currently, this needs to exactly match
1030  // the encoding used internally for ResultIndex.
1031  unsigned result = E->getResultExprIndex();
1032  result = (result == PseudoObjectExpr::NoResult ? 0 : result + 1);
1033  Record.push_back(result);
1034 
1035  Record.AddStmt(E->getSyntacticForm());
1037  i = E->semantics_begin(), e = E->semantics_end(); i != e; ++i) {
1038  Record.AddStmt(*i);
1039  }
1041 }
1042 
1043 void ASTStmtWriter::VisitAtomicExpr(AtomicExpr *E) {
1044  VisitExpr(E);
1045  Record.push_back(E->getOp());
1046  for (unsigned I = 0, N = E->getNumSubExprs(); I != N; ++I)
1047  Record.AddStmt(E->getSubExprs()[I]);
1048  Record.AddSourceLocation(E->getBuiltinLoc());
1049  Record.AddSourceLocation(E->getRParenLoc());
1051 }
1052 
1053 //===----------------------------------------------------------------------===//
1054 // Objective-C Expressions and Statements.
1055 //===----------------------------------------------------------------------===//
1056 
1057 void ASTStmtWriter::VisitObjCStringLiteral(ObjCStringLiteral *E) {
1058  VisitExpr(E);
1059  Record.AddStmt(E->getString());
1060  Record.AddSourceLocation(E->getAtLoc());
1062 }
1063 
1064 void ASTStmtWriter::VisitObjCBoxedExpr(ObjCBoxedExpr *E) {
1065  VisitExpr(E);
1066  Record.AddStmt(E->getSubExpr());
1067  Record.AddDeclRef(E->getBoxingMethod());
1068  Record.AddSourceRange(E->getSourceRange());
1070 }
1071 
1072 void ASTStmtWriter::VisitObjCArrayLiteral(ObjCArrayLiteral *E) {
1073  VisitExpr(E);
1074  Record.push_back(E->getNumElements());
1075  for (unsigned i = 0; i < E->getNumElements(); i++)
1076  Record.AddStmt(E->getElement(i));
1078  Record.AddSourceRange(E->getSourceRange());
1080 }
1081 
1082 void ASTStmtWriter::VisitObjCDictionaryLiteral(ObjCDictionaryLiteral *E) {
1083  VisitExpr(E);
1084  Record.push_back(E->getNumElements());
1085  Record.push_back(E->HasPackExpansions);
1086  for (unsigned i = 0; i < E->getNumElements(); i++) {
1087  ObjCDictionaryElement Element = E->getKeyValueElement(i);
1088  Record.AddStmt(Element.Key);
1089  Record.AddStmt(Element.Value);
1090  if (E->HasPackExpansions) {
1091  Record.AddSourceLocation(Element.EllipsisLoc);
1092  unsigned NumExpansions = 0;
1093  if (Element.NumExpansions)
1094  NumExpansions = *Element.NumExpansions + 1;
1095  Record.push_back(NumExpansions);
1096  }
1097  }
1098 
1099  Record.AddDeclRef(E->getDictWithObjectsMethod());
1100  Record.AddSourceRange(E->getSourceRange());
1102 }
1103 
1104 void ASTStmtWriter::VisitObjCEncodeExpr(ObjCEncodeExpr *E) {
1105  VisitExpr(E);
1107  Record.AddSourceLocation(E->getAtLoc());
1108  Record.AddSourceLocation(E->getRParenLoc());
1110 }
1111 
1112 void ASTStmtWriter::VisitObjCSelectorExpr(ObjCSelectorExpr *E) {
1113  VisitExpr(E);
1114  Record.AddSelectorRef(E->getSelector());
1115  Record.AddSourceLocation(E->getAtLoc());
1116  Record.AddSourceLocation(E->getRParenLoc());
1118 }
1119 
1120 void ASTStmtWriter::VisitObjCProtocolExpr(ObjCProtocolExpr *E) {
1121  VisitExpr(E);
1122  Record.AddDeclRef(E->getProtocol());
1123  Record.AddSourceLocation(E->getAtLoc());
1124  Record.AddSourceLocation(E->ProtoLoc);
1125  Record.AddSourceLocation(E->getRParenLoc());
1127 }
1128 
1129 void ASTStmtWriter::VisitObjCIvarRefExpr(ObjCIvarRefExpr *E) {
1130  VisitExpr(E);
1131  Record.AddDeclRef(E->getDecl());
1132  Record.AddSourceLocation(E->getLocation());
1133  Record.AddSourceLocation(E->getOpLoc());
1134  Record.AddStmt(E->getBase());
1135  Record.push_back(E->isArrow());
1136  Record.push_back(E->isFreeIvar());
1138 }
1139 
1140 void ASTStmtWriter::VisitObjCPropertyRefExpr(ObjCPropertyRefExpr *E) {
1141  VisitExpr(E);
1142  Record.push_back(E->SetterAndMethodRefFlags.getInt());
1143  Record.push_back(E->isImplicitProperty());
1144  if (E->isImplicitProperty()) {
1147  } else {
1148  Record.AddDeclRef(E->getExplicitProperty());
1149  }
1150  Record.AddSourceLocation(E->getLocation());
1152  if (E->isObjectReceiver()) {
1153  Record.push_back(0);
1154  Record.AddStmt(E->getBase());
1155  } else if (E->isSuperReceiver()) {
1156  Record.push_back(1);
1157  Record.AddTypeRef(E->getSuperReceiverType());
1158  } else {
1159  Record.push_back(2);
1160  Record.AddDeclRef(E->getClassReceiver());
1161  }
1162 
1164 }
1165 
1166 void ASTStmtWriter::VisitObjCSubscriptRefExpr(ObjCSubscriptRefExpr *E) {
1167  VisitExpr(E);
1168  Record.AddSourceLocation(E->getRBracket());
1169  Record.AddStmt(E->getBaseExpr());
1170  Record.AddStmt(E->getKeyExpr());
1171  Record.AddDeclRef(E->getAtIndexMethodDecl());
1172  Record.AddDeclRef(E->setAtIndexMethodDecl());
1173 
1175 }
1176 
1177 void ASTStmtWriter::VisitObjCMessageExpr(ObjCMessageExpr *E) {
1178  VisitExpr(E);
1179  Record.push_back(E->getNumArgs());
1180  Record.push_back(E->getNumStoredSelLocs());
1181  Record.push_back(E->SelLocsKind);
1182  Record.push_back(E->isDelegateInitCall());
1183  Record.push_back(E->IsImplicit);
1184  Record.push_back((unsigned)E->getReceiverKind()); // FIXME: stable encoding
1185  switch (E->getReceiverKind()) {
1187  Record.AddStmt(E->getInstanceReceiver());
1188  break;
1189 
1192  break;
1193 
1196  Record.AddTypeRef(E->getSuperType());
1197  Record.AddSourceLocation(E->getSuperLoc());
1198  break;
1199  }
1200 
1201  if (E->getMethodDecl()) {
1202  Record.push_back(1);
1203  Record.AddDeclRef(E->getMethodDecl());
1204  } else {
1205  Record.push_back(0);
1206  Record.AddSelectorRef(E->getSelector());
1207  }
1208 
1209  Record.AddSourceLocation(E->getLeftLoc());
1210  Record.AddSourceLocation(E->getRightLoc());
1211 
1212  for (CallExpr::arg_iterator Arg = E->arg_begin(), ArgEnd = E->arg_end();
1213  Arg != ArgEnd; ++Arg)
1214  Record.AddStmt(*Arg);
1215 
1216  SourceLocation *Locs = E->getStoredSelLocs();
1217  for (unsigned i = 0, e = E->getNumStoredSelLocs(); i != e; ++i)
1218  Record.AddSourceLocation(Locs[i]);
1219 
1221 }
1222 
1223 void ASTStmtWriter::VisitObjCForCollectionStmt(ObjCForCollectionStmt *S) {
1224  VisitStmt(S);
1225  Record.AddStmt(S->getElement());
1226  Record.AddStmt(S->getCollection());
1227  Record.AddStmt(S->getBody());
1228  Record.AddSourceLocation(S->getForLoc());
1229  Record.AddSourceLocation(S->getRParenLoc());
1231 }
1232 
1233 void ASTStmtWriter::VisitObjCAtCatchStmt(ObjCAtCatchStmt *S) {
1234  VisitStmt(S);
1235  Record.AddStmt(S->getCatchBody());
1236  Record.AddDeclRef(S->getCatchParamDecl());
1237  Record.AddSourceLocation(S->getAtCatchLoc());
1238  Record.AddSourceLocation(S->getRParenLoc());
1240 }
1241 
1242 void ASTStmtWriter::VisitObjCAtFinallyStmt(ObjCAtFinallyStmt *S) {
1243  VisitStmt(S);
1244  Record.AddStmt(S->getFinallyBody());
1245  Record.AddSourceLocation(S->getAtFinallyLoc());
1247 }
1248 
1249 void ASTStmtWriter::VisitObjCAutoreleasePoolStmt(ObjCAutoreleasePoolStmt *S) {
1250  VisitStmt(S); // FIXME: no test coverage.
1251  Record.AddStmt(S->getSubStmt());
1252  Record.AddSourceLocation(S->getAtLoc());
1254 }
1255 
1256 void ASTStmtWriter::VisitObjCAtTryStmt(ObjCAtTryStmt *S) {
1257  VisitStmt(S);
1258  Record.push_back(S->getNumCatchStmts());
1259  Record.push_back(S->getFinallyStmt() != nullptr);
1260  Record.AddStmt(S->getTryBody());
1261  for (unsigned I = 0, N = S->getNumCatchStmts(); I != N; ++I)
1262  Record.AddStmt(S->getCatchStmt(I));
1263  if (S->getFinallyStmt())
1264  Record.AddStmt(S->getFinallyStmt());
1265  Record.AddSourceLocation(S->getAtTryLoc());
1267 }
1268 
1269 void ASTStmtWriter::VisitObjCAtSynchronizedStmt(ObjCAtSynchronizedStmt *S) {
1270  VisitStmt(S); // FIXME: no test coverage.
1271  Record.AddStmt(S->getSynchExpr());
1272  Record.AddStmt(S->getSynchBody());
1275 }
1276 
1277 void ASTStmtWriter::VisitObjCAtThrowStmt(ObjCAtThrowStmt *S) {
1278  VisitStmt(S); // FIXME: no test coverage.
1279  Record.AddStmt(S->getThrowExpr());
1280  Record.AddSourceLocation(S->getThrowLoc());
1282 }
1283 
1284 void ASTStmtWriter::VisitObjCBoolLiteralExpr(ObjCBoolLiteralExpr *E) {
1285  VisitExpr(E);
1286  Record.push_back(E->getValue());
1287  Record.AddSourceLocation(E->getLocation());
1289 }
1290 
1291 void ASTStmtWriter::VisitObjCAvailabilityCheckExpr(ObjCAvailabilityCheckExpr *E) {
1292  VisitExpr(E);
1293  Record.AddSourceRange(E->getSourceRange());
1294  Record.AddVersionTuple(E->getVersion());
1296 }
1297 
1298 //===----------------------------------------------------------------------===//
1299 // C++ Expressions and Statements.
1300 //===----------------------------------------------------------------------===//
1301 
1302 void ASTStmtWriter::VisitCXXCatchStmt(CXXCatchStmt *S) {
1303  VisitStmt(S);
1304  Record.AddSourceLocation(S->getCatchLoc());
1305  Record.AddDeclRef(S->getExceptionDecl());
1306  Record.AddStmt(S->getHandlerBlock());
1308 }
1309 
1310 void ASTStmtWriter::VisitCXXTryStmt(CXXTryStmt *S) {
1311  VisitStmt(S);
1312  Record.push_back(S->getNumHandlers());
1313  Record.AddSourceLocation(S->getTryLoc());
1314  Record.AddStmt(S->getTryBlock());
1315  for (unsigned i = 0, e = S->getNumHandlers(); i != e; ++i)
1316  Record.AddStmt(S->getHandler(i));
1318 }
1319 
1320 void ASTStmtWriter::VisitCXXForRangeStmt(CXXForRangeStmt *S) {
1321  VisitStmt(S);
1322  Record.AddSourceLocation(S->getForLoc());
1323  Record.AddSourceLocation(S->getCoawaitLoc());
1324  Record.AddSourceLocation(S->getColonLoc());
1325  Record.AddSourceLocation(S->getRParenLoc());
1326  Record.AddStmt(S->getInit());
1327  Record.AddStmt(S->getRangeStmt());
1328  Record.AddStmt(S->getBeginStmt());
1329  Record.AddStmt(S->getEndStmt());
1330  Record.AddStmt(S->getCond());
1331  Record.AddStmt(S->getInc());
1332  Record.AddStmt(S->getLoopVarStmt());
1333  Record.AddStmt(S->getBody());
1335 }
1336 
1337 void ASTStmtWriter::VisitMSDependentExistsStmt(MSDependentExistsStmt *S) {
1338  VisitStmt(S);
1339  Record.AddSourceLocation(S->getKeywordLoc());
1340  Record.push_back(S->isIfExists());
1342  Record.AddDeclarationNameInfo(S->getNameInfo());
1343  Record.AddStmt(S->getSubStmt());
1345 }
1346 
1347 void ASTStmtWriter::VisitCXXOperatorCallExpr(CXXOperatorCallExpr *E) {
1348  VisitCallExpr(E);
1349  Record.push_back(E->getOperator());
1350  Record.push_back(E->getFPFeatures().getInt());
1351  Record.AddSourceRange(E->Range);
1353 }
1354 
1355 void ASTStmtWriter::VisitCXXMemberCallExpr(CXXMemberCallExpr *E) {
1356  VisitCallExpr(E);
1358 }
1359 
1360 void ASTStmtWriter::VisitCXXConstructExpr(CXXConstructExpr *E) {
1361  VisitExpr(E);
1362 
1363  Record.push_back(E->getNumArgs());
1364  Record.push_back(E->isElidable());
1365  Record.push_back(E->hadMultipleCandidates());
1366  Record.push_back(E->isListInitialization());
1369  Record.push_back(E->getConstructionKind()); // FIXME: stable encoding
1370  Record.AddSourceLocation(E->getLocation());
1371  Record.AddDeclRef(E->getConstructor());
1372  Record.AddSourceRange(E->getParenOrBraceRange());
1373 
1374  for (unsigned I = 0, N = E->getNumArgs(); I != N; ++I)
1375  Record.AddStmt(E->getArg(I));
1376 
1378 }
1379 
1380 void ASTStmtWriter::VisitCXXInheritedCtorInitExpr(CXXInheritedCtorInitExpr *E) {
1381  VisitExpr(E);
1382  Record.AddDeclRef(E->getConstructor());
1383  Record.AddSourceLocation(E->getLocation());
1384  Record.push_back(E->constructsVBase());
1385  Record.push_back(E->inheritedFromVBase());
1387 }
1388 
1389 void ASTStmtWriter::VisitCXXTemporaryObjectExpr(CXXTemporaryObjectExpr *E) {
1390  VisitCXXConstructExpr(E);
1391  Record.AddTypeSourceInfo(E->getTypeSourceInfo());
1393 }
1394 
1395 void ASTStmtWriter::VisitLambdaExpr(LambdaExpr *E) {
1396  VisitExpr(E);
1397  Record.push_back(E->NumCaptures);
1398  Record.AddSourceRange(E->IntroducerRange);
1399  Record.push_back(E->CaptureDefault); // FIXME: stable encoding
1400  Record.AddSourceLocation(E->CaptureDefaultLoc);
1401  Record.push_back(E->ExplicitParams);
1402  Record.push_back(E->ExplicitResultType);
1403  Record.AddSourceLocation(E->ClosingBrace);
1404 
1405  // Add capture initializers.
1407  CEnd = E->capture_init_end();
1408  C != CEnd; ++C) {
1409  Record.AddStmt(*C);
1410  }
1411 
1413 }
1414 
1415 void ASTStmtWriter::VisitCXXStdInitializerListExpr(CXXStdInitializerListExpr *E) {
1416  VisitExpr(E);
1417  Record.AddStmt(E->getSubExpr());
1419 }
1420 
1421 void ASTStmtWriter::VisitCXXNamedCastExpr(CXXNamedCastExpr *E) {
1422  VisitExplicitCastExpr(E);
1424  Record.AddSourceRange(E->getAngleBrackets());
1425 }
1426 
1427 void ASTStmtWriter::VisitCXXStaticCastExpr(CXXStaticCastExpr *E) {
1428  VisitCXXNamedCastExpr(E);
1430 }
1431 
1432 void ASTStmtWriter::VisitCXXDynamicCastExpr(CXXDynamicCastExpr *E) {
1433  VisitCXXNamedCastExpr(E);
1435 }
1436 
1437 void ASTStmtWriter::VisitCXXReinterpretCastExpr(CXXReinterpretCastExpr *E) {
1438  VisitCXXNamedCastExpr(E);
1440 }
1441 
1442 void ASTStmtWriter::VisitCXXConstCastExpr(CXXConstCastExpr *E) {
1443  VisitCXXNamedCastExpr(E);
1445 }
1446 
1447 void ASTStmtWriter::VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr *E) {
1448  VisitExplicitCastExpr(E);
1449  Record.AddSourceLocation(E->getLParenLoc());
1450  Record.AddSourceLocation(E->getRParenLoc());
1452 }
1453 
1454 void ASTStmtWriter::VisitBuiltinBitCastExpr(BuiltinBitCastExpr *E) {
1455  VisitExplicitCastExpr(E);
1456  Record.AddSourceLocation(E->getBeginLoc());
1457  Record.AddSourceLocation(E->getEndLoc());
1458 }
1459 
1460 void ASTStmtWriter::VisitUserDefinedLiteral(UserDefinedLiteral *E) {
1461  VisitCallExpr(E);
1462  Record.AddSourceLocation(E->UDSuffixLoc);
1464 }
1465 
1466 void ASTStmtWriter::VisitCXXBoolLiteralExpr(CXXBoolLiteralExpr *E) {
1467  VisitExpr(E);
1468  Record.push_back(E->getValue());
1469  Record.AddSourceLocation(E->getLocation());
1471 }
1472 
1473 void ASTStmtWriter::VisitCXXNullPtrLiteralExpr(CXXNullPtrLiteralExpr *E) {
1474  VisitExpr(E);
1475  Record.AddSourceLocation(E->getLocation());
1477 }
1478 
1479 void ASTStmtWriter::VisitCXXTypeidExpr(CXXTypeidExpr *E) {
1480  VisitExpr(E);
1481  Record.AddSourceRange(E->getSourceRange());
1482  if (E->isTypeOperand()) {
1485  } else {
1486  Record.AddStmt(E->getExprOperand());
1488  }
1489 }
1490 
1491 void ASTStmtWriter::VisitCXXThisExpr(CXXThisExpr *E) {
1492  VisitExpr(E);
1493  Record.AddSourceLocation(E->getLocation());
1494  Record.push_back(E->isImplicit());
1496 }
1497 
1498 void ASTStmtWriter::VisitCXXThrowExpr(CXXThrowExpr *E) {
1499  VisitExpr(E);
1500  Record.AddSourceLocation(E->getThrowLoc());
1501  Record.AddStmt(E->getSubExpr());
1502  Record.push_back(E->isThrownVariableInScope());
1504 }
1505 
1506 void ASTStmtWriter::VisitCXXDefaultArgExpr(CXXDefaultArgExpr *E) {
1507  VisitExpr(E);
1508  Record.AddDeclRef(E->getParam());
1509  Record.AddDeclRef(cast_or_null<Decl>(E->getUsedContext()));
1510  Record.AddSourceLocation(E->getUsedLocation());
1512 }
1513 
1514 void ASTStmtWriter::VisitCXXDefaultInitExpr(CXXDefaultInitExpr *E) {
1515  VisitExpr(E);
1516  Record.AddDeclRef(E->getField());
1517  Record.AddDeclRef(cast_or_null<Decl>(E->getUsedContext()));
1518  Record.AddSourceLocation(E->getExprLoc());
1520 }
1521 
1522 void ASTStmtWriter::VisitCXXBindTemporaryExpr(CXXBindTemporaryExpr *E) {
1523  VisitExpr(E);
1524  Record.AddCXXTemporary(E->getTemporary());
1525  Record.AddStmt(E->getSubExpr());
1527 }
1528 
1529 void ASTStmtWriter::VisitCXXScalarValueInitExpr(CXXScalarValueInitExpr *E) {
1530  VisitExpr(E);
1531  Record.AddTypeSourceInfo(E->getTypeSourceInfo());
1532  Record.AddSourceLocation(E->getRParenLoc());
1534 }
1535 
1536 void ASTStmtWriter::VisitCXXNewExpr(CXXNewExpr *E) {
1537  VisitExpr(E);
1538 
1539  Record.push_back(E->isArray());
1540  Record.push_back(E->hasInitializer());
1541  Record.push_back(E->getNumPlacementArgs());
1542  Record.push_back(E->isParenTypeId());
1543 
1544  Record.push_back(E->isGlobalNew());
1545  Record.push_back(E->passAlignment());
1547  Record.push_back(E->CXXNewExprBits.StoredInitializationStyle);
1548 
1549  Record.AddDeclRef(E->getOperatorNew());
1550  Record.AddDeclRef(E->getOperatorDelete());
1552  if (E->isParenTypeId())
1553  Record.AddSourceRange(E->getTypeIdParens());
1554  Record.AddSourceRange(E->getSourceRange());
1555  Record.AddSourceRange(E->getDirectInitRange());
1556 
1557  for (CXXNewExpr::arg_iterator I = E->raw_arg_begin(), N = E->raw_arg_end();
1558  I != N; ++I)
1559  Record.AddStmt(*I);
1560 
1562 }
1563 
1564 void ASTStmtWriter::VisitCXXDeleteExpr(CXXDeleteExpr *E) {
1565  VisitExpr(E);
1566  Record.push_back(E->isGlobalDelete());
1567  Record.push_back(E->isArrayForm());
1568  Record.push_back(E->isArrayFormAsWritten());
1570  Record.AddDeclRef(E->getOperatorDelete());
1571  Record.AddStmt(E->getArgument());
1572  Record.AddSourceLocation(E->getBeginLoc());
1573 
1575 }
1576 
1577 void ASTStmtWriter::VisitCXXPseudoDestructorExpr(CXXPseudoDestructorExpr *E) {
1578  VisitExpr(E);
1579 
1580  Record.AddStmt(E->getBase());
1581  Record.push_back(E->isArrow());
1582  Record.AddSourceLocation(E->getOperatorLoc());
1584  Record.AddTypeSourceInfo(E->getScopeTypeInfo());
1585  Record.AddSourceLocation(E->getColonColonLoc());
1586  Record.AddSourceLocation(E->getTildeLoc());
1587 
1588  // PseudoDestructorTypeStorage.
1590  if (E->getDestroyedTypeIdentifier())
1592  else
1594 
1596 }
1597 
1598 void ASTStmtWriter::VisitExprWithCleanups(ExprWithCleanups *E) {
1599  VisitExpr(E);
1600  Record.push_back(E->getNumObjects());
1601  for (unsigned i = 0, e = E->getNumObjects(); i != e; ++i)
1602  Record.AddDeclRef(E->getObject(i));
1603 
1604  Record.push_back(E->cleanupsHaveSideEffects());
1605  Record.AddStmt(E->getSubExpr());
1607 }
1608 
1609 void ASTStmtWriter::VisitCXXDependentScopeMemberExpr(
1611  VisitExpr(E);
1612 
1613  // Don't emit anything here (or if you do you will have to update
1614  // the corresponding deserialization function).
1615 
1616  Record.push_back(E->hasTemplateKWAndArgsInfo());
1617  Record.push_back(E->getNumTemplateArgs());
1618  Record.push_back(E->hasFirstQualifierFoundInScope());
1619 
1620  if (E->hasTemplateKWAndArgsInfo()) {
1621  const ASTTemplateKWAndArgsInfo &ArgInfo =
1622  *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>();
1623  AddTemplateKWAndArgsInfo(ArgInfo,
1624  E->getTrailingObjects<TemplateArgumentLoc>());
1625  }
1626 
1627  Record.push_back(E->isArrow());
1628  Record.AddSourceLocation(E->getOperatorLoc());
1629  Record.AddTypeRef(E->getBaseType());
1631  if (!E->isImplicitAccess())
1632  Record.AddStmt(E->getBase());
1633  else
1634  Record.AddStmt(nullptr);
1635 
1636  if (E->hasFirstQualifierFoundInScope())
1638 
1639  Record.AddDeclarationNameInfo(E->MemberNameInfo);
1641 }
1642 
1643 void
1644 ASTStmtWriter::VisitDependentScopeDeclRefExpr(DependentScopeDeclRefExpr *E) {
1645  VisitExpr(E);
1646 
1647  // Don't emit anything here, HasTemplateKWAndArgsInfo must be
1648  // emitted first.
1649 
1650  Record.push_back(E->DependentScopeDeclRefExprBits.HasTemplateKWAndArgsInfo);
1651  if (E->DependentScopeDeclRefExprBits.HasTemplateKWAndArgsInfo) {
1652  const ASTTemplateKWAndArgsInfo &ArgInfo =
1653  *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>();
1654  Record.push_back(ArgInfo.NumTemplateArgs);
1655  AddTemplateKWAndArgsInfo(ArgInfo,
1656  E->getTrailingObjects<TemplateArgumentLoc>());
1657  }
1658 
1660  Record.AddDeclarationNameInfo(E->NameInfo);
1662 }
1663 
1664 void
1665 ASTStmtWriter::VisitCXXUnresolvedConstructExpr(CXXUnresolvedConstructExpr *E) {
1666  VisitExpr(E);
1667  Record.push_back(E->arg_size());
1669  ArgI = E->arg_begin(), ArgE = E->arg_end(); ArgI != ArgE; ++ArgI)
1670  Record.AddStmt(*ArgI);
1671  Record.AddTypeSourceInfo(E->getTypeSourceInfo());
1672  Record.AddSourceLocation(E->getLParenLoc());
1673  Record.AddSourceLocation(E->getRParenLoc());
1675 }
1676 
1677 void ASTStmtWriter::VisitOverloadExpr(OverloadExpr *E) {
1678  VisitExpr(E);
1679 
1680  Record.push_back(E->getNumDecls());
1681  Record.push_back(E->hasTemplateKWAndArgsInfo());
1682  if (E->hasTemplateKWAndArgsInfo()) {
1683  const ASTTemplateKWAndArgsInfo &ArgInfo =
1685  Record.push_back(ArgInfo.NumTemplateArgs);
1687  }
1688 
1689  for (OverloadExpr::decls_iterator OvI = E->decls_begin(),
1690  OvE = E->decls_end();
1691  OvI != OvE; ++OvI) {
1692  Record.AddDeclRef(OvI.getDecl());
1693  Record.push_back(OvI.getAccess());
1694  }
1695 
1696  Record.AddDeclarationNameInfo(E->getNameInfo());
1698 }
1699 
1700 void ASTStmtWriter::VisitUnresolvedMemberExpr(UnresolvedMemberExpr *E) {
1701  VisitOverloadExpr(E);
1702  Record.push_back(E->isArrow());
1703  Record.push_back(E->hasUnresolvedUsing());
1704  Record.AddStmt(!E->isImplicitAccess() ? E->getBase() : nullptr);
1705  Record.AddTypeRef(E->getBaseType());
1706  Record.AddSourceLocation(E->getOperatorLoc());
1708 }
1709 
1710 void ASTStmtWriter::VisitUnresolvedLookupExpr(UnresolvedLookupExpr *E) {
1711  VisitOverloadExpr(E);
1712  Record.push_back(E->requiresADL());
1713  Record.push_back(E->isOverloaded());
1714  Record.AddDeclRef(E->getNamingClass());
1716 }
1717 
1718 void ASTStmtWriter::VisitTypeTraitExpr(TypeTraitExpr *E) {
1719  VisitExpr(E);
1720  Record.push_back(E->TypeTraitExprBits.NumArgs);
1721  Record.push_back(E->TypeTraitExprBits.Kind); // FIXME: Stable encoding
1722  Record.push_back(E->TypeTraitExprBits.Value);
1723  Record.AddSourceRange(E->getSourceRange());
1724  for (unsigned I = 0, N = E->getNumArgs(); I != N; ++I)
1725  Record.AddTypeSourceInfo(E->getArg(I));
1727 }
1728 
1729 void ASTStmtWriter::VisitArrayTypeTraitExpr(ArrayTypeTraitExpr *E) {
1730  VisitExpr(E);
1731  Record.push_back(E->getTrait());
1732  Record.push_back(E->getValue());
1733  Record.AddSourceRange(E->getSourceRange());
1735  Record.AddStmt(E->getDimensionExpression());
1737 }
1738 
1739 void ASTStmtWriter::VisitExpressionTraitExpr(ExpressionTraitExpr *E) {
1740  VisitExpr(E);
1741  Record.push_back(E->getTrait());
1742  Record.push_back(E->getValue());
1743  Record.AddSourceRange(E->getSourceRange());
1744  Record.AddStmt(E->getQueriedExpression());
1746 }
1747 
1748 void ASTStmtWriter::VisitCXXNoexceptExpr(CXXNoexceptExpr *E) {
1749  VisitExpr(E);
1750  Record.push_back(E->getValue());
1751  Record.AddSourceRange(E->getSourceRange());
1752  Record.AddStmt(E->getOperand());
1754 }
1755 
1756 void ASTStmtWriter::VisitPackExpansionExpr(PackExpansionExpr *E) {
1757  VisitExpr(E);
1758  Record.AddSourceLocation(E->getEllipsisLoc());
1759  Record.push_back(E->NumExpansions);
1760  Record.AddStmt(E->getPattern());
1762 }
1763 
1764 void ASTStmtWriter::VisitSizeOfPackExpr(SizeOfPackExpr *E) {
1765  VisitExpr(E);
1766  Record.push_back(E->isPartiallySubstituted() ? E->getPartialArguments().size()
1767  : 0);
1768  Record.AddSourceLocation(E->OperatorLoc);
1769  Record.AddSourceLocation(E->PackLoc);
1770  Record.AddSourceLocation(E->RParenLoc);
1771  Record.AddDeclRef(E->Pack);
1772  if (E->isPartiallySubstituted()) {
1773  for (const auto &TA : E->getPartialArguments())
1774  Record.AddTemplateArgument(TA);
1775  } else if (!E->isValueDependent()) {
1776  Record.push_back(E->getPackLength());
1777  }
1779 }
1780 
1781 void ASTStmtWriter::VisitSubstNonTypeTemplateParmExpr(
1783  VisitExpr(E);
1784  Record.AddDeclRef(E->getParameter());
1785  Record.AddSourceLocation(E->getNameLoc());
1786  Record.AddStmt(E->getReplacement());
1788 }
1789 
1790 void ASTStmtWriter::VisitSubstNonTypeTemplateParmPackExpr(
1792  VisitExpr(E);
1793  Record.AddDeclRef(E->getParameterPack());
1794  Record.AddTemplateArgument(E->getArgumentPack());
1797 }
1798 
1799 void ASTStmtWriter::VisitFunctionParmPackExpr(FunctionParmPackExpr *E) {
1800  VisitExpr(E);
1801  Record.push_back(E->getNumExpansions());
1802  Record.AddDeclRef(E->getParameterPack());
1804  for (FunctionParmPackExpr::iterator I = E->begin(), End = E->end();
1805  I != End; ++I)
1806  Record.AddDeclRef(*I);
1808 }
1809 
1810 void ASTStmtWriter::VisitMaterializeTemporaryExpr(MaterializeTemporaryExpr *E) {
1811  VisitExpr(E);
1812  Record.AddStmt(E->getTemporary());
1813  Record.AddDeclRef(E->getExtendingDecl());
1814  Record.push_back(E->getManglingNumber());
1816 }
1817 
1818 void ASTStmtWriter::VisitCXXFoldExpr(CXXFoldExpr *E) {
1819  VisitExpr(E);
1820  Record.AddSourceLocation(E->LParenLoc);
1821  Record.AddSourceLocation(E->EllipsisLoc);
1822  Record.AddSourceLocation(E->RParenLoc);
1823  Record.push_back(E->NumExpansions);
1824  Record.AddStmt(E->SubExprs[0]);
1825  Record.AddStmt(E->SubExprs[1]);
1826  Record.push_back(E->Opcode);
1828 }
1829 
1830 void ASTStmtWriter::VisitOpaqueValueExpr(OpaqueValueExpr *E) {
1831  VisitExpr(E);
1832  Record.AddStmt(E->getSourceExpr());
1833  Record.AddSourceLocation(E->getLocation());
1834  Record.push_back(E->isUnique());
1836 }
1837 
1838 void ASTStmtWriter::VisitTypoExpr(TypoExpr *E) {
1839  VisitExpr(E);
1840  // TODO: Figure out sane writer behavior for a TypoExpr, if necessary
1841  llvm_unreachable("Cannot write TypoExpr nodes");
1842 }
1843 
1844 //===----------------------------------------------------------------------===//
1845 // CUDA Expressions and Statements.
1846 //===----------------------------------------------------------------------===//
1847 
1848 void ASTStmtWriter::VisitCUDAKernelCallExpr(CUDAKernelCallExpr *E) {
1849  VisitCallExpr(E);
1850  Record.AddStmt(E->getConfig());
1852 }
1853 
1854 //===----------------------------------------------------------------------===//
1855 // OpenCL Expressions and Statements.
1856 //===----------------------------------------------------------------------===//
1857 void ASTStmtWriter::VisitAsTypeExpr(AsTypeExpr *E) {
1858  VisitExpr(E);
1859  Record.AddSourceLocation(E->getBuiltinLoc());
1860  Record.AddSourceLocation(E->getRParenLoc());
1861  Record.AddStmt(E->getSrcExpr());
1863 }
1864 
1865 //===----------------------------------------------------------------------===//
1866 // Microsoft Expressions and Statements.
1867 //===----------------------------------------------------------------------===//
1868 void ASTStmtWriter::VisitMSPropertyRefExpr(MSPropertyRefExpr *E) {
1869  VisitExpr(E);
1870  Record.push_back(E->isArrow());
1871  Record.AddStmt(E->getBaseExpr());
1873  Record.AddSourceLocation(E->getMemberLoc());
1874  Record.AddDeclRef(E->getPropertyDecl());
1876 }
1877 
1878 void ASTStmtWriter::VisitMSPropertySubscriptExpr(MSPropertySubscriptExpr *E) {
1879  VisitExpr(E);
1880  Record.AddStmt(E->getBase());
1881  Record.AddStmt(E->getIdx());
1882  Record.AddSourceLocation(E->getRBracketLoc());
1884 }
1885 
1886 void ASTStmtWriter::VisitCXXUuidofExpr(CXXUuidofExpr *E) {
1887  VisitExpr(E);
1888  Record.AddSourceRange(E->getSourceRange());
1889  Record.AddString(E->getUuidStr());
1890  if (E->isTypeOperand()) {
1893  } else {
1894  Record.AddStmt(E->getExprOperand());
1896  }
1897 }
1898 
1899 void ASTStmtWriter::VisitSEHExceptStmt(SEHExceptStmt *S) {
1900  VisitStmt(S);
1901  Record.AddSourceLocation(S->getExceptLoc());
1902  Record.AddStmt(S->getFilterExpr());
1903  Record.AddStmt(S->getBlock());
1905 }
1906 
1907 void ASTStmtWriter::VisitSEHFinallyStmt(SEHFinallyStmt *S) {
1908  VisitStmt(S);
1909  Record.AddSourceLocation(S->getFinallyLoc());
1910  Record.AddStmt(S->getBlock());
1912 }
1913 
1914 void ASTStmtWriter::VisitSEHTryStmt(SEHTryStmt *S) {
1915  VisitStmt(S);
1916  Record.push_back(S->getIsCXXTry());
1917  Record.AddSourceLocation(S->getTryLoc());
1918  Record.AddStmt(S->getTryBlock());
1919  Record.AddStmt(S->getHandler());
1921 }
1922 
1923 void ASTStmtWriter::VisitSEHLeaveStmt(SEHLeaveStmt *S) {
1924  VisitStmt(S);
1925  Record.AddSourceLocation(S->getLeaveLoc());
1927 }
1928 
1929 //===----------------------------------------------------------------------===//
1930 // OpenMP Directives.
1931 //===----------------------------------------------------------------------===//
1932 void ASTStmtWriter::VisitOMPExecutableDirective(OMPExecutableDirective *E) {
1933  Record.AddSourceLocation(E->getBeginLoc());
1934  Record.AddSourceLocation(E->getEndLoc());
1935  OMPClauseWriter ClauseWriter(Record);
1936  for (unsigned i = 0; i < E->getNumClauses(); ++i) {
1937  ClauseWriter.writeClause(E->getClause(i));
1938  }
1939  if (E->hasAssociatedStmt())
1940  Record.AddStmt(E->getAssociatedStmt());
1941 }
1942 
1943 void ASTStmtWriter::VisitOMPLoopDirective(OMPLoopDirective *D) {
1944  VisitStmt(D);
1945  Record.push_back(D->getNumClauses());
1946  Record.push_back(D->getCollapsedNumber());
1947  VisitOMPExecutableDirective(D);
1948  Record.AddStmt(D->getIterationVariable());
1949  Record.AddStmt(D->getLastIteration());
1950  Record.AddStmt(D->getCalcLastIteration());
1951  Record.AddStmt(D->getPreCond());
1952  Record.AddStmt(D->getCond());
1953  Record.AddStmt(D->getInit());
1954  Record.AddStmt(D->getInc());
1955  Record.AddStmt(D->getPreInits());
1959  Record.AddStmt(D->getIsLastIterVariable());
1960  Record.AddStmt(D->getLowerBoundVariable());
1961  Record.AddStmt(D->getUpperBoundVariable());
1962  Record.AddStmt(D->getStrideVariable());
1963  Record.AddStmt(D->getEnsureUpperBound());
1964  Record.AddStmt(D->getNextLowerBound());
1965  Record.AddStmt(D->getNextUpperBound());
1966  Record.AddStmt(D->getNumIterations());
1967  }
1969  Record.AddStmt(D->getPrevLowerBoundVariable());
1970  Record.AddStmt(D->getPrevUpperBoundVariable());
1971  Record.AddStmt(D->getDistInc());
1972  Record.AddStmt(D->getPrevEnsureUpperBound());
1975  Record.AddStmt(D->getCombinedEnsureUpperBound());
1976  Record.AddStmt(D->getCombinedInit());
1977  Record.AddStmt(D->getCombinedCond());
1978  Record.AddStmt(D->getCombinedNextLowerBound());
1979  Record.AddStmt(D->getCombinedNextUpperBound());
1980  Record.AddStmt(D->getCombinedDistCond());
1981  Record.AddStmt(D->getCombinedParForInDistCond());
1982  }
1983  for (auto I : D->counters()) {
1984  Record.AddStmt(I);
1985  }
1986  for (auto I : D->private_counters()) {
1987  Record.AddStmt(I);
1988  }
1989  for (auto I : D->inits()) {
1990  Record.AddStmt(I);
1991  }
1992  for (auto I : D->updates()) {
1993  Record.AddStmt(I);
1994  }
1995  for (auto I : D->finals()) {
1996  Record.AddStmt(I);
1997  }
1998  for (Stmt *S : D->dependent_counters())
1999  Record.AddStmt(S);
2000  for (Stmt *S : D->dependent_inits())
2001  Record.AddStmt(S);
2002  for (Stmt *S : D->finals_conditions())
2003  Record.AddStmt(S);
2004 }
2005 
2006 void ASTStmtWriter::VisitOMPParallelDirective(OMPParallelDirective *D) {
2007  VisitStmt(D);
2008  Record.push_back(D->getNumClauses());
2009  VisitOMPExecutableDirective(D);
2010  Record.push_back(D->hasCancel() ? 1 : 0);
2012 }
2013 
2014 void ASTStmtWriter::VisitOMPSimdDirective(OMPSimdDirective *D) {
2015  VisitOMPLoopDirective(D);
2017 }
2018 
2019 void ASTStmtWriter::VisitOMPForDirective(OMPForDirective *D) {
2020  VisitOMPLoopDirective(D);
2021  Record.push_back(D->hasCancel() ? 1 : 0);
2023 }
2024 
2025 void ASTStmtWriter::VisitOMPForSimdDirective(OMPForSimdDirective *D) {
2026  VisitOMPLoopDirective(D);
2028 }
2029 
2030 void ASTStmtWriter::VisitOMPSectionsDirective(OMPSectionsDirective *D) {
2031  VisitStmt(D);
2032  Record.push_back(D->getNumClauses());
2033  VisitOMPExecutableDirective(D);
2034  Record.push_back(D->hasCancel() ? 1 : 0);
2036 }
2037 
2038 void ASTStmtWriter::VisitOMPSectionDirective(OMPSectionDirective *D) {
2039  VisitStmt(D);
2040  VisitOMPExecutableDirective(D);
2041  Record.push_back(D->hasCancel() ? 1 : 0);
2043 }
2044 
2045 void ASTStmtWriter::VisitOMPSingleDirective(OMPSingleDirective *D) {
2046  VisitStmt(D);
2047  Record.push_back(D->getNumClauses());
2048  VisitOMPExecutableDirective(D);
2050 }
2051 
2052 void ASTStmtWriter::VisitOMPMasterDirective(OMPMasterDirective *D) {
2053  VisitStmt(D);
2054  VisitOMPExecutableDirective(D);
2056 }
2057 
2058 void ASTStmtWriter::VisitOMPCriticalDirective(OMPCriticalDirective *D) {
2059  VisitStmt(D);
2060  Record.push_back(D->getNumClauses());
2061  VisitOMPExecutableDirective(D);
2064 }
2065 
2066 void ASTStmtWriter::VisitOMPParallelForDirective(OMPParallelForDirective *D) {
2067  VisitOMPLoopDirective(D);
2068  Record.push_back(D->hasCancel() ? 1 : 0);
2070 }
2071 
2072 void ASTStmtWriter::VisitOMPParallelForSimdDirective(
2074  VisitOMPLoopDirective(D);
2076 }
2077 
2078 void ASTStmtWriter::VisitOMPParallelSectionsDirective(
2080  VisitStmt(D);
2081  Record.push_back(D->getNumClauses());
2082  VisitOMPExecutableDirective(D);
2083  Record.push_back(D->hasCancel() ? 1 : 0);
2085 }
2086 
2087 void ASTStmtWriter::VisitOMPTaskDirective(OMPTaskDirective *D) {
2088  VisitStmt(D);
2089  Record.push_back(D->getNumClauses());
2090  VisitOMPExecutableDirective(D);
2091  Record.push_back(D->hasCancel() ? 1 : 0);
2093 }
2094 
2095 void ASTStmtWriter::VisitOMPAtomicDirective(OMPAtomicDirective *D) {
2096  VisitStmt(D);
2097  Record.push_back(D->getNumClauses());
2098  VisitOMPExecutableDirective(D);
2099  Record.AddStmt(D->getX());
2100  Record.AddStmt(D->getV());
2101  Record.AddStmt(D->getExpr());
2102  Record.AddStmt(D->getUpdateExpr());
2103  Record.push_back(D->isXLHSInRHSPart() ? 1 : 0);
2104  Record.push_back(D->isPostfixUpdate() ? 1 : 0);
2106 }
2107 
2108 void ASTStmtWriter::VisitOMPTargetDirective(OMPTargetDirective *D) {
2109  VisitStmt(D);
2110  Record.push_back(D->getNumClauses());
2111  VisitOMPExecutableDirective(D);
2113 }
2114 
2115 void ASTStmtWriter::VisitOMPTargetDataDirective(OMPTargetDataDirective *D) {
2116  VisitStmt(D);
2117  Record.push_back(D->getNumClauses());
2118  VisitOMPExecutableDirective(D);
2120 }
2121 
2122 void ASTStmtWriter::VisitOMPTargetEnterDataDirective(
2124  VisitStmt(D);
2125  Record.push_back(D->getNumClauses());
2126  VisitOMPExecutableDirective(D);
2128 }
2129 
2130 void ASTStmtWriter::VisitOMPTargetExitDataDirective(
2132  VisitStmt(D);
2133  Record.push_back(D->getNumClauses());
2134  VisitOMPExecutableDirective(D);
2136 }
2137 
2138 void ASTStmtWriter::VisitOMPTargetParallelDirective(
2140  VisitStmt(D);
2141  Record.push_back(D->getNumClauses());
2142  VisitOMPExecutableDirective(D);
2144 }
2145 
2146 void ASTStmtWriter::VisitOMPTargetParallelForDirective(
2148  VisitOMPLoopDirective(D);
2149  Record.push_back(D->hasCancel() ? 1 : 0);
2151 }
2152 
2153 void ASTStmtWriter::VisitOMPTaskyieldDirective(OMPTaskyieldDirective *D) {
2154  VisitStmt(D);
2155  VisitOMPExecutableDirective(D);
2157 }
2158 
2159 void ASTStmtWriter::VisitOMPBarrierDirective(OMPBarrierDirective *D) {
2160  VisitStmt(D);
2161  VisitOMPExecutableDirective(D);
2163 }
2164 
2165 void ASTStmtWriter::VisitOMPTaskwaitDirective(OMPTaskwaitDirective *D) {
2166  VisitStmt(D);
2167  VisitOMPExecutableDirective(D);
2169 }
2170 
2171 void ASTStmtWriter::VisitOMPTaskgroupDirective(OMPTaskgroupDirective *D) {
2172  VisitStmt(D);
2173  Record.push_back(D->getNumClauses());
2174  VisitOMPExecutableDirective(D);
2175  Record.AddStmt(D->getReductionRef());
2177 }
2178 
2179 void ASTStmtWriter::VisitOMPFlushDirective(OMPFlushDirective *D) {
2180  VisitStmt(D);
2181  Record.push_back(D->getNumClauses());
2182  VisitOMPExecutableDirective(D);
2184 }
2185 
2186 void ASTStmtWriter::VisitOMPOrderedDirective(OMPOrderedDirective *D) {
2187  VisitStmt(D);
2188  Record.push_back(D->getNumClauses());
2189  VisitOMPExecutableDirective(D);
2191 }
2192 
2193 void ASTStmtWriter::VisitOMPTeamsDirective(OMPTeamsDirective *D) {
2194  VisitStmt(D);
2195  Record.push_back(D->getNumClauses());
2196  VisitOMPExecutableDirective(D);
2198 }
2199 
2200 void ASTStmtWriter::VisitOMPCancellationPointDirective(
2202  VisitStmt(D);
2203  VisitOMPExecutableDirective(D);
2204  Record.push_back(D->getCancelRegion());
2206 }
2207 
2208 void ASTStmtWriter::VisitOMPCancelDirective(OMPCancelDirective *D) {
2209  VisitStmt(D);
2210  Record.push_back(D->getNumClauses());
2211  VisitOMPExecutableDirective(D);
2212  Record.push_back(D->getCancelRegion());
2214 }
2215 
2216 void ASTStmtWriter::VisitOMPTaskLoopDirective(OMPTaskLoopDirective *D) {
2217  VisitOMPLoopDirective(D);
2219 }
2220 
2221 void ASTStmtWriter::VisitOMPTaskLoopSimdDirective(OMPTaskLoopSimdDirective *D) {
2222  VisitOMPLoopDirective(D);
2224 }
2225 
2226 void ASTStmtWriter::VisitOMPDistributeDirective(OMPDistributeDirective *D) {
2227  VisitOMPLoopDirective(D);
2229 }
2230 
2231 void ASTStmtWriter::VisitOMPTargetUpdateDirective(OMPTargetUpdateDirective *D) {
2232  VisitStmt(D);
2233  Record.push_back(D->getNumClauses());
2234  VisitOMPExecutableDirective(D);
2236 }
2237 
2238 void ASTStmtWriter::VisitOMPDistributeParallelForDirective(
2240  VisitOMPLoopDirective(D);
2241  Record.push_back(D->hasCancel() ? 1 : 0);
2243 }
2244 
2245 void ASTStmtWriter::VisitOMPDistributeParallelForSimdDirective(
2247  VisitOMPLoopDirective(D);
2249 }
2250 
2251 void ASTStmtWriter::VisitOMPDistributeSimdDirective(
2253  VisitOMPLoopDirective(D);
2255 }
2256 
2257 void ASTStmtWriter::VisitOMPTargetParallelForSimdDirective(
2259  VisitOMPLoopDirective(D);
2261 }
2262 
2263 void ASTStmtWriter::VisitOMPTargetSimdDirective(OMPTargetSimdDirective *D) {
2264  VisitOMPLoopDirective(D);
2266 }
2267 
2268 void ASTStmtWriter::VisitOMPTeamsDistributeDirective(
2270  VisitOMPLoopDirective(D);
2272 }
2273 
2274 void ASTStmtWriter::VisitOMPTeamsDistributeSimdDirective(
2276  VisitOMPLoopDirective(D);
2278 }
2279 
2280 void ASTStmtWriter::VisitOMPTeamsDistributeParallelForSimdDirective(
2282  VisitOMPLoopDirective(D);
2284 }
2285 
2286 void ASTStmtWriter::VisitOMPTeamsDistributeParallelForDirective(
2288  VisitOMPLoopDirective(D);
2289  Record.push_back(D->hasCancel() ? 1 : 0);
2291 }
2292 
2293 void ASTStmtWriter::VisitOMPTargetTeamsDirective(OMPTargetTeamsDirective *D) {
2294  VisitStmt(D);
2295  Record.push_back(D->getNumClauses());
2296  VisitOMPExecutableDirective(D);
2298 }
2299 
2300 void ASTStmtWriter::VisitOMPTargetTeamsDistributeDirective(
2302  VisitOMPLoopDirective(D);
2304 }
2305 
2306 void ASTStmtWriter::VisitOMPTargetTeamsDistributeParallelForDirective(
2308  VisitOMPLoopDirective(D);
2309  Record.push_back(D->hasCancel() ? 1 : 0);
2311 }
2312 
2313 void ASTStmtWriter::VisitOMPTargetTeamsDistributeParallelForSimdDirective(
2315  VisitOMPLoopDirective(D);
2316  Code = serialization::
2318 }
2319 
2320 void ASTStmtWriter::VisitOMPTargetTeamsDistributeSimdDirective(
2322  VisitOMPLoopDirective(D);
2324 }
2325 
2326 //===----------------------------------------------------------------------===//
2327 // ASTWriter Implementation
2328 //===----------------------------------------------------------------------===//
2329 
2331  assert(SwitchCaseIDs.find(S) == SwitchCaseIDs.end() &&
2332  "SwitchCase recorded twice");
2333  unsigned NextID = SwitchCaseIDs.size();
2334  SwitchCaseIDs[S] = NextID;
2335  return NextID;
2336 }
2337 
2339  assert(SwitchCaseIDs.find(S) != SwitchCaseIDs.end() &&
2340  "SwitchCase hasn't been seen yet");
2341  return SwitchCaseIDs[S];
2342 }
2343 
2345  SwitchCaseIDs.clear();
2346 }
2347 
2348 /// Write the given substatement or subexpression to the
2349 /// bitstream.
2350 void ASTWriter::WriteSubStmt(Stmt *S) {
2351  RecordData Record;
2352  ASTStmtWriter Writer(*this, Record);
2353  ++NumStatements;
2354 
2355  if (!S) {
2356  Stream.EmitRecord(serialization::STMT_NULL_PTR, Record);
2357  return;
2358  }
2359 
2360  llvm::DenseMap<Stmt *, uint64_t>::iterator I = SubStmtEntries.find(S);
2361  if (I != SubStmtEntries.end()) {
2362  Record.push_back(I->second);
2363  Stream.EmitRecord(serialization::STMT_REF_PTR, Record);
2364  return;
2365  }
2366 
2367 #ifndef NDEBUG
2368  assert(!ParentStmts.count(S) && "There is a Stmt cycle!");
2369 
2370  struct ParentStmtInserterRAII {
2371  Stmt *S;
2372  llvm::DenseSet<Stmt *> &ParentStmts;
2373 
2374  ParentStmtInserterRAII(Stmt *S, llvm::DenseSet<Stmt *> &ParentStmts)
2375  : S(S), ParentStmts(ParentStmts) {
2376  ParentStmts.insert(S);
2377  }
2378  ~ParentStmtInserterRAII() {
2379  ParentStmts.erase(S);
2380  }
2381  };
2382 
2383  ParentStmtInserterRAII ParentStmtInserter(S, ParentStmts);
2384 #endif
2385 
2386  Writer.Visit(S);
2387 
2388  uint64_t Offset = Writer.Emit();
2389  SubStmtEntries[S] = Offset;
2390 }
2391 
2392 /// Flush all of the statements that have been added to the
2393 /// queue via AddStmt().
2394 void ASTRecordWriter::FlushStmts() {
2395  // We expect to be the only consumer of the two temporary statement maps,
2396  // assert that they are empty.
2397  assert(Writer->SubStmtEntries.empty() && "unexpected entries in sub-stmt map");
2398  assert(Writer->ParentStmts.empty() && "unexpected entries in parent stmt map");
2399 
2400  for (unsigned I = 0, N = StmtsToEmit.size(); I != N; ++I) {
2401  Writer->WriteSubStmt(StmtsToEmit[I]);
2402 
2403  assert(N == StmtsToEmit.size() && "record modified while being written!");
2404 
2405  // Note that we are at the end of a full expression. Any
2406  // expression records that follow this one are part of a different
2407  // expression.
2408  Writer->Stream.EmitRecord(serialization::STMT_STOP, ArrayRef<uint32_t>());
2409 
2410  Writer->SubStmtEntries.clear();
2411  Writer->ParentStmts.clear();
2412  }
2413 
2414  StmtsToEmit.clear();
2415 }
2416 
2417 void ASTRecordWriter::FlushSubStmts() {
2418  // For a nested statement, write out the substatements in reverse order (so
2419  // that a simple stack machine can be used when loading), and don't emit a
2420  // STMT_STOP after each one.
2421  for (unsigned I = 0, N = StmtsToEmit.size(); I != N; ++I) {
2422  Writer->WriteSubStmt(StmtsToEmit[N - I - 1]);
2423  assert(N == StmtsToEmit.size() && "record modified while being written!");
2424  }
2425 
2426  StmtsToEmit.clear();
2427 }
SourceLocation getRParenLoc() const
Definition: Stmt.h:2361
Expr * getInc()
Definition: Stmt.h:2417
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
Definition: ExprObjC.h:614
unsigned getNumSemanticExprs() const
Definition: Expr.h:5737
A PredefinedExpr record.
Definition: ASTBitCodes.h:1640
const Expr * getSubExpr() const
Definition: Expr.h:938
A call to an overloaded operator written using operator syntax.
Definition: ExprCXX.h:77
ObjCIndirectCopyRestoreExpr - Represents the passing of a function argument by indirect copy-restore ...
Definition: ExprObjC.h:1577
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:408
The receiver is the instance of the superclass object.
Definition: ExprObjC.h:1107
Represents a single C99 designator.
Definition: Expr.h:4686
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
Definition: Expr.h:1323
SourceLocation getRBracLoc() const
Definition: Stmt.h:1418
Defines the clang::ASTContext interface.
A CompoundLiteralExpr record.
Definition: ASTBitCodes.h:1700
This represents &#39;#pragma omp distribute simd&#39; composite directive.
Definition: StmtOpenMP.h:3393
const BlockDecl * getBlockDecl() const
Definition: Expr.h:5565
Expr * getNextUpperBound() const
Definition: StmtOpenMP.h:992
IdentifierInfo * getInputIdentifier(unsigned i) const
Definition: Stmt.h:2968
This represents &#39;#pragma omp master&#39; directive.
Definition: StmtOpenMP.h:1576
ConstantExprBitfields ConstantExprBits
Definition: Stmt.h:960
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
Definition: ExprCXX.h:945
SourceLocation getRParenLoc() const
Definition: Stmt.h:2875
The null pointer literal (C++11 [lex.nullptr])
Definition: ExprCXX.h:592
unsigned getNumDecls() const
Gets the number of declarations in the unresolved set.
Definition: ExprCXX.h:2853
This represents &#39;#pragma omp task&#39; directive.
Definition: StmtOpenMP.h:1916
This represents a GCC inline-assembly statement extension.
Definition: Stmt.h:2852
Represents a &#39;co_await&#39; expression while the type of the promise is dependent.
Definition: ExprCXX.h:4647
SourceLocation getForLoc() const
Definition: StmtCXX.h:201
NamedDecl * getFoundDecl()
Get the NamedDecl through which this reference occurred.
Definition: Expr.h:1259
bool getValue() const
Definition: ExprObjC.h:97
The receiver is an object instance.
Definition: ExprObjC.h:1101
Expr * getLHS() const
Definition: Expr.h:3752
Expr * getUpperBoundVariable() const
Definition: StmtOpenMP.h:960
unsigned getNumInputs() const
Definition: Stmt.h:2764
SourceLocation getOpLoc() const
Definition: ExprObjC.h:1528
Expr * getSyntacticForm()
Return the syntactic form of this expression, i.e.
Definition: Expr.h:5717
SourceLocation getRParenLoc() const
Definition: Expr.h:2764
ObjCDictionaryElement getKeyValueElement(unsigned Index) const
Definition: ExprObjC.h:360
CompoundStmt * getBlock() const
Definition: Stmt.h:3243
An IndirectGotoStmt record.
Definition: ASTBitCodes.h:1613
SourceLocation getForLoc() const
Definition: Stmt.h:2430
SourceLocation getUsedLocation() const
Retrieve the location where this default argument was actually used.
Definition: ExprCXX.h:1157
uint64_t getValue() const
Definition: ExprCXX.h:2666
StringKind getKind() const
Definition: Expr.h:1801
An AddrLabelExpr record.
Definition: ASTBitCodes.h:1730
ValueDecl * getMemberDecl() const
Retrieve the member declaration to which this expression refers.
Definition: Expr.h:2894
NameKind
The kind of the name stored in this DeclarationName.
Expr * getCond() const
Definition: Expr.h:4147
ObjCMethodDecl * getAtIndexMethodDecl() const
Definition: ExprObjC.h:896
Selector getSelector() const
Definition: ExprObjC.cpp:337
SourceRange getSourceRange() const
Definition: ExprCXX.h:3888
void AddToken(const Token &Tok, RecordDataImpl &Record)
Emit a token.
Definition: ASTWriter.cpp:4544
SourceLocation getEllipsisLoc() const
Get the location of the ... in a case statement of the form LHS ... RHS.
Definition: Stmt.h:1553
SourceLocation getLParen() const
Get the location of the left parentheses &#39;(&#39;.
Definition: Expr.h:1993
const Expr * getSubExpr() const
Definition: ExprCXX.h:1071
Expr * getCond()
Definition: Stmt.h:2249
Expr * getExpr(unsigned Index)
getExpr - Return the Expr at the specified index.
Definition: Expr.h:4011
A CXXStaticCastExpr record.
Definition: ASTBitCodes.h:1855
ArrayRef< Expr * > dependent_counters()
Definition: StmtOpenMP.h:1128
unsigned getNumSubExprs() const
getNumSubExprs - Return the size of the SubExprs array.
Definition: Expr.h:4005
bool isSuperReceiver() const
Definition: ExprObjC.h:776
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
Definition: ExprCXX.h:2533
VarDecl * getParameterPack() const
Get the parameter pack which this expression refers to.
Definition: ExprCXX.h:4272
SourceLocation TemplateKWLoc
The source location of the template keyword; this is used as part of the representation of qualified ...
Definition: TemplateBase.h:661
An AttributedStmt record.
Definition: ASTBitCodes.h:1592
CompoundStmt * getSubStmt()
Definition: Expr.h:3942
A CXXReinterpretCastExpr record.
Definition: ASTBitCodes.h:1861
const Expr * getInit(unsigned Init) const
Definition: Expr.h:4423
const DeclContext * getParentContext() const
If the SourceLocExpr has been resolved return the subexpression representing the resolved value...
Definition: Expr.h:4307
unsigned getNumAsmToks()
Definition: Stmt.h:3105
An ObjCBoolLiteralExpr record.
Definition: ASTBitCodes.h:1823
SourceLocation getRParenLoc() const
Definition: StmtObjC.h:107
bool isThrownVariableInScope() const
Determines whether the variable thrown by this expression (if any!) is within the innermost try block...
Definition: ExprCXX.h:1081
Expr *const * semantics_iterator
Definition: Expr.h:5739
ObjCProtocolDecl * getProtocol() const
Definition: ExprObjC.h:519
Represents a &#39;co_return&#39; statement in the C++ Coroutines TS.
Definition: StmtCXX.h:456
Stmt - This represents one statement.
Definition: Stmt.h:66
Expr * getLowerBoundVariable() const
Definition: StmtOpenMP.h:952
unsigned getNumArgs() const
getNumArgs - Return the number of actual arguments to this call.
Definition: Expr.h:2664
Expr * getDimensionExpression() const
Definition: ExprCXX.h:2668
const ObjCAtFinallyStmt * getFinallyStmt() const
Retrieve the @finally statement, if any.
Definition: StmtObjC.h:235
CXXCatchStmt * getHandler(unsigned i)
Definition: StmtCXX.h:107
bool isArrayFormAsWritten() const
Definition: ExprCXX.h:2293
IfStmt - This represents an if/then/else.
Definition: Stmt.h:1812
SourceLocation getOperatorLoc() const
getOperatorLoc - Return the location of the operator.
Definition: Expr.h:2277
SourceLocation getRParenLoc() const
Definition: Expr.h:3992
SourceLocation getLocation() const
Definition: Expr.h:1613
ObjCMethodDecl * setAtIndexMethodDecl() const
Definition: ExprObjC.h:900
void AddNestedNameSpecifierLoc(NestedNameSpecifierLoc NNS)
Emit a nested name specifier with source-location information.
Definition: ASTWriter.cpp:5876
unsigned getNumOutputs() const
Definition: Stmt.h:2742
This represents &#39;#pragma omp for simd&#39; directive.
Definition: StmtOpenMP.h:1326
Expr * getBase() const
Definition: Expr.h:2888
const StringLiteral * getAsmString() const
Definition: Stmt.h:2880
TypeSourceInfo * getTypeSourceInfo() const
Definition: Expr.h:3088
An ImplicitValueInitExpr record.
Definition: ASTBitCodes.h:1724
iterator end()
Definition: DeclGroup.h:105
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:88
This represents &#39;#pragma omp teams distribute parallel for&#39; composite directive.
Definition: StmtOpenMP.h:3804
An ImplicitCastExpr record.
Definition: ASTBitCodes.h:1694
Stmt * getHandlerBlock() const
Definition: StmtCXX.h:51
SourceLocation getBeginLoc() const
Returns starting location of directive kind.
Definition: StmtOpenMP.h:224
llvm::APFloat getValue() const
Definition: Expr.h:1572
ObjCMethodDecl * getImplicitPropertySetter() const
Definition: ExprObjC.h:717
Represents the index of the current element of an array being initialized by an ArrayInitLoopExpr.
Definition: Expr.h:5054
FunctionDecl * getOperatorNew() const
Definition: ExprCXX.h:2124
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
Definition: ExprCXX.h:2943
DeclarationNameInfo getNameInfo() const
Retrieve the name of the entity we&#39;re testing for, along with location information.
Definition: StmtCXX.h:288
const Expr * getSubExpr() const
Definition: Expr.h:4234
Defines the C++ template declaration subclasses.
Opcode getOpcode() const
Definition: Expr.h:3444
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:4861
SourceLocation getIdentLoc() const
Definition: Stmt.h:1724
Represents an attribute applied to a statement.
Definition: Stmt.h:1754
ParenExpr - This represents a parethesized expression, e.g.
Definition: Expr.h:1969
NamedDecl * getDecl() const
A CXXOperatorCallExpr record.
Definition: ASTBitCodes.h:1840
bool hasQualifier() const
Determines whether this member expression actually had a C++ nested-name-specifier prior to the name ...
Definition: Expr.h:2908
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies this name, if any.
Definition: StmtCXX.h:284
Expr * getLowerBound()
Get lower bound of array section.
Definition: ExprOpenMP.h:90
This represents &#39;#pragma omp target teams distribute&#39; combined directive.
Definition: StmtOpenMP.h:3941
A CXXTemporaryObjectExpr record.
Definition: ASTBitCodes.h:1852
Represents Objective-C&#39;s @throw statement.
Definition: StmtObjC.h:332
bool requiresZeroInitialization() const
Whether this construction first requires zero-initialization before the initializer is called...
Definition: ExprCXX.h:1442
SourceLocation getLocation() const
Definition: ExprCXX.h:606
const RecordDecl * getCapturedRecordDecl() const
Retrieve the record declaration for captured variables.
Definition: Stmt.h:3468
SourceLocation getRParenLoc() const
Definition: Expr.h:2417
SourceLocation getKeywordLoc() const
Definition: ExprCXX.h:4678
Represents a call to a C++ constructor.
Definition: ExprCXX.h:1331
SourceLocation getBeginLoc() const LLVM_READONLY
Definition: Stmt.h:1229
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
Definition: ExprObjC.h:845
TypeSourceInfo * getTypeInfoAsWritten() const
getTypeInfoAsWritten - Returns the type source info for the type that this expression is casting to...
Definition: Expr.h:3330
FPOptions getFPFeatures() const
Definition: Expr.h:3586
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent...
Definition: ExprCXX.h:2621
bool getIsCXXTry() const
Definition: Stmt.h:3285
SourceLocation getLParenLoc() const
Definition: Expr.h:3372
A constant expression context.
Definition: ASTBitCodes.h:1637
Expr * getCombinedParForInDistCond() const
Definition: StmtOpenMP.h:1080
A container of type source information.
Definition: Decl.h:86
This represents &#39;#pragma omp parallel for&#39; directive.
Definition: StmtOpenMP.h:1697
MS property subscript expression.
Definition: ExprCXX.h:846
IdentKind getIdentKind() const
Definition: Expr.h:1926
SourceLocation getGotoLoc() const
Definition: Stmt.h:2510
SourceLocation getRParenLoc() const
Definition: ExprCXX.h:1982
This represents &#39;#pragma omp target teams distribute parallel for&#39; combined directive.
Definition: StmtOpenMP.h:4009
Expr * getCombinedEnsureUpperBound() const
Definition: StmtOpenMP.h:1044
Represents a prvalue temporary that is written into memory so that a reference can bind to it...
Definition: ExprCXX.h:4325
float __ovld __cnfn distance(float p0, float p1)
Returns the distance between p0 and p1.
SourceLocation getAccessorLoc() const
Definition: Expr.h:5515
SourceLocation getRParenLoc() const
getRParenLoc - Return the location of final right parenthesis.
Definition: Expr.h:4077
unsigned getDeclRefExprAbbrev() const
Definition: ASTWriter.h:693
const Expr * getSubExpr() const
Definition: Expr.h:1649
SourceLocation getAtLoc() const
Definition: ExprObjC.h:66
SourceLocation getCoawaitLoc() const
Definition: StmtCXX.h:202
Expr * getIndexExpr(unsigned Idx)
Definition: Expr.h:2305
SourceLocation getEndLoc() const
Returns ending location of directive.
Definition: StmtOpenMP.h:226
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:1901
This represents &#39;#pragma omp target exit data&#39; directive.
Definition: StmtOpenMP.h:2608
Stmt * getSubStmt()
Definition: Stmt.h:1645
const VarDecl * getNRVOCandidate() const
Retrieve the variable that might be used for the named return value optimization. ...
Definition: Stmt.h:2652
SourceLocation getLParenLoc() const
Definition: Stmt.h:2432
bool hasTemplateKWAndArgsInfo() const
Definition: Expr.h:1269
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:2791
ObjCIsaExpr - Represent X->isa and X.isa when X is an ObjC &#39;id&#39; type.
Definition: ExprObjC.h:1492
CompoundLiteralExpr - [C99 6.5.2.5].
Definition: Expr.h:3052
ArrayRef< Expr * > dependent_inits()
Definition: StmtOpenMP.h:1134
SourceRange getSourceRange() const LLVM_READONLY
Definition: ExprCXX.h:742
SourceLocation getOperatorLoc() const
Retrieve the location of the &#39;.&#39; or &#39;->&#39; operator.
Definition: ExprCXX.h:2451
SourceLocation getAtLoc() const
Definition: ExprObjC.h:470
unsigned getNumArgs() const
Determine the number of arguments to this type trait.
Definition: ExprCXX.h:2582
SourceRange getSourceRange() const
Definition: ExprCXX.h:2249
ObjCInterfaceDecl * getClassReceiver() const
Definition: ExprObjC.h:771
Expr * getCombinedUpperBoundVariable() const
Definition: StmtOpenMP.h:1038
SourceLocation getColonLoc() const
Definition: Expr.h:3697
bool isArrow() const
Definition: ExprObjC.h:1520
SourceLocation getLeftLoc() const
Definition: ExprObjC.h:1416
Expr * getCalcLastIteration() const
Definition: StmtOpenMP.h:920
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:1899
SourceLocation getIfLoc() const
Definition: Stmt.h:1971
unsigned getNumPlacementArgs() const
Definition: ExprCXX.h:2142
TypeSourceInfo * getArgumentTypeInfo() const
Definition: Expr.h:2387
bool requiresADL() const
True if this declaration should be extended by argument-dependent lookup.
Definition: ExprCXX.h:3011
SourceRange getSourceRange() const LLVM_READONLY
Retrieve the source range that covers this offsetof node.
Definition: Expr.h:2223
capture_iterator capture_begin()
Retrieve an iterator pointing to the first capture.
Definition: Stmt.h:3493
A CXXConstructExpr record.
Definition: ASTBitCodes.h:1846
unsigned getNumExpressions() const
Definition: Expr.h:2320
SourceLocation getLocation() const
Retrieve the location of the literal.
Definition: Expr.h:1447
raw_arg_iterator raw_arg_begin()
Definition: ExprCXX.h:2234
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will call.
Definition: ExprCXX.h:1557
A C++ throw-expression (C++ [except.throw]).
Definition: ExprCXX.h:1049
Expr * getExprOperand() const
Definition: ExprCXX.h:730
Represents an expression – generally a full-expression – that introduces cleanups to be run at the ...
Definition: ExprCXX.h:3212
TypeSourceInfo * getArg(unsigned I) const
Retrieve the Ith argument.
Definition: ExprCXX.h:2585
SourceRange getSourceRange() const LLVM_READONLY
Definition: ExprObjC.h:160
SourceLocation getRParenLoc() const
Definition: Expr.h:5459
SourceLocation getLocation() const
Retrieve the location of the literal.
Definition: Expr.h:1486
void AddString(StringRef Str)
Emit a string.
Definition: ASTWriter.h:949
iterator begin() const
Definition: ExprCXX.h:4280
bool isXLHSInRHSPart() const
Return true if helper update expression has form &#39;OpaqueValueExpr(x) binop OpaqueValueExpr(expr)&#39; and...
Definition: StmtOpenMP.h:2405
void AddSourceRange(SourceRange Range)
Emit a source range.
Definition: ASTWriter.h:853
A ShuffleVectorExpr record.
Definition: ASTBitCodes.h:1745
SourceLocation getBuiltinLoc() const
Definition: Expr.h:4154
ObjCPropertyDecl * getExplicitProperty() const
Definition: ExprObjC.h:707
A C++ static_cast expression (C++ [expr.static.cast]).
Definition: ExprCXX.h:318
void AddTypeSourceInfo(TypeSourceInfo *TInfo)
Emits a reference to a declarator info.
Definition: ASTWriter.cpp:5578
Expr * getExprOperand() const
Definition: ExprCXX.h:955
const Stmt * getSubStmt() const
Definition: StmtObjC.h:379
SourceLocation getRParenLoc() const
Retrieve the location of the closing parenthesis.
Definition: ExprCXX.h:295
LabelStmt - Represents a label, which has a substatement.
Definition: Stmt.h:1710
Represents a C99 designated initializer expression.
Definition: Expr.h:4611
SourceLocation getAtLoc() const
Definition: ExprObjC.h:523
An OffsetOfExpr record.
Definition: ASTBitCodes.h:1670
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
Definition: Decl.h:297
TypeSourceInfo * getEncodedTypeSourceInfo() const
Definition: ExprObjC.h:430
TypeSourceInfo * getScopeTypeInfo() const
Retrieve the scope type in a qualified pseudo-destructor expression.
Definition: ExprCXX.h:2462
SourceLocation getKeywordLoc() const
Definition: StmtCXX.h:476
Stmt * getBody()
Definition: Stmt.h:2353
An ObjCAtThrowStmt record.
Definition: ASTBitCodes.h:1817
SourceLocation getTildeLoc() const
Retrieve the location of the &#39;~&#39;.
Definition: ExprCXX.h:2469
FieldDecl * getField() const
For a field offsetof node, returns the field.
Definition: Expr.h:2202
SourceLocation getRParenLoc() const
Definition: Expr.h:5898
Represents a function call to one of __builtin_LINE(), __builtin_COLUMN(), __builtin_FUNCTION(), or __builtin_FILE().
Definition: Expr.h:4267
void AddTypeRef(QualType T)
Emit a reference to a type.
Definition: ASTWriter.h:887
An element in an Objective-C dictionary literal.
Definition: ExprObjC.h:261
A DesignatedInitExpr record.
Definition: ASTBitCodes.h:1709
This represents &#39;#pragma omp parallel&#39; directive.
Definition: StmtOpenMP.h:356
ShuffleVectorExpr - clang-specific builtin-in function __builtin_shufflevector.
Definition: Expr.h:3971
bool cleanupsHaveSideEffects() const
Definition: ExprCXX.h:3250
QualType getComputationResultType() const
Definition: Expr.h:3655
SourceLocation getRParen() const
Get the location of the right parentheses &#39;)&#39;.
Definition: Expr.h:1997
DeclStmt * getConditionVariableDeclStmt()
If this SwitchStmt has a condition variable, return the faux DeclStmt associated with the creation of...
Definition: Stmt.h:2134
bool isFileScope() const
Definition: Expr.h:3082
SourceLocation getAmpAmpLoc() const
Definition: Expr.h:3896
Expr * getEnsureUpperBound() const
Definition: StmtOpenMP.h:976
NameKind getNameKind() const
Determine what kind of name this is.
SourceLocation getEndLoc() const
Definition: Stmt.h:1226
Represents a member of a struct/union/class.
Definition: Decl.h:2615
Expr * getBase()
Retrieve the base object of this member expressions, e.g., the x in x.m.
Definition: ExprCXX.h:3754
Represents a place-holder for an object not to be initialized by anything.
Definition: Expr.h:4909
NonTypeTemplateParmDecl * getParameter() const
Definition: ExprCXX.h:4149
const DeclarationNameInfo & getNameInfo() const
Gets the full name info.
Definition: ExprCXX.h:2856
StringLiteral * getString()
Definition: ExprObjC.h:62
unsigned getArrayExprIndex() const
For an array element node, returns the index into the array of expressions.
Definition: Expr.h:2196
Expr * getInc() const
Definition: StmtOpenMP.h:936
SourceLocation getLabelLoc() const
Definition: Expr.h:3898
SourceLocation getRBraceLoc() const
Definition: Expr.h:4524
SourceLocation getOperatorLoc() const
Definition: Expr.h:2414
GNUNullExpr - Implements the GNU __null extension, which is a name for a null pointer constant that h...
Definition: Expr.h:4182
ArrayRef< Expr * > updates()
Definition: StmtOpenMP.h:1116
SourceLocation getRParenLoc() const
Definition: Expr.h:3375
The iterator over UnresolvedSets.
Definition: UnresolvedSet.h:31
This represents &#39;#pragma omp target simd&#39; directive.
Definition: StmtOpenMP.h:3529
Expr * getSourceExpr() const
The source expression of an opaque value expression is the expression which originally generated the ...
Definition: Expr.h:1108
Represents a C++ member access expression for which lookup produced a set of overloaded functions...
Definition: ExprCXX.h:3677
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
Definition: Expr.h:5490
const DeclGroupRef getDeclGroup() const
Definition: Stmt.h:1221
OpenMPDirectiveKind getDirectiveKind() const
Definition: StmtOpenMP.h:300
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:2171
Expr * getSubExpr()
Definition: Expr.h:3177
This represents &#39;#pragma omp barrier&#39; directive.
Definition: StmtOpenMP.h:2028
SourceLocation getQuestionLoc() const
Definition: Expr.h:3696
ObjCArrayLiteral - used for objective-c array containers; as in: @["Hello", NSApp, [NSNumber numberWithInt:42]];.
Definition: ExprObjC.h:188
unsigned getCharByteWidth() const
Definition: Expr.h:1799
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:418
Represents a reference to a non-type template parameter pack that has been substituted with a non-tem...
Definition: ExprCXX.h:4175
This represents &#39;#pragma omp critical&#39; directive.
Definition: StmtOpenMP.h:1623
OpenMPDirectiveKind getCancelRegion() const
Get cancellation region for the current cancellation point.
Definition: StmtOpenMP.h:2907
bool hadArrayRangeDesignator() const
Definition: Expr.h:4545
SourceLocation getCatchLoc() const
Definition: StmtCXX.h:48
Selector getSelector() const
Definition: ExprObjC.h:467
void AddIdentifierRef(const IdentifierInfo *II)
Emit a reference to an identifier.
Definition: ASTWriter.h:870
Represents Objective-C&#39;s @catch statement.
Definition: StmtObjC.h:77
SourceLocation getOpLoc() const
Definition: ExprObjC.h:597
IndirectGotoStmt - This represents an indirect goto.
Definition: Stmt.h:2494
Describes an C or C++ initializer list.
Definition: Expr.h:4375
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
Definition: ExprCXX.h:673
This represents &#39;#pragma omp distribute parallel for&#39; composite directive.
Definition: StmtOpenMP.h:3244
bool isArrow() const
Definition: ExprObjC.h:584
ArrayRef< Stmt const * > getParamMoves() const
Definition: StmtCXX.h:417
This represents &#39;#pragma omp teams distribute parallel for simd&#39; composite directive.
Definition: StmtOpenMP.h:3733
Expr * getKeyExpr() const
Definition: ExprObjC.h:893
ASTWriter::RecordDataImpl & getRecordData() const
Extract the underlying record storage.
Definition: ASTWriter.h:792
unsigned getNumExpansions() const
Get the number of parameters in this parameter pack.
Definition: ExprCXX.h:4284
unsigned getLength() const
Definition: Expr.h:1798
ForStmt - This represents a &#39;for (init;cond;inc)&#39; stmt.
Definition: Stmt.h:2384
ArrayRef< Expr * > finals()
Definition: StmtOpenMP.h:1122
Expr * getIsLastIterVariable() const
Definition: StmtOpenMP.h:944
FunctionDecl * getOperatorDelete() const
Definition: ExprCXX.h:2305
Expr * getBaseExpr() const
Definition: ExprObjC.h:890
TemplateArgument getArgumentPack() const
Retrieve the template argument pack containing the substituted template arguments.
Definition: ExprCXX.cpp:1547
bool isElidable() const
Whether this construction is elidable.
Definition: ExprCXX.h:1409
Expr * getOperand() const
Definition: ExprCXX.h:3884
unsigned getIntegerLiteralAbbrev() const
Definition: ASTWriter.h:695
const Expr * getThrowExpr() const
Definition: StmtObjC.h:344
bool isGlobalNew() const
Definition: ExprCXX.h:2165
SourceLocation getParameterPackLocation() const
Retrieve the location of the parameter pack name.
Definition: ExprCXX.h:4206
bool doesUsualArrayDeleteWantSize() const
Answers whether the usual array deallocation function for the allocated type expects the size of the ...
Definition: ExprCXX.h:2301
LabelDecl * getDecl() const
Definition: Stmt.h:1727
Expr * getX()
Get &#39;x&#39; part of the associated expression/statement.
Definition: StmtOpenMP.h:2389
SourceLocation getLBracLoc() const
Definition: Stmt.h:1417
A reference to a previously [de]serialized Stmt record.
Definition: ASTBitCodes.h:1574
capture_init_iterator capture_init_begin()
Retrieve the first initialization argument for this lambda expression (which initializes the first ca...
Definition: ExprCXX.h:1872
SourceLocation getRParenLoc() const
Definition: StmtCXX.h:204
ExprValueKind getValueKind() const
getValueKind - The value kind that this expression produces.
Definition: Expr.h:414
path_iterator path_begin()
Definition: Expr.h:3197
SourceLocation getIsaMemberLoc() const
getMemberLoc - Return the location of the "member", in X->F, it is the location of &#39;F&#39;...
Definition: ExprObjC.h:1525
Stmt * getBody()
Definition: Stmt.h:2418
semantics_iterator semantics_end()
Definition: Expr.h:5747
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
Definition: ExprCXX.h:3619
Expr * getIterationVariable() const
Definition: StmtOpenMP.h:912
A builtin binary operation expression such as "x + y" or "x <= y".
Definition: Expr.h:3409
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:3308
bool constructsVBase() const
Determine whether this constructor is actually constructing a base class (rather than a complete obje...
Definition: ExprCXX.h:1561
Stmt * getInit()
Definition: Stmt.h:2397
Expr * getOutputExpr(unsigned i)
Definition: Stmt.cpp:439
iterator begin()
Definition: DeclGroup.h:99
bool hadMultipleCandidates() const
Returns true if this member expression refers to a method that was resolved from an overloaded set ha...
Definition: Expr.h:3015
unsigned getCharacterLiteralAbbrev() const
Definition: ASTWriter.h:694
SourceLocation getThrowLoc() const
Definition: ExprCXX.h:1074
unsigned getResultExprIndex() const
Return the index of the result-bearing expression into the semantics expressions, or PseudoObjectExpr...
Definition: Expr.h:5722
const StringLiteral * getInputConstraintLiteral(unsigned i) const
Definition: Stmt.h:2981
CXXForRangeStmt - This represents C++0x [stmt.ranged]&#39;s ranged for statement, represented as &#39;for (ra...
Definition: StmtCXX.h:134
bool isArrow() const
Definition: Expr.h:2995
labels_range labels()
Definition: Stmt.h:3024
This represents &#39;#pragma omp cancellation point&#39; directive.
Definition: StmtOpenMP.h:2863
ObjCStringLiteral, used for Objective-C string literals i.e.
Definition: ExprObjC.h:50
SourceLocation getEqualOrColonLoc() const
Retrieve the location of the &#39;=&#39; that precedes the initializer value itself, if present.
Definition: Expr.h:4836
const CallExpr * getConfig() const
Definition: ExprCXX.h:246
bool isArrow() const
Definition: ExprCXX.h:830
FPOptions getFPFeatures() const
Definition: ExprCXX.h:151
CaseStmt - Represent a case statement.
Definition: Stmt.h:1478
TypoExpr - Internal placeholder for expressions where typo correction still needs to be performed and...
Definition: Expr.h:5936
Expr * getCond()
Definition: Stmt.h:2416
IdentKind getIdentKind() const
Definition: Expr.h:4288
SourceLocation getContinueLoc() const
Definition: Stmt.h:2552
This represents &#39;#pragma omp teams&#39; directive.
Definition: StmtOpenMP.h:2806
unsigned getInt() const
Used to serialize this.
Definition: LangOptions.h:368
Expr * getInit() const
Definition: StmtOpenMP.h:932
SourceLocation getEndLoc() const
Definition: Expr.h:4312
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
Definition: Expr.h:3125
FieldDecl * getField()
Get the field whose initializer will be used.
Definition: ExprCXX.h:1212
Helper class for OffsetOfExpr.
Definition: Expr.h:2138
A marker record that indicates that we are at the end of an expression.
Definition: ASTBitCodes.h:1568
This represents &#39;#pragma omp teams distribute simd&#39; combined directive.
Definition: StmtOpenMP.h:3663
Represents binding an expression to a temporary.
Definition: ExprCXX.h:1282
StringLiteral * getClobberStringLiteral(unsigned i)
Definition: Stmt.h:3061
OpaqueValueExpr * getOpaqueValue() const
getOpaqueValue - Return the opaque value placeholder.
Definition: ExprCXX.h:4576
Expr * Key
The key for the dictionary element.
Definition: ExprObjC.h:263
SourceLocation getBuiltinLoc() const
Definition: Expr.h:4245
CXXTemporary * getTemporary()
Definition: ExprCXX.h:1301
bool isOpenMPWorksharingDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a worksharing directive.
ObjCMethodDecl * getArrayWithObjectsMethod() const
Definition: ExprObjC.h:239
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
Definition: ExprCXX.h:1727
CXXRecordDecl * getNamingClass()
Gets the &#39;naming class&#39; (in the sense of C++0x [class.access.base]p5) of the lookup.
Definition: ExprCXX.h:3019
NestedNameSpecifierLoc getQualifierLoc() const
If the name was qualified, retrieves the nested-name-specifier that precedes the name, with source-location information.
Definition: Expr.h:1241
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:176
SourceLocation getTryLoc() const
Definition: Stmt.h:3282
Represents a C++ member access expression where the actual member referenced could not be resolved be...
Definition: ExprCXX.h:3417
VarDecl * getConditionVariable() const
Retrieve the variable declared in this "for" statement, if any.
Definition: Stmt.cpp:924
SourceLocation getOperatorLoc() const
getOperatorLoc - Return the location of the operator.
Definition: Expr.h:2055
SourceLocation getNameLoc() const
Definition: ExprCXX.h:4141
TypeSourceInfo * getTypeSourceInfo() const
Definition: ExprCXX.h:1978
Stmt * getBody()
Definition: Stmt.h:2089
SourceLocation getLocation() const
Definition: ExprObjC.h:103
A default argument (C++ [dcl.fct.default]).
Definition: ExprCXX.h:1111
Stmt * getInit()
Definition: Stmt.h:1955
bool isExact() const
Definition: Expr.h:1605
bool isTypeOperand() const
Definition: ExprCXX.h:938
SourceLocation getTokenLocation() const
getTokenLocation - The location of the __null token.
Definition: Expr.h:4196
llvm::APFloatBase::Semantics getRawSemantics() const
Get a raw enumeration value representing the floating-point semantics of this literal (32-bit IEEE...
Definition: Expr.h:1582
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:3551
Represents the this expression in C++.
Definition: ExprCXX.h:1006
ObjCMethodDecl * getDictWithObjectsMethod() const
Definition: ExprObjC.h:374
arg_iterator arg_end()
Definition: Expr.h:2722
ObjCIvarDecl * getDecl()
Definition: ExprObjC.h:576
SourceLocation getRParenLoc() const
Retrieve the location of the right parentheses (&#39;)&#39;) that follows the argument list.
Definition: ExprCXX.h:3344
TypeSourceInfo * getAllocatedTypeSourceInfo() const
Definition: ExprCXX.h:2103
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>".
Definition: TemplateBase.h:650
NestedNameSpecifierLoc getQualifierLoc() const
If the member name was qualified, retrieves the nested-name-specifier that precedes the member name...
Definition: Expr.h:2913
void AddAPValue(const APValue &Value)
Emit an APvalue.
Definition: ASTWriter.cpp:5421
TypeSourceInfo * getQueriedTypeSourceInfo() const
Definition: ExprCXX.h:2664
bool isArrayForm() const
Definition: ExprCXX.h:2292
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:217
This represents &#39;#pragma omp target parallel for simd&#39; directive.
Definition: StmtOpenMP.h:3461
ArrayRef< Expr * > private_counters()
Definition: StmtOpenMP.h:1104
OpenMP 4.0 [2.4, Array Sections].
Definition: ExprOpenMP.h:44
ConditionalOperator - The ?: ternary operator.
Definition: Expr.h:3707
StmtBitfields StmtBits
Definition: Stmt.h:942
const ValueDecl * getExtendingDecl() const
Get the declaration which triggered the lifetime-extension of this temporary, if any.
Definition: ExprCXX.h:4385
TypeSourceInfo * getTypeSourceInfo() const
Definition: ExprCXX.h:1688
bool isStdInitListInitialization() const
Whether this constructor call was written as list-initialization, but was interpreted as forming a st...
Definition: ExprCXX.h:1433
Represents a C++ pseudo-destructor (C++ [expr.pseudo]).
Definition: ExprCXX.h:2385
ASTTemplateKWAndArgsInfo * getTrailingASTTemplateKWAndArgsInfo()
Return the optional template keyword and arguments info.
Definition: ExprCXX.h:3837
CompoundStmt - This represents a group of statements like { stmt stmt }.
Definition: Stmt.h:1310
unsigned NumTemplateArgs
The number of template arguments in TemplateArgs.
Definition: TemplateBase.h:664
SourceLocation getRBracket() const
Definition: ExprObjC.h:881
bool isMicrosoftABI() const
Returns whether this is really a Win64 ABI va_arg expression.
Definition: Expr.h:4239
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:1506
void AddDeclarationNameLoc(const DeclarationNameLoc &DNLoc, DeclarationName Name)
Definition: ASTWriter.cpp:5785
Expr ** getSubExprs()
Definition: Expr.h:5874
CompoundStmt * getSubStmt() const
Retrieve the compound statement that will be included in the program only if the existence of the sym...
Definition: StmtCXX.h:292
This represents &#39;#pragma omp taskgroup&#39; directive.
Definition: StmtOpenMP.h:2116
void AddCXXTemporary(const CXXTemporary *Temp)
Emit a CXXTemporary.
Definition: ASTWriter.cpp:5533
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will (ultimately) call.
Definition: ExprCXX.h:1403
QualType getComputationLHSType() const
Definition: Expr.h:3652
SourceRange getSourceRange() const LLVM_READONLY
Definition: ExprObjC.h:216
SourceLocation getRParenLoc() const
Definition: ExprObjC.h:471
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand...
Definition: Expr.h:2347
SourceLocation getTryLoc() const
Definition: StmtCXX.h:94
bool isConstexpr() const
Definition: Stmt.h:1985
Expr * getCombinedLowerBoundVariable() const
Definition: StmtOpenMP.h:1032
SourceLocation getLocation() const
Definition: ExprCXX.h:1405
SourceLocation getRBracketLoc() const
Definition: ExprCXX.h:884
SourceLocation getLocation() const
Definition: Expr.h:1230
unsigned getSwitchCaseID(SwitchCase *S)
Retrieve the ID for the given switch-case statement.
InitListExpr * getUpdater() const
Definition: Expr.h:4967
ConstantExpr - An expression that occurs in a constant context and optionally the result of evaluatin...
Definition: Expr.h:953
Represents a call to the builtin function __builtin_va_arg.
Definition: Expr.h:4216
SourceLocation getLabelLoc() const
Definition: Stmt.h:2473
bool isImplicitAccess() const
True if this is an implicit access, i.e.
Definition: ExprCXX.h:3507
SourceLocation getThrowLoc() const LLVM_READONLY
Definition: StmtObjC.h:348
unsigned Offset
Definition: Format.cpp:1758
static unsigned getNumSubExprs(AtomicOp Op)
Determine the number of arguments the specified atomic builtin should have.
Definition: Expr.cpp:4579
unsigned getValue() const
Definition: Expr.h:1539
This represents &#39;#pragma omp distribute&#39; directive.
Definition: StmtOpenMP.h:3117
Expr * getSrcExpr() const
getSrcExpr - Return the Expr to be converted.
Definition: Expr.h:5623
SourceLocation getDestroyedTypeLoc() const
Retrieve the starting location of the type being destroyed.
Definition: ExprCXX.h:2493
ObjCMethodDecl * getBoxingMethod() const
Definition: ExprObjC.h:145
SourceLocation getFinallyLoc() const
Definition: Stmt.h:3240
An expression "T()" which creates a value-initialized rvalue of type T, which is a non-class type...
Definition: ExprCXX.h:1958
ADLCallKind getADLCallKind() const
Definition: Expr.h:2642
const Stmt * getAssociatedStmt() const
Returns statement associated with the directive.
Definition: StmtOpenMP.h:252
SourceLocation getOperatorLoc() const
Retrieve the location of the &#39;->&#39; or &#39;.&#39; operator.
Definition: ExprCXX.h:3776
Expr * getCond() const
Definition: Expr.h:3741
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:1760
llvm::MutableArrayRef< Designator > designators()
Definition: Expr.h:4814
DeclAccessPair getFoundDecl() const
Retrieves the declaration found by lookup.
Definition: Expr.h:2898
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:3867
This represents one expression.
Definition: Expr.h:108
SourceLocation getElseLoc() const
Definition: Stmt.h:1974
DeclStmt * getEndStmt()
Definition: StmtCXX.h:165
SourceLocation End
IdentifierInfo * getFieldName() const
For a field or identifier offsetof node, returns the name of the field.
Definition: Expr.cpp:1593
CXXBaseSpecifier * getBase() const
For a base class node, returns the base specifier.
Definition: Expr.h:2212
bool isArrow() const
Determine whether this member expression used the &#39;->&#39; operator; otherwise, it used the &#39;...
Definition: ExprCXX.h:3773
StringRef getClobber(unsigned i) const
Definition: Stmt.h:3156
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:1449
SourceLocation getWhileLoc() const
Definition: Stmt.h:2301
unsigned getPackLength() const
Retrieve the length of the parameter pack.
Definition: ExprCXX.h:4074
NonOdrUseReason isNonOdrUse() const
Is this expression a non-odr-use reference, and if so, why? This is only meaningful if the named memb...
Definition: Expr.h:3035
Represents a C++ functional cast expression that builds a temporary object.
Definition: ExprCXX.h:1659
A C++ const_cast expression (C++ [expr.const.cast]).
Definition: ExprCXX.h:436
SourceLocation getLocation() const
Definition: ExprCXX.h:1021
BlockExpr - Adaptor class for mixing a BlockDecl with expressions.
Definition: Expr.h:5551
Field designator where only the field name is known.
Definition: ASTBitCodes.h:1998
VarDecl * getExceptionDecl() const
Definition: StmtCXX.h:49
IdentifierInfo * getDestroyedTypeIdentifier() const
In a dependent pseudo-destructor expression for which we do not have full type information on the des...
Definition: ExprCXX.h:2485
Expr * getCallee()
Definition: Expr.h:2638
unsigned getNumInits() const
Definition: Expr.h:4405
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:1310
This represents &#39;#pragma omp target teams distribute parallel for simd&#39; combined directive.
Definition: StmtOpenMP.h:4093
raw_arg_iterator raw_arg_end()
Definition: ExprCXX.h:2235
bool isArrow() const
Determine whether this pseudo-destructor expression was written using an &#39;->&#39; (otherwise, it used a &#39;.
Definition: ExprCXX.h:2448
Stmt * getBody()
Definition: Stmt.h:2261
ObjCDictionaryLiteral - AST node to represent objective-c dictionary literals; as in:"name" : NSUserN...
Definition: ExprObjC.h:304
const CompoundStmt * getSynchBody() const
Definition: StmtObjC.h:297
SourceLocation getLParenLoc() const
Definition: Expr.h:5160
Expr * getRHS()
Definition: Stmt.h:1579
bool hasQualifier() const
Determine whether this declaration reference was preceded by a C++ nested-name-specifier, e.g., N::foo.
Definition: Expr.h:1237
Represents Objective-C&#39;s @synchronized statement.
Definition: StmtObjC.h:277
ObjCSelectorExpr used for @selector in Objective-C.
Definition: ExprObjC.h:454
A CXXStdInitializerListExpr record.
Definition: ASTBitCodes.h:1873
TypeSourceInfo * getTypeSourceInfo() const
Definition: Expr.h:2284
Represents an expression that computes the length of a parameter pack.
Definition: ExprCXX.h:3997
SourceLocation getRBracketLoc() const
Definition: ExprOpenMP.h:111
CXXTryStmt - A C++ try block, including all handlers.
Definition: StmtCXX.h:68
AsTypeExpr - Clang builtin function __builtin_astype [OpenCL 6.2.4.2] This AST node provides support ...
Definition: Expr.h:5600
An ArraySubscriptExpr record.
Definition: ASTBitCodes.h:1676
SourceLocation getAtTryLoc() const
Retrieve the location of the @ in the @try.
Definition: StmtObjC.h:204
bool refersToEnclosingVariableOrCapture() const
Does this DeclRefExpr refer to an enclosing local or a captured variable?
Definition: Expr.h:1352
IdentifierInfo & getAccessor() const
Definition: Expr.h:5512
This represents &#39;#pragma omp target teams distribute simd&#39; combined directive.
Definition: StmtOpenMP.h:4166
ArrayTypeTrait getTrait() const
Definition: ExprCXX.h:2660
decls_iterator decls_begin() const
Definition: ExprCXX.h:2842
unsigned size() const
Definition: Stmt.h:1338
unsigned getNumClauses() const
Get number of clauses.
Definition: StmtOpenMP.h:240
An ArrayInitLoopExpr record.
Definition: ASTBitCodes.h:1718
Expr * getDistInc() const
Definition: StmtOpenMP.h:1020
A PseudoObjectExpr record.
Definition: ASTBitCodes.h:1757
SourceRange getAngleBrackets() const LLVM_READONLY
Definition: ExprCXX.h:299
Expr * getNextLowerBound() const
Definition: StmtOpenMP.h:984
Kind getKind() const
Determine what kind of offsetof node this is.
Definition: Expr.h:2192
QualType getType() const
Definition: Expr.h:137
Expr * getPrevEnsureUpperBound() const
Definition: StmtOpenMP.h:1026
SourceLocation getKeywordLoc() const
Retrieve the location of the __if_exists or __if_not_exists keyword.
Definition: StmtCXX.h:274
capture_init_range capture_inits()
Definition: Stmt.h:3515
This represents &#39;#pragma omp for&#39; directive.
Definition: StmtOpenMP.h:1249
An ObjCIndirectCopyRestoreExpr record.
Definition: ASTBitCodes.h:1799
Expr * getElement(unsigned Index)
getElement - Return the Element at the specified index.
Definition: ExprObjC.h:230
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:273
SourceLocation getSwitchLoc() const
Definition: Stmt.h:2150
LabelDecl * getLabel() const
Definition: Stmt.h:2468
bool hasInitializer() const
Whether this new-expression has any initializer at all.
Definition: ExprCXX.h:2168
const Stmt * getTryBody() const
Retrieve the @try body.
Definition: StmtObjC.h:208
Represents a folding of a pack over an operator.
Definition: ExprCXX.h:4441
ReturnStmt - This represents a return, optionally of an expression: return; return 4;...
Definition: Stmt.h:2610
This represents &#39;#pragma omp target teams&#39; directive.
Definition: StmtOpenMP.h:3882
SourceLocation getRParenLoc() const
getRParenLoc - Return the location of final right parenthesis.
Definition: Expr.h:5629
An expression that sends a message to the given Objective-C object or class.
Definition: ExprObjC.h:950
void AddDeclRef(const Decl *D)
Emit a reference to a declaration.
Definition: ASTWriter.h:909
This represents a Microsoft inline-assembly statement extension.
Definition: Stmt.h:3075
SourceLocation getDoLoc() const
Definition: Stmt.h:2357
SwitchCase * getSwitchCaseList()
Definition: Stmt.h:2146
SourceLocation getAtLoc() const
Definition: StmtObjC.h:388
ObjCMethodDecl * getImplicitPropertyGetter() const
Definition: ExprObjC.h:712
A DesignatedInitUpdateExpr record.
Definition: ASTBitCodes.h:1712
SourceLocation getRBracketLoc() const
Definition: Expr.h:2491
void AddStmt(Stmt *S)
Add the given statement or expression to the queue of statements to emit.
Definition: ASTWriter.h:839
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:2021
Expr * getInputExpr(unsigned i)
Definition: Stmt.cpp:741
Expr * getOutputExpr(unsigned i)
Definition: Stmt.cpp:737
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:5510
SourceLocation getMemberLoc() const
getMemberLoc - Return the location of the "member", in X->F, it is the location of &#39;F&#39;...
Definition: Expr.h:3000
ReceiverKind getReceiverKind() const
Determine the kind of receiver that this message is being sent to.
Definition: ExprObjC.h:1234
bool usesGNUSyntax() const
Determines whether this designated initializer used the deprecated GNU syntax for designated initiali...
Definition: Expr.h:4845
AtomicOp getOp() const
Definition: Expr.h:5871
A member reference to an MSPropertyDecl.
Definition: ExprCXX.h:772
Represents a reference to a non-type template parameter that has been substituted with a template arg...
Definition: ExprCXX.h:4115
const OffsetOfNode & getComponent(unsigned Idx) const
Definition: Expr.h:2291
This represents &#39;#pragma omp cancel&#39; directive.
Definition: StmtOpenMP.h:2921
Expr * getTrueExpr() const
getTrueExpr - Return the subexpression which will be evaluated if the condition evaluates to true; th...
Definition: Expr.h:3832
Expr * getCond()
Definition: Stmt.h:1887
ValueDecl * getDecl()
Definition: Expr.h:1222
An ObjCAvailabilityCheckExpr record.
Definition: ASTBitCodes.h:1826
SourceLocation getLocation() const
Definition: Expr.h:1930
SourceLocation getRParenLoc() const
Definition: Expr.h:4248
SourceLocation getForLoc() const
Definition: StmtObjC.h:52
const Expr * getSubExpr() const
Definition: Expr.h:1985
ObjCBridgeCastKind getBridgeKind() const
Determine which kind of bridge is being performed via this cast.
Definition: ExprObjC.h:1665
SourceRange getSourceRange() const LLVM_READONLY
Definition: ExprCXX.h:970
const Expr * getSubExpr() const
Definition: ExprCXX.h:1305
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:3346
const DeclContext * getUsedContext() const
Definition: ExprCXX.h:1153
Expr * getLHS()
An array access can be written A[4] or 4[A] (both are equivalent).
Definition: Expr.h:2472
bool getValue() const
Definition: ExprCXX.h:566
bool hadMultipleCandidates() const
Returns true if this expression refers to a function that was resolved from an overloaded set having ...
Definition: Expr.h:1335
ImaginaryLiteral - We support imaginary integer and floating point literals, like "1...
Definition: Expr.h:1637
This represents &#39;#pragma omp flush&#39; directive.
Definition: StmtOpenMP.h:2189
An ObjCForCollectionStmt record.
Definition: ASTBitCodes.h:1802
This represents &#39;#pragma omp parallel for simd&#39; directive.
Definition: StmtOpenMP.h:1777
ExprObjectKind getObjectKind() const
getObjectKind - The object kind that this expression produces.
Definition: Expr.h:421
DoStmt - This represents a &#39;do/while&#39; stmt.
Definition: Stmt.h:2328
AsmStmt is the base class for GCCAsmStmt and MSAsmStmt.
Definition: Stmt.h:2693
SourceLocation getOperatorLoc() const
Retrieve the location of the &#39;->&#39; or &#39;.&#39; operator.
Definition: ExprCXX.h:3527
SourceLocation getLParenLoc() const
Retrieve the location of the left parentheses (&#39;(&#39;) that precedes the argument list.
Definition: ExprCXX.h:3339
A MS-style AsmStmt record.
Definition: ASTBitCodes.h:1634
void push_back(uint64_t N)
Minimal vector-like interface.
Definition: ASTWriter.h:796
Expr * getLastIteration() const
Definition: StmtOpenMP.h:916
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:2408
Expr * getArgument()
Definition: ExprCXX.h:2307
This represents &#39;#pragma omp target enter data&#39; directive.
Definition: StmtOpenMP.h:2549
Expr * getStrideVariable() const
Definition: StmtOpenMP.h:968
bool getValue() const
Definition: ExprCXX.h:3890
A C++ dynamic_cast expression (C++ [expr.dynamic.cast]).
Definition: ExprCXX.h:354
OpaqueValueExpr - An expression referring to an opaque object of a fixed type and value class...
Definition: Expr.h:1050
Expr * getBase() const
Definition: Expr.h:4964
ConvertVectorExpr - Clang builtin function __builtin_convertvector This AST node provides support for...
Definition: Expr.h:4039
unsigned getNumArgs() const
Return the number of actual arguments in this message, not counting the receiver. ...
Definition: ExprObjC.h:1382
Expr * getCombinedDistCond() const
Definition: StmtOpenMP.h:1074
const Stmt * getPreInits() const
Definition: StmtOpenMP.h:940
#define false
Definition: stdbool.h:17
SourceLocation getLParenLoc() const
Definition: Expr.h:3085
A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr...
Definition: ExprCXX.h:2750
A field in a dependent type, known only by its name.
Definition: Expr.h:2147
This captures a statement into a function.
Definition: Stmt.h:3350
Represents a call to an inherited base class constructor from an inheriting constructor.
Definition: ExprCXX.h:1522
ExpressionTrait getTrait() const
Definition: ExprCXX.h:2728
unsigned path_size() const
Definition: Expr.h:3196
Token * getAsmToks()
Definition: Stmt.h:3106
PseudoObjectExpr - An expression which accesses a pseudo-object l-value.
Definition: Expr.h:5673
bool isImplicitProperty() const
Definition: ExprObjC.h:704
bool isInstantiationDependent() const
Whether this expression is instantiation-dependent, meaning that it depends in some way on a template...
Definition: Expr.h:200
bool inheritedFromVBase() const
Determine whether the inherited constructor is inherited from a virtual base of the object we constru...
Definition: ExprCXX.h:1571
StringLiteral * getFunctionName()
Definition: Expr.h:1933
unsigned getNumExprs() const
Return the number of expressions in this paren list.
Definition: Expr.h:5141
This represents &#39;#pragma omp single&#39; directive.
Definition: StmtOpenMP.h:1521
Encodes a location in the source.
body_range body()
Definition: Stmt.h:1343
Expr * getRetValue()
Definition: Stmt.h:2643
StringRef getOutputConstraint(unsigned i) const
Definition: Stmt.h:3116
SourceLocation getOperatorLoc() const
Definition: Expr.h:3441
const Stmt * getCatchBody() const
Definition: StmtObjC.h:93
unsigned getNumHandlers() const
Definition: StmtCXX.h:106
Expr * getSubExpr() const
Definition: Expr.h:2051
NestedNameSpecifierLoc getQualifierLoc() const
Retrieves the nested-name-specifier that qualifies the type name, with source-location information...
Definition: ExprCXX.h:2437
This is a basic class for representing single OpenMP executable directive.
Definition: StmtOpenMP.h:32
SourceLocation getBuiltinLoc() const
getBuiltinLoc - Return the location of the __builtin_astype token.
Definition: Expr.h:5626
bool hasUnresolvedUsing() const
Determine whether the lookup results contain an unresolved using declaration.
Definition: ExprCXX.h:3767
CastKind getCastKind() const
Definition: Expr.h:3171
Expr * getSubExpr(unsigned Idx) const
Definition: Expr.h:4863
SourceLocation getOperatorLoc() const
Retrieve the location of the cast operator keyword, e.g., static_cast.
Definition: ExprCXX.h:292
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)"...
Definition: ExprCXX.h:2005
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c dictionary literal.
Definition: ExprObjC.h:358
OMPClause * getClause(unsigned i) const
Returns specified clause.
Definition: StmtOpenMP.h:246
Expr * getLHS()
Definition: Stmt.h:1567
A call to a literal operator (C++11 [over.literal]) written as a user-defined literal (C++11 [lit...
Definition: ExprCXX.h:473
Represents a C++2a __builtin_bit_cast(T, v) expression.
Definition: ExprCXX.h:4724
SourceLocation getEllipsisLoc() const
Retrieve the location of the ellipsis that describes this pack expansion.
Definition: ExprCXX.h:3957
Expr * getExpr()
Get &#39;expr&#39; part of the associated expression/statement.
Definition: StmtOpenMP.h:2415
Represents a call to a member function that may be written either with member call syntax (e...
Definition: ExprCXX.h:170
SourceLocation getExceptLoc() const
Definition: Stmt.h:3199
SourceRange getSourceRange() const LLVM_READONLY
Definition: ExprObjC.h:380
Stmt * getElse()
Definition: Stmt.h:1908
DeclStmt - Adaptor class for mixing declarations with statements and expressions. ...
Definition: Stmt.h:1203
DeclarationNameInfo getDirectiveName() const
Return name of the directive.
Definition: StmtOpenMP.h:1681
SourceLocation getLBraceLoc() const
Definition: Stmt.h:3098
A CXXFunctionalCastExpr record.
Definition: ASTBitCodes.h:1867
Expr * getCond()
Definition: Stmt.h:2077
SourceLocation getStrTokenLoc(unsigned TokNum) const
Get one of the string literal token.
Definition: Expr.h:1833
StmtVisitor - This class implements a simple visitor for Stmt subclasses.
Definition: StmtVisitor.h:182
bool canOverflow() const
Returns true if the unary operator can cause an overflow.
Definition: Expr.h:2064
SourceLocation getColonLoc() const
Definition: ExprOpenMP.h:108
SourceLocation RAngleLoc
The source location of the right angle bracket (&#39;>&#39;).
Definition: TemplateBase.h:655
SourceLocation getRParenLoc() const
Definition: Expr.h:3951
void AddTemplateArgument(const TemplateArgument &Arg)
Emit a template argument.
Definition: ASTWriter.cpp:5989
An ObjCEncodeExpr record.
Definition: ASTBitCodes.h:1772
SourceLocation getRParenLoc() const
Definition: ExprObjC.h:425
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:1301
This represents &#39;#pragma omp taskwait&#39; directive.
Definition: StmtOpenMP.h:2072
SourceLocation getAtLoc() const
Definition: ExprObjC.h:423
SourceRange getSourceRange() const
Definition: ExprObjC.h:1717
bool isPascal() const
Definition: Expr.h:1810
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:5807
UnaryExprOrTypeTrait getKind() const
Definition: Expr.h:2378
bool isArray() const
Definition: ExprCXX.h:2129
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:503
bool isValueDependent() const
isValueDependent - Determines whether this expression is value-dependent (C++ [temp.dep.constexpr]).
Definition: Expr.h:158
SourceLocation getLParenLoc() const
Definition: Expr.h:3949
SourceLocation getGotoLoc() const
Definition: Stmt.h:2471
SourceLocation getAtFinallyLoc() const
Definition: StmtObjC.h:148
AccessSpecifier getAccess() const
An ObjCIsa Expr record.
Definition: ASTBitCodes.h:1796
const StringLiteral * getOutputConstraintLiteral(unsigned i) const
Definition: Stmt.h:2953
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
Definition: Expr.h:3249
Stmt * getCapturedStmt()
Retrieve the statement being captured.
Definition: Stmt.h:3451
void AddAttributes(ArrayRef< const Attr *> Attrs)
Emit a list of attributes.
Definition: ASTWriter.cpp:4538
SourceLocation getAtCatchLoc() const
Definition: StmtObjC.h:105
CharacterKind getKind() const
Definition: Expr.h:1532
This represents &#39;#pragma omp target&#39; directive.
Definition: StmtOpenMP.h:2433
Expr * getInputExpr(unsigned i)
Definition: Stmt.cpp:450
void AddSourceLocation(SourceLocation Loc)
Emit a source location.
Definition: ASTWriter.h:848
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:1971
Expr * getV()
Get &#39;v&#39; part of the associated expression/statement.
Definition: StmtOpenMP.h:2410
bool isParenTypeId() const
Definition: ExprCXX.h:2159
SourceLocation getEndLoc() const
Definition: Stmt.h:3100
NullStmtBitfields NullStmtBits
Definition: Stmt.h:943
Expr * getSubExpr()
Definition: ExprObjC.h:142
An expression trait intrinsic.
Definition: ExprCXX.h:2691
ArrayRef< Expr * > exprs()
Definition: Expr.h:5156
const ObjCMethodDecl * getMethodDecl() const
Definition: ExprObjC.h:1356
An AtomicExpr record.
Definition: ASTBitCodes.h:1760
VarDecl * getConditionVariable()
Retrieve the variable declared in this "switch" statement, if any.
Definition: Stmt.cpp:987
DeclStmt * getConditionVariableDeclStmt()
If this WhileStmt has a condition variable, return the faux DeclStmt associated with the creation of ...
Definition: Stmt.h:2289
This represents &#39;#pragma omp ordered&#39; directive.
Definition: StmtOpenMP.h:2244
StmtExpr - This is the GNU Statement Expression extension: ({int X=4; X;}).
Definition: Expr.h:3926
void AddAPFloat(const llvm::APFloat &Value)
Emit a floating-point value.
Definition: ASTWriter.cpp:5409
This represents &#39;#pragma omp target update&#39; directive.
Definition: StmtOpenMP.h:3185
ObjCBoxedExpr - used for generalized expression boxing.
Definition: ExprObjC.h:124
bool isArgumentType() const
Definition: Expr.h:2383
SourceLocation getKeywordLoc() const
Definition: Stmt.h:1457
Expr * getArrayFiller()
If this initializer list initializes an array with more elements than there are initializers in the l...
Definition: Expr.h:4469
SourceLocation getStarLoc() const
Definition: Stmt.h:2512
bool passAlignment() const
Indicates whether the required alignment should be implicitly passed to the allocation function...
Definition: ExprCXX.h:2199
bool isPartOfExplicitCast() const
Definition: Expr.h:3268
FunctionDecl * getOperatorDelete() const
Definition: ExprCXX.h:2126
Representation of a Microsoft __if_exists or __if_not_exists statement with a dependent name...
Definition: StmtCXX.h:252
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:221
void AddDeclarationNameInfo(const DeclarationNameInfo &NameInfo)
Definition: ASTWriter.cpp:5816
NonOdrUseReason isNonOdrUse() const
Is this expression a non-odr-use reference, and if so, why?
Definition: Expr.h:1346
void VisitStmt(Stmt *S)
A qualified reference to a name whose declaration cannot yet be resolved.
Definition: ExprCXX.h:3061
Expr * Value
The value of the dictionary element.
Definition: ExprObjC.h:266
const Expr * getInitializer() const
Definition: Expr.h:3078
ArrayRef< Expr * > finals_conditions()
Definition: StmtOpenMP.h:1140
Expr * getLHS() const
Definition: Expr.h:3449
void AddTemplateKWAndArgsInfo(const ASTTemplateKWAndArgsInfo &ArgInfo, const TemplateArgumentLoc *Args)
CompoundAssignOperator - For compound assignments (e.g.
Definition: Expr.h:3629
SourceLocation getLocation() const LLVM_READONLY
Definition: ExprCXX.h:1573
A POD class for pairing a NamedDecl* with an access specifier.
Represents a C11 generic selection.
Definition: Expr.h:5206
ArrayRef< TemplateArgument > getPartialArguments() const
Get.
Definition: ExprCXX.h:4090
const Expr * getBase() const
Definition: Expr.h:5508
Expr * getInstanceReceiver()
Returns the object expression (receiver) for an instance message, or null for a message that is not a...
Definition: ExprObjC.h:1260
AddrLabelExpr - The GNU address of label extension, representing &&label.
Definition: Expr.h:3882
An Objective-C "bridged" cast expression, which casts between Objective-C pointers and C pointers...
Definition: ExprObjC.h:1638
Represents a reference to a function parameter pack or init-capture pack that has been substituted bu...
Definition: ExprCXX.h:4243
OpaqueValueExpr * getOpaqueValue() const
getOpaqueValue - Return the opaque value placeholder.
Definition: Expr.h:3823
unsigned getManglingNumber() const
Definition: ExprCXX.h:4392
SourceLocation getMemberLoc() const
Definition: ExprCXX.h:831
TypeSourceInfo * getDestroyedTypeInfo() const
Retrieve the source location information for the type being destroyed.
Definition: ExprCXX.h:2478
arg_iterator arg_end()
Definition: ExprObjC.h:1473
Expr * getFalseExpr() const
getFalseExpr - Return the subexpression which will be evaluated if the condnition evaluates to false;...
Definition: Expr.h:3839
NullStmt - This is the null statement ";": C99 6.8.3p3.
Definition: Stmt.h:1275
bool isTypeOperand() const
Definition: ExprCXX.h:713
StringRef getInputConstraint(unsigned i) const
Definition: Stmt.h:3129
SourceLocation getLocation() const
Definition: ExprCXX.h:572
unsigned getNumAssocs() const
The number of association expressions.
Definition: Expr.h:5374
void writeClause(OMPClause *C)
Definition: ASTWriter.cpp:6613
Dataflow Directional Tag Classes.
Expr * getPrevUpperBoundVariable() const
Definition: StmtOpenMP.h:1014
bool isVolatile() const
Definition: Stmt.h:2729
An InitListExpr record.
Definition: ASTBitCodes.h:1706
VarDecl * getConditionVariable()
Retrieve the variable declared in this "while" statement, if any.
Definition: Stmt.cpp:1043
[C99 6.4.2.2] - A predefined identifier such as func.
Definition: Expr.h:1878
SourceLocation getLocation() const
Definition: ExprObjC.h:763
A CXXBoolLiteralExpr record.
Definition: ASTBitCodes.h:1876
Represents a delete expression for memory deallocation and destructor calls, e.g. ...
Definition: ExprCXX.h:2265
IdentifierInfo * getOutputIdentifier(unsigned i) const
Definition: Stmt.h:2942
bool isSimple() const
Definition: Stmt.h:2726
OverloadedOperatorKind getOperator() const
Returns the kind of overloaded operator that this expression refers to.
Definition: ExprCXX.h:106
NonTypeTemplateParmDecl * getParameterPack() const
Retrieve the non-type template parameter pack being substituted.
Definition: ExprCXX.h:4203
MSPropertyDecl * getPropertyDecl() const
Definition: ExprCXX.h:829
const Stmt * getFinallyBody() const
Definition: StmtObjC.h:139
An ExtVectorElementExpr record.
Definition: ASTBitCodes.h:1703
ArrayRef< const Attr * > getAttrs() const
Definition: Stmt.h:1790
bool isImplicit() const
Definition: ExprCXX.h:1027
Expr * getCond() const
Definition: StmtOpenMP.h:928
This represents &#39;#pragma omp section&#39; directive.
Definition: StmtOpenMP.h:1459
This represents &#39;#pragma omp teams distribute&#39; directive.
Definition: StmtOpenMP.h:3595
QualType getSuperType() const
Retrieve the type referred to by &#39;super&#39;.
Definition: ExprObjC.h:1336
SourceLocation EllipsisLoc
The location of the ellipsis, if this is a pack expansion.
Definition: ExprObjC.h:269
TypeSourceInfo * getTypeSourceInfo() const
Retrieve the type source information for the type being constructed.
Definition: ExprCXX.h:3335
AccessSpecifier getAccess() const
Definition: DeclBase.h:473
A runtime availability query.
Definition: ExprObjC.h:1699
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:4076
VarDecl *const * iterator
Iterators over the parameters which the parameter pack expanded into.
Definition: ExprCXX.h:4279
A C++ reinterpret_cast expression (C++ [expr.reinterpret.cast]).
Definition: ExprCXX.h:396
This represents &#39;#pragma omp simd&#39; directive.
Definition: StmtOpenMP.h:1184
Stmt * getHandler() const
Definition: Stmt.h:3291
Represents a &#39;co_yield&#39; expression.
Definition: ExprCXX.h:4698
SourceLocation getLBraceLoc() const
Definition: Expr.h:4522
SourceLocation getSemiLoc() const
Definition: Stmt.h:1286
An ObjCAutoreleasePoolStmt record.
Definition: ASTBitCodes.h:1820
Expr * getOperand() const
Retrieve the operand of the &#39;co_return&#39; statement.
Definition: StmtCXX.h:480
const Expr * getReductionRef() const
Returns reference to the task_reduction return variable.
Definition: StmtOpenMP.h:2167
Represents a C++11 pack expansion that produces a sequence of expressions.
Definition: ExprCXX.h:3921
bool isListInitialization() const
Whether this constructor call was written as list-initialization.
Definition: ExprCXX.h:1422
bool isImplicit() const
Definition: ExprCXX.h:4637
A CXXDynamicCastExpr record.
Definition: ASTBitCodes.h:1858
DependentScopeDeclRefExprBitfields DependentScopeDeclRefExprBits
Definition: Stmt.h:991
const Expr * getSynchExpr() const
Definition: StmtObjC.h:305
Expr * getUpdateExpr()
Get helper expression of the form &#39;OpaqueValueExpr(x) binop OpaqueValueExpr(expr)&#39; or &#39;OpaqueValueExp...
Definition: StmtOpenMP.h:2396
SourceLocation getParameterPackLocation() const
Get the location of the parameter pack.
Definition: ExprCXX.h:4275
semantics_iterator semantics_begin()
Definition: Expr.h:5741
bool isIfExists() const
Determine whether this is an __if_exists statement.
Definition: StmtCXX.h:277
SourceLocation getBeginLoc() const
Definition: Expr.h:4311
NestedNameSpecifierLoc getQualifierLoc() const
Definition: ExprCXX.h:832
ExplicitCastExpr - An explicit cast written in the source code.
Definition: Expr.h:3312
This represents &#39;#pragma omp atomic&#39; directive.
Definition: StmtOpenMP.h:2299
child_range children()
Definition: ExprCXX.h:4596
Expr * getCombinedInit() const
Definition: StmtOpenMP.h:1050
SourceLocation getLParenLoc() const
Definition: ExprObjC.h:1662
DeclStmt * getConditionVariableDeclStmt()
If this IfStmt has a condition variable, return the faux DeclStmt associated with the creation of tha...
Definition: Stmt.h:1943
void AddVersionTuple(const VersionTuple &Version)
Emit a version tuple.
Definition: ASTWriter.h:959
An ObjCAtFinallyStmt record.
Definition: ASTBitCodes.h:1808
SourceLocation getRParenLoc() const
Definition: ExprObjC.h:524
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
Definition: ExprCXX.h:720
CXXNewExprBitfields CXXNewExprBits
Definition: Stmt.h:988
llvm::APInt getValue() const
Definition: Expr.h:1405
Represents a __leave statement.
Definition: Stmt.h:3311
unsigned getCollapsedNumber() const
Get number of collapsed loops.
Definition: StmtOpenMP.h:910
Expr * getCombinedNextLowerBound() const
Definition: StmtOpenMP.h:1062
ArrayRef< Expr * > counters()
Definition: StmtOpenMP.h:1098
LabelDecl * getLabel() const
Definition: Expr.h:3904
path_iterator path_end()
Definition: Expr.h:3198
iterator end() const
Definition: ExprCXX.h:4281
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
Definition: ExprCXX.h:3864
SwitchStmt - This represents a &#39;switch&#39; stmt.
Definition: Stmt.h:2017
unsigned getByteLength() const
Definition: Expr.h:1797
SourceLocation getColonColonLoc() const
Retrieve the location of the &#39;::&#39; in a qualified pseudo-destructor expression.
Definition: ExprCXX.h:2466
Expr * getCombinedNextUpperBound() const
Definition: StmtOpenMP.h:1068
SourceLocation getBeginLoc() const
Definition: ExprCXX.h:2316
arg_iterator arg_begin()
Definition: ExprObjC.h:1471
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source location information.
Definition: ExprCXX.h:3113
SourceLocation getRParenLoc() const
Definition: StmtObjC.h:54
Represents the body of a coroutine.
Definition: StmtCXX.h:317
TemplateArgumentLoc * getTrailingTemplateArgumentLoc()
Return the optional template arguments.
Definition: ExprCXX.h:3847
Location wrapper for a TemplateArgument.
Definition: TemplateBase.h:449
Expr * getBase() const
Definition: ExprObjC.h:1518
bool isOpenMPDistributeDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a distribute directive.
Iterator for iterating over Stmt * arrays that contain only T *.
Definition: Stmt.h:1042
SourceLocation getBuiltinLoc() const
Definition: Expr.h:3989
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
Definition: Expr.h:2437
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c array literal.
Definition: ExprObjC.h:227
SourceLocation getLeaveLoc() const
Definition: Stmt.h:3321
Represents Objective-C&#39;s collection statement.
Definition: StmtObjC.h:23
An ObjCAtSynchronizedStmt record.
Definition: ASTBitCodes.h:1814
arg_iterator arg_begin()
Definition: Expr.h:2719
ArrayRef< Expr * > inits()
Definition: StmtOpenMP.h:1110
unsigned getNumObjects() const
Definition: ExprCXX.h:3243
ObjCEncodeExpr, used for @encode in Objective-C.
Definition: ExprObjC.h:407
SourceLocation getLocation() const
Retrieve the location of this expression.
Definition: Expr.h:1080
SourceLocation getLocation() const
Definition: ExprObjC.h:589
An implicit indirection through a C++ base class, when the field found is in a base class...
Definition: Expr.h:2150
Expr * getCond() const
getCond - Return the condition expression; this is defined in terms of the opaque value...
Definition: Expr.h:3827
Represents a call to a CUDA kernel function.
Definition: ExprCXX.h:223
SourceLocation getRParenLoc() const
Definition: Expr.h:4157
Represents a &#39;co_await&#39; expression.
Definition: ExprCXX.h:4611
bool isUnique() const
Definition: Expr.h:1116
TypeTraitExprBitfields TypeTraitExprBits
Definition: Stmt.h:990
bool isDelegateInitCall() const
isDelegateInitCall - Answers whether this message send has been tagged as a "delegate init call"...
Definition: ExprObjC.h:1413
Stmt * getInit()
Definition: Stmt.h:2098
A CXXMemberCallExpr record.
Definition: ASTBitCodes.h:1843
bool doesUsualArrayDeleteWantSize() const
Answers whether the usual array deallocation function for the allocated type expects the size of the ...
Definition: ExprCXX.h:2204
SourceRange getDirectInitRange() const
Definition: ExprCXX.h:2248
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the member name, with source location information...
Definition: ExprCXX.h:3538
Expr * getNumIterations() const
Definition: StmtOpenMP.h:1000
Opcode getOpcode() const
Definition: Expr.h:2046
Expr * getArg(unsigned Arg)
Return the specified argument.
Definition: ExprCXX.h:1482
StringRef getBytes() const
Allow access to clients that need the byte representation, such as ASTWriterStmt::VisitStringLiteral(...
Definition: Expr.h:1777
Represents Objective-C&#39;s @finally statement.
Definition: StmtObjC.h:127
SourceLocation getDefaultLoc() const
Definition: Expr.h:5458
StringRef getAsmString() const
Definition: Stmt.h:3109
bool hasAssociatedStmt() const
Returns true if directive has associated statement.
Definition: StmtOpenMP.h:249
Expr * getPrevLowerBoundVariable() const
Definition: StmtOpenMP.h:1008
uint64_t EmitStmt(unsigned Code, unsigned Abbrev=0)
Emit the record to the stream, preceded by its substatements.
Definition: ASTWriter.h:818
const Expr * getBase() const
Definition: ExprObjC.h:580
bool isArrow() const
Determine whether this member expression used the &#39;->&#39; operator; otherwise, it used the &#39;...
Definition: ExprCXX.h:3524
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
Definition: Expr.h:2976
SourceLocation getColonLoc() const
Definition: Stmt.h:1459
Represents a base class of a C++ class.
Definition: DeclCXX.h:146
unsigned getNumClobbers() const
Definition: Stmt.h:2774
bool isImplicit() const
Definition: StmtCXX.h:489
SourceLocation getRParenLoc() const
Definition: Stmt.h:2434
ObjCIvarRefExpr - A reference to an ObjC instance variable.
Definition: ExprObjC.h:546
child_range children()
Definition: ExprCXX.h:4686
bool isPartiallySubstituted() const
Determine whether this represents a partially-substituted sizeof...
Definition: ExprCXX.h:4085
Represents an expression that might suspend coroutine execution; either a co_await or co_yield expres...
Definition: ExprCXX.h:4524
DeclStmt * getRangeStmt()
Definition: StmtCXX.h:161
A ConvertVectorExpr record.
Definition: ASTBitCodes.h:1748
unsigned arg_size() const
Retrieve the number of arguments.
Definition: ExprCXX.h:3353
Expr * getRHS() const
Definition: Expr.h:4151
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
Definition: ExprCXX.h:3296
SourceLocation getAsmLoc() const
Definition: Stmt.h:2723
GotoStmt - This represents a direct goto.
Definition: Stmt.h:2455
A use of a default initializer in a constructor or in aggregate initialization.
Definition: ExprCXX.h:1188
Expr * getTarget()
Definition: Stmt.h:2514
Expr * getSrcExpr() const
getSrcExpr - Return the Expr to be converted.
Definition: Expr.h:4063
const SwitchCase * getNextSwitchCase() const
Definition: Stmt.h:1453
CapturedDecl * getCapturedDecl()
Retrieve the outlined function declaration.
Definition: Stmt.cpp:1291
StringRef getUuidStr() const
Definition: ExprCXX.h:966
bool isFreeIvar() const
Definition: ExprObjC.h:585
Expr * getCond()
Definition: Stmt.h:2346
QualType getSuperReceiverType() const
Definition: ExprObjC.h:767
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:886
ASTStmtWriter(ASTWriter &Writer, ASTWriter::RecordData &Record)
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
Definition: Expr.h:2811
GNU array range designator.
Definition: ASTBitCodes.h:2008
SourceLocation getWhileLoc() const
Definition: Stmt.h:2359
An ArrayInitIndexExpr record.
Definition: ASTBitCodes.h:1721
A GCC-style AsmStmt record.
Definition: ASTBitCodes.h:1631
This represents &#39;#pragma omp target parallel&#39; directive.
Definition: StmtOpenMP.h:2666
ContinueStmt - This represents a continue.
Definition: Stmt.h:2543
Expr * getPromiseCall() const
Retrieve the promise call that results from this &#39;co_return&#39; statement.
Definition: StmtCXX.h:485
Represents a loop initializing the elements of an array.
Definition: Expr.h:4999
SourceLocation getColonLoc() const
Definition: StmtCXX.h:203
ChooseExpr - GNU builtin-in function __builtin_choose_expr.
Definition: Expr.h:4102
Expr * getFilterExpr() const
Definition: Stmt.h:3202
SourceLocation getAttrLoc() const
Definition: Stmt.h:1789
BinaryConditionalOperator - The GNU extension to the conditional operator which allows the middle ope...
Definition: Expr.h:3780
CXXCatchStmt - This represents a C++ catch block.
Definition: StmtCXX.h:28
An index into an array.
Definition: Expr.h:2143
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr.type.conv]).
Definition: ExprCXX.h:1597
SourceLocation getRParenLoc() const
Definition: Expr.h:5161
An object for streaming information to a record.
Definition: ASTWriter.h:748
An ObjCAtCatchStmt record.
Definition: ASTBitCodes.h:1805
Expr * getRHS() const
Definition: Expr.h:3753
Expr * getCombinedCond() const
Definition: StmtOpenMP.h:1056
WhileStmt - This represents a &#39;while&#39; stmt.
Definition: Stmt.h:2200
SourceRange getParenOrBraceRange() const
Definition: ExprCXX.h:1499
CleanupObject getObject(unsigned i) const
Definition: ExprCXX.h:3245
Field designator where the field has been resolved to a declaration.
Definition: ASTBitCodes.h:2002
unsigned getNumConcatenated() const
getNumConcatenated - Get the number of string literal tokens that were concatenated in translation ph...
Definition: Expr.h:1828
SourceLocation getLParenLoc() const
Definition: ExprCXX.h:1628
bool containsUnexpandedParameterPack() const
Whether this expression contains an unexpanded parameter pack (for C++11 variadic templates)...
Definition: Expr.h:223
child_range children()
Definition: StmtCXX.h:429
SourceLocation getAtSynchronizedLoc() const
Definition: StmtObjC.h:294
A CXXInheritedCtorInitExpr record.
Definition: ASTBitCodes.h:1849
const DeclContext * getUsedContext() const
Definition: ExprCXX.h:1225
CompoundStmt * getTryBlock()
Definition: StmtCXX.h:99
Writes an AST file containing the contents of a translation unit.
Definition: ASTWriter.h:103
SourceLocation getBreakLoc() const
Definition: Stmt.h:2582
bool shouldCopy() const
shouldCopy - True if we should do the &#39;copy&#39; part of the copy-restore.
Definition: ExprObjC.h:1607
The receiver is a class.
Definition: ExprObjC.h:1098
Represents Objective-C&#39;s @try ... @catch ... @finally statement.
Definition: StmtObjC.h:165
capture_iterator capture_end() const
Retrieve an iterator pointing past the end of the sequence of captures.
Definition: Stmt.h:3498
void AddCXXBaseSpecifier(const CXXBaseSpecifier &Base)
Emit a C++ base specifier.
Definition: ASTWriter.cpp:6071
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
Definition: Stmt.cpp:262
bool isGlobalDelete() const
Definition: ExprCXX.h:2291
This represents &#39;#pragma omp taskloop simd&#39; directive.
Definition: StmtOpenMP.h:3051
void AddAPInt(const llvm::APInt &Value)
Emit an integral value.
Definition: ASTWriter.cpp:5398
SourceLocation getBuiltinLoc() const
getBuiltinLoc - Return the location of the __builtin_convertvector token.
Definition: Expr.h:4074
unsigned getNumCatchStmts() const
Retrieve the number of @catch statements in this try-catch-finally block.
Definition: StmtObjC.h:214
Expr * getBase() const
Retrieve the base object of this member expressions, e.g., the x in x.m.
Definition: ExprCXX.h:3515
StringLiteral - This represents a string literal expression, e.g.
Definition: Expr.h:1686
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Definition: Expr.h:2521
SourceRange getTypeIdParens() const
Definition: ExprCXX.h:2160
Expr * getPattern()
Retrieve the pattern of the pack expansion.
Definition: ExprCXX.h:3950
Expr * getPreCond() const
Definition: StmtOpenMP.h:924
RetTy Visit(PTR(Stmt) S, ParamTys... P)
Definition: StmtVisitor.h:42
Expr * getLHS() const
Definition: Expr.h:4149
bool hasTemplateKWAndArgsInfo() const
Definition: ExprCXX.h:2794
Abstract class common to all of the C++ "named"/"keyword" casts.
Definition: ExprCXX.h:262
This represents &#39;#pragma omp sections&#39; directive.
Definition: StmtOpenMP.h:1391
ObjCBoolLiteralExpr - Objective-C Boolean Literal.
Definition: ExprObjC.h:85
bool isObjectReceiver() const
Definition: ExprObjC.h:775
unsigned getNumComponents() const
Definition: Expr.h:2301
This represents &#39;#pragma omp target data&#39; directive.
Definition: StmtOpenMP.h:2491
const ParmVarDecl * getParam() const
Definition: ExprCXX.h:1146
OpenMPDirectiveKind getCancelRegion() const
Get cancellation region for the current cancellation point.
Definition: StmtOpenMP.h:2970
capture_init_iterator capture_init_end()
Retrieve the iterator pointing one past the last initialization argument for this lambda expression...
Definition: ExprCXX.h:1884
capture_range captures()
Definition: Stmt.h:3485
A reference to a declared variable, function, enum, etc.
Definition: Expr.h:1146
Expr * getRHS() const
Definition: Expr.h:3451
NestedNameSpecifierLoc getQualifierLoc() const
Fetches the nested-name qualifier with source-location information, if one was given.
Definition: ExprCXX.h:2871
BreakStmt - This represents a break.
Definition: Stmt.h:2573
SourceLocation getReceiverLocation() const
Definition: ExprObjC.h:765
const VarDecl * getCatchParamDecl() const
Definition: StmtObjC.h:97
unsigned getNumLabels() const
Definition: Stmt.h:3001
SourceLocation getLocation() const
Definition: Expr.h:1531
FieldDecl * getInitializedFieldInUnion()
If this initializes a union, specifies which field in the union to initialize.
Definition: Expr.h:4487
bool isConditionDependent() const
Definition: Expr.h:4137
Stmt * getSubStmt()
Definition: Stmt.h:1731
SourceLocation getBridgeKeywordLoc() const
The location of the bridge keyword.
Definition: ExprObjC.h:1673
bool hadMultipleCandidates() const
Whether the referred constructor was resolved from an overloaded set having size greater than 1...
Definition: ExprCXX.h:1414
void AddTemplateArgumentLoc(const TemplateArgumentLoc &Arg)
Emits a template argument location.
Definition: ASTWriter.cpp:5565
DeclStmt * getLoopVarStmt()
Definition: StmtCXX.h:168
unsigned getNumArgs() const
Return the number of arguments to the constructor call.
Definition: ExprCXX.h:1479
const Expr * getBase() const
Definition: ExprObjC.h:756
A trivial tuple used to represent a source range.
This represents &#39;#pragma omp taskyield&#39; directive.
Definition: StmtOpenMP.h:1984
This represents &#39;#pragma omp distribute parallel for simd&#39; composite directive.
Definition: StmtOpenMP.h:3324
A boolean literal, per ([C++ lex.bool] Boolean literals).
Definition: ExprCXX.h:554
SourceLocation getBeginLoc() const LLVM_READONLY
Definition: ExprCXX.h:4742
OffsetOfExpr - [C99 7.17] - This represents an expression of the form offsetof(record-type, member-designator).
Definition: Expr.h:2242
Expr * getQueriedExpression() const
Definition: ExprCXX.h:2730
This represents &#39;#pragma omp parallel sections&#39; directive.
Definition: StmtOpenMP.h:1845
SourceLocation getBuiltinLoc() const
Definition: Expr.h:5897
A Microsoft C++ __uuidof expression, which gets the _GUID that corresponds to the supplied type or ex...
Definition: ExprCXX.h:909
SourceLocation getRParenLoc() const
Definition: ExprCXX.h:1630
Expr * getCommon() const
getCommon - Return the common expression, written to the left of the condition.
Definition: Expr.h:3820
TypeSourceInfo * getWrittenTypeInfo() const
Definition: Expr.h:4242
DeclStmt * getBeginStmt()
Definition: StmtCXX.h:162
SourceLocation getRightLoc() const
Definition: ExprObjC.h:1417
The receiver is a superclass.
Definition: ExprObjC.h:1104
SourceLocation getGenericLoc() const
Definition: Expr.h:5455
SourceLocation LAngleLoc
The source location of the left angle bracket (&#39;<&#39;).
Definition: TemplateBase.h:652
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:1446
SourceLocation getBegin() const
TypeSourceInfo * getTypeSourceInfo() const
getTypeSourceInfo - Return the destination type.
Definition: Expr.h:4066
SourceLocation getRParenLoc() const
Return the location of the right parentheses.
Definition: Expr.h:2281
Represents Objective-C&#39;s @autoreleasepool Statement.
Definition: StmtObjC.h:368
bool isConditionTrue() const
isConditionTrue - Return whether the condition is true (i.e.
Definition: Expr.h:4130
decls_iterator decls_end() const
Definition: ExprCXX.h:2845
SourceLocation getKeywordLoc() const
Definition: ExprCXX.h:4569
bool caseStmtIsGNURange() const
True if this case statement is of the form case LHS ...
Definition: Stmt.h:1547
StmtCode
Record codes for each kind of statement or expression.
Definition: ASTBitCodes.h:1565
CompoundStmt * getTryBlock() const
Definition: Stmt.h:3287
Stmt * getSubStmt()
Definition: Stmt.h:1794
QualType getBaseType() const
Definition: ExprCXX.h:3763
InitListExpr * getSyntacticForm() const
Definition: Expr.h:4534
Expr * getBaseExpr() const
Definition: ExprCXX.h:828
Represents an implicitly-generated value initialization of an object of a given type.
Definition: Expr.h:5089
CompoundStmt * getBlock() const
Definition: Stmt.h:3206
SourceLocation getReturnLoc() const
Definition: Stmt.h:2666
CapturedRegionKind getCapturedRegionKind() const
Retrieve the captured region kind.
Definition: Stmt.cpp:1306
A GenericSelectionExpr record.
Definition: ASTBitCodes.h:1754
This represents &#39;#pragma omp target parallel for&#39; directive.
Definition: StmtOpenMP.h:2726
Expr * getLength()
Get length of array section.
Definition: ExprOpenMP.h:98
SourceLocation getOperatorLoc() const
Definition: Expr.h:2993
ConstructionKind getConstructionKind() const
Determine whether this constructor is actually constructing a base class (rather than a complete obje...
Definition: ExprCXX.h:1451
SourceLocation getEndLoc() const LLVM_READONLY
Definition: ExprCXX.h:4743
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:1288
Expr * getBase()
An array section can be written only as Base[LowerBound:Length].
Definition: ExprOpenMP.h:81
Stmt * getSubStmt()
Definition: Stmt.h:1597
bool isOverloaded() const
True if this lookup is overloaded.
Definition: ExprCXX.h:3014
This represents &#39;#pragma omp taskloop&#39; directive.
Definition: StmtOpenMP.h:2986