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::VisitConceptSpecializationExpr(
393  VisitExpr(E);
395  Record.push_back(TemplateArgs.size());
397  Record.AddSourceLocation(E->getTemplateKWLoc());
399  Record.AddDeclRef(E->getFoundDecl());
400  Record.AddDeclRef(E->getNamedConcept());
402  for (const TemplateArgument &Arg : TemplateArgs)
403  Record.AddTemplateArgument(Arg);
404  Record.push_back(E->isSatisfied());
406 }
407 
408 
409 void ASTStmtWriter::VisitCapturedStmt(CapturedStmt *S) {
410  VisitStmt(S);
411  // NumCaptures
412  Record.push_back(std::distance(S->capture_begin(), S->capture_end()));
413 
414  // CapturedDecl and captured region kind
415  Record.AddDeclRef(S->getCapturedDecl());
416  Record.push_back(S->getCapturedRegionKind());
417 
418  Record.AddDeclRef(S->getCapturedRecordDecl());
419 
420  // Capture inits
421  for (auto *I : S->capture_inits())
422  Record.AddStmt(I);
423 
424  // Body
425  Record.AddStmt(S->getCapturedStmt());
426 
427  // Captures
428  for (const auto &I : S->captures()) {
429  if (I.capturesThis() || I.capturesVariableArrayType())
430  Record.AddDeclRef(nullptr);
431  else
432  Record.AddDeclRef(I.getCapturedVar());
433  Record.push_back(I.getCaptureKind());
434  Record.AddSourceLocation(I.getLocation());
435  }
436 
438 }
439 
440 void ASTStmtWriter::VisitExpr(Expr *E) {
441  VisitStmt(E);
442  Record.AddTypeRef(E->getType());
443  Record.push_back(E->isTypeDependent());
444  Record.push_back(E->isValueDependent());
445  Record.push_back(E->isInstantiationDependent());
447  Record.push_back(E->getValueKind());
448  Record.push_back(E->getObjectKind());
449 }
450 
451 void ASTStmtWriter::VisitConstantExpr(ConstantExpr *E) {
452  VisitExpr(E);
453  Record.push_back(static_cast<uint64_t>(E->ConstantExprBits.ResultKind));
454  switch (E->ConstantExprBits.ResultKind) {
456  Record.push_back(E->Int64Result());
457  Record.push_back(E->ConstantExprBits.IsUnsigned |
458  E->ConstantExprBits.BitWidth << 1);
459  break;
461  Record.AddAPValue(E->APValueResult());
462  }
463  Record.AddStmt(E->getSubExpr());
465 }
466 
467 void ASTStmtWriter::VisitPredefinedExpr(PredefinedExpr *E) {
468  VisitExpr(E);
469 
470  bool HasFunctionName = E->getFunctionName() != nullptr;
471  Record.push_back(HasFunctionName);
472  Record.push_back(E->getIdentKind()); // FIXME: stable encoding
473  Record.AddSourceLocation(E->getLocation());
474  if (HasFunctionName)
475  Record.AddStmt(E->getFunctionName());
477 }
478 
479 void ASTStmtWriter::VisitDeclRefExpr(DeclRefExpr *E) {
480  VisitExpr(E);
481 
482  Record.push_back(E->hasQualifier());
483  Record.push_back(E->getDecl() != E->getFoundDecl());
484  Record.push_back(E->hasTemplateKWAndArgsInfo());
485  Record.push_back(E->hadMultipleCandidates());
487  Record.push_back(E->isNonOdrUse());
488 
489  if (E->hasTemplateKWAndArgsInfo()) {
490  unsigned NumTemplateArgs = E->getNumTemplateArgs();
491  Record.push_back(NumTemplateArgs);
492  }
493 
495 
496  if ((!E->hasTemplateKWAndArgsInfo()) && (!E->hasQualifier()) &&
497  (E->getDecl() == E->getFoundDecl()) &&
500  AbbrevToUse = Writer.getDeclRefExprAbbrev();
501  }
502 
503  if (E->hasQualifier())
505 
506  if (E->getDecl() != E->getFoundDecl())
507  Record.AddDeclRef(E->getFoundDecl());
508 
509  if (E->hasTemplateKWAndArgsInfo())
510  AddTemplateKWAndArgsInfo(*E->getTrailingObjects<ASTTemplateKWAndArgsInfo>(),
511  E->getTrailingObjects<TemplateArgumentLoc>());
512 
513  Record.AddDeclRef(E->getDecl());
514  Record.AddSourceLocation(E->getLocation());
515  Record.AddDeclarationNameLoc(E->DNLoc, E->getDecl()->getDeclName());
517 }
518 
519 void ASTStmtWriter::VisitIntegerLiteral(IntegerLiteral *E) {
520  VisitExpr(E);
521  Record.AddSourceLocation(E->getLocation());
522  Record.AddAPInt(E->getValue());
523 
524  if (E->getValue().getBitWidth() == 32) {
525  AbbrevToUse = Writer.getIntegerLiteralAbbrev();
526  }
527 
529 }
530 
531 void ASTStmtWriter::VisitFixedPointLiteral(FixedPointLiteral *E) {
532  VisitExpr(E);
533  Record.AddSourceLocation(E->getLocation());
534  Record.AddAPInt(E->getValue());
536 }
537 
538 void ASTStmtWriter::VisitFloatingLiteral(FloatingLiteral *E) {
539  VisitExpr(E);
540  Record.push_back(E->getRawSemantics());
541  Record.push_back(E->isExact());
542  Record.AddAPFloat(E->getValue());
543  Record.AddSourceLocation(E->getLocation());
545 }
546 
547 void ASTStmtWriter::VisitImaginaryLiteral(ImaginaryLiteral *E) {
548  VisitExpr(E);
549  Record.AddStmt(E->getSubExpr());
551 }
552 
553 void ASTStmtWriter::VisitStringLiteral(StringLiteral *E) {
554  VisitExpr(E);
555 
556  // Store the various bits of data of StringLiteral.
557  Record.push_back(E->getNumConcatenated());
558  Record.push_back(E->getLength());
559  Record.push_back(E->getCharByteWidth());
560  Record.push_back(E->getKind());
561  Record.push_back(E->isPascal());
562 
563  // Store the trailing array of SourceLocation.
564  for (unsigned I = 0, N = E->getNumConcatenated(); I != N; ++I)
565  Record.AddSourceLocation(E->getStrTokenLoc(I));
566 
567  // Store the trailing array of char holding the string data.
568  StringRef StrData = E->getBytes();
569  for (unsigned I = 0, N = E->getByteLength(); I != N; ++I)
570  Record.push_back(StrData[I]);
571 
573 }
574 
575 void ASTStmtWriter::VisitCharacterLiteral(CharacterLiteral *E) {
576  VisitExpr(E);
577  Record.push_back(E->getValue());
578  Record.AddSourceLocation(E->getLocation());
579  Record.push_back(E->getKind());
580 
581  AbbrevToUse = Writer.getCharacterLiteralAbbrev();
582 
584 }
585 
586 void ASTStmtWriter::VisitParenExpr(ParenExpr *E) {
587  VisitExpr(E);
588  Record.AddSourceLocation(E->getLParen());
589  Record.AddSourceLocation(E->getRParen());
590  Record.AddStmt(E->getSubExpr());
592 }
593 
594 void ASTStmtWriter::VisitParenListExpr(ParenListExpr *E) {
595  VisitExpr(E);
596  Record.push_back(E->getNumExprs());
597  for (auto *SubStmt : E->exprs())
598  Record.AddStmt(SubStmt);
599  Record.AddSourceLocation(E->getLParenLoc());
600  Record.AddSourceLocation(E->getRParenLoc());
602 }
603 
604 void ASTStmtWriter::VisitUnaryOperator(UnaryOperator *E) {
605  VisitExpr(E);
606  Record.AddStmt(E->getSubExpr());
607  Record.push_back(E->getOpcode()); // FIXME: stable encoding
608  Record.AddSourceLocation(E->getOperatorLoc());
609  Record.push_back(E->canOverflow());
611 }
612 
613 void ASTStmtWriter::VisitOffsetOfExpr(OffsetOfExpr *E) {
614  VisitExpr(E);
615  Record.push_back(E->getNumComponents());
616  Record.push_back(E->getNumExpressions());
617  Record.AddSourceLocation(E->getOperatorLoc());
618  Record.AddSourceLocation(E->getRParenLoc());
620  for (unsigned I = 0, N = E->getNumComponents(); I != N; ++I) {
621  const OffsetOfNode &ON = E->getComponent(I);
622  Record.push_back(ON.getKind()); // FIXME: Stable encoding
624  Record.AddSourceLocation(ON.getSourceRange().getEnd());
625  switch (ON.getKind()) {
626  case OffsetOfNode::Array:
627  Record.push_back(ON.getArrayExprIndex());
628  break;
629 
630  case OffsetOfNode::Field:
631  Record.AddDeclRef(ON.getField());
632  break;
633 
635  Record.AddIdentifierRef(ON.getFieldName());
636  break;
637 
638  case OffsetOfNode::Base:
639  Record.AddCXXBaseSpecifier(*ON.getBase());
640  break;
641  }
642  }
643  for (unsigned I = 0, N = E->getNumExpressions(); I != N; ++I)
644  Record.AddStmt(E->getIndexExpr(I));
646 }
647 
648 void ASTStmtWriter::VisitUnaryExprOrTypeTraitExpr(UnaryExprOrTypeTraitExpr *E) {
649  VisitExpr(E);
650  Record.push_back(E->getKind());
651  if (E->isArgumentType())
653  else {
654  Record.push_back(0);
655  Record.AddStmt(E->getArgumentExpr());
656  }
657  Record.AddSourceLocation(E->getOperatorLoc());
658  Record.AddSourceLocation(E->getRParenLoc());
660 }
661 
662 void ASTStmtWriter::VisitArraySubscriptExpr(ArraySubscriptExpr *E) {
663  VisitExpr(E);
664  Record.AddStmt(E->getLHS());
665  Record.AddStmt(E->getRHS());
666  Record.AddSourceLocation(E->getRBracketLoc());
668 }
669 
670 void ASTStmtWriter::VisitOMPArraySectionExpr(OMPArraySectionExpr *E) {
671  VisitExpr(E);
672  Record.AddStmt(E->getBase());
673  Record.AddStmt(E->getLowerBound());
674  Record.AddStmt(E->getLength());
675  Record.AddSourceLocation(E->getColonLoc());
676  Record.AddSourceLocation(E->getRBracketLoc());
678 }
679 
680 void ASTStmtWriter::VisitCallExpr(CallExpr *E) {
681  VisitExpr(E);
682  Record.push_back(E->getNumArgs());
683  Record.AddSourceLocation(E->getRParenLoc());
684  Record.AddStmt(E->getCallee());
685  for (CallExpr::arg_iterator Arg = E->arg_begin(), ArgEnd = E->arg_end();
686  Arg != ArgEnd; ++Arg)
687  Record.AddStmt(*Arg);
688  Record.push_back(static_cast<unsigned>(E->getADLCallKind()));
690 }
691 
692 void ASTStmtWriter::VisitMemberExpr(MemberExpr *E) {
693  VisitExpr(E);
694 
695  bool HasQualifier = E->hasQualifier();
696  bool HasFoundDecl =
697  E->hasQualifierOrFoundDecl() &&
698  (E->getFoundDecl().getDecl() != E->getMemberDecl() ||
699  E->getFoundDecl().getAccess() != E->getMemberDecl()->getAccess());
700  bool HasTemplateInfo = E->hasTemplateKWAndArgsInfo();
701  unsigned NumTemplateArgs = E->getNumTemplateArgs();
702 
703  // Write these first for easy access when deserializing, as they affect the
704  // size of the MemberExpr.
705  Record.push_back(HasQualifier);
706  Record.push_back(HasFoundDecl);
707  Record.push_back(HasTemplateInfo);
708  Record.push_back(NumTemplateArgs);
709 
710  Record.AddStmt(E->getBase());
711  Record.AddDeclRef(E->getMemberDecl());
712  Record.AddDeclarationNameLoc(E->MemberDNLoc,
713  E->getMemberDecl()->getDeclName());
714  Record.AddSourceLocation(E->getMemberLoc());
715  Record.push_back(E->isArrow());
716  Record.push_back(E->hadMultipleCandidates());
717  Record.push_back(E->isNonOdrUse());
718  Record.AddSourceLocation(E->getOperatorLoc());
719 
720  if (HasFoundDecl) {
721  DeclAccessPair FoundDecl = E->getFoundDecl();
722  Record.AddDeclRef(FoundDecl.getDecl());
723  Record.push_back(FoundDecl.getAccess());
724  }
725 
726  if (HasQualifier)
728 
729  if (HasTemplateInfo)
730  AddTemplateKWAndArgsInfo(*E->getTrailingObjects<ASTTemplateKWAndArgsInfo>(),
731  E->getTrailingObjects<TemplateArgumentLoc>());
732 
734 }
735 
736 void ASTStmtWriter::VisitObjCIsaExpr(ObjCIsaExpr *E) {
737  VisitExpr(E);
738  Record.AddStmt(E->getBase());
739  Record.AddSourceLocation(E->getIsaMemberLoc());
740  Record.AddSourceLocation(E->getOpLoc());
741  Record.push_back(E->isArrow());
743 }
744 
745 void ASTStmtWriter::
746 VisitObjCIndirectCopyRestoreExpr(ObjCIndirectCopyRestoreExpr *E) {
747  VisitExpr(E);
748  Record.AddStmt(E->getSubExpr());
749  Record.push_back(E->shouldCopy());
751 }
752 
753 void ASTStmtWriter::VisitObjCBridgedCastExpr(ObjCBridgedCastExpr *E) {
754  VisitExplicitCastExpr(E);
755  Record.AddSourceLocation(E->getLParenLoc());
757  Record.push_back(E->getBridgeKind()); // FIXME: Stable encoding
759 }
760 
761 void ASTStmtWriter::VisitCastExpr(CastExpr *E) {
762  VisitExpr(E);
763  Record.push_back(E->path_size());
764  Record.AddStmt(E->getSubExpr());
765  Record.push_back(E->getCastKind()); // FIXME: stable encoding
766 
768  PI = E->path_begin(), PE = E->path_end(); PI != PE; ++PI)
769  Record.AddCXXBaseSpecifier(**PI);
770 }
771 
772 void ASTStmtWriter::VisitBinaryOperator(BinaryOperator *E) {
773  VisitExpr(E);
774  Record.AddStmt(E->getLHS());
775  Record.AddStmt(E->getRHS());
776  Record.push_back(E->getOpcode()); // FIXME: stable encoding
777  Record.AddSourceLocation(E->getOperatorLoc());
778  Record.push_back(E->getFPFeatures().getInt());
780 }
781 
782 void ASTStmtWriter::VisitCompoundAssignOperator(CompoundAssignOperator *E) {
783  VisitBinaryOperator(E);
784  Record.AddTypeRef(E->getComputationLHSType());
787 }
788 
789 void ASTStmtWriter::VisitConditionalOperator(ConditionalOperator *E) {
790  VisitExpr(E);
791  Record.AddStmt(E->getCond());
792  Record.AddStmt(E->getLHS());
793  Record.AddStmt(E->getRHS());
794  Record.AddSourceLocation(E->getQuestionLoc());
795  Record.AddSourceLocation(E->getColonLoc());
797 }
798 
799 void
800 ASTStmtWriter::VisitBinaryConditionalOperator(BinaryConditionalOperator *E) {
801  VisitExpr(E);
802  Record.AddStmt(E->getOpaqueValue());
803  Record.AddStmt(E->getCommon());
804  Record.AddStmt(E->getCond());
805  Record.AddStmt(E->getTrueExpr());
806  Record.AddStmt(E->getFalseExpr());
807  Record.AddSourceLocation(E->getQuestionLoc());
808  Record.AddSourceLocation(E->getColonLoc());
810 }
811 
812 void ASTStmtWriter::VisitImplicitCastExpr(ImplicitCastExpr *E) {
813  VisitCastExpr(E);
814  Record.push_back(E->isPartOfExplicitCast());
815 
816  if (E->path_size() == 0)
817  AbbrevToUse = Writer.getExprImplicitCastAbbrev();
818 
820 }
821 
822 void ASTStmtWriter::VisitExplicitCastExpr(ExplicitCastExpr *E) {
823  VisitCastExpr(E);
825 }
826 
827 void ASTStmtWriter::VisitCStyleCastExpr(CStyleCastExpr *E) {
828  VisitExplicitCastExpr(E);
829  Record.AddSourceLocation(E->getLParenLoc());
830  Record.AddSourceLocation(E->getRParenLoc());
832 }
833 
834 void ASTStmtWriter::VisitCompoundLiteralExpr(CompoundLiteralExpr *E) {
835  VisitExpr(E);
836  Record.AddSourceLocation(E->getLParenLoc());
838  Record.AddStmt(E->getInitializer());
839  Record.push_back(E->isFileScope());
841 }
842 
843 void ASTStmtWriter::VisitExtVectorElementExpr(ExtVectorElementExpr *E) {
844  VisitExpr(E);
845  Record.AddStmt(E->getBase());
846  Record.AddIdentifierRef(&E->getAccessor());
847  Record.AddSourceLocation(E->getAccessorLoc());
849 }
850 
851 void ASTStmtWriter::VisitInitListExpr(InitListExpr *E) {
852  VisitExpr(E);
853  // NOTE: only add the (possibly null) syntactic form.
854  // No need to serialize the isSemanticForm flag and the semantic form.
855  Record.AddStmt(E->getSyntacticForm());
856  Record.AddSourceLocation(E->getLBraceLoc());
857  Record.AddSourceLocation(E->getRBraceLoc());
858  bool isArrayFiller = E->ArrayFillerOrUnionFieldInit.is<Expr*>();
859  Record.push_back(isArrayFiller);
860  if (isArrayFiller)
861  Record.AddStmt(E->getArrayFiller());
862  else
864  Record.push_back(E->hadArrayRangeDesignator());
865  Record.push_back(E->getNumInits());
866  if (isArrayFiller) {
867  // ArrayFiller may have filled "holes" due to designated initializer.
868  // Replace them by 0 to indicate that the filler goes in that place.
869  Expr *filler = E->getArrayFiller();
870  for (unsigned I = 0, N = E->getNumInits(); I != N; ++I)
871  Record.AddStmt(E->getInit(I) != filler ? E->getInit(I) : nullptr);
872  } else {
873  for (unsigned I = 0, N = E->getNumInits(); I != N; ++I)
874  Record.AddStmt(E->getInit(I));
875  }
877 }
878 
879 void ASTStmtWriter::VisitDesignatedInitExpr(DesignatedInitExpr *E) {
880  VisitExpr(E);
881  Record.push_back(E->getNumSubExprs());
882  for (unsigned I = 0, N = E->getNumSubExprs(); I != N; ++I)
883  Record.AddStmt(E->getSubExpr(I));
885  Record.push_back(E->usesGNUSyntax());
886  for (const DesignatedInitExpr::Designator &D : E->designators()) {
887  if (D.isFieldDesignator()) {
888  if (FieldDecl *Field = D.getField()) {
890  Record.AddDeclRef(Field);
891  } else {
893  Record.AddIdentifierRef(D.getFieldName());
894  }
895  Record.AddSourceLocation(D.getDotLoc());
896  Record.AddSourceLocation(D.getFieldLoc());
897  } else if (D.isArrayDesignator()) {
899  Record.push_back(D.getFirstExprIndex());
900  Record.AddSourceLocation(D.getLBracketLoc());
901  Record.AddSourceLocation(D.getRBracketLoc());
902  } else {
903  assert(D.isArrayRangeDesignator() && "Unknown designator");
905  Record.push_back(D.getFirstExprIndex());
906  Record.AddSourceLocation(D.getLBracketLoc());
907  Record.AddSourceLocation(D.getEllipsisLoc());
908  Record.AddSourceLocation(D.getRBracketLoc());
909  }
910  }
912 }
913 
914 void ASTStmtWriter::VisitDesignatedInitUpdateExpr(DesignatedInitUpdateExpr *E) {
915  VisitExpr(E);
916  Record.AddStmt(E->getBase());
917  Record.AddStmt(E->getUpdater());
919 }
920 
921 void ASTStmtWriter::VisitNoInitExpr(NoInitExpr *E) {
922  VisitExpr(E);
924 }
925 
926 void ASTStmtWriter::VisitArrayInitLoopExpr(ArrayInitLoopExpr *E) {
927  VisitExpr(E);
928  Record.AddStmt(E->SubExprs[0]);
929  Record.AddStmt(E->SubExprs[1]);
931 }
932 
933 void ASTStmtWriter::VisitArrayInitIndexExpr(ArrayInitIndexExpr *E) {
934  VisitExpr(E);
936 }
937 
938 void ASTStmtWriter::VisitImplicitValueInitExpr(ImplicitValueInitExpr *E) {
939  VisitExpr(E);
941 }
942 
943 void ASTStmtWriter::VisitVAArgExpr(VAArgExpr *E) {
944  VisitExpr(E);
945  Record.AddStmt(E->getSubExpr());
947  Record.AddSourceLocation(E->getBuiltinLoc());
948  Record.AddSourceLocation(E->getRParenLoc());
949  Record.push_back(E->isMicrosoftABI());
951 }
952 
953 void ASTStmtWriter::VisitSourceLocExpr(SourceLocExpr *E) {
954  VisitExpr(E);
955  Record.AddDeclRef(cast_or_null<Decl>(E->getParentContext()));
956  Record.AddSourceLocation(E->getBeginLoc());
957  Record.AddSourceLocation(E->getEndLoc());
958  Record.push_back(E->getIdentKind());
960 }
961 
962 void ASTStmtWriter::VisitAddrLabelExpr(AddrLabelExpr *E) {
963  VisitExpr(E);
964  Record.AddSourceLocation(E->getAmpAmpLoc());
965  Record.AddSourceLocation(E->getLabelLoc());
966  Record.AddDeclRef(E->getLabel());
968 }
969 
970 void ASTStmtWriter::VisitStmtExpr(StmtExpr *E) {
971  VisitExpr(E);
972  Record.AddStmt(E->getSubStmt());
973  Record.AddSourceLocation(E->getLParenLoc());
974  Record.AddSourceLocation(E->getRParenLoc());
976 }
977 
978 void ASTStmtWriter::VisitChooseExpr(ChooseExpr *E) {
979  VisitExpr(E);
980  Record.AddStmt(E->getCond());
981  Record.AddStmt(E->getLHS());
982  Record.AddStmt(E->getRHS());
983  Record.AddSourceLocation(E->getBuiltinLoc());
984  Record.AddSourceLocation(E->getRParenLoc());
985  Record.push_back(E->isConditionDependent() ? false : E->isConditionTrue());
987 }
988 
989 void ASTStmtWriter::VisitGNUNullExpr(GNUNullExpr *E) {
990  VisitExpr(E);
991  Record.AddSourceLocation(E->getTokenLocation());
993 }
994 
995 void ASTStmtWriter::VisitShuffleVectorExpr(ShuffleVectorExpr *E) {
996  VisitExpr(E);
997  Record.push_back(E->getNumSubExprs());
998  for (unsigned I = 0, N = E->getNumSubExprs(); I != N; ++I)
999  Record.AddStmt(E->getExpr(I));
1000  Record.AddSourceLocation(E->getBuiltinLoc());
1001  Record.AddSourceLocation(E->getRParenLoc());
1003 }
1004 
1005 void ASTStmtWriter::VisitConvertVectorExpr(ConvertVectorExpr *E) {
1006  VisitExpr(E);
1007  Record.AddSourceLocation(E->getBuiltinLoc());
1008  Record.AddSourceLocation(E->getRParenLoc());
1009  Record.AddTypeSourceInfo(E->getTypeSourceInfo());
1010  Record.AddStmt(E->getSrcExpr());
1012 }
1013 
1014 void ASTStmtWriter::VisitBlockExpr(BlockExpr *E) {
1015  VisitExpr(E);
1016  Record.AddDeclRef(E->getBlockDecl());
1018 }
1019 
1020 void ASTStmtWriter::VisitGenericSelectionExpr(GenericSelectionExpr *E) {
1021  VisitExpr(E);
1022 
1023  Record.push_back(E->getNumAssocs());
1024  Record.push_back(E->ResultIndex);
1025  Record.AddSourceLocation(E->getGenericLoc());
1026  Record.AddSourceLocation(E->getDefaultLoc());
1027  Record.AddSourceLocation(E->getRParenLoc());
1028 
1029  Stmt **Stmts = E->getTrailingObjects<Stmt *>();
1030  // Add 1 to account for the controlling expression which is the first
1031  // expression in the trailing array of Stmt *. This is not needed for
1032  // the trailing array of TypeSourceInfo *.
1033  for (unsigned I = 0, N = E->getNumAssocs() + 1; I < N; ++I)
1034  Record.AddStmt(Stmts[I]);
1035 
1036  TypeSourceInfo **TSIs = E->getTrailingObjects<TypeSourceInfo *>();
1037  for (unsigned I = 0, N = E->getNumAssocs(); I < N; ++I)
1038  Record.AddTypeSourceInfo(TSIs[I]);
1039 
1041 }
1042 
1043 void ASTStmtWriter::VisitPseudoObjectExpr(PseudoObjectExpr *E) {
1044  VisitExpr(E);
1045  Record.push_back(E->getNumSemanticExprs());
1046 
1047  // Push the result index. Currently, this needs to exactly match
1048  // the encoding used internally for ResultIndex.
1049  unsigned result = E->getResultExprIndex();
1050  result = (result == PseudoObjectExpr::NoResult ? 0 : result + 1);
1051  Record.push_back(result);
1052 
1053  Record.AddStmt(E->getSyntacticForm());
1055  i = E->semantics_begin(), e = E->semantics_end(); i != e; ++i) {
1056  Record.AddStmt(*i);
1057  }
1059 }
1060 
1061 void ASTStmtWriter::VisitAtomicExpr(AtomicExpr *E) {
1062  VisitExpr(E);
1063  Record.push_back(E->getOp());
1064  for (unsigned I = 0, N = E->getNumSubExprs(); I != N; ++I)
1065  Record.AddStmt(E->getSubExprs()[I]);
1066  Record.AddSourceLocation(E->getBuiltinLoc());
1067  Record.AddSourceLocation(E->getRParenLoc());
1069 }
1070 
1071 //===----------------------------------------------------------------------===//
1072 // Objective-C Expressions and Statements.
1073 //===----------------------------------------------------------------------===//
1074 
1075 void ASTStmtWriter::VisitObjCStringLiteral(ObjCStringLiteral *E) {
1076  VisitExpr(E);
1077  Record.AddStmt(E->getString());
1078  Record.AddSourceLocation(E->getAtLoc());
1080 }
1081 
1082 void ASTStmtWriter::VisitObjCBoxedExpr(ObjCBoxedExpr *E) {
1083  VisitExpr(E);
1084  Record.AddStmt(E->getSubExpr());
1085  Record.AddDeclRef(E->getBoxingMethod());
1086  Record.AddSourceRange(E->getSourceRange());
1088 }
1089 
1090 void ASTStmtWriter::VisitObjCArrayLiteral(ObjCArrayLiteral *E) {
1091  VisitExpr(E);
1092  Record.push_back(E->getNumElements());
1093  for (unsigned i = 0; i < E->getNumElements(); i++)
1094  Record.AddStmt(E->getElement(i));
1096  Record.AddSourceRange(E->getSourceRange());
1098 }
1099 
1100 void ASTStmtWriter::VisitObjCDictionaryLiteral(ObjCDictionaryLiteral *E) {
1101  VisitExpr(E);
1102  Record.push_back(E->getNumElements());
1103  Record.push_back(E->HasPackExpansions);
1104  for (unsigned i = 0; i < E->getNumElements(); i++) {
1105  ObjCDictionaryElement Element = E->getKeyValueElement(i);
1106  Record.AddStmt(Element.Key);
1107  Record.AddStmt(Element.Value);
1108  if (E->HasPackExpansions) {
1109  Record.AddSourceLocation(Element.EllipsisLoc);
1110  unsigned NumExpansions = 0;
1111  if (Element.NumExpansions)
1112  NumExpansions = *Element.NumExpansions + 1;
1113  Record.push_back(NumExpansions);
1114  }
1115  }
1116 
1117  Record.AddDeclRef(E->getDictWithObjectsMethod());
1118  Record.AddSourceRange(E->getSourceRange());
1120 }
1121 
1122 void ASTStmtWriter::VisitObjCEncodeExpr(ObjCEncodeExpr *E) {
1123  VisitExpr(E);
1125  Record.AddSourceLocation(E->getAtLoc());
1126  Record.AddSourceLocation(E->getRParenLoc());
1128 }
1129 
1130 void ASTStmtWriter::VisitObjCSelectorExpr(ObjCSelectorExpr *E) {
1131  VisitExpr(E);
1132  Record.AddSelectorRef(E->getSelector());
1133  Record.AddSourceLocation(E->getAtLoc());
1134  Record.AddSourceLocation(E->getRParenLoc());
1136 }
1137 
1138 void ASTStmtWriter::VisitObjCProtocolExpr(ObjCProtocolExpr *E) {
1139  VisitExpr(E);
1140  Record.AddDeclRef(E->getProtocol());
1141  Record.AddSourceLocation(E->getAtLoc());
1142  Record.AddSourceLocation(E->ProtoLoc);
1143  Record.AddSourceLocation(E->getRParenLoc());
1145 }
1146 
1147 void ASTStmtWriter::VisitObjCIvarRefExpr(ObjCIvarRefExpr *E) {
1148  VisitExpr(E);
1149  Record.AddDeclRef(E->getDecl());
1150  Record.AddSourceLocation(E->getLocation());
1151  Record.AddSourceLocation(E->getOpLoc());
1152  Record.AddStmt(E->getBase());
1153  Record.push_back(E->isArrow());
1154  Record.push_back(E->isFreeIvar());
1156 }
1157 
1158 void ASTStmtWriter::VisitObjCPropertyRefExpr(ObjCPropertyRefExpr *E) {
1159  VisitExpr(E);
1160  Record.push_back(E->SetterAndMethodRefFlags.getInt());
1161  Record.push_back(E->isImplicitProperty());
1162  if (E->isImplicitProperty()) {
1165  } else {
1166  Record.AddDeclRef(E->getExplicitProperty());
1167  }
1168  Record.AddSourceLocation(E->getLocation());
1170  if (E->isObjectReceiver()) {
1171  Record.push_back(0);
1172  Record.AddStmt(E->getBase());
1173  } else if (E->isSuperReceiver()) {
1174  Record.push_back(1);
1175  Record.AddTypeRef(E->getSuperReceiverType());
1176  } else {
1177  Record.push_back(2);
1178  Record.AddDeclRef(E->getClassReceiver());
1179  }
1180 
1182 }
1183 
1184 void ASTStmtWriter::VisitObjCSubscriptRefExpr(ObjCSubscriptRefExpr *E) {
1185  VisitExpr(E);
1186  Record.AddSourceLocation(E->getRBracket());
1187  Record.AddStmt(E->getBaseExpr());
1188  Record.AddStmt(E->getKeyExpr());
1189  Record.AddDeclRef(E->getAtIndexMethodDecl());
1190  Record.AddDeclRef(E->setAtIndexMethodDecl());
1191 
1193 }
1194 
1195 void ASTStmtWriter::VisitObjCMessageExpr(ObjCMessageExpr *E) {
1196  VisitExpr(E);
1197  Record.push_back(E->getNumArgs());
1198  Record.push_back(E->getNumStoredSelLocs());
1199  Record.push_back(E->SelLocsKind);
1200  Record.push_back(E->isDelegateInitCall());
1201  Record.push_back(E->IsImplicit);
1202  Record.push_back((unsigned)E->getReceiverKind()); // FIXME: stable encoding
1203  switch (E->getReceiverKind()) {
1205  Record.AddStmt(E->getInstanceReceiver());
1206  break;
1207 
1210  break;
1211 
1214  Record.AddTypeRef(E->getSuperType());
1215  Record.AddSourceLocation(E->getSuperLoc());
1216  break;
1217  }
1218 
1219  if (E->getMethodDecl()) {
1220  Record.push_back(1);
1221  Record.AddDeclRef(E->getMethodDecl());
1222  } else {
1223  Record.push_back(0);
1224  Record.AddSelectorRef(E->getSelector());
1225  }
1226 
1227  Record.AddSourceLocation(E->getLeftLoc());
1228  Record.AddSourceLocation(E->getRightLoc());
1229 
1230  for (CallExpr::arg_iterator Arg = E->arg_begin(), ArgEnd = E->arg_end();
1231  Arg != ArgEnd; ++Arg)
1232  Record.AddStmt(*Arg);
1233 
1234  SourceLocation *Locs = E->getStoredSelLocs();
1235  for (unsigned i = 0, e = E->getNumStoredSelLocs(); i != e; ++i)
1236  Record.AddSourceLocation(Locs[i]);
1237 
1239 }
1240 
1241 void ASTStmtWriter::VisitObjCForCollectionStmt(ObjCForCollectionStmt *S) {
1242  VisitStmt(S);
1243  Record.AddStmt(S->getElement());
1244  Record.AddStmt(S->getCollection());
1245  Record.AddStmt(S->getBody());
1246  Record.AddSourceLocation(S->getForLoc());
1247  Record.AddSourceLocation(S->getRParenLoc());
1249 }
1250 
1251 void ASTStmtWriter::VisitObjCAtCatchStmt(ObjCAtCatchStmt *S) {
1252  VisitStmt(S);
1253  Record.AddStmt(S->getCatchBody());
1254  Record.AddDeclRef(S->getCatchParamDecl());
1255  Record.AddSourceLocation(S->getAtCatchLoc());
1256  Record.AddSourceLocation(S->getRParenLoc());
1258 }
1259 
1260 void ASTStmtWriter::VisitObjCAtFinallyStmt(ObjCAtFinallyStmt *S) {
1261  VisitStmt(S);
1262  Record.AddStmt(S->getFinallyBody());
1263  Record.AddSourceLocation(S->getAtFinallyLoc());
1265 }
1266 
1267 void ASTStmtWriter::VisitObjCAutoreleasePoolStmt(ObjCAutoreleasePoolStmt *S) {
1268  VisitStmt(S); // FIXME: no test coverage.
1269  Record.AddStmt(S->getSubStmt());
1270  Record.AddSourceLocation(S->getAtLoc());
1272 }
1273 
1274 void ASTStmtWriter::VisitObjCAtTryStmt(ObjCAtTryStmt *S) {
1275  VisitStmt(S);
1276  Record.push_back(S->getNumCatchStmts());
1277  Record.push_back(S->getFinallyStmt() != nullptr);
1278  Record.AddStmt(S->getTryBody());
1279  for (unsigned I = 0, N = S->getNumCatchStmts(); I != N; ++I)
1280  Record.AddStmt(S->getCatchStmt(I));
1281  if (S->getFinallyStmt())
1282  Record.AddStmt(S->getFinallyStmt());
1283  Record.AddSourceLocation(S->getAtTryLoc());
1285 }
1286 
1287 void ASTStmtWriter::VisitObjCAtSynchronizedStmt(ObjCAtSynchronizedStmt *S) {
1288  VisitStmt(S); // FIXME: no test coverage.
1289  Record.AddStmt(S->getSynchExpr());
1290  Record.AddStmt(S->getSynchBody());
1293 }
1294 
1295 void ASTStmtWriter::VisitObjCAtThrowStmt(ObjCAtThrowStmt *S) {
1296  VisitStmt(S); // FIXME: no test coverage.
1297  Record.AddStmt(S->getThrowExpr());
1298  Record.AddSourceLocation(S->getThrowLoc());
1300 }
1301 
1302 void ASTStmtWriter::VisitObjCBoolLiteralExpr(ObjCBoolLiteralExpr *E) {
1303  VisitExpr(E);
1304  Record.push_back(E->getValue());
1305  Record.AddSourceLocation(E->getLocation());
1307 }
1308 
1309 void ASTStmtWriter::VisitObjCAvailabilityCheckExpr(ObjCAvailabilityCheckExpr *E) {
1310  VisitExpr(E);
1311  Record.AddSourceRange(E->getSourceRange());
1312  Record.AddVersionTuple(E->getVersion());
1314 }
1315 
1316 //===----------------------------------------------------------------------===//
1317 // C++ Expressions and Statements.
1318 //===----------------------------------------------------------------------===//
1319 
1320 void ASTStmtWriter::VisitCXXCatchStmt(CXXCatchStmt *S) {
1321  VisitStmt(S);
1322  Record.AddSourceLocation(S->getCatchLoc());
1323  Record.AddDeclRef(S->getExceptionDecl());
1324  Record.AddStmt(S->getHandlerBlock());
1326 }
1327 
1328 void ASTStmtWriter::VisitCXXTryStmt(CXXTryStmt *S) {
1329  VisitStmt(S);
1330  Record.push_back(S->getNumHandlers());
1331  Record.AddSourceLocation(S->getTryLoc());
1332  Record.AddStmt(S->getTryBlock());
1333  for (unsigned i = 0, e = S->getNumHandlers(); i != e; ++i)
1334  Record.AddStmt(S->getHandler(i));
1336 }
1337 
1338 void ASTStmtWriter::VisitCXXForRangeStmt(CXXForRangeStmt *S) {
1339  VisitStmt(S);
1340  Record.AddSourceLocation(S->getForLoc());
1341  Record.AddSourceLocation(S->getCoawaitLoc());
1342  Record.AddSourceLocation(S->getColonLoc());
1343  Record.AddSourceLocation(S->getRParenLoc());
1344  Record.AddStmt(S->getInit());
1345  Record.AddStmt(S->getRangeStmt());
1346  Record.AddStmt(S->getBeginStmt());
1347  Record.AddStmt(S->getEndStmt());
1348  Record.AddStmt(S->getCond());
1349  Record.AddStmt(S->getInc());
1350  Record.AddStmt(S->getLoopVarStmt());
1351  Record.AddStmt(S->getBody());
1353 }
1354 
1355 void ASTStmtWriter::VisitMSDependentExistsStmt(MSDependentExistsStmt *S) {
1356  VisitStmt(S);
1357  Record.AddSourceLocation(S->getKeywordLoc());
1358  Record.push_back(S->isIfExists());
1360  Record.AddDeclarationNameInfo(S->getNameInfo());
1361  Record.AddStmt(S->getSubStmt());
1363 }
1364 
1365 void ASTStmtWriter::VisitCXXOperatorCallExpr(CXXOperatorCallExpr *E) {
1366  VisitCallExpr(E);
1367  Record.push_back(E->getOperator());
1368  Record.push_back(E->getFPFeatures().getInt());
1369  Record.AddSourceRange(E->Range);
1371 }
1372 
1373 void ASTStmtWriter::VisitCXXMemberCallExpr(CXXMemberCallExpr *E) {
1374  VisitCallExpr(E);
1376 }
1377 
1378 void ASTStmtWriter::VisitCXXRewrittenBinaryOperator(
1380  VisitExpr(E);
1381  Record.push_back(E->isReversed());
1382  Record.AddStmt(E->getSemanticForm());
1384 }
1385 
1386 void ASTStmtWriter::VisitCXXConstructExpr(CXXConstructExpr *E) {
1387  VisitExpr(E);
1388 
1389  Record.push_back(E->getNumArgs());
1390  Record.push_back(E->isElidable());
1391  Record.push_back(E->hadMultipleCandidates());
1392  Record.push_back(E->isListInitialization());
1395  Record.push_back(E->getConstructionKind()); // FIXME: stable encoding
1396  Record.AddSourceLocation(E->getLocation());
1397  Record.AddDeclRef(E->getConstructor());
1398  Record.AddSourceRange(E->getParenOrBraceRange());
1399 
1400  for (unsigned I = 0, N = E->getNumArgs(); I != N; ++I)
1401  Record.AddStmt(E->getArg(I));
1402 
1404 }
1405 
1406 void ASTStmtWriter::VisitCXXInheritedCtorInitExpr(CXXInheritedCtorInitExpr *E) {
1407  VisitExpr(E);
1408  Record.AddDeclRef(E->getConstructor());
1409  Record.AddSourceLocation(E->getLocation());
1410  Record.push_back(E->constructsVBase());
1411  Record.push_back(E->inheritedFromVBase());
1413 }
1414 
1415 void ASTStmtWriter::VisitCXXTemporaryObjectExpr(CXXTemporaryObjectExpr *E) {
1416  VisitCXXConstructExpr(E);
1417  Record.AddTypeSourceInfo(E->getTypeSourceInfo());
1419 }
1420 
1421 void ASTStmtWriter::VisitLambdaExpr(LambdaExpr *E) {
1422  VisitExpr(E);
1423  Record.push_back(E->NumCaptures);
1424  Record.AddSourceRange(E->IntroducerRange);
1425  Record.push_back(E->CaptureDefault); // FIXME: stable encoding
1426  Record.AddSourceLocation(E->CaptureDefaultLoc);
1427  Record.push_back(E->ExplicitParams);
1428  Record.push_back(E->ExplicitResultType);
1429  Record.AddSourceLocation(E->ClosingBrace);
1430 
1431  // Add capture initializers.
1433  CEnd = E->capture_init_end();
1434  C != CEnd; ++C) {
1435  Record.AddStmt(*C);
1436  }
1437 
1439 }
1440 
1441 void ASTStmtWriter::VisitCXXStdInitializerListExpr(CXXStdInitializerListExpr *E) {
1442  VisitExpr(E);
1443  Record.AddStmt(E->getSubExpr());
1445 }
1446 
1447 void ASTStmtWriter::VisitCXXNamedCastExpr(CXXNamedCastExpr *E) {
1448  VisitExplicitCastExpr(E);
1450  Record.AddSourceRange(E->getAngleBrackets());
1451 }
1452 
1453 void ASTStmtWriter::VisitCXXStaticCastExpr(CXXStaticCastExpr *E) {
1454  VisitCXXNamedCastExpr(E);
1456 }
1457 
1458 void ASTStmtWriter::VisitCXXDynamicCastExpr(CXXDynamicCastExpr *E) {
1459  VisitCXXNamedCastExpr(E);
1461 }
1462 
1463 void ASTStmtWriter::VisitCXXReinterpretCastExpr(CXXReinterpretCastExpr *E) {
1464  VisitCXXNamedCastExpr(E);
1466 }
1467 
1468 void ASTStmtWriter::VisitCXXConstCastExpr(CXXConstCastExpr *E) {
1469  VisitCXXNamedCastExpr(E);
1471 }
1472 
1473 void ASTStmtWriter::VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr *E) {
1474  VisitExplicitCastExpr(E);
1475  Record.AddSourceLocation(E->getLParenLoc());
1476  Record.AddSourceLocation(E->getRParenLoc());
1478 }
1479 
1480 void ASTStmtWriter::VisitBuiltinBitCastExpr(BuiltinBitCastExpr *E) {
1481  VisitExplicitCastExpr(E);
1482  Record.AddSourceLocation(E->getBeginLoc());
1483  Record.AddSourceLocation(E->getEndLoc());
1484 }
1485 
1486 void ASTStmtWriter::VisitUserDefinedLiteral(UserDefinedLiteral *E) {
1487  VisitCallExpr(E);
1488  Record.AddSourceLocation(E->UDSuffixLoc);
1490 }
1491 
1492 void ASTStmtWriter::VisitCXXBoolLiteralExpr(CXXBoolLiteralExpr *E) {
1493  VisitExpr(E);
1494  Record.push_back(E->getValue());
1495  Record.AddSourceLocation(E->getLocation());
1497 }
1498 
1499 void ASTStmtWriter::VisitCXXNullPtrLiteralExpr(CXXNullPtrLiteralExpr *E) {
1500  VisitExpr(E);
1501  Record.AddSourceLocation(E->getLocation());
1503 }
1504 
1505 void ASTStmtWriter::VisitCXXTypeidExpr(CXXTypeidExpr *E) {
1506  VisitExpr(E);
1507  Record.AddSourceRange(E->getSourceRange());
1508  if (E->isTypeOperand()) {
1511  } else {
1512  Record.AddStmt(E->getExprOperand());
1514  }
1515 }
1516 
1517 void ASTStmtWriter::VisitCXXThisExpr(CXXThisExpr *E) {
1518  VisitExpr(E);
1519  Record.AddSourceLocation(E->getLocation());
1520  Record.push_back(E->isImplicit());
1522 }
1523 
1524 void ASTStmtWriter::VisitCXXThrowExpr(CXXThrowExpr *E) {
1525  VisitExpr(E);
1526  Record.AddSourceLocation(E->getThrowLoc());
1527  Record.AddStmt(E->getSubExpr());
1528  Record.push_back(E->isThrownVariableInScope());
1530 }
1531 
1532 void ASTStmtWriter::VisitCXXDefaultArgExpr(CXXDefaultArgExpr *E) {
1533  VisitExpr(E);
1534  Record.AddDeclRef(E->getParam());
1535  Record.AddDeclRef(cast_or_null<Decl>(E->getUsedContext()));
1536  Record.AddSourceLocation(E->getUsedLocation());
1538 }
1539 
1540 void ASTStmtWriter::VisitCXXDefaultInitExpr(CXXDefaultInitExpr *E) {
1541  VisitExpr(E);
1542  Record.AddDeclRef(E->getField());
1543  Record.AddDeclRef(cast_or_null<Decl>(E->getUsedContext()));
1544  Record.AddSourceLocation(E->getExprLoc());
1546 }
1547 
1548 void ASTStmtWriter::VisitCXXBindTemporaryExpr(CXXBindTemporaryExpr *E) {
1549  VisitExpr(E);
1550  Record.AddCXXTemporary(E->getTemporary());
1551  Record.AddStmt(E->getSubExpr());
1553 }
1554 
1555 void ASTStmtWriter::VisitCXXScalarValueInitExpr(CXXScalarValueInitExpr *E) {
1556  VisitExpr(E);
1557  Record.AddTypeSourceInfo(E->getTypeSourceInfo());
1558  Record.AddSourceLocation(E->getRParenLoc());
1560 }
1561 
1562 void ASTStmtWriter::VisitCXXNewExpr(CXXNewExpr *E) {
1563  VisitExpr(E);
1564 
1565  Record.push_back(E->isArray());
1566  Record.push_back(E->hasInitializer());
1567  Record.push_back(E->getNumPlacementArgs());
1568  Record.push_back(E->isParenTypeId());
1569 
1570  Record.push_back(E->isGlobalNew());
1571  Record.push_back(E->passAlignment());
1573  Record.push_back(E->CXXNewExprBits.StoredInitializationStyle);
1574 
1575  Record.AddDeclRef(E->getOperatorNew());
1576  Record.AddDeclRef(E->getOperatorDelete());
1578  if (E->isParenTypeId())
1579  Record.AddSourceRange(E->getTypeIdParens());
1580  Record.AddSourceRange(E->getSourceRange());
1581  Record.AddSourceRange(E->getDirectInitRange());
1582 
1583  for (CXXNewExpr::arg_iterator I = E->raw_arg_begin(), N = E->raw_arg_end();
1584  I != N; ++I)
1585  Record.AddStmt(*I);
1586 
1588 }
1589 
1590 void ASTStmtWriter::VisitCXXDeleteExpr(CXXDeleteExpr *E) {
1591  VisitExpr(E);
1592  Record.push_back(E->isGlobalDelete());
1593  Record.push_back(E->isArrayForm());
1594  Record.push_back(E->isArrayFormAsWritten());
1596  Record.AddDeclRef(E->getOperatorDelete());
1597  Record.AddStmt(E->getArgument());
1598  Record.AddSourceLocation(E->getBeginLoc());
1599 
1601 }
1602 
1603 void ASTStmtWriter::VisitCXXPseudoDestructorExpr(CXXPseudoDestructorExpr *E) {
1604  VisitExpr(E);
1605 
1606  Record.AddStmt(E->getBase());
1607  Record.push_back(E->isArrow());
1608  Record.AddSourceLocation(E->getOperatorLoc());
1610  Record.AddTypeSourceInfo(E->getScopeTypeInfo());
1611  Record.AddSourceLocation(E->getColonColonLoc());
1612  Record.AddSourceLocation(E->getTildeLoc());
1613 
1614  // PseudoDestructorTypeStorage.
1616  if (E->getDestroyedTypeIdentifier())
1618  else
1620 
1622 }
1623 
1624 void ASTStmtWriter::VisitExprWithCleanups(ExprWithCleanups *E) {
1625  VisitExpr(E);
1626  Record.push_back(E->getNumObjects());
1627  for (unsigned i = 0, e = E->getNumObjects(); i != e; ++i)
1628  Record.AddDeclRef(E->getObject(i));
1629 
1630  Record.push_back(E->cleanupsHaveSideEffects());
1631  Record.AddStmt(E->getSubExpr());
1633 }
1634 
1635 void ASTStmtWriter::VisitCXXDependentScopeMemberExpr(
1637  VisitExpr(E);
1638 
1639  // Don't emit anything here (or if you do you will have to update
1640  // the corresponding deserialization function).
1641 
1642  Record.push_back(E->hasTemplateKWAndArgsInfo());
1643  Record.push_back(E->getNumTemplateArgs());
1644  Record.push_back(E->hasFirstQualifierFoundInScope());
1645 
1646  if (E->hasTemplateKWAndArgsInfo()) {
1647  const ASTTemplateKWAndArgsInfo &ArgInfo =
1648  *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>();
1649  AddTemplateKWAndArgsInfo(ArgInfo,
1650  E->getTrailingObjects<TemplateArgumentLoc>());
1651  }
1652 
1653  Record.push_back(E->isArrow());
1654  Record.AddSourceLocation(E->getOperatorLoc());
1655  Record.AddTypeRef(E->getBaseType());
1657  if (!E->isImplicitAccess())
1658  Record.AddStmt(E->getBase());
1659  else
1660  Record.AddStmt(nullptr);
1661 
1662  if (E->hasFirstQualifierFoundInScope())
1664 
1665  Record.AddDeclarationNameInfo(E->MemberNameInfo);
1667 }
1668 
1669 void
1670 ASTStmtWriter::VisitDependentScopeDeclRefExpr(DependentScopeDeclRefExpr *E) {
1671  VisitExpr(E);
1672 
1673  // Don't emit anything here, HasTemplateKWAndArgsInfo must be
1674  // emitted first.
1675 
1676  Record.push_back(E->DependentScopeDeclRefExprBits.HasTemplateKWAndArgsInfo);
1677  if (E->DependentScopeDeclRefExprBits.HasTemplateKWAndArgsInfo) {
1678  const ASTTemplateKWAndArgsInfo &ArgInfo =
1679  *E->getTrailingObjects<ASTTemplateKWAndArgsInfo>();
1680  Record.push_back(ArgInfo.NumTemplateArgs);
1681  AddTemplateKWAndArgsInfo(ArgInfo,
1682  E->getTrailingObjects<TemplateArgumentLoc>());
1683  }
1684 
1686  Record.AddDeclarationNameInfo(E->NameInfo);
1688 }
1689 
1690 void
1691 ASTStmtWriter::VisitCXXUnresolvedConstructExpr(CXXUnresolvedConstructExpr *E) {
1692  VisitExpr(E);
1693  Record.push_back(E->arg_size());
1695  ArgI = E->arg_begin(), ArgE = E->arg_end(); ArgI != ArgE; ++ArgI)
1696  Record.AddStmt(*ArgI);
1697  Record.AddTypeSourceInfo(E->getTypeSourceInfo());
1698  Record.AddSourceLocation(E->getLParenLoc());
1699  Record.AddSourceLocation(E->getRParenLoc());
1701 }
1702 
1703 void ASTStmtWriter::VisitOverloadExpr(OverloadExpr *E) {
1704  VisitExpr(E);
1705 
1706  Record.push_back(E->getNumDecls());
1707  Record.push_back(E->hasTemplateKWAndArgsInfo());
1708  if (E->hasTemplateKWAndArgsInfo()) {
1709  const ASTTemplateKWAndArgsInfo &ArgInfo =
1711  Record.push_back(ArgInfo.NumTemplateArgs);
1713  }
1714 
1715  for (OverloadExpr::decls_iterator OvI = E->decls_begin(),
1716  OvE = E->decls_end();
1717  OvI != OvE; ++OvI) {
1718  Record.AddDeclRef(OvI.getDecl());
1719  Record.push_back(OvI.getAccess());
1720  }
1721 
1722  Record.AddDeclarationNameInfo(E->getNameInfo());
1724 }
1725 
1726 void ASTStmtWriter::VisitUnresolvedMemberExpr(UnresolvedMemberExpr *E) {
1727  VisitOverloadExpr(E);
1728  Record.push_back(E->isArrow());
1729  Record.push_back(E->hasUnresolvedUsing());
1730  Record.AddStmt(!E->isImplicitAccess() ? E->getBase() : nullptr);
1731  Record.AddTypeRef(E->getBaseType());
1732  Record.AddSourceLocation(E->getOperatorLoc());
1734 }
1735 
1736 void ASTStmtWriter::VisitUnresolvedLookupExpr(UnresolvedLookupExpr *E) {
1737  VisitOverloadExpr(E);
1738  Record.push_back(E->requiresADL());
1739  Record.push_back(E->isOverloaded());
1740  Record.AddDeclRef(E->getNamingClass());
1742 }
1743 
1744 void ASTStmtWriter::VisitTypeTraitExpr(TypeTraitExpr *E) {
1745  VisitExpr(E);
1746  Record.push_back(E->TypeTraitExprBits.NumArgs);
1747  Record.push_back(E->TypeTraitExprBits.Kind); // FIXME: Stable encoding
1748  Record.push_back(E->TypeTraitExprBits.Value);
1749  Record.AddSourceRange(E->getSourceRange());
1750  for (unsigned I = 0, N = E->getNumArgs(); I != N; ++I)
1751  Record.AddTypeSourceInfo(E->getArg(I));
1753 }
1754 
1755 void ASTStmtWriter::VisitArrayTypeTraitExpr(ArrayTypeTraitExpr *E) {
1756  VisitExpr(E);
1757  Record.push_back(E->getTrait());
1758  Record.push_back(E->getValue());
1759  Record.AddSourceRange(E->getSourceRange());
1761  Record.AddStmt(E->getDimensionExpression());
1763 }
1764 
1765 void ASTStmtWriter::VisitExpressionTraitExpr(ExpressionTraitExpr *E) {
1766  VisitExpr(E);
1767  Record.push_back(E->getTrait());
1768  Record.push_back(E->getValue());
1769  Record.AddSourceRange(E->getSourceRange());
1770  Record.AddStmt(E->getQueriedExpression());
1772 }
1773 
1774 void ASTStmtWriter::VisitCXXNoexceptExpr(CXXNoexceptExpr *E) {
1775  VisitExpr(E);
1776  Record.push_back(E->getValue());
1777  Record.AddSourceRange(E->getSourceRange());
1778  Record.AddStmt(E->getOperand());
1780 }
1781 
1782 void ASTStmtWriter::VisitPackExpansionExpr(PackExpansionExpr *E) {
1783  VisitExpr(E);
1784  Record.AddSourceLocation(E->getEllipsisLoc());
1785  Record.push_back(E->NumExpansions);
1786  Record.AddStmt(E->getPattern());
1788 }
1789 
1790 void ASTStmtWriter::VisitSizeOfPackExpr(SizeOfPackExpr *E) {
1791  VisitExpr(E);
1792  Record.push_back(E->isPartiallySubstituted() ? E->getPartialArguments().size()
1793  : 0);
1794  Record.AddSourceLocation(E->OperatorLoc);
1795  Record.AddSourceLocation(E->PackLoc);
1796  Record.AddSourceLocation(E->RParenLoc);
1797  Record.AddDeclRef(E->Pack);
1798  if (E->isPartiallySubstituted()) {
1799  for (const auto &TA : E->getPartialArguments())
1800  Record.AddTemplateArgument(TA);
1801  } else if (!E->isValueDependent()) {
1802  Record.push_back(E->getPackLength());
1803  }
1805 }
1806 
1807 void ASTStmtWriter::VisitSubstNonTypeTemplateParmExpr(
1809  VisitExpr(E);
1810  Record.AddDeclRef(E->getParameter());
1811  Record.AddSourceLocation(E->getNameLoc());
1812  Record.AddStmt(E->getReplacement());
1814 }
1815 
1816 void ASTStmtWriter::VisitSubstNonTypeTemplateParmPackExpr(
1818  VisitExpr(E);
1819  Record.AddDeclRef(E->getParameterPack());
1820  Record.AddTemplateArgument(E->getArgumentPack());
1823 }
1824 
1825 void ASTStmtWriter::VisitFunctionParmPackExpr(FunctionParmPackExpr *E) {
1826  VisitExpr(E);
1827  Record.push_back(E->getNumExpansions());
1828  Record.AddDeclRef(E->getParameterPack());
1830  for (FunctionParmPackExpr::iterator I = E->begin(), End = E->end();
1831  I != End; ++I)
1832  Record.AddDeclRef(*I);
1834 }
1835 
1836 void ASTStmtWriter::VisitMaterializeTemporaryExpr(MaterializeTemporaryExpr *E) {
1837  VisitExpr(E);
1838  Record.AddStmt(E->getTemporary());
1839  Record.AddDeclRef(E->getExtendingDecl());
1840  Record.push_back(E->getManglingNumber());
1842 }
1843 
1844 void ASTStmtWriter::VisitCXXFoldExpr(CXXFoldExpr *E) {
1845  VisitExpr(E);
1846  Record.AddSourceLocation(E->LParenLoc);
1847  Record.AddSourceLocation(E->EllipsisLoc);
1848  Record.AddSourceLocation(E->RParenLoc);
1849  Record.push_back(E->NumExpansions);
1850  Record.AddStmt(E->SubExprs[0]);
1851  Record.AddStmt(E->SubExprs[1]);
1852  Record.push_back(E->Opcode);
1854 }
1855 
1856 void ASTStmtWriter::VisitOpaqueValueExpr(OpaqueValueExpr *E) {
1857  VisitExpr(E);
1858  Record.AddStmt(E->getSourceExpr());
1859  Record.AddSourceLocation(E->getLocation());
1860  Record.push_back(E->isUnique());
1862 }
1863 
1864 void ASTStmtWriter::VisitTypoExpr(TypoExpr *E) {
1865  VisitExpr(E);
1866  // TODO: Figure out sane writer behavior for a TypoExpr, if necessary
1867  llvm_unreachable("Cannot write TypoExpr nodes");
1868 }
1869 
1870 //===----------------------------------------------------------------------===//
1871 // CUDA Expressions and Statements.
1872 //===----------------------------------------------------------------------===//
1873 
1874 void ASTStmtWriter::VisitCUDAKernelCallExpr(CUDAKernelCallExpr *E) {
1875  VisitCallExpr(E);
1876  Record.AddStmt(E->getConfig());
1878 }
1879 
1880 //===----------------------------------------------------------------------===//
1881 // OpenCL Expressions and Statements.
1882 //===----------------------------------------------------------------------===//
1883 void ASTStmtWriter::VisitAsTypeExpr(AsTypeExpr *E) {
1884  VisitExpr(E);
1885  Record.AddSourceLocation(E->getBuiltinLoc());
1886  Record.AddSourceLocation(E->getRParenLoc());
1887  Record.AddStmt(E->getSrcExpr());
1889 }
1890 
1891 //===----------------------------------------------------------------------===//
1892 // Microsoft Expressions and Statements.
1893 //===----------------------------------------------------------------------===//
1894 void ASTStmtWriter::VisitMSPropertyRefExpr(MSPropertyRefExpr *E) {
1895  VisitExpr(E);
1896  Record.push_back(E->isArrow());
1897  Record.AddStmt(E->getBaseExpr());
1899  Record.AddSourceLocation(E->getMemberLoc());
1900  Record.AddDeclRef(E->getPropertyDecl());
1902 }
1903 
1904 void ASTStmtWriter::VisitMSPropertySubscriptExpr(MSPropertySubscriptExpr *E) {
1905  VisitExpr(E);
1906  Record.AddStmt(E->getBase());
1907  Record.AddStmt(E->getIdx());
1908  Record.AddSourceLocation(E->getRBracketLoc());
1910 }
1911 
1912 void ASTStmtWriter::VisitCXXUuidofExpr(CXXUuidofExpr *E) {
1913  VisitExpr(E);
1914  Record.AddSourceRange(E->getSourceRange());
1915  Record.AddString(E->getUuidStr());
1916  if (E->isTypeOperand()) {
1919  } else {
1920  Record.AddStmt(E->getExprOperand());
1922  }
1923 }
1924 
1925 void ASTStmtWriter::VisitSEHExceptStmt(SEHExceptStmt *S) {
1926  VisitStmt(S);
1927  Record.AddSourceLocation(S->getExceptLoc());
1928  Record.AddStmt(S->getFilterExpr());
1929  Record.AddStmt(S->getBlock());
1931 }
1932 
1933 void ASTStmtWriter::VisitSEHFinallyStmt(SEHFinallyStmt *S) {
1934  VisitStmt(S);
1935  Record.AddSourceLocation(S->getFinallyLoc());
1936  Record.AddStmt(S->getBlock());
1938 }
1939 
1940 void ASTStmtWriter::VisitSEHTryStmt(SEHTryStmt *S) {
1941  VisitStmt(S);
1942  Record.push_back(S->getIsCXXTry());
1943  Record.AddSourceLocation(S->getTryLoc());
1944  Record.AddStmt(S->getTryBlock());
1945  Record.AddStmt(S->getHandler());
1947 }
1948 
1949 void ASTStmtWriter::VisitSEHLeaveStmt(SEHLeaveStmt *S) {
1950  VisitStmt(S);
1951  Record.AddSourceLocation(S->getLeaveLoc());
1953 }
1954 
1955 //===----------------------------------------------------------------------===//
1956 // OpenMP Directives.
1957 //===----------------------------------------------------------------------===//
1958 void ASTStmtWriter::VisitOMPExecutableDirective(OMPExecutableDirective *E) {
1959  Record.AddSourceLocation(E->getBeginLoc());
1960  Record.AddSourceLocation(E->getEndLoc());
1961  OMPClauseWriter ClauseWriter(Record);
1962  for (unsigned i = 0; i < E->getNumClauses(); ++i) {
1963  ClauseWriter.writeClause(E->getClause(i));
1964  }
1965  if (E->hasAssociatedStmt())
1966  Record.AddStmt(E->getAssociatedStmt());
1967 }
1968 
1969 void ASTStmtWriter::VisitOMPLoopDirective(OMPLoopDirective *D) {
1970  VisitStmt(D);
1971  Record.push_back(D->getNumClauses());
1972  Record.push_back(D->getCollapsedNumber());
1973  VisitOMPExecutableDirective(D);
1974  Record.AddStmt(D->getIterationVariable());
1975  Record.AddStmt(D->getLastIteration());
1976  Record.AddStmt(D->getCalcLastIteration());
1977  Record.AddStmt(D->getPreCond());
1978  Record.AddStmt(D->getCond());
1979  Record.AddStmt(D->getInit());
1980  Record.AddStmt(D->getInc());
1981  Record.AddStmt(D->getPreInits());
1985  Record.AddStmt(D->getIsLastIterVariable());
1986  Record.AddStmt(D->getLowerBoundVariable());
1987  Record.AddStmt(D->getUpperBoundVariable());
1988  Record.AddStmt(D->getStrideVariable());
1989  Record.AddStmt(D->getEnsureUpperBound());
1990  Record.AddStmt(D->getNextLowerBound());
1991  Record.AddStmt(D->getNextUpperBound());
1992  Record.AddStmt(D->getNumIterations());
1993  }
1995  Record.AddStmt(D->getPrevLowerBoundVariable());
1996  Record.AddStmt(D->getPrevUpperBoundVariable());
1997  Record.AddStmt(D->getDistInc());
1998  Record.AddStmt(D->getPrevEnsureUpperBound());
2001  Record.AddStmt(D->getCombinedEnsureUpperBound());
2002  Record.AddStmt(D->getCombinedInit());
2003  Record.AddStmt(D->getCombinedCond());
2004  Record.AddStmt(D->getCombinedNextLowerBound());
2005  Record.AddStmt(D->getCombinedNextUpperBound());
2006  Record.AddStmt(D->getCombinedDistCond());
2007  Record.AddStmt(D->getCombinedParForInDistCond());
2008  }
2009  for (auto I : D->counters()) {
2010  Record.AddStmt(I);
2011  }
2012  for (auto I : D->private_counters()) {
2013  Record.AddStmt(I);
2014  }
2015  for (auto I : D->inits()) {
2016  Record.AddStmt(I);
2017  }
2018  for (auto I : D->updates()) {
2019  Record.AddStmt(I);
2020  }
2021  for (auto I : D->finals()) {
2022  Record.AddStmt(I);
2023  }
2024  for (Stmt *S : D->dependent_counters())
2025  Record.AddStmt(S);
2026  for (Stmt *S : D->dependent_inits())
2027  Record.AddStmt(S);
2028  for (Stmt *S : D->finals_conditions())
2029  Record.AddStmt(S);
2030 }
2031 
2032 void ASTStmtWriter::VisitOMPParallelDirective(OMPParallelDirective *D) {
2033  VisitStmt(D);
2034  Record.push_back(D->getNumClauses());
2035  VisitOMPExecutableDirective(D);
2036  Record.push_back(D->hasCancel() ? 1 : 0);
2038 }
2039 
2040 void ASTStmtWriter::VisitOMPSimdDirective(OMPSimdDirective *D) {
2041  VisitOMPLoopDirective(D);
2043 }
2044 
2045 void ASTStmtWriter::VisitOMPForDirective(OMPForDirective *D) {
2046  VisitOMPLoopDirective(D);
2047  Record.push_back(D->hasCancel() ? 1 : 0);
2049 }
2050 
2051 void ASTStmtWriter::VisitOMPForSimdDirective(OMPForSimdDirective *D) {
2052  VisitOMPLoopDirective(D);
2054 }
2055 
2056 void ASTStmtWriter::VisitOMPSectionsDirective(OMPSectionsDirective *D) {
2057  VisitStmt(D);
2058  Record.push_back(D->getNumClauses());
2059  VisitOMPExecutableDirective(D);
2060  Record.push_back(D->hasCancel() ? 1 : 0);
2062 }
2063 
2064 void ASTStmtWriter::VisitOMPSectionDirective(OMPSectionDirective *D) {
2065  VisitStmt(D);
2066  VisitOMPExecutableDirective(D);
2067  Record.push_back(D->hasCancel() ? 1 : 0);
2069 }
2070 
2071 void ASTStmtWriter::VisitOMPSingleDirective(OMPSingleDirective *D) {
2072  VisitStmt(D);
2073  Record.push_back(D->getNumClauses());
2074  VisitOMPExecutableDirective(D);
2076 }
2077 
2078 void ASTStmtWriter::VisitOMPMasterDirective(OMPMasterDirective *D) {
2079  VisitStmt(D);
2080  VisitOMPExecutableDirective(D);
2082 }
2083 
2084 void ASTStmtWriter::VisitOMPCriticalDirective(OMPCriticalDirective *D) {
2085  VisitStmt(D);
2086  Record.push_back(D->getNumClauses());
2087  VisitOMPExecutableDirective(D);
2090 }
2091 
2092 void ASTStmtWriter::VisitOMPParallelForDirective(OMPParallelForDirective *D) {
2093  VisitOMPLoopDirective(D);
2094  Record.push_back(D->hasCancel() ? 1 : 0);
2096 }
2097 
2098 void ASTStmtWriter::VisitOMPParallelForSimdDirective(
2100  VisitOMPLoopDirective(D);
2102 }
2103 
2104 void ASTStmtWriter::VisitOMPParallelSectionsDirective(
2106  VisitStmt(D);
2107  Record.push_back(D->getNumClauses());
2108  VisitOMPExecutableDirective(D);
2109  Record.push_back(D->hasCancel() ? 1 : 0);
2111 }
2112 
2113 void ASTStmtWriter::VisitOMPTaskDirective(OMPTaskDirective *D) {
2114  VisitStmt(D);
2115  Record.push_back(D->getNumClauses());
2116  VisitOMPExecutableDirective(D);
2117  Record.push_back(D->hasCancel() ? 1 : 0);
2119 }
2120 
2121 void ASTStmtWriter::VisitOMPAtomicDirective(OMPAtomicDirective *D) {
2122  VisitStmt(D);
2123  Record.push_back(D->getNumClauses());
2124  VisitOMPExecutableDirective(D);
2125  Record.AddStmt(D->getX());
2126  Record.AddStmt(D->getV());
2127  Record.AddStmt(D->getExpr());
2128  Record.AddStmt(D->getUpdateExpr());
2129  Record.push_back(D->isXLHSInRHSPart() ? 1 : 0);
2130  Record.push_back(D->isPostfixUpdate() ? 1 : 0);
2132 }
2133 
2134 void ASTStmtWriter::VisitOMPTargetDirective(OMPTargetDirective *D) {
2135  VisitStmt(D);
2136  Record.push_back(D->getNumClauses());
2137  VisitOMPExecutableDirective(D);
2139 }
2140 
2141 void ASTStmtWriter::VisitOMPTargetDataDirective(OMPTargetDataDirective *D) {
2142  VisitStmt(D);
2143  Record.push_back(D->getNumClauses());
2144  VisitOMPExecutableDirective(D);
2146 }
2147 
2148 void ASTStmtWriter::VisitOMPTargetEnterDataDirective(
2150  VisitStmt(D);
2151  Record.push_back(D->getNumClauses());
2152  VisitOMPExecutableDirective(D);
2154 }
2155 
2156 void ASTStmtWriter::VisitOMPTargetExitDataDirective(
2158  VisitStmt(D);
2159  Record.push_back(D->getNumClauses());
2160  VisitOMPExecutableDirective(D);
2162 }
2163 
2164 void ASTStmtWriter::VisitOMPTargetParallelDirective(
2166  VisitStmt(D);
2167  Record.push_back(D->getNumClauses());
2168  VisitOMPExecutableDirective(D);
2170 }
2171 
2172 void ASTStmtWriter::VisitOMPTargetParallelForDirective(
2174  VisitOMPLoopDirective(D);
2175  Record.push_back(D->hasCancel() ? 1 : 0);
2177 }
2178 
2179 void ASTStmtWriter::VisitOMPTaskyieldDirective(OMPTaskyieldDirective *D) {
2180  VisitStmt(D);
2181  VisitOMPExecutableDirective(D);
2183 }
2184 
2185 void ASTStmtWriter::VisitOMPBarrierDirective(OMPBarrierDirective *D) {
2186  VisitStmt(D);
2187  VisitOMPExecutableDirective(D);
2189 }
2190 
2191 void ASTStmtWriter::VisitOMPTaskwaitDirective(OMPTaskwaitDirective *D) {
2192  VisitStmt(D);
2193  VisitOMPExecutableDirective(D);
2195 }
2196 
2197 void ASTStmtWriter::VisitOMPTaskgroupDirective(OMPTaskgroupDirective *D) {
2198  VisitStmt(D);
2199  Record.push_back(D->getNumClauses());
2200  VisitOMPExecutableDirective(D);
2201  Record.AddStmt(D->getReductionRef());
2203 }
2204 
2205 void ASTStmtWriter::VisitOMPFlushDirective(OMPFlushDirective *D) {
2206  VisitStmt(D);
2207  Record.push_back(D->getNumClauses());
2208  VisitOMPExecutableDirective(D);
2210 }
2211 
2212 void ASTStmtWriter::VisitOMPOrderedDirective(OMPOrderedDirective *D) {
2213  VisitStmt(D);
2214  Record.push_back(D->getNumClauses());
2215  VisitOMPExecutableDirective(D);
2217 }
2218 
2219 void ASTStmtWriter::VisitOMPTeamsDirective(OMPTeamsDirective *D) {
2220  VisitStmt(D);
2221  Record.push_back(D->getNumClauses());
2222  VisitOMPExecutableDirective(D);
2224 }
2225 
2226 void ASTStmtWriter::VisitOMPCancellationPointDirective(
2228  VisitStmt(D);
2229  VisitOMPExecutableDirective(D);
2230  Record.push_back(D->getCancelRegion());
2232 }
2233 
2234 void ASTStmtWriter::VisitOMPCancelDirective(OMPCancelDirective *D) {
2235  VisitStmt(D);
2236  Record.push_back(D->getNumClauses());
2237  VisitOMPExecutableDirective(D);
2238  Record.push_back(D->getCancelRegion());
2240 }
2241 
2242 void ASTStmtWriter::VisitOMPTaskLoopDirective(OMPTaskLoopDirective *D) {
2243  VisitOMPLoopDirective(D);
2245 }
2246 
2247 void ASTStmtWriter::VisitOMPTaskLoopSimdDirective(OMPTaskLoopSimdDirective *D) {
2248  VisitOMPLoopDirective(D);
2250 }
2251 
2252 void ASTStmtWriter::VisitOMPMasterTaskLoopDirective(
2254  VisitOMPLoopDirective(D);
2256 }
2257 
2258 void ASTStmtWriter::VisitOMPMasterTaskLoopSimdDirective(
2260  VisitOMPLoopDirective(D);
2262 }
2263 
2264 void ASTStmtWriter::VisitOMPParallelMasterTaskLoopDirective(
2266  VisitOMPLoopDirective(D);
2268 }
2269 
2270 void ASTStmtWriter::VisitOMPDistributeDirective(OMPDistributeDirective *D) {
2271  VisitOMPLoopDirective(D);
2273 }
2274 
2275 void ASTStmtWriter::VisitOMPTargetUpdateDirective(OMPTargetUpdateDirective *D) {
2276  VisitStmt(D);
2277  Record.push_back(D->getNumClauses());
2278  VisitOMPExecutableDirective(D);
2280 }
2281 
2282 void ASTStmtWriter::VisitOMPDistributeParallelForDirective(
2284  VisitOMPLoopDirective(D);
2285  Record.push_back(D->hasCancel() ? 1 : 0);
2287 }
2288 
2289 void ASTStmtWriter::VisitOMPDistributeParallelForSimdDirective(
2291  VisitOMPLoopDirective(D);
2293 }
2294 
2295 void ASTStmtWriter::VisitOMPDistributeSimdDirective(
2297  VisitOMPLoopDirective(D);
2299 }
2300 
2301 void ASTStmtWriter::VisitOMPTargetParallelForSimdDirective(
2303  VisitOMPLoopDirective(D);
2305 }
2306 
2307 void ASTStmtWriter::VisitOMPTargetSimdDirective(OMPTargetSimdDirective *D) {
2308  VisitOMPLoopDirective(D);
2310 }
2311 
2312 void ASTStmtWriter::VisitOMPTeamsDistributeDirective(
2314  VisitOMPLoopDirective(D);
2316 }
2317 
2318 void ASTStmtWriter::VisitOMPTeamsDistributeSimdDirective(
2320  VisitOMPLoopDirective(D);
2322 }
2323 
2324 void ASTStmtWriter::VisitOMPTeamsDistributeParallelForSimdDirective(
2326  VisitOMPLoopDirective(D);
2328 }
2329 
2330 void ASTStmtWriter::VisitOMPTeamsDistributeParallelForDirective(
2332  VisitOMPLoopDirective(D);
2333  Record.push_back(D->hasCancel() ? 1 : 0);
2335 }
2336 
2337 void ASTStmtWriter::VisitOMPTargetTeamsDirective(OMPTargetTeamsDirective *D) {
2338  VisitStmt(D);
2339  Record.push_back(D->getNumClauses());
2340  VisitOMPExecutableDirective(D);
2342 }
2343 
2344 void ASTStmtWriter::VisitOMPTargetTeamsDistributeDirective(
2346  VisitOMPLoopDirective(D);
2348 }
2349 
2350 void ASTStmtWriter::VisitOMPTargetTeamsDistributeParallelForDirective(
2352  VisitOMPLoopDirective(D);
2353  Record.push_back(D->hasCancel() ? 1 : 0);
2355 }
2356 
2357 void ASTStmtWriter::VisitOMPTargetTeamsDistributeParallelForSimdDirective(
2359  VisitOMPLoopDirective(D);
2360  Code = serialization::
2362 }
2363 
2364 void ASTStmtWriter::VisitOMPTargetTeamsDistributeSimdDirective(
2366  VisitOMPLoopDirective(D);
2368 }
2369 
2370 //===----------------------------------------------------------------------===//
2371 // ASTWriter Implementation
2372 //===----------------------------------------------------------------------===//
2373 
2375  assert(SwitchCaseIDs.find(S) == SwitchCaseIDs.end() &&
2376  "SwitchCase recorded twice");
2377  unsigned NextID = SwitchCaseIDs.size();
2378  SwitchCaseIDs[S] = NextID;
2379  return NextID;
2380 }
2381 
2383  assert(SwitchCaseIDs.find(S) != SwitchCaseIDs.end() &&
2384  "SwitchCase hasn't been seen yet");
2385  return SwitchCaseIDs[S];
2386 }
2387 
2389  SwitchCaseIDs.clear();
2390 }
2391 
2392 /// Write the given substatement or subexpression to the
2393 /// bitstream.
2394 void ASTWriter::WriteSubStmt(Stmt *S) {
2395  RecordData Record;
2396  ASTStmtWriter Writer(*this, Record);
2397  ++NumStatements;
2398 
2399  if (!S) {
2400  Stream.EmitRecord(serialization::STMT_NULL_PTR, Record);
2401  return;
2402  }
2403 
2404  llvm::DenseMap<Stmt *, uint64_t>::iterator I = SubStmtEntries.find(S);
2405  if (I != SubStmtEntries.end()) {
2406  Record.push_back(I->second);
2407  Stream.EmitRecord(serialization::STMT_REF_PTR, Record);
2408  return;
2409  }
2410 
2411 #ifndef NDEBUG
2412  assert(!ParentStmts.count(S) && "There is a Stmt cycle!");
2413 
2414  struct ParentStmtInserterRAII {
2415  Stmt *S;
2416  llvm::DenseSet<Stmt *> &ParentStmts;
2417 
2418  ParentStmtInserterRAII(Stmt *S, llvm::DenseSet<Stmt *> &ParentStmts)
2419  : S(S), ParentStmts(ParentStmts) {
2420  ParentStmts.insert(S);
2421  }
2422  ~ParentStmtInserterRAII() {
2423  ParentStmts.erase(S);
2424  }
2425  };
2426 
2427  ParentStmtInserterRAII ParentStmtInserter(S, ParentStmts);
2428 #endif
2429 
2430  Writer.Visit(S);
2431 
2432  uint64_t Offset = Writer.Emit();
2433  SubStmtEntries[S] = Offset;
2434 }
2435 
2436 /// Flush all of the statements that have been added to the
2437 /// queue via AddStmt().
2438 void ASTRecordWriter::FlushStmts() {
2439  // We expect to be the only consumer of the two temporary statement maps,
2440  // assert that they are empty.
2441  assert(Writer->SubStmtEntries.empty() && "unexpected entries in sub-stmt map");
2442  assert(Writer->ParentStmts.empty() && "unexpected entries in parent stmt map");
2443 
2444  for (unsigned I = 0, N = StmtsToEmit.size(); I != N; ++I) {
2445  Writer->WriteSubStmt(StmtsToEmit[I]);
2446 
2447  assert(N == StmtsToEmit.size() && "record modified while being written!");
2448 
2449  // Note that we are at the end of a full expression. Any
2450  // expression records that follow this one are part of a different
2451  // expression.
2452  Writer->Stream.EmitRecord(serialization::STMT_STOP, ArrayRef<uint32_t>());
2453 
2454  Writer->SubStmtEntries.clear();
2455  Writer->ParentStmts.clear();
2456  }
2457 
2458  StmtsToEmit.clear();
2459 }
2460 
2461 void ASTRecordWriter::FlushSubStmts() {
2462  // For a nested statement, write out the substatements in reverse order (so
2463  // that a simple stack machine can be used when loading), and don't emit a
2464  // STMT_STOP after each one.
2465  for (unsigned I = 0, N = StmtsToEmit.size(); I != N; ++I) {
2466  Writer->WriteSubStmt(StmtsToEmit[N - I - 1]);
2467  assert(N == StmtsToEmit.size() && "record modified while being written!");
2468  }
2469 
2470  StmtsToEmit.clear();
2471 }
SourceLocation getRParenLoc() const
Definition: Stmt.h:2371
Expr * getInc()
Definition: Stmt.h:2427
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:1643
const Expr * getSubExpr() const
Definition: Expr.h:938
A call to an overloaded operator written using operator syntax.
Definition: ExprCXX.h:78
ObjCIndirectCopyRestoreExpr - Represents the passing of a function argument by indirect copy-restore ...
Definition: ExprObjC.h:1577
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:409
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:1428
Defines the clang::ASTContext interface.
A CompoundLiteralExpr record.
Definition: ASTBitCodes.h:1703
This represents &#39;#pragma omp distribute simd&#39; composite directive.
Definition: StmtOpenMP.h:3614
const BlockDecl * getBlockDecl() const
Definition: Expr.h:5565
Expr * getNextUpperBound() const
Definition: StmtOpenMP.h:993
IdentifierInfo * getInputIdentifier(unsigned i) const
Definition: Stmt.h:2978
This represents &#39;#pragma omp master&#39; directive.
Definition: StmtOpenMP.h:1592
ConstantExprBitfields ConstantExprBits
Definition: Stmt.h:969
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
Definition: ExprCXX.h:1036
SourceLocation getRParenLoc() const
Definition: Stmt.h:2885
The null pointer literal (C++11 [lex.nullptr])
Definition: ExprCXX.h:683
unsigned getNumDecls() const
Gets the number of declarations in the unresolved set.
Definition: ExprCXX.h:2947
This represents &#39;#pragma omp task&#39; directive.
Definition: StmtOpenMP.h:1932
This represents a GCC inline-assembly statement extension.
Definition: Stmt.h:2862
Represents a &#39;co_await&#39; expression while the type of the promise is dependent.
Definition: ExprCXX.h:4741
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:961
unsigned getNumInputs() const
Definition: Stmt.h:2774
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:3253
An IndirectGotoStmt record.
Definition: ASTBitCodes.h:1616
SourceLocation getForLoc() const
Definition: Stmt.h:2440
SourceLocation getUsedLocation() const
Retrieve the location where this default argument was actually used.
Definition: ExprCXX.h:1248
uint64_t getValue() const
Definition: ExprCXX.h:2760
StringKind getKind() const
Definition: Expr.h:1801
An AddrLabelExpr record.
Definition: ASTBitCodes.h:1733
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:3982
void AddToken(const Token &Tok, RecordDataImpl &Record)
Emit a token.
Definition: ASTWriter.cpp:4583
SourceLocation getEllipsisLoc() const
Get the location of the ... in a case statement of the form LHS ... RHS.
Definition: Stmt.h:1563
SourceLocation getLParen() const
Get the location of the left parentheses &#39;(&#39;.
Definition: Expr.h:1993
const Expr * getSubExpr() const
Definition: ExprCXX.h:1162
Expr * getCond()
Definition: Stmt.h:2259
Expr * getExpr(unsigned Index)
getExpr - Return the Expr at the specified index.
Definition: Expr.h:4011
A CXXStaticCastExpr record.
Definition: ASTBitCodes.h:1861
ArrayRef< Expr * > dependent_counters()
Definition: StmtOpenMP.h:1141
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:2627
VarDecl * getParameterPack() const
Get the parameter pack which this expression refers to.
Definition: ExprCXX.h:4366
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:1595
CompoundStmt * getSubStmt()
Definition: Expr.h:3942
A CXXReinterpretCastExpr record.
Definition: ASTBitCodes.h:1867
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:3115
An ObjCBoolLiteralExpr record.
Definition: ASTBitCodes.h:1826
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:1172
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:953
unsigned getNumArgs() const
getNumArgs - Return the number of actual arguments to this call.
Definition: Expr.h:2664
Expr * getDimensionExpression() const
Definition: ExprCXX.h:2762
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:2387
IfStmt - This represents an if/then/else.
Definition: Stmt.h:1822
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:5915
unsigned getNumOutputs() const
Definition: Stmt.h:2752
This represents &#39;#pragma omp for simd&#39; directive.
Definition: StmtOpenMP.h:1342
Expr * getBase() const
Definition: Expr.h:2888
const StringLiteral * getAsmString() const
Definition: Stmt.h:2890
TypeSourceInfo * getTypeSourceInfo() const
Definition: Expr.h:3088
An ImplicitValueInitExpr record.
Definition: ASTBitCodes.h:1727
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:4025
An ImplicitCastExpr record.
Definition: ASTBitCodes.h:1697
Stmt * getHandlerBlock() const
Definition: StmtCXX.h:51
SourceLocation getBeginLoc() const
Returns starting location of directive kind.
Definition: StmtOpenMP.h:225
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:2218
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
Definition: ExprCXX.h:3037
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:1734
Represents an attribute applied to a statement.
Definition: Stmt.h:1764
ParenExpr - This represents a parethesized expression, e.g.
Definition: Expr.h:1969
NamedDecl * getDecl() const
A CXXOperatorCallExpr record.
Definition: ASTBitCodes.h:1843
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:4162
A CXXTemporaryObjectExpr record.
Definition: ASTBitCodes.h:1858
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:1533
SourceLocation getLocation() const
Definition: ExprCXX.h:697
const RecordDecl * getCapturedRecordDecl() const
Retrieve the record declaration for captured variables.
Definition: Stmt.h:3478
SourceLocation getRParenLoc() const
Definition: Expr.h:2417
SourceLocation getKeywordLoc() const
Definition: ExprCXX.h:4772
Represents a call to a C++ constructor.
Definition: ExprCXX.h:1422
SourceLocation getBeginLoc() const LLVM_READONLY
Definition: Stmt.h:1239
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:2715
bool getIsCXXTry() const
Definition: Stmt.h:3295
SourceLocation getLParenLoc() const
Definition: Expr.h:3372
A constant expression context.
Definition: ASTBitCodes.h:1640
Expr * getCombinedParForInDistCond() const
Definition: StmtOpenMP.h:1081
A container of type source information.
Definition: Decl.h:86
This represents &#39;#pragma omp parallel for&#39; directive.
Definition: StmtOpenMP.h:1713
MS property subscript expression.
Definition: ExprCXX.h:937
IdentKind getIdentKind() const
Definition: Expr.h:1926
SourceLocation getGotoLoc() const
Definition: Stmt.h:2520
SourceLocation getRParenLoc() const
Definition: ExprCXX.h:2077
This represents &#39;#pragma omp target teams distribute parallel for&#39; combined directive.
Definition: StmtOpenMP.h:4230
Expr * getCombinedEnsureUpperBound() const
Definition: StmtOpenMP.h:1045
Represents a prvalue temporary that is written into memory so that a reference can bind to it...
Definition: ExprCXX.h:4419
bool isSatisfied() const
Whether or not the concept with the given arguments was satisfied when the expression was created...
Definition: ExprCXX.h:4935
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:227
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:1917
This represents &#39;#pragma omp target exit data&#39; directive.
Definition: StmtOpenMP.h:2624
Stmt * getSubStmt()
Definition: Stmt.h:1655
const VarDecl * getNRVOCandidate() const
Retrieve the variable that might be used for the named return value optimization. ...
Definition: Stmt.h:2662
SourceLocation getLParenLoc() const
Definition: Stmt.h:2442
bool hasTemplateKWAndArgsInfo() const
Definition: Expr.h:1269
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:2807
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:1147
SourceRange getSourceRange() const LLVM_READONLY
Definition: ExprCXX.h:833
SourceLocation getOperatorLoc() const
Retrieve the location of the &#39;.&#39; or &#39;->&#39; operator.
Definition: ExprCXX.h:2545
SourceLocation getAtLoc() const
Definition: ExprObjC.h:470
unsigned getNumArgs() const
Determine the number of arguments to this type trait.
Definition: ExprCXX.h:2676
SourceRange getSourceRange() const
Definition: ExprCXX.h:2343
ObjCInterfaceDecl * getClassReceiver() const
Definition: ExprObjC.h:771
Expr * getCombinedUpperBoundVariable() const
Definition: StmtOpenMP.h:1039
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:921
Implicit construction of a std::initializer_list<T> object from an array temporary within list-initia...
Definition: ExprCXX.h:715
Stmt * getThen()
Definition: Stmt.h:1909
SourceLocation getIfLoc() const
Definition: Stmt.h:1981
unsigned getNumPlacementArgs() const
Definition: ExprCXX.h:2236
TypeSourceInfo * getArgumentTypeInfo() const
Definition: Expr.h:2387
bool requiresADL() const
True if this declaration should be extended by argument-dependent lookup.
Definition: ExprCXX.h:3105
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:3503
A CXXConstructExpr record.
Definition: ASTBitCodes.h:1852
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:2328
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will call.
Definition: ExprCXX.h:1648
A C++ throw-expression (C++ [except.throw]).
Definition: ExprCXX.h:1140
Expr * getExprOperand() const
Definition: ExprCXX.h:821
Represents an expression – generally a full-expression – that introduces cleanups to be run at the ...
Definition: ExprCXX.h:3306
TypeSourceInfo * getArg(unsigned I) const
Retrieve the Ith argument.
Definition: ExprCXX.h:2679
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:4374
bool isXLHSInRHSPart() const
Return true if helper update expression has form &#39;OpaqueValueExpr(x) binop OpaqueValueExpr(expr)&#39; and...
Definition: StmtOpenMP.h:2421
void AddSourceRange(SourceRange Range)
Emit a source range.
Definition: ASTWriter.h:853
A ShuffleVectorExpr record.
Definition: ASTBitCodes.h:1748
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:409
void AddTypeSourceInfo(TypeSourceInfo *TInfo)
Emits a reference to a declarator info.
Definition: ASTWriter.cpp:5617
Expr * getExprOperand() const
Definition: ExprCXX.h:1046
const Stmt * getSubStmt() const
Definition: StmtObjC.h:379
SourceLocation getRParenLoc() const
Retrieve the location of the closing parenthesis.
Definition: ExprCXX.h:386
LabelStmt - Represents a label, which has a substatement.
Definition: Stmt.h:1720
Represents a C99 designated initializer expression.
Definition: Expr.h:4611
SourceLocation getAtLoc() const
Definition: ExprObjC.h:523
An OffsetOfExpr record.
Definition: ASTBitCodes.h:1673
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
Expr * getSemanticForm()
Get an equivalent semantic form for this expression.
Definition: ExprCXX.h:293
TypeSourceInfo * getScopeTypeInfo() const
Retrieve the scope type in a qualified pseudo-destructor expression.
Definition: ExprCXX.h:2556
SourceLocation getKeywordLoc() const
Definition: StmtCXX.h:476
Stmt * getBody()
Definition: Stmt.h:2363
An ObjCAtThrowStmt record.
Definition: ASTBitCodes.h:1820
SourceLocation getTildeLoc() const
Retrieve the location of the &#39;~&#39;.
Definition: ExprCXX.h:2563
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:1712
This represents &#39;#pragma omp parallel&#39; directive.
Definition: StmtOpenMP.h:357
ShuffleVectorExpr - clang-specific builtin-in function __builtin_shufflevector.
Definition: Expr.h:3971
bool cleanupsHaveSideEffects() const
Definition: ExprCXX.h:3344
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:2144
ConceptDecl * getNamedConcept() const
Definition: ExprCXX.h:4915
bool isFileScope() const
Definition: Expr.h:3082
SourceLocation getAmpAmpLoc() const
Definition: Expr.h:3896
Expr * getEnsureUpperBound() const
Definition: StmtOpenMP.h:977
NameKind getNameKind() const
Determine what kind of name this is.
SourceLocation getEndLoc() const
Definition: Stmt.h:1236
Represents a member of a struct/union/class.
Definition: Decl.h:2643
Expr * getBase()
Retrieve the base object of this member expressions, e.g., the x in x.m.
Definition: ExprCXX.h:3848
Represents a place-holder for an object not to be initialized by anything.
Definition: Expr.h:4909
NonTypeTemplateParmDecl * getParameter() const
Definition: ExprCXX.h:4243
const DeclarationNameInfo & getNameInfo() const
Gets the full name info.
Definition: ExprCXX.h:2950
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:937
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:1129
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:3750
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:3771
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:1231
OpenMPDirectiveKind getDirectiveKind() const
Definition: StmtOpenMP.h:301
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:2181
Expr * getSubExpr()
Definition: Expr.h:3177
This represents &#39;#pragma omp barrier&#39; directive.
Definition: StmtOpenMP.h:2044
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:419
Represents a reference to a non-type template parameter pack that has been substituted with a non-tem...
Definition: ExprCXX.h:4269
This represents &#39;#pragma omp critical&#39; directive.
Definition: StmtOpenMP.h:1639
OpenMPDirectiveKind getCancelRegion() const
Get cancellation region for the current cancellation point.
Definition: StmtOpenMP.h:2923
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:2504
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:764
This represents &#39;#pragma omp distribute parallel for&#39; composite directive.
Definition: StmtOpenMP.h:3465
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:3954
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:4378
unsigned getLength() const
Definition: Expr.h:1798
ForStmt - This represents a &#39;for (init;cond;inc)&#39; stmt.
Definition: Stmt.h:2394
ArrayRef< Expr * > finals()
Definition: StmtOpenMP.h:1135
Expr * getIsLastIterVariable() const
Definition: StmtOpenMP.h:945
FunctionDecl * getOperatorDelete() const
Definition: ExprCXX.h:2399
Expr * getBaseExpr() const
Definition: ExprObjC.h:890
TemplateArgument getArgumentPack() const
Retrieve the template argument pack containing the substituted template arguments.
Definition: ExprCXX.cpp:1625
bool isElidable() const
Whether this construction is elidable.
Definition: ExprCXX.h:1500
Expr * getOperand() const
Definition: ExprCXX.h:3978
unsigned getIntegerLiteralAbbrev() const
Definition: ASTWriter.h:695
const Expr * getThrowExpr() const
Definition: StmtObjC.h:344
bool isGlobalNew() const
Definition: ExprCXX.h:2259
SourceLocation getParameterPackLocation() const
Retrieve the location of the parameter pack name.
Definition: ExprCXX.h:4300
bool doesUsualArrayDeleteWantSize() const
Answers whether the usual array deallocation function for the allocated type expects the size of the ...
Definition: ExprCXX.h:2395
LabelDecl * getDecl() const
Definition: Stmt.h:1737
Expr * getX()
Get &#39;x&#39; part of the associated expression/statement.
Definition: StmtOpenMP.h:2405
SourceLocation getLBracLoc() const
Definition: Stmt.h:1427
A reference to a previously [de]serialized Stmt record.
Definition: ASTBitCodes.h:1577
capture_init_iterator capture_init_begin()
Retrieve the first initialization argument for this lambda expression (which initializes the first ca...
Definition: ExprCXX.h:1963
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:2428
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:3713
Expr * getIterationVariable() const
Definition: StmtOpenMP.h:913
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:3529
bool constructsVBase() const
Determine whether this constructor is actually constructing a base class (rather than a complete obje...
Definition: ExprCXX.h:1652
Stmt * getInit()
Definition: Stmt.h:2407
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:1165
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:2991
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:3034
This represents &#39;#pragma omp cancellation point&#39; directive.
Definition: StmtOpenMP.h:2879
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:247
bool isArrow() const
Definition: ExprCXX.h:921
FPOptions getFPFeatures() const
Definition: ExprCXX.h:152
CaseStmt - Represent a case statement.
Definition: Stmt.h:1488
TypoExpr - Internal placeholder for expressions where typo correction still needs to be performed and...
Definition: Expr.h:5936
Expr * getCond()
Definition: Stmt.h:2426
IdentKind getIdentKind() const
Definition: Expr.h:4288
SourceLocation getContinueLoc() const
Definition: Stmt.h:2562
This represents &#39;#pragma omp teams&#39; directive.
Definition: StmtOpenMP.h:2822
unsigned getInt() const
Used to serialize this.
Definition: LangOptions.h:368
Expr * getInit() const
Definition: StmtOpenMP.h:933
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:1303
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:1571
This represents &#39;#pragma omp teams distribute simd&#39; combined directive.
Definition: StmtOpenMP.h:3884
Represents binding an expression to a temporary.
Definition: ExprCXX.h:1373
StringLiteral * getClobberStringLiteral(unsigned i)
Definition: Stmt.h:3071
OpaqueValueExpr * getOpaqueValue() const
getOpaqueValue - Return the opaque value placeholder.
Definition: ExprCXX.h:4670
Expr * Key
The key for the dictionary element.
Definition: ExprObjC.h:263
SourceLocation getBuiltinLoc() const
Definition: Expr.h:4245
CXXTemporary * getTemporary()
Definition: ExprCXX.h:1392
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:1818
CXXRecordDecl * getNamingClass()
Gets the &#39;naming class&#39; (in the sense of C++0x [class.access.base]p5) of the lookup.
Definition: ExprCXX.h:3113
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:3292
Represents a C++ member access expression where the actual member referenced could not be resolved be...
Definition: ExprCXX.h:3511
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:4235
TypeSourceInfo * getTypeSourceInfo() const
Definition: ExprCXX.h:2073
Stmt * getBody()
Definition: Stmt.h:2099
SourceLocation getLocation() const
Definition: ExprObjC.h:103
A default argument (C++ [dcl.fct.default]).
Definition: ExprCXX.h:1202
Stmt * getInit()
Definition: Stmt.h:1965
bool isExact() const
Definition: Expr.h:1605
bool isTypeOperand() const
Definition: ExprCXX.h:1029
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:3645
Represents the this expression in C++.
Definition: ExprCXX.h:1097
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:3438
TypeSourceInfo * getAllocatedTypeSourceInfo() const
Definition: ExprCXX.h:2197
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:5460
TypeSourceInfo * getQueriedTypeSourceInfo() const
Definition: ExprCXX.h:2758
bool isArrayForm() const
Definition: ExprCXX.h:2386
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:3682
ArrayRef< Expr * > private_counters()
Definition: StmtOpenMP.h:1117
OpenMP 4.0 [2.4, Array Sections].
Definition: ExprOpenMP.h:44
ConditionalOperator - The ?: ternary operator.
Definition: Expr.h:3707
StmtBitfields StmtBits
Definition: Stmt.h:951
const ValueDecl * getExtendingDecl() const
Get the declaration which triggered the lifetime-extension of this temporary, if any.
Definition: ExprCXX.h:4479
TypeSourceInfo * getTypeSourceInfo() const
Definition: ExprCXX.h:1779
bool isStdInitListInitialization() const
Whether this constructor call was written as list-initialization, but was interpreted as forming a st...
Definition: ExprCXX.h:1524
Represents a C++ pseudo-destructor (C++ [expr.pseudo]).
Definition: ExprCXX.h:2479
ASTTemplateKWAndArgsInfo * getTrailingASTTemplateKWAndArgsInfo()
Return the optional template keyword and arguments info.
Definition: ExprCXX.h:3931
CompoundStmt - This represents a group of statements like { stmt stmt }.
Definition: Stmt.h:1320
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:1522
void AddDeclarationNameLoc(const DeclarationNameLoc &DNLoc, DeclarationName Name)
Definition: ASTWriter.cpp:5824
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:2132
void AddCXXTemporary(const CXXTemporary *Temp)
Emit a CXXTemporary.
Definition: ASTWriter.cpp:5572
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will (ultimately) call.
Definition: ExprCXX.h:1494
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:1995
Expr * getCombinedLowerBoundVariable() const
Definition: StmtOpenMP.h:1033
SourceLocation getLocation() const
Definition: ExprCXX.h:1496
SourceLocation getRBracketLoc() const
Definition: ExprCXX.h:975
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:2483
bool isImplicitAccess() const
True if this is an implicit access, i.e.
Definition: ExprCXX.h:3601
SourceLocation getThrowLoc() const LLVM_READONLY
Definition: StmtObjC.h:348
unsigned Offset
Definition: Format.cpp:1809
static unsigned getNumSubExprs(AtomicOp Op)
Determine the number of arguments the specified atomic builtin should have.
Definition: Expr.cpp:4581
unsigned getValue() const
Definition: Expr.h:1539
This represents &#39;#pragma omp distribute&#39; directive.
Definition: StmtOpenMP.h:3338
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:2587
ObjCMethodDecl * getBoxingMethod() const
Definition: ExprObjC.h:145
SourceLocation getFinallyLoc() const
Definition: Stmt.h:3250
An expression "T()" which creates a value-initialized rvalue of type T, which is a non-class type...
Definition: ExprCXX.h:2053
ADLCallKind getADLCallKind() const
Definition: Expr.h:2642
const Stmt * getAssociatedStmt() const
Returns statement associated with the directive.
Definition: StmtOpenMP.h:253
SourceLocation getOperatorLoc() const
Retrieve the location of the &#39;->&#39; or &#39;.&#39; operator.
Definition: ExprCXX.h:3870
Expr * getCond() const
Definition: Expr.h:3741
bool hasCancel() const
Return true if current directive has inner cancel directive.
Definition: StmtOpenMP.h:1776
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:4088
This represents one expression.
Definition: Expr.h:108
SourceLocation getElseLoc() const
Definition: Stmt.h:1984
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:3867
StringRef getClobber(unsigned i) const
Definition: Stmt.h:3166
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:1530
SourceLocation getWhileLoc() const
Definition: Stmt.h:2311
This represents &#39;#pragma omp master taskloop&#39; directive.
Definition: StmtOpenMP.h:3134
unsigned getPackLength() const
Retrieve the length of the parameter pack.
Definition: ExprCXX.h:4168
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:1750
A C++ const_cast expression (C++ [expr.const.cast]).
Definition: ExprCXX.h:527
SourceLocation getLocation() const
Definition: ExprCXX.h:1112
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:2008
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:2579
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:1326
This represents &#39;#pragma omp target teams distribute parallel for simd&#39; combined directive.
Definition: StmtOpenMP.h:4314
raw_arg_iterator raw_arg_end()
Definition: ExprCXX.h:2329
bool isArrow() const
Determine whether this pseudo-destructor expression was written using an &#39;->&#39; (otherwise, it used a &#39;.
Definition: ExprCXX.h:2542
const ASTTemplateArgumentListInfo * getTemplateArgsAsWritten() const
Definition: ExprCXX.h:4924
Stmt * getBody()
Definition: Stmt.h:2271
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:1589
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:1879
TypeSourceInfo * getTypeSourceInfo() const
Definition: Expr.h:2284
Represents an expression that computes the length of a parameter pack.
Definition: ExprCXX.h:4091
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:1679
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:4387
ArrayTypeTrait getTrait() const
Definition: ExprCXX.h:2754
decls_iterator decls_begin() const
Definition: ExprCXX.h:2936
unsigned size() const
Definition: Stmt.h:1348
unsigned getNumClauses() const
Get number of clauses.
Definition: StmtOpenMP.h:241
An ArrayInitLoopExpr record.
Definition: ASTBitCodes.h:1721
Expr * getDistInc() const
Definition: StmtOpenMP.h:1021
A PseudoObjectExpr record.
Definition: ASTBitCodes.h:1760
SourceRange getAngleBrackets() const LLVM_READONLY
Definition: ExprCXX.h:390
Expr * getNextLowerBound() const
Definition: StmtOpenMP.h:985
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:1027
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:3525
This represents &#39;#pragma omp for&#39; directive.
Definition: StmtOpenMP.h:1265
An ObjCIndirectCopyRestoreExpr record.
Definition: ASTBitCodes.h:1802
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:2160
LabelDecl * getLabel() const
Definition: Stmt.h:2478
bool hasInitializer() const
Whether this new-expression has any initializer at all.
Definition: ExprCXX.h:2262
const Stmt * getTryBody() const
Retrieve the @try body.
Definition: StmtObjC.h:208
Represents a folding of a pack over an operator.
Definition: ExprCXX.h:4535
ReturnStmt - This represents a return, optionally of an expression: return; return 4;...
Definition: Stmt.h:2620
This represents &#39;#pragma omp target teams&#39; directive.
Definition: StmtOpenMP.h:4103
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:3085
SourceLocation getDoLoc() const
Definition: Stmt.h:2367
SwitchCase * getSwitchCaseList()
Definition: Stmt.h:2156
SourceLocation getAtLoc() const
Definition: StmtObjC.h:388
ObjCMethodDecl * getImplicitPropertyGetter() const
Definition: ExprObjC.h:712
A DesignatedInitUpdateExpr record.
Definition: ASTBitCodes.h:1715
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:5549
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:863
Represents a reference to a non-type template parameter that has been substituted with a template arg...
Definition: ExprCXX.h:4209
const OffsetOfNode & getComponent(unsigned Idx) const
Definition: Expr.h:2291
This represents &#39;#pragma omp cancel&#39; directive.
Definition: StmtOpenMP.h:2937
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:1897
ValueDecl * getDecl()
Definition: Expr.h:1222
An ObjCAvailabilityCheckExpr record.
Definition: ASTBitCodes.h:1829
SourceLocation getLocation() const
Definition: Expr.h:1930
SourceLocation getRParenLoc() const
Definition: Expr.h:4248
SourceLocation getTemplateKWLoc() const
Definition: ExprCXX.h:4943
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:1061
const Expr * getSubExpr() const
Definition: ExprCXX.h:1396
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:1244
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:657
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:2205
An ObjCForCollectionStmt record.
Definition: ASTBitCodes.h:1805
This represents &#39;#pragma omp parallel for simd&#39; directive.
Definition: StmtOpenMP.h:1793
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:2338
AsmStmt is the base class for GCCAsmStmt and MSAsmStmt.
Definition: Stmt.h:2703
SourceLocation getOperatorLoc() const
Retrieve the location of the &#39;->&#39; or &#39;.&#39; operator.
Definition: ExprCXX.h:3621
SourceLocation getLParenLoc() const
Retrieve the location of the left parentheses (&#39;(&#39;) that precedes the argument list.
Definition: ExprCXX.h:3433
A MS-style AsmStmt record.
Definition: ASTBitCodes.h:1637
void push_back(uint64_t N)
Minimal vector-like interface.
Definition: ASTWriter.h:796
This represents &#39;#pragma omp parallel master taskloop&#39; directive.
Definition: StmtOpenMP.h:3270
Expr * getLastIteration() const
Definition: StmtOpenMP.h:917
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:2424
Expr * getArgument()
Definition: ExprCXX.h:2401
This represents &#39;#pragma omp target enter data&#39; directive.
Definition: StmtOpenMP.h:2565
Expr * getStrideVariable() const
Definition: StmtOpenMP.h:969
This represents &#39;#pragma omp master taskloop simd&#39; directive.
Definition: StmtOpenMP.h:3202
bool getValue() const
Definition: ExprCXX.h:3984
A C++ dynamic_cast expression (C++ [expr.dynamic.cast]).
Definition: ExprCXX.h:445
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:1075
const Stmt * getPreInits() const
Definition: StmtOpenMP.h:941
#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:2844
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:3360
Represents a call to an inherited base class constructor from an inheriting constructor.
Definition: ExprCXX.h:1613
ExpressionTrait getTrait() const
Definition: ExprCXX.h:2822
unsigned path_size() const
Definition: Expr.h:3196
Token * getAsmToks()
Definition: Stmt.h:3116
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:1662
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:1537
Encodes a location in the source.
body_range body()
Definition: Stmt.h:1353
Expr * getRetValue()
Definition: Stmt.h:2653
StringRef getOutputConstraint(unsigned i) const
Definition: Stmt.h:3126
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:2531
This is a basic class for representing single OpenMP executable directive.
Definition: StmtOpenMP.h:33
SourceLocation getBuiltinLoc() const
getBuiltinLoc - Return the location of the __builtin_astype token.
Definition: Expr.h:5626
bool hasUnresolvedUsing() const
Determine whether the lookup results contain an unresolved using declaration.
Definition: ExprCXX.h:3861
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:383
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)"...
Definition: ExprCXX.h:2100
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:247
Expr * getLHS()
Definition: Stmt.h:1577
A call to a literal operator (C++11 [over.literal]) written as a user-defined literal (C++11 [lit...
Definition: ExprCXX.h:564
Represents a C++2a __builtin_bit_cast(T, v) expression.
Definition: ExprCXX.h:4818
SourceLocation getEllipsisLoc() const
Retrieve the location of the ellipsis that describes this pack expansion.
Definition: ExprCXX.h:4051
Expr * getExpr()
Get &#39;expr&#39; part of the associated expression/statement.
Definition: StmtOpenMP.h:2431
Represents a call to a member function that may be written either with member call syntax (e...
Definition: ExprCXX.h:171
SourceLocation getExceptLoc() const
Definition: Stmt.h:3209
SourceRange getSourceRange() const LLVM_READONLY
Definition: ExprObjC.h:380
Stmt * getElse()
Definition: Stmt.h:1918
DeclStmt - Adaptor class for mixing declarations with statements and expressions. ...
Definition: Stmt.h:1213
DeclarationNameInfo getDirectiveName() const
Return name of the directive.
Definition: StmtOpenMP.h:1697
SourceLocation getLBraceLoc() const
Definition: Stmt.h:3108
A CXXFunctionalCastExpr record.
Definition: ASTBitCodes.h:1873
Expr * getCond()
Definition: Stmt.h:2087
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:6028
An ObjCEncodeExpr record.
Definition: ASTBitCodes.h:1775
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:2088
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:2223
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:2481
SourceLocation getAtFinallyLoc() const
Definition: StmtObjC.h:148
AccessSpecifier getAccess() const
An ObjCIsa Expr record.
Definition: ASTBitCodes.h:1799
const StringLiteral * getOutputConstraintLiteral(unsigned i) const
Definition: Stmt.h:2963
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:3461
void AddAttributes(ArrayRef< const Attr *> Attrs)
Emit a list of attributes.
Definition: ASTWriter.cpp:4577
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:2449
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:1987
Expr * getV()
Get &#39;v&#39; part of the associated expression/statement.
Definition: StmtOpenMP.h:2426
bool isParenTypeId() const
Definition: ExprCXX.h:2253
SourceLocation getEndLoc() const
Definition: Stmt.h:3110
NullStmtBitfields NullStmtBits
Definition: Stmt.h:952
Expr * getSubExpr()
Definition: ExprObjC.h:142
An expression trait intrinsic.
Definition: ExprCXX.h:2785
ArrayRef< Expr * > exprs()
Definition: Expr.h:5156
const ObjCMethodDecl * getMethodDecl() const
Definition: ExprObjC.h:1356
An AtomicExpr record.
Definition: ASTBitCodes.h:1763
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:2299
This represents &#39;#pragma omp ordered&#39; directive.
Definition: StmtOpenMP.h:2260
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:5448
This represents &#39;#pragma omp target update&#39; directive.
Definition: StmtOpenMP.h:3406
ObjCBoxedExpr - used for generalized expression boxing.
Definition: ExprObjC.h:124
bool isArgumentType() const
Definition: Expr.h:2383
SourceLocation getKeywordLoc() const
Definition: Stmt.h:1467
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:2522
bool passAlignment() const
Indicates whether the required alignment should be implicitly passed to the allocation function...
Definition: ExprCXX.h:2293
bool isPartOfExplicitCast() const
Definition: Expr.h:3268
FunctionDecl * getOperatorDelete() const
Definition: ExprCXX.h:2220
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:5855
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:3155
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:1153
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:1664
A POD class for pairing a NamedDecl* with an access specifier.
NamedDecl * getFoundDecl() const
Definition: ExprCXX.h:4911
Represents a C11 generic selection.
Definition: Expr.h:5206
ArrayRef< TemplateArgument > getPartialArguments() const
Get.
Definition: ExprCXX.h:4184
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
bool isReversed() const
Determine whether this expression was rewritten in reverse form.
Definition: ExprCXX.h:311
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:4337
Represents a template argument.
Definition: TemplateBase.h:50
OpaqueValueExpr * getOpaqueValue() const
getOpaqueValue - Return the opaque value placeholder.
Definition: Expr.h:3823
unsigned getManglingNumber() const
Definition: ExprCXX.h:4486
SourceLocation getMemberLoc() const
Definition: ExprCXX.h:922
TypeSourceInfo * getDestroyedTypeInfo() const
Retrieve the source location information for the type being destroyed.
Definition: ExprCXX.h:2572
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:1285
bool isTypeOperand() const
Definition: ExprCXX.h:804
StringRef getInputConstraint(unsigned i) const
Definition: Stmt.h:3139
SourceLocation getLocation() const
Definition: ExprCXX.h:663
unsigned getNumAssocs() const
The number of association expressions.
Definition: Expr.h:5374
void writeClause(OMPClause *C)
Definition: ASTWriter.cpp:6617
Dataflow Directional Tag Classes.
Expr * getPrevUpperBoundVariable() const
Definition: StmtOpenMP.h:1015
bool isVolatile() const
Definition: Stmt.h:2739
An InitListExpr record.
Definition: ASTBitCodes.h:1709
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:1882
Represents a delete expression for memory deallocation and destructor calls, e.g. ...
Definition: ExprCXX.h:2359
IdentifierInfo * getOutputIdentifier(unsigned i) const
Definition: Stmt.h:2952
bool isSimple() const
Definition: Stmt.h:2736
OverloadedOperatorKind getOperator() const
Returns the kind of overloaded operator that this expression refers to.
Definition: ExprCXX.h:107
NonTypeTemplateParmDecl * getParameterPack() const
Retrieve the non-type template parameter pack being substituted.
Definition: ExprCXX.h:4297
MSPropertyDecl * getPropertyDecl() const
Definition: ExprCXX.h:920
const Stmt * getFinallyBody() const
Definition: StmtObjC.h:139
An ExtVectorElementExpr record.
Definition: ASTBitCodes.h:1706
ArrayRef< const Attr * > getAttrs() const
Definition: Stmt.h:1800
bool isImplicit() const
Definition: ExprCXX.h:1118
Expr * getCond() const
Definition: StmtOpenMP.h:929
This represents &#39;#pragma omp section&#39; directive.
Definition: StmtOpenMP.h:1475
This represents &#39;#pragma omp teams distribute&#39; directive.
Definition: StmtOpenMP.h:3816
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:3429
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:4297
VarDecl *const * iterator
Iterators over the parameters which the parameter pack expanded into.
Definition: ExprCXX.h:4373
A C++ reinterpret_cast expression (C++ [expr.reinterpret.cast]).
Definition: ExprCXX.h:487
This represents &#39;#pragma omp simd&#39; directive.
Definition: StmtOpenMP.h:1200
Stmt * getHandler() const
Definition: Stmt.h:3301
Represents a &#39;co_yield&#39; expression.
Definition: ExprCXX.h:4792
SourceLocation getLBraceLoc() const
Definition: Expr.h:4522
SourceLocation getSemiLoc() const
Definition: Stmt.h:1296
An ObjCAutoreleasePoolStmt record.
Definition: ASTBitCodes.h:1823
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:2183
Represents a C++11 pack expansion that produces a sequence of expressions.
Definition: ExprCXX.h:4015
bool isListInitialization() const
Whether this constructor call was written as list-initialization.
Definition: ExprCXX.h:1513
bool isImplicit() const
Definition: ExprCXX.h:4731
A CXXDynamicCastExpr record.
Definition: ASTBitCodes.h:1864
DependentScopeDeclRefExprBitfields DependentScopeDeclRefExprBits
Definition: Stmt.h:1001
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:2412
SourceLocation getParameterPackLocation() const
Get the location of the parameter pack.
Definition: ExprCXX.h:4369
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:923
ExplicitCastExpr - An explicit cast written in the source code.
Definition: Expr.h:3312
This represents &#39;#pragma omp atomic&#39; directive.
Definition: StmtOpenMP.h:2315
child_range children()
Definition: ExprCXX.h:4690
Expr * getCombinedInit() const
Definition: StmtOpenMP.h:1051
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:1953
void AddVersionTuple(const VersionTuple &Version)
Emit a version tuple.
Definition: ASTWriter.h:959
An ObjCAtFinallyStmt record.
Definition: ASTBitCodes.h:1811
SourceLocation getRParenLoc() const
Definition: ExprObjC.h:524
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
Definition: ExprCXX.h:811
CXXNewExprBitfields CXXNewExprBits
Definition: Stmt.h:998
llvm::APInt getValue() const
Definition: Expr.h:1405
Represents a __leave statement.
Definition: Stmt.h:3321
unsigned getCollapsedNumber() const
Get number of collapsed loops.
Definition: StmtOpenMP.h:911
Expr * getCombinedNextLowerBound() const
Definition: StmtOpenMP.h:1063
ArrayRef< Expr * > counters()
Definition: StmtOpenMP.h:1111
LabelDecl * getLabel() const
Definition: Expr.h:3904
path_iterator path_end()
Definition: Expr.h:3198
iterator end() const
Definition: ExprCXX.h:4375
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
Definition: ExprCXX.h:3958
SwitchStmt - This represents a &#39;switch&#39; stmt.
Definition: Stmt.h:2027
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:2560
Expr * getCombinedNextUpperBound() const
Definition: StmtOpenMP.h:1069
SourceLocation getBeginLoc() const
Definition: ExprCXX.h:2410
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:3207
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:3941
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:1052
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:3331
Represents Objective-C&#39;s collection statement.
Definition: StmtObjC.h:23
An ObjCAtSynchronizedStmt record.
Definition: ASTBitCodes.h:1817
arg_iterator arg_begin()
Definition: Expr.h:2719
ArrayRef< Expr * > inits()
Definition: StmtOpenMP.h:1123
unsigned getNumObjects() const
Definition: ExprCXX.h:3337
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:224
SourceLocation getRParenLoc() const
Definition: Expr.h:4157
Represents a &#39;co_await&#39; expression.
Definition: ExprCXX.h:4705
bool isUnique() const
Definition: Expr.h:1116
TypeTraitExprBitfields TypeTraitExprBits
Definition: Stmt.h:1000
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:2108
const NestedNameSpecifierLoc & getNestedNameSpecifierLoc() const
Definition: ExprCXX.h:4907
A CXXMemberCallExpr record.
Definition: ASTBitCodes.h:1846
bool doesUsualArrayDeleteWantSize() const
Answers whether the usual array deallocation function for the allocated type expects the size of the ...
Definition: ExprCXX.h:2298
SourceRange getDirectInitRange() const
Definition: ExprCXX.h:2342
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the member name, with source location information...
Definition: ExprCXX.h:3632
Expr * getNumIterations() const
Definition: StmtOpenMP.h:1001
Opcode getOpcode() const
Definition: Expr.h:2046
Expr * getArg(unsigned Arg)
Return the specified argument.
Definition: ExprCXX.h:1573
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:3119
bool hasAssociatedStmt() const
Returns true if directive has associated statement.
Definition: StmtOpenMP.h:250
Expr * getPrevLowerBoundVariable() const
Definition: StmtOpenMP.h:1009
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:3618
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:1469
Represents a base class of a C++ class.
Definition: DeclCXX.h:147
unsigned getNumClobbers() const
Definition: Stmt.h:2784
bool isImplicit() const
Definition: StmtCXX.h:489
SourceLocation getRParenLoc() const
Definition: Stmt.h:2444
ObjCIvarRefExpr - A reference to an ObjC instance variable.
Definition: ExprObjC.h:546
child_range children()
Definition: ExprCXX.h:4780
bool isPartiallySubstituted() const
Determine whether this represents a partially-substituted sizeof...
Definition: ExprCXX.h:4179
Represents an expression that might suspend coroutine execution; either a co_await or co_yield expres...
Definition: ExprCXX.h:4618
DeclStmt * getRangeStmt()
Definition: StmtCXX.h:161
A ConvertVectorExpr record.
Definition: ASTBitCodes.h:1751
unsigned arg_size() const
Retrieve the number of arguments.
Definition: ExprCXX.h:3447
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:3390
SourceLocation getAsmLoc() const
Definition: Stmt.h:2733
GotoStmt - This represents a direct goto.
Definition: Stmt.h:2465
A use of a default initializer in a constructor or in aggregate initialization.
Definition: ExprCXX.h:1279
Expr * getTarget()
Definition: Stmt.h:2524
Expr * getSrcExpr() const
getSrcExpr - Return the Expr to be converted.
Definition: Expr.h:4063
const SwitchCase * getNextSwitchCase() const
Definition: Stmt.h:1463
CapturedDecl * getCapturedDecl()
Retrieve the outlined function declaration.
Definition: Stmt.cpp:1291
StringRef getUuidStr() const
Definition: ExprCXX.h:1057
bool isFreeIvar() const
Definition: ExprObjC.h:585
Expr * getCond()
Definition: Stmt.h:2356
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:2018
SourceLocation getWhileLoc() const
Definition: Stmt.h:2369
An ArrayInitIndexExpr record.
Definition: ASTBitCodes.h:1724
A GCC-style AsmStmt record.
Definition: ASTBitCodes.h:1634
This represents &#39;#pragma omp target parallel&#39; directive.
Definition: StmtOpenMP.h:2682
ArrayRef< TemplateArgument > getTemplateArguments() const
Definition: ExprCXX.h:4919
ContinueStmt - This represents a continue.
Definition: Stmt.h:2553
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:3212
SourceLocation getAttrLoc() const
Definition: Stmt.h:1799
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:1688
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:1808
Expr * getRHS() const
Definition: Expr.h:3753
Expr * getCombinedCond() const
Definition: StmtOpenMP.h:1057
WhileStmt - This represents a &#39;while&#39; stmt.
Definition: Stmt.h:2210
Represents the specialization of a concept - evaluates to a prvalue of type bool. ...
Definition: ExprCXX.h:4849
SourceRange getParenOrBraceRange() const
Definition: ExprCXX.h:1590
CleanupObject getObject(unsigned i) const
Definition: ExprCXX.h:3339
Field designator where the field has been resolved to a declaration.
Definition: ASTBitCodes.h:2012
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:1719
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:1855
const DeclContext * getUsedContext() const
Definition: ExprCXX.h:1316
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:2592
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:3508
void AddCXXBaseSpecifier(const CXXBaseSpecifier &Base)
Emit a C++ base specifier.
Definition: ASTWriter.cpp:6116
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:2385
This represents &#39;#pragma omp taskloop simd&#39; directive.
Definition: StmtOpenMP.h:3067
void AddASTTemplateArgumentListInfo(const ASTTemplateArgumentListInfo *ASTTemplArgList)
Emits an AST template argument list info.
Definition: ASTWriter.cpp:6095
void AddAPInt(const llvm::APInt &Value)
Emit an integral value.
Definition: ASTWriter.cpp:5437
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:3609
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:2254
Expr * getPattern()
Retrieve the pattern of the pack expansion.
Definition: ExprCXX.h:4044
Expr * getPreCond() const
Definition: StmtOpenMP.h:925
RetTy Visit(PTR(Stmt) S, ParamTys... P)
Definition: StmtVisitor.h:42
Expr * getLHS() const
Definition: Expr.h:4149
bool hasTemplateKWAndArgsInfo() const
Definition: ExprCXX.h:2888
Abstract class common to all of the C++ "named"/"keyword" casts.
Definition: ExprCXX.h:353
This represents &#39;#pragma omp sections&#39; directive.
Definition: StmtOpenMP.h:1407
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:2507
const ParmVarDecl * getParam() const
Definition: ExprCXX.h:1237
OpenMPDirectiveKind getCancelRegion() const
Get cancellation region for the current cancellation point.
Definition: StmtOpenMP.h:2986
capture_init_iterator capture_init_end()
Retrieve the iterator pointing one past the last initialization argument for this lambda expression...
Definition: ExprCXX.h:1975
A rewritten comparison expression that was originally written using operator syntax.
Definition: ExprCXX.h:273
capture_range captures()
Definition: Stmt.h:3495
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:2965
BreakStmt - This represents a break.
Definition: Stmt.h:2583
SourceLocation getReceiverLocation() const
Definition: ExprObjC.h:765
const VarDecl * getCatchParamDecl() const
Definition: StmtObjC.h:97
unsigned getNumLabels() const
Definition: Stmt.h:3011
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:1741
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:1505
void AddTemplateArgumentLoc(const TemplateArgumentLoc &Arg)
Emits a template argument location.
Definition: ASTWriter.cpp:5604
DeclStmt * getLoopVarStmt()
Definition: StmtCXX.h:168
unsigned getNumArgs() const
Return the number of arguments to the constructor call.
Definition: ExprCXX.h:1570
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:2000
This represents &#39;#pragma omp distribute parallel for simd&#39; composite directive.
Definition: StmtOpenMP.h:3545
A boolean literal, per ([C++ lex.bool] Boolean literals).
Definition: ExprCXX.h:645
SourceLocation getBeginLoc() const LLVM_READONLY
Definition: ExprCXX.h:4836
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:2824
This represents &#39;#pragma omp parallel sections&#39; directive.
Definition: StmtOpenMP.h:1861
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:1000
SourceLocation getRParenLoc() const
Definition: ExprCXX.h:1721
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:1462
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:2939
SourceLocation getKeywordLoc() const
Definition: ExprCXX.h:4663
bool caseStmtIsGNURange() const
True if this case statement is of the form case LHS ...
Definition: Stmt.h:1557
StmtCode
Record codes for each kind of statement or expression.
Definition: ASTBitCodes.h:1568
CompoundStmt * getTryBlock() const
Definition: Stmt.h:3297
Stmt * getSubStmt()
Definition: Stmt.h:1804
QualType getBaseType() const
Definition: ExprCXX.h:3857
InitListExpr * getSyntacticForm() const
Definition: Expr.h:4534
Expr * getBaseExpr() const
Definition: ExprCXX.h:919
Represents an implicitly-generated value initialization of an object of a given type.
Definition: Expr.h:5089
CompoundStmt * getBlock() const
Definition: Stmt.h:3216
SourceLocation getReturnLoc() const
Definition: Stmt.h:2676
CapturedRegionKind getCapturedRegionKind() const
Retrieve the captured region kind.
Definition: Stmt.cpp:1306
A GenericSelectionExpr record.
Definition: ASTBitCodes.h:1757
This represents &#39;#pragma omp target parallel for&#39; directive.
Definition: StmtOpenMP.h:2742
SourceLocation getConceptNameLoc() const
Definition: ExprCXX.h:4941
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:1542
SourceLocation getEndLoc() const LLVM_READONLY
Definition: ExprCXX.h:4837
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:1607
bool isOverloaded() const
True if this lookup is overloaded.
Definition: ExprCXX.h:3108
This represents &#39;#pragma omp taskloop&#39; directive.
Definition: StmtOpenMP.h:3002