Clang Project

clang_source_code/include/clang/AST/Stmt.h
1//===- Stmt.h - Classes for representing statements -------------*- C++ -*-===//
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//  This file defines the Stmt interface and subclasses.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_CLANG_AST_STMT_H
14#define LLVM_CLANG_AST_STMT_H
15
16#include "clang/AST/DeclGroup.h"
17#include "clang/AST/StmtIterator.h"
18#include "clang/Basic/CapturedStmt.h"
19#include "clang/Basic/IdentifierTable.h"
20#include "clang/Basic/LLVM.h"
21#include "clang/Basic/SourceLocation.h"
22#include "llvm/ADT/ArrayRef.h"
23#include "llvm/ADT/PointerIntPair.h"
24#include "llvm/ADT/StringRef.h"
25#include "llvm/ADT/iterator.h"
26#include "llvm/ADT/iterator_range.h"
27#include "llvm/Support/Casting.h"
28#include "llvm/Support/Compiler.h"
29#include "llvm/Support/ErrorHandling.h"
30#include <algorithm>
31#include <cassert>
32#include <cstddef>
33#include <iterator>
34#include <string>
35
36namespace llvm {
37
38class FoldingSetNodeID;
39
40// namespace llvm
41
42namespace clang {
43
44class ASTContext;
45class Attr;
46class CapturedDecl;
47class Decl;
48class Expr;
49class LabelDecl;
50class ODRHash;
51class PrinterHelper;
52struct PrintingPolicy;
53class RecordDecl;
54class SourceManager;
55class StringLiteral;
56class Token;
57class VarDecl;
58
59//===----------------------------------------------------------------------===//
60// AST classes for statements.
61//===----------------------------------------------------------------------===//
62
63/// Stmt - This represents one statement.
64///
65class alignas(void *) Stmt {
66public:
67  enum StmtClass {
68    NoStmtClass = 0,
69#define STMT(CLASS, PARENT) CLASS##Class,
70#define STMT_RANGE(BASE, FIRST, LAST) \
71        first##BASE##Constant=FIRST##Class, last##BASE##Constant=LAST##Class,
72#define LAST_STMT_RANGE(BASE, FIRST, LAST) \
73        first##BASE##Constant=FIRST##Class, last##BASE##Constant=LAST##Class
74#define ABSTRACT_STMT(STMT)
75#include "clang/AST/StmtNodes.inc"
76  };
77
78  // Make vanilla 'new' and 'delete' illegal for Stmts.
79protected:
80  friend class ASTStmtReader;
81  friend class ASTStmtWriter;
82
83  void *operator new(size_t bytesnoexcept {
84    llvm_unreachable("Stmts cannot be allocated with regular 'new'.");
85  }
86
87  void operator delete(void *datanoexcept {
88    llvm_unreachable("Stmts cannot be released with regular 'delete'.");
89  }
90
91  //===--- Statement bitfields classes ---===//
92
93  class StmtBitfields {
94    friend class ASTStmtReader;
95    friend class ASTStmtWriter;
96    friend class Stmt;
97
98    /// The statement class.
99    unsigned sClass : 8;
100
101    /// This bit is set only for the Stmts that are the structured-block of
102    /// OpenMP executable directives. Directives that have a structured block
103    /// are called "non-standalone" directives.
104    /// I.e. those returned by OMPExecutableDirective::getStructuredBlock().
105    unsigned IsOMPStructuredBlock : 1;
106  };
107  enum { NumStmtBits = 9 };
108
109  class NullStmtBitfields {
110    friend class ASTStmtReader;
111    friend class ASTStmtWriter;
112    friend class NullStmt;
113
114    unsigned : NumStmtBits;
115
116    /// True if the null statement was preceded by an empty macro, e.g:
117    /// @code
118    ///   #define CALL(x)
119    ///   CALL(0);
120    /// @endcode
121    unsigned HasLeadingEmptyMacro : 1;
122
123    /// The location of the semi-colon.
124    SourceLocation SemiLoc;
125  };
126
127  class CompoundStmtBitfields {
128    friend class ASTStmtReader;
129    friend class CompoundStmt;
130
131    unsigned : NumStmtBits;
132
133    unsigned NumStmts : 32 - NumStmtBits;
134
135    /// The location of the opening "{".
136    SourceLocation LBraceLoc;
137  };
138
139  class LabelStmtBitfields {
140    friend class LabelStmt;
141
142    unsigned : NumStmtBits;
143
144    SourceLocation IdentLoc;
145  };
146
147  class AttributedStmtBitfields {
148    friend class ASTStmtReader;
149    friend class AttributedStmt;
150
151    unsigned : NumStmtBits;
152
153    /// Number of attributes.
154    unsigned NumAttrs : 32 - NumStmtBits;
155
156    /// The location of the attribute.
157    SourceLocation AttrLoc;
158  };
159
160  class IfStmtBitfields {
161    friend class ASTStmtReader;
162    friend class IfStmt;
163
164    unsigned : NumStmtBits;
165
166    /// True if this if statement is a constexpr if.
167    unsigned IsConstexpr : 1;
168
169    /// True if this if statement has storage for an else statement.
170    unsigned HasElse : 1;
171
172    /// True if this if statement has storage for a variable declaration.
173    unsigned HasVar : 1;
174
175    /// True if this if statement has storage for an init statement.
176    unsigned HasInit : 1;
177
178    /// The location of the "if".
179    SourceLocation IfLoc;
180  };
181
182  class SwitchStmtBitfields {
183    friend class SwitchStmt;
184
185    unsigned : NumStmtBits;
186
187    /// True if the SwitchStmt has storage for an init statement.
188    unsigned HasInit : 1;
189
190    /// True if the SwitchStmt has storage for a condition variable.
191    unsigned HasVar : 1;
192
193    /// If the SwitchStmt is a switch on an enum value, records whether all
194    /// the enum values were covered by CaseStmts.  The coverage information
195    /// value is meant to be a hint for possible clients.
196    unsigned AllEnumCasesCovered : 1;
197
198    /// The location of the "switch".
199    SourceLocation SwitchLoc;
200  };
201
202  class WhileStmtBitfields {
203    friend class ASTStmtReader;
204    friend class WhileStmt;
205
206    unsigned : NumStmtBits;
207
208    /// True if the WhileStmt has storage for a condition variable.
209    unsigned HasVar : 1;
210
211    /// The location of the "while".
212    SourceLocation WhileLoc;
213  };
214
215  class DoStmtBitfields {
216    friend class DoStmt;
217
218    unsigned : NumStmtBits;
219
220    /// The location of the "do".
221    SourceLocation DoLoc;
222  };
223
224  class ForStmtBitfields {
225    friend class ForStmt;
226
227    unsigned : NumStmtBits;
228
229    /// The location of the "for".
230    SourceLocation ForLoc;
231  };
232
233  class GotoStmtBitfields {
234    friend class GotoStmt;
235    friend class IndirectGotoStmt;
236
237    unsigned : NumStmtBits;
238
239    /// The location of the "goto".
240    SourceLocation GotoLoc;
241  };
242
243  class ContinueStmtBitfields {
244    friend class ContinueStmt;
245
246    unsigned : NumStmtBits;
247
248    /// The location of the "continue".
249    SourceLocation ContinueLoc;
250  };
251
252  class BreakStmtBitfields {
253    friend class BreakStmt;
254
255    unsigned : NumStmtBits;
256
257    /// The location of the "break".
258    SourceLocation BreakLoc;
259  };
260
261  class ReturnStmtBitfields {
262    friend class ReturnStmt;
263
264    unsigned : NumStmtBits;
265
266    /// True if this ReturnStmt has storage for an NRVO candidate.
267    unsigned HasNRVOCandidate : 1;
268
269    /// The location of the "return".
270    SourceLocation RetLoc;
271  };
272
273  class SwitchCaseBitfields {
274    friend class SwitchCase;
275    friend class CaseStmt;
276
277    unsigned : NumStmtBits;
278
279    /// Used by CaseStmt to store whether it is a case statement
280    /// of the form case LHS ... RHS (a GNU extension).
281    unsigned CaseStmtIsGNURange : 1;
282
283    /// The location of the "case" or "default" keyword.
284    SourceLocation KeywordLoc;
285  };
286
287  //===--- Expression bitfields classes ---===//
288
289  class ExprBitfields {
290    friend class ASTStmtReader// deserialization
291    friend class AtomicExpr// ctor
292    friend class BlockDeclRefExpr// ctor
293    friend class CallExpr// ctor
294    friend class CXXConstructExpr// ctor
295    friend class CXXDependentScopeMemberExpr// ctor
296    friend class CXXNewExpr// ctor
297    friend class CXXUnresolvedConstructExpr// ctor
298    friend class DeclRefExpr// computeDependence
299    friend class DependentScopeDeclRefExpr// ctor
300    friend class DesignatedInitExpr// ctor
301    friend class Expr;
302    friend class InitListExpr// ctor
303    friend class ObjCArrayLiteral// ctor
304    friend class ObjCDictionaryLiteral// ctor
305    friend class ObjCMessageExpr// ctor
306    friend class OffsetOfExpr// ctor
307    friend class OpaqueValueExpr// ctor
308    friend class OverloadExpr// ctor
309    friend class ParenListExpr// ctor
310    friend class PseudoObjectExpr// ctor
311    friend class ShuffleVectorExpr// ctor
312
313    unsigned : NumStmtBits;
314
315    unsigned ValueKind : 2;
316    unsigned ObjectKind : 3;
317    unsigned TypeDependent : 1;
318    unsigned ValueDependent : 1;
319    unsigned InstantiationDependent : 1;
320    unsigned ContainsUnexpandedParameterPack : 1;
321  };
322  enum { NumExprBits = NumStmtBits + 9 };
323
324  class PredefinedExprBitfields {
325    friend class ASTStmtReader;
326    friend class PredefinedExpr;
327
328    unsigned : NumExprBits;
329
330    /// The kind of this PredefinedExpr. One of the enumeration values
331    /// in PredefinedExpr::IdentKind.
332    unsigned Kind : 4;
333
334    /// True if this PredefinedExpr has a trailing "StringLiteral *"
335    /// for the predefined identifier.
336    unsigned HasFunctionName : 1;
337
338    /// The location of this PredefinedExpr.
339    SourceLocation Loc;
340  };
341
342  class DeclRefExprBitfields {
343    friend class ASTStmtReader// deserialization
344    friend class DeclRefExpr;
345
346    unsigned : NumExprBits;
347
348    unsigned HasQualifier : 1;
349    unsigned HasTemplateKWAndArgsInfo : 1;
350    unsigned HasFoundDecl : 1;
351    unsigned HadMultipleCandidates : 1;
352    unsigned RefersToEnclosingVariableOrCapture : 1;
353
354    /// The location of the declaration name itself.
355    SourceLocation Loc;
356  };
357
358  enum APFloatSemantics {
359    IEEEhalf,
360    IEEEsingle,
361    IEEEdouble,
362    x87DoubleExtended,
363    IEEEquad,
364    PPCDoubleDouble
365  };
366
367  class FloatingLiteralBitfields {
368    friend class FloatingLiteral;
369
370    unsigned : NumExprBits;
371
372    unsigned Semantics : 3// Provides semantics for APFloat construction
373    unsigned IsExact : 1;
374  };
375
376  class StringLiteralBitfields {
377    friend class ASTStmtReader;
378    friend class StringLiteral;
379
380    unsigned : NumExprBits;
381
382    /// The kind of this string literal.
383    /// One of the enumeration values of StringLiteral::StringKind.
384    unsigned Kind : 3;
385
386    /// The width of a single character in bytes. Only values of 1, 2,
387    /// and 4 bytes are supported. StringLiteral::mapCharByteWidth maps
388    /// the target + string kind to the appropriate CharByteWidth.
389    unsigned CharByteWidth : 3;
390
391    unsigned IsPascal : 1;
392
393    /// The number of concatenated token this string is made of.
394    /// This is the number of trailing SourceLocation.
395    unsigned NumConcatenated;
396  };
397
398  class CharacterLiteralBitfields {
399    friend class CharacterLiteral;
400
401    unsigned : NumExprBits;
402
403    unsigned Kind : 3;
404  };
405
406  class UnaryOperatorBitfields {
407    friend class UnaryOperator;
408
409    unsigned : NumExprBits;
410
411    unsigned Opc : 5;
412    unsigned CanOverflow : 1;
413
414    SourceLocation Loc;
415  };
416
417  class UnaryExprOrTypeTraitExprBitfields {
418    friend class UnaryExprOrTypeTraitExpr;
419
420    unsigned : NumExprBits;
421
422    unsigned Kind : 3;
423    unsigned IsType : 1// true if operand is a type, false if an expression.
424  };
425
426  class ArraySubscriptExprBitfields {
427    friend class ArraySubscriptExpr;
428
429    unsigned : NumExprBits;
430
431    SourceLocation RBracketLoc;
432  };
433
434  class CallExprBitfields {
435    friend class CallExpr;
436
437    unsigned : NumExprBits;
438
439    unsigned NumPreArgs : 1;
440
441    /// True if the callee of the call expression was found using ADL.
442    unsigned UsesADL : 1;
443
444    /// Padding used to align OffsetToTrailingObjects to a byte multiple.
445    unsigned : 24 - 2 - NumExprBits;
446
447    /// The offset in bytes from the this pointer to the start of the
448    /// trailing objects belonging to CallExpr. Intentionally byte sized
449    /// for faster access.
450    unsigned OffsetToTrailingObjects : 8;
451  };
452  enum { NumCallExprBits = 32 };
453
454  class MemberExprBitfields {
455    friend class MemberExpr;
456
457    unsigned : NumExprBits;
458
459    /// IsArrow - True if this is "X->F", false if this is "X.F".
460    unsigned IsArrow : 1;
461
462    /// True if this member expression used a nested-name-specifier to
463    /// refer to the member, e.g., "x->Base::f", or found its member via
464    /// a using declaration.  When true, a MemberExprNameQualifier
465    /// structure is allocated immediately after the MemberExpr.
466    unsigned HasQualifierOrFoundDecl : 1;
467
468    /// True if this member expression specified a template keyword
469    /// and/or a template argument list explicitly, e.g., x->f<int>,
470    /// x->template f, x->template f<int>.
471    /// When true, an ASTTemplateKWAndArgsInfo structure and its
472    /// TemplateArguments (if any) are present.
473    unsigned HasTemplateKWAndArgsInfo : 1;
474
475    /// True if this member expression refers to a method that
476    /// was resolved from an overloaded set having size greater than 1.
477    unsigned HadMultipleCandidates : 1;
478
479    /// This is the location of the -> or . in the expression.
480    SourceLocation OperatorLoc;
481  };
482
483  class CastExprBitfields {
484    friend class CastExpr;
485    friend class ImplicitCastExpr;
486
487    unsigned : NumExprBits;
488
489    unsigned Kind : 6;
490    unsigned PartOfExplicitCast : 1// Only set for ImplicitCastExpr.
491
492    /// The number of CXXBaseSpecifiers in the cast. 14 bits would be enough
493    /// here. ([implimits] Direct and indirect base classes [16384]).
494    unsigned BasePathSize;
495  };
496
497  class BinaryOperatorBitfields {
498    friend class BinaryOperator;
499
500    unsigned : NumExprBits;
501
502    unsigned Opc : 6;
503
504    /// This is only meaningful for operations on floating point
505    /// types and 0 otherwise.
506    unsigned FPFeatures : 3;
507
508    SourceLocation OpLoc;
509  };
510
511  class InitListExprBitfields {
512    friend class InitListExpr;
513
514    unsigned : NumExprBits;
515
516    /// Whether this initializer list originally had a GNU array-range
517    /// designator in it. This is a temporary marker used by CodeGen.
518    unsigned HadArrayRangeDesignator : 1;
519  };
520
521  class ParenListExprBitfields {
522    friend class ASTStmtReader;
523    friend class ParenListExpr;
524
525    unsigned : NumExprBits;
526
527    /// The number of expressions in the paren list.
528    unsigned NumExprs;
529  };
530
531  class GenericSelectionExprBitfields {
532    friend class ASTStmtReader;
533    friend class GenericSelectionExpr;
534
535    unsigned : NumExprBits;
536
537    /// The location of the "_Generic".
538    SourceLocation GenericLoc;
539  };
540
541  class PseudoObjectExprBitfields {
542    friend class ASTStmtReader// deserialization
543    friend class PseudoObjectExpr;
544
545    unsigned : NumExprBits;
546
547    // These don't need to be particularly wide, because they're
548    // strictly limited by the forms of expressions we permit.
549    unsigned NumSubExprs : 8;
550    unsigned ResultIndex : 32 - 8 - NumExprBits;
551  };
552
553  //===--- C++ Expression bitfields classes ---===//
554
555  class CXXOperatorCallExprBitfields {
556    friend class ASTStmtReader;
557    friend class CXXOperatorCallExpr;
558
559    unsigned : NumCallExprBits;
560
561    /// The kind of this overloaded operator. One of the enumerator
562    /// value of OverloadedOperatorKind.
563    unsigned OperatorKind : 6;
564
565    // Only meaningful for floating point types.
566    unsigned FPFeatures : 3;
567  };
568
569  class CXXBoolLiteralExprBitfields {
570    friend class CXXBoolLiteralExpr;
571
572    unsigned : NumExprBits;
573
574    /// The value of the boolean literal.
575    unsigned Value : 1;
576
577    /// The location of the boolean literal.
578    SourceLocation Loc;
579  };
580
581  class CXXNullPtrLiteralExprBitfields {
582    friend class CXXNullPtrLiteralExpr;
583
584    unsigned : NumExprBits;
585
586    /// The location of the null pointer literal.
587    SourceLocation Loc;
588  };
589
590  class CXXThisExprBitfields {
591    friend class CXXThisExpr;
592
593    unsigned : NumExprBits;
594
595    /// Whether this is an implicit "this".
596    unsigned IsImplicit : 1;
597
598    /// The location of the "this".
599    SourceLocation Loc;
600  };
601
602  class CXXThrowExprBitfields {
603    friend class ASTStmtReader;
604    friend class CXXThrowExpr;
605
606    unsigned : NumExprBits;
607
608    /// Whether the thrown variable (if any) is in scope.
609    unsigned IsThrownVariableInScope : 1;
610
611    /// The location of the "throw".
612    SourceLocation ThrowLoc;
613  };
614
615  class CXXDefaultArgExprBitfields {
616    friend class ASTStmtReader;
617    friend class CXXDefaultArgExpr;
618
619    unsigned : NumExprBits;
620
621    /// The location where the default argument expression was used.
622    SourceLocation Loc;
623  };
624
625  class CXXDefaultInitExprBitfields {
626    friend class ASTStmtReader;
627    friend class CXXDefaultInitExpr;
628
629    unsigned : NumExprBits;
630
631    /// The location where the default initializer expression was used.
632    SourceLocation Loc;
633  };
634
635  class CXXScalarValueInitExprBitfields {
636    friend class ASTStmtReader;
637    friend class CXXScalarValueInitExpr;
638
639    unsigned : NumExprBits;
640
641    SourceLocation RParenLoc;
642  };
643
644  class CXXNewExprBitfields {
645    friend class ASTStmtReader;
646    friend class ASTStmtWriter;
647    friend class CXXNewExpr;
648
649    unsigned : NumExprBits;
650
651    /// Was the usage ::new, i.e. is the global new to be used?
652    unsigned IsGlobalNew : 1;
653
654    /// Do we allocate an array? If so, the first trailing "Stmt *" is the
655    /// size expression.
656    unsigned IsArray : 1;
657
658    /// Should the alignment be passed to the allocation function?
659    unsigned ShouldPassAlignment : 1;
660
661    /// If this is an array allocation, does the usual deallocation
662    /// function for the allocated type want to know the allocated size?
663    unsigned UsualArrayDeleteWantsSize : 1;
664
665    /// What kind of initializer do we have? Could be none, parens, or braces.
666    /// In storage, we distinguish between "none, and no initializer expr", and
667    /// "none, but an implicit initializer expr".
668    unsigned StoredInitializationStyle : 2;
669
670    /// True if the allocated type was expressed as a parenthesized type-id.
671    unsigned IsParenTypeId : 1;
672
673    /// The number of placement new arguments.
674    unsigned NumPlacementArgs;
675  };
676
677  class CXXDeleteExprBitfields {
678    friend class ASTStmtReader;
679    friend class CXXDeleteExpr;
680
681    unsigned : NumExprBits;
682
683    /// Is this a forced global delete, i.e. "::delete"?
684    unsigned GlobalDelete : 1;
685
686    /// Is this the array form of delete, i.e. "delete[]"?
687    unsigned ArrayForm : 1;
688
689    /// ArrayFormAsWritten can be different from ArrayForm if 'delete' is
690    /// applied to pointer-to-array type (ArrayFormAsWritten will be false
691    /// while ArrayForm will be true).
692    unsigned ArrayFormAsWritten : 1;
693
694    /// Does the usual deallocation function for the element type require
695    /// a size_t argument?
696    unsigned UsualArrayDeleteWantsSize : 1;
697
698    /// Location of the expression.
699    SourceLocation Loc;
700  };
701
702  class TypeTraitExprBitfields {
703    friend class ASTStmtReader;
704    friend class ASTStmtWriter;
705    friend class TypeTraitExpr;
706
707    unsigned : NumExprBits;
708
709    /// The kind of type trait, which is a value of a TypeTrait enumerator.
710    unsigned Kind : 8;
711
712    /// If this expression is not value-dependent, this indicates whether
713    /// the trait evaluated true or false.
714    unsigned Value : 1;
715
716    /// The number of arguments to this type trait.
717    unsigned NumArgs : 32 - 8 - 1 - NumExprBits;
718  };
719
720  class DependentScopeDeclRefExprBitfields {
721    friend class ASTStmtReader;
722    friend class ASTStmtWriter;
723    friend class DependentScopeDeclRefExpr;
724
725    unsigned : NumExprBits;
726
727    /// Whether the name includes info for explicit template
728    /// keyword and arguments.
729    unsigned HasTemplateKWAndArgsInfo : 1;
730  };
731
732  class CXXConstructExprBitfields {
733    friend class ASTStmtReader;
734    friend class CXXConstructExpr;
735
736    unsigned : NumExprBits;
737
738    unsigned Elidable : 1;
739    unsigned HadMultipleCandidates : 1;
740    unsigned ListInitialization : 1;
741    unsigned StdInitListInitialization : 1;
742    unsigned ZeroInitialization : 1;
743    unsigned ConstructionKind : 3;
744
745    SourceLocation Loc;
746  };
747
748  class ExprWithCleanupsBitfields {
749    friend class ASTStmtReader// deserialization
750    friend class ExprWithCleanups;
751
752    unsigned : NumExprBits;
753
754    // When false, it must not have side effects.
755    unsigned CleanupsHaveSideEffects : 1;
756
757    unsigned NumObjects : 32 - 1 - NumExprBits;
758  };
759
760  class CXXUnresolvedConstructExprBitfields {
761    friend class ASTStmtReader;
762    friend class CXXUnresolvedConstructExpr;
763
764    unsigned : NumExprBits;
765
766    /// The number of arguments used to construct the type.
767    unsigned NumArgs;
768  };
769
770  class CXXDependentScopeMemberExprBitfields {
771    friend class ASTStmtReader;
772    friend class CXXDependentScopeMemberExpr;
773
774    unsigned : NumExprBits;
775
776    /// Whether this member expression used the '->' operator or
777    /// the '.' operator.
778    unsigned IsArrow : 1;
779
780    /// Whether this member expression has info for explicit template
781    /// keyword and arguments.
782    unsigned HasTemplateKWAndArgsInfo : 1;
783
784    /// See getFirstQualifierFoundInScope() and the comment listing
785    /// the trailing objects.
786    unsigned HasFirstQualifierFoundInScope : 1;
787
788    /// The location of the '->' or '.' operator.
789    SourceLocation OperatorLoc;
790  };
791
792  class OverloadExprBitfields {
793    friend class ASTStmtReader;
794    friend class OverloadExpr;
795
796    unsigned : NumExprBits;
797
798    /// Whether the name includes info for explicit template
799    /// keyword and arguments.
800    unsigned HasTemplateKWAndArgsInfo : 1;
801
802    /// Padding used by the derived classes to store various bits. If you
803    /// need to add some data here, shrink this padding and add your data
804    /// above. NumOverloadExprBits also needs to be updated.
805    unsigned : 32 - NumExprBits - 1;
806
807    /// The number of results.
808    unsigned NumResults;
809  };
810  enum { NumOverloadExprBits = NumExprBits + 1 };
811
812  class UnresolvedLookupExprBitfields {
813    friend class ASTStmtReader;
814    friend class UnresolvedLookupExpr;
815
816    unsigned : NumOverloadExprBits;
817
818    /// True if these lookup results should be extended by
819    /// argument-dependent lookup if this is the operand of a function call.
820    unsigned RequiresADL : 1;
821
822    /// True if these lookup results are overloaded.  This is pretty trivially
823    /// rederivable if we urgently need to kill this field.
824    unsigned Overloaded : 1;
825  };
826  static_assert(sizeof(UnresolvedLookupExprBitfields) <= 4,
827                "UnresolvedLookupExprBitfields must be <= than 4 bytes to"
828                "avoid trashing OverloadExprBitfields::NumResults!");
829
830  class UnresolvedMemberExprBitfields {
831    friend class ASTStmtReader;
832    friend class UnresolvedMemberExpr;
833
834    unsigned : NumOverloadExprBits;
835
836    /// Whether this member expression used the '->' operator or
837    /// the '.' operator.
838    unsigned IsArrow : 1;
839
840    /// Whether the lookup results contain an unresolved using declaration.
841    unsigned HasUnresolvedUsing : 1;
842  };
843  static_assert(sizeof(UnresolvedMemberExprBitfields) <= 4,
844                "UnresolvedMemberExprBitfields must be <= than 4 bytes to"
845                "avoid trashing OverloadExprBitfields::NumResults!");
846
847  class CXXNoexceptExprBitfields {
848    friend class ASTStmtReader;
849    friend class CXXNoexceptExpr;
850
851    unsigned : NumExprBits;
852
853    unsigned Value : 1;
854  };
855
856  class SubstNonTypeTemplateParmExprBitfields {
857    friend class ASTStmtReader;
858    friend class SubstNonTypeTemplateParmExpr;
859
860    unsigned : NumExprBits;
861
862    /// The location of the non-type template parameter reference.
863    SourceLocation NameLoc;
864  };
865
866  //===--- C++ Coroutines TS bitfields classes ---===//
867
868  class CoawaitExprBitfields {
869    friend class CoawaitExpr;
870
871    unsigned : NumExprBits;
872
873    unsigned IsImplicit : 1;
874  };
875
876  //===--- Obj-C Expression bitfields classes ---===//
877
878  class ObjCIndirectCopyRestoreExprBitfields {
879    friend class ObjCIndirectCopyRestoreExpr;
880
881    unsigned : NumExprBits;
882
883    unsigned ShouldCopy : 1;
884  };
885
886  //===--- Clang Extensions bitfields classes ---===//
887
888  class OpaqueValueExprBitfields {
889    friend class ASTStmtReader;
890    friend class OpaqueValueExpr;
891
892    unsigned : NumExprBits;
893
894    /// The OVE is a unique semantic reference to its source expression if this
895    /// bit is set to true.
896    unsigned IsUnique : 1;
897
898    SourceLocation Loc;
899  };
900
901  union {
902    // Same order as in StmtNodes.td.
903    // Statements
904    StmtBitfields StmtBits;
905    NullStmtBitfields NullStmtBits;
906    CompoundStmtBitfields CompoundStmtBits;
907    LabelStmtBitfields LabelStmtBits;
908    AttributedStmtBitfields AttributedStmtBits;
909    IfStmtBitfields IfStmtBits;
910    SwitchStmtBitfields SwitchStmtBits;
911    WhileStmtBitfields WhileStmtBits;
912    DoStmtBitfields DoStmtBits;
913    ForStmtBitfields ForStmtBits;
914    GotoStmtBitfields GotoStmtBits;
915    ContinueStmtBitfields ContinueStmtBits;
916    BreakStmtBitfields BreakStmtBits;
917    ReturnStmtBitfields ReturnStmtBits;
918    SwitchCaseBitfields SwitchCaseBits;
919
920    // Expressions
921    ExprBitfields ExprBits;
922    PredefinedExprBitfields PredefinedExprBits;
923    DeclRefExprBitfields DeclRefExprBits;
924    FloatingLiteralBitfields FloatingLiteralBits;
925    StringLiteralBitfields StringLiteralBits;
926    CharacterLiteralBitfields CharacterLiteralBits;
927    UnaryOperatorBitfields UnaryOperatorBits;
928    UnaryExprOrTypeTraitExprBitfields UnaryExprOrTypeTraitExprBits;
929    ArraySubscriptExprBitfields ArraySubscriptExprBits;
930    CallExprBitfields CallExprBits;
931    MemberExprBitfields MemberExprBits;
932    CastExprBitfields CastExprBits;
933    BinaryOperatorBitfields BinaryOperatorBits;
934    InitListExprBitfields InitListExprBits;
935    ParenListExprBitfields ParenListExprBits;
936    GenericSelectionExprBitfields GenericSelectionExprBits;
937    PseudoObjectExprBitfields PseudoObjectExprBits;
938
939    // C++ Expressions
940    CXXOperatorCallExprBitfields CXXOperatorCallExprBits;
941    CXXBoolLiteralExprBitfields CXXBoolLiteralExprBits;
942    CXXNullPtrLiteralExprBitfields CXXNullPtrLiteralExprBits;
943    CXXThisExprBitfields CXXThisExprBits;
944    CXXThrowExprBitfields CXXThrowExprBits;
945    CXXDefaultArgExprBitfields CXXDefaultArgExprBits;
946    CXXDefaultInitExprBitfields CXXDefaultInitExprBits;
947    CXXScalarValueInitExprBitfields CXXScalarValueInitExprBits;
948    CXXNewExprBitfields CXXNewExprBits;
949    CXXDeleteExprBitfields CXXDeleteExprBits;
950    TypeTraitExprBitfields TypeTraitExprBits;
951    DependentScopeDeclRefExprBitfields DependentScopeDeclRefExprBits;
952    CXXConstructExprBitfields CXXConstructExprBits;
953    ExprWithCleanupsBitfields ExprWithCleanupsBits;
954    CXXUnresolvedConstructExprBitfields CXXUnresolvedConstructExprBits;
955    CXXDependentScopeMemberExprBitfields CXXDependentScopeMemberExprBits;
956    OverloadExprBitfields OverloadExprBits;
957    UnresolvedLookupExprBitfields UnresolvedLookupExprBits;
958    UnresolvedMemberExprBitfields UnresolvedMemberExprBits;
959    CXXNoexceptExprBitfields CXXNoexceptExprBits;
960    SubstNonTypeTemplateParmExprBitfields SubstNonTypeTemplateParmExprBits;
961
962    // C++ Coroutines TS expressions
963    CoawaitExprBitfields CoawaitBits;
964
965    // Obj-C Expressions
966    ObjCIndirectCopyRestoreExprBitfields ObjCIndirectCopyRestoreExprBits;
967
968    // Clang Extensions
969    OpaqueValueExprBitfields OpaqueValueExprBits;
970  };
971
972public:
973  // Only allow allocation of Stmts using the allocator in ASTContext
974  // or by doing a placement new.
975  voidoperator new(size_t bytesconst ASTContextC,
976                     unsigned alignment = 8);
977
978  voidoperator new(size_t bytesconst ASTContextC,
979                     unsigned alignment = 8) {
980    return operator new(bytes, *C, alignment);
981  }
982
983  void *operator new(size_t bytesvoid *memnoexcept { return mem; }
984
985  void operator delete(void *, const ASTContext &, unsignednoexcept {}
986  void operator delete(void *, const ASTContext *, unsignednoexcept {}
987  void operator delete(void *, size_t) noexcept {}
988  void operator delete(void *, void *) noexcept {}
989
990public:
991  /// A placeholder type used to construct an empty shell of a
992  /// type, that will be filled in later (e.g., by some
993  /// de-serialization).
994  struct EmptyShell {};
995
996protected:
997  /// Iterator for iterating over Stmt * arrays that contain only T *.
998  ///
999  /// This is needed because AST nodes use Stmt* arrays to store
1000  /// references to children (to be compatible with StmtIterator).
1001  template<typename T, typename TPtr = T *, typename StmtPtr = Stmt *>
1002  struct CastIterator
1003      : llvm::iterator_adaptor_base<CastIterator<T, TPtr, StmtPtr>, StmtPtr *,
1004                                    std::random_access_iterator_tag, TPtr> {
1005    using Base = typename CastIterator::iterator_adaptor_base;
1006
1007    CastIterator() : Base(nullptr) {}
1008    CastIterator(StmtPtr *I) : Base(I) {}
1009
1010    typename Base::value_type operator*() const {
1011      return cast<T>(*this->I);
1012    }
1013  };
1014
1015  /// Const iterator for iterating over Stmt * arrays that contain only T *.
1016  template <typename T>
1017  using ConstCastIterator = CastIterator<T, const T *constconst Stmt *const>;
1018
1019  using ExprIterator = CastIterator<Expr>;
1020  using ConstExprIterator = ConstCastIterator<Expr>;
1021
1022private:
1023  /// Whether statistic collection is enabled.
1024  static bool StatisticsEnabled;
1025
1026protected:
1027  /// Construct an empty statement.
1028  explicit Stmt(StmtClass SCEmptyShell) : Stmt(SC) {}
1029
1030public:
1031  Stmt(StmtClass SC) {
1032    static_assert(sizeof(*this) <= 8,
1033                  "changing bitfields changed sizeof(Stmt)");
1034    static_assert(sizeof(*this) % alignof(void *) == 0,
1035                  "Insufficient alignment!");
1036    StmtBits.sClass = SC;
1037    StmtBits.IsOMPStructuredBlock = false;
1038    if (StatisticsEnabledStmt::addStmtClass(SC);
1039  }
1040
1041  StmtClass getStmtClass() const {
1042    return static_cast<StmtClass>(StmtBits.sClass);
1043  }
1044
1045  const char *getStmtClassName() const;
1046
1047  bool isOMPStructuredBlock() const { return StmtBits.IsOMPStructuredBlock; }
1048  void setIsOMPStructuredBlock(bool IsOMPStructuredBlock) {
1049    StmtBits.IsOMPStructuredBlock = IsOMPStructuredBlock;
1050  }
1051
1052  /// SourceLocation tokens are not useful in isolation - they are low level
1053  /// value objects created/interpreted by SourceManager. We assume AST
1054  /// clients will have a pointer to the respective SourceManager.
1055  SourceRange getSourceRange() const LLVM_READONLY;
1056  SourceLocation getBeginLoc() const LLVM_READONLY;
1057  SourceLocation getEndLoc() const LLVM_READONLY;
1058
1059  // global temp stats (until we have a per-module visitor)
1060  static void addStmtClass(const StmtClass s);
1061  static void EnableStatistics();
1062  static void PrintStats();
1063
1064  /// Dumps the specified AST fragment and all subtrees to
1065  /// \c llvm::errs().
1066  void dump() const;
1067  void dump(SourceManager &SMconst;
1068  void dump(raw_ostream &OSSourceManager &SMconst;
1069  void dump(raw_ostream &OSconst;
1070
1071  /// \return Unique reproducible object identifier
1072  int64_t getID(const ASTContext &Contextconst;
1073
1074  /// dumpColor - same as dump(), but forces color highlighting.
1075  void dumpColor() const;
1076
1077  /// dumpPretty/printPretty - These two methods do a "pretty print" of the AST
1078  /// back to its original source language syntax.
1079  void dumpPretty(const ASTContext &Contextconst;
1080  void printPretty(raw_ostream &OSPrinterHelper *Helper,
1081                   const PrintingPolicy &Policyunsigned Indentation = 0,
1082                   StringRef NewlineSymbol = "\n",
1083                   const ASTContext *Context = nullptrconst;
1084
1085  /// viewAST - Visualize an AST rooted at this Stmt* using GraphViz.  Only
1086  ///   works on systems with GraphViz (Mac OS X) or dot+gv installed.
1087  void viewAST() const;
1088
1089  /// Skip no-op (attributed, compound) container stmts and skip captured
1090  /// stmt at the top, if \a IgnoreCaptured is true.
1091  Stmt *IgnoreContainers(bool IgnoreCaptured = false);
1092  const Stmt *IgnoreContainers(bool IgnoreCaptured = falseconst {
1093    return const_cast<Stmt *>(this)->IgnoreContainers(IgnoreCaptured);
1094  }
1095
1096  const Stmt *stripLabelLikeStatements() const;
1097  Stmt *stripLabelLikeStatements() {
1098    return const_cast<Stmt*>(
1099      const_cast<const Stmt*>(this)->stripLabelLikeStatements());
1100  }
1101
1102  /// Child Iterators: All subclasses must implement 'children'
1103  /// to permit easy iteration over the substatements/subexpessions of an
1104  /// AST node.  This permits easy iteration over all nodes in the AST.
1105  using child_iterator = StmtIterator;
1106  using const_child_iterator = ConstStmtIterator;
1107
1108  using child_range = llvm::iterator_range<child_iterator>;
1109  using const_child_range = llvm::iterator_range<const_child_iterator>;
1110
1111  child_range children();
1112
1113  const_child_range children() const {
1114    auto Children = const_cast<Stmt *>(this)->children();
1115    return const_child_range(Children.begin(), Children.end());
1116  }
1117
1118  child_iterator child_begin() { return children().begin(); }
1119  child_iterator child_end() { return children().end(); }
1120
1121  const_child_iterator child_begin() const { return children().begin(); }
1122  const_child_iterator child_end() const { return children().end(); }
1123
1124  /// Produce a unique representation of the given statement.
1125  ///
1126  /// \param ID once the profiling operation is complete, will contain
1127  /// the unique representation of the given statement.
1128  ///
1129  /// \param Context the AST context in which the statement resides
1130  ///
1131  /// \param Canonical whether the profile should be based on the canonical
1132  /// representation of this statement (e.g., where non-type template
1133  /// parameters are identified by index/level rather than their
1134  /// declaration pointers) or the exact representation of the statement as
1135  /// written in the source.
1136  void Profile(llvm::FoldingSetNodeID &IDconst ASTContext &Context,
1137               bool Canonicalconst;
1138
1139  /// Calculate a unique representation for a statement that is
1140  /// stable across compiler invocations.
1141  ///
1142  /// \param ID profile information will be stored in ID.
1143  ///
1144  /// \param Hash an ODRHash object which will be called where pointers would
1145  /// have been used in the Profile function.
1146  void ProcessODRHash(llvm::FoldingSetNodeID &IDODRHashHashconst;
1147};
1148
1149/// DeclStmt - Adaptor class for mixing declarations with statements and
1150/// expressions. For example, CompoundStmt mixes statements, expressions
1151/// and declarations (variables, types). Another example is ForStmt, where
1152/// the first statement can be an expression or a declaration.
1153class DeclStmt : public Stmt {
1154  DeclGroupRef DG;
1155  SourceLocation StartLocEndLoc;
1156
1157public:
1158  DeclStmt(DeclGroupRef dgSourceLocation startLocSourceLocation endLoc)
1159      : Stmt(DeclStmtClass), DG(dg), StartLoc(startLoc), EndLoc(endLoc) {}
1160
1161  /// Build an empty declaration statement.
1162  explicit DeclStmt(EmptyShell Empty) : Stmt(DeclStmtClass, Empty) {}
1163
1164  /// isSingleDecl - This method returns true if this DeclStmt refers
1165  /// to a single Decl.
1166  bool isSingleDecl() const { return DG.isSingleDecl(); }
1167
1168  const Decl *getSingleDecl() const { return DG.getSingleDecl(); }
1169  Decl *getSingleDecl() { return DG.getSingleDecl(); }
1170
1171  const DeclGroupRef getDeclGroup() const { return DG; }
1172  DeclGroupRef getDeclGroup() { return DG; }
1173  void setDeclGroup(DeclGroupRef DGR) { DG = DGR; }
1174
1175  void setStartLoc(SourceLocation L) { StartLoc = L; }
1176  SourceLocation getEndLoc() const { return EndLoc; }
1177  void setEndLoc(SourceLocation L) { EndLoc = L; }
1178
1179  SourceLocation getBeginLoc() const LLVM_READONLY { return StartLoc; }
1180
1181  static bool classof(const Stmt *T) {
1182    return T->getStmtClass() == DeclStmtClass;
1183  }
1184
1185  // Iterators over subexpressions.
1186  child_range children() {
1187    return child_range(child_iterator(DG.begin(), DG.end()),
1188                       child_iterator(DG.end(), DG.end()));
1189  }
1190
1191  using decl_iterator = DeclGroupRef::iterator;
1192  using const_decl_iterator = DeclGroupRef::const_iterator;
1193  using decl_range = llvm::iterator_range<decl_iterator>;
1194  using decl_const_range = llvm::iterator_range<const_decl_iterator>;
1195
1196  decl_range decls() { return decl_range(decl_begin(), decl_end()); }
1197
1198  decl_const_range decls() const {
1199    return decl_const_range(decl_begin(), decl_end());
1200  }
1201
1202  decl_iterator decl_begin() { return DG.begin(); }
1203  decl_iterator decl_end() { return DG.end(); }
1204  const_decl_iterator decl_begin() const { return DG.begin(); }
1205  const_decl_iterator decl_end() const { return DG.end(); }
1206
1207  using reverse_decl_iterator = std::reverse_iterator<decl_iterator>;
1208
1209  reverse_decl_iterator decl_rbegin() {
1210    return reverse_decl_iterator(decl_end());
1211  }
1212
1213  reverse_decl_iterator decl_rend() {
1214    return reverse_decl_iterator(decl_begin());
1215  }
1216};
1217
1218/// NullStmt - This is the null statement ";": C99 6.8.3p3.
1219///
1220class NullStmt : public Stmt {
1221public:
1222  NullStmt(SourceLocation Lbool hasLeadingEmptyMacro = false)
1223      : Stmt(NullStmtClass) {
1224    NullStmtBits.HasLeadingEmptyMacro = hasLeadingEmptyMacro;
1225    setSemiLoc(L);
1226  }
1227
1228  /// Build an empty null statement.
1229  explicit NullStmt(EmptyShell Empty) : Stmt(NullStmtClass, Empty) {}
1230
1231  SourceLocation getSemiLoc() const { return NullStmtBits.SemiLoc; }
1232  void setSemiLoc(SourceLocation L) { NullStmtBits.SemiLoc = L; }
1233
1234  bool hasLeadingEmptyMacro() const {
1235    return NullStmtBits.HasLeadingEmptyMacro;
1236  }
1237
1238  SourceLocation getBeginLoc() const { return getSemiLoc(); }
1239  SourceLocation getEndLoc() const { return getSemiLoc(); }
1240
1241  static bool classof(const Stmt *T) {
1242    return T->getStmtClass() == NullStmtClass;
1243  }
1244
1245  child_range children() {
1246    return child_range(child_iterator(), child_iterator());
1247  }
1248};
1249
1250/// CompoundStmt - This represents a group of statements like { stmt stmt }.
1251class CompoundStmt final : public Stmt,
1252                           private llvm::TrailingObjects<CompoundStmt, Stmt *> {
1253  friend class ASTStmtReader;
1254  friend TrailingObjects;
1255
1256  /// The location of the closing "}". LBraceLoc is stored in CompoundStmtBits.
1257  SourceLocation RBraceLoc;
1258
1259  CompoundStmt(ArrayRef<Stmt *> StmtsSourceLocation LBSourceLocation RB);
1260  explicit CompoundStmt(EmptyShell Empty) : Stmt(CompoundStmtClass, Empty) {}
1261
1262  void setStmts(ArrayRef<Stmt *> Stmts);
1263
1264public:
1265  static CompoundStmt *Create(const ASTContext &CArrayRef<Stmt *> Stmts,
1266                              SourceLocation LBSourceLocation RB);
1267
1268  // Build an empty compound statement with a location.
1269  explicit CompoundStmt(SourceLocation Loc)
1270      : Stmt(CompoundStmtClass), RBraceLoc(Loc) {
1271    CompoundStmtBits.NumStmts = 0;
1272    CompoundStmtBits.LBraceLoc = Loc;
1273  }
1274
1275  // Build an empty compound statement.
1276  static CompoundStmt *CreateEmpty(const ASTContext &Cunsigned NumStmts);
1277
1278  bool body_empty() const { return CompoundStmtBits.NumStmts == 0; }
1279  unsigned size() const { return CompoundStmtBits.NumStmts; }
1280
1281  using body_iterator = Stmt **;
1282  using body_range = llvm::iterator_range<body_iterator>;
1283
1284  body_range body() { return body_range(body_begin(), body_end()); }
1285  body_iterator body_begin() { return getTrailingObjects<Stmt *>(); }
1286  body_iterator body_end() { return body_begin() + size(); }
1287  Stmt *body_front() { return !body_empty() ? body_begin()[0] : nullptr; }
1288
1289  Stmt *body_back() {
1290    return !body_empty() ? body_begin()[size() - 1] : nullptr;
1291  }
1292
1293  void setLastStmt(Stmt *S) {
1294     (0) . __assert_fail ("!body_empty() && \"setLastStmt\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/Stmt.h", 1294, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(!body_empty() && "setLastStmt");
1295    body_begin()[size() - 1] = S;
1296  }
1297
1298  using const_body_iterator = Stmt *const *;
1299  using body_const_range = llvm::iterator_range<const_body_iterator>;
1300
1301  body_const_range body() const {
1302    return body_const_range(body_begin(), body_end());
1303  }
1304
1305  const_body_iterator body_begin() const {
1306    return getTrailingObjects<Stmt *>();
1307  }
1308
1309  const_body_iterator body_end() const { return body_begin() + size(); }
1310
1311  const Stmt *body_front() const {
1312    return !body_empty() ? body_begin()[0] : nullptr;
1313  }
1314
1315  const Stmt *body_back() const {
1316    return !body_empty() ? body_begin()[size() - 1] : nullptr;
1317  }
1318
1319  using reverse_body_iterator = std::reverse_iterator<body_iterator>;
1320
1321  reverse_body_iterator body_rbegin() {
1322    return reverse_body_iterator(body_end());
1323  }
1324
1325  reverse_body_iterator body_rend() {
1326    return reverse_body_iterator(body_begin());
1327  }
1328
1329  using const_reverse_body_iterator =
1330      std::reverse_iterator<const_body_iterator>;
1331
1332  const_reverse_body_iterator body_rbegin() const {
1333    return const_reverse_body_iterator(body_end());
1334  }
1335
1336  const_reverse_body_iterator body_rend() const {
1337    return const_reverse_body_iterator(body_begin());
1338  }
1339
1340  SourceLocation getBeginLoc() const { return CompoundStmtBits.LBraceLoc; }
1341  SourceLocation getEndLoc() const { return RBraceLoc; }
1342
1343  SourceLocation getLBracLoc() const { return CompoundStmtBits.LBraceLoc; }
1344  SourceLocation getRBracLoc() const { return RBraceLoc; }
1345
1346  static bool classof(const Stmt *T) {
1347    return T->getStmtClass() == CompoundStmtClass;
1348  }
1349
1350  // Iterators
1351  child_range children() { return child_range(body_begin(), body_end()); }
1352
1353  const_child_range children() const {
1354    return const_child_range(body_begin(), body_end());
1355  }
1356};
1357
1358// SwitchCase is the base class for CaseStmt and DefaultStmt,
1359class SwitchCase : public Stmt {
1360protected:
1361  /// The location of the ":".
1362  SourceLocation ColonLoc;
1363
1364  // The location of the "case" or "default" keyword. Stored in SwitchCaseBits.
1365  // SourceLocation KeywordLoc;
1366
1367  /// A pointer to the following CaseStmt or DefaultStmt class,
1368  /// used by SwitchStmt.
1369  SwitchCase *NextSwitchCase = nullptr;
1370
1371  SwitchCase(StmtClass SCSourceLocation KWLocSourceLocation ColonLoc)
1372      : Stmt(SC), ColonLoc(ColonLoc) {
1373    setKeywordLoc(KWLoc);
1374  }
1375
1376  SwitchCase(StmtClass SCEmptyShell) : Stmt(SC) {}
1377
1378public:
1379  const SwitchCase *getNextSwitchCase() const { return NextSwitchCase; }
1380  SwitchCase *getNextSwitchCase() { return NextSwitchCase; }
1381  void setNextSwitchCase(SwitchCase *SC) { NextSwitchCase = SC; }
1382
1383  SourceLocation getKeywordLoc() const { return SwitchCaseBits.KeywordLoc; }
1384  void setKeywordLoc(SourceLocation L) { SwitchCaseBits.KeywordLoc = L; }
1385  SourceLocation getColonLoc() const { return ColonLoc; }
1386  void setColonLoc(SourceLocation L) { ColonLoc = L; }
1387
1388  inline Stmt *getSubStmt();
1389  const Stmt *getSubStmt() const {
1390    return const_cast<SwitchCase *>(this)->getSubStmt();
1391  }
1392
1393  SourceLocation getBeginLoc() const { return getKeywordLoc(); }
1394  inline SourceLocation getEndLoc() const LLVM_READONLY;
1395
1396  static bool classof(const Stmt *T) {
1397    return T->getStmtClass() == CaseStmtClass ||
1398           T->getStmtClass() == DefaultStmtClass;
1399  }
1400};
1401
1402/// CaseStmt - Represent a case statement. It can optionally be a GNU case
1403/// statement of the form LHS ... RHS representing a range of cases.
1404class CaseStmt final
1405    : public SwitchCase,
1406      private llvm::TrailingObjects<CaseStmt, Stmt *, SourceLocation> {
1407  friend TrailingObjects;
1408
1409  // CaseStmt is followed by several trailing objects, some of which optional.
1410  // Note that it would be more convenient to put the optional trailing objects
1411  // at the end but this would impact children().
1412  // The trailing objects are in order:
1413  //
1414  // * A "Stmt *" for the LHS of the case statement. Always present.
1415  //
1416  // * A "Stmt *" for the RHS of the case statement. This is a GNU extension
1417  //   which allow ranges in cases statement of the form LHS ... RHS.
1418  //   Present if and only if caseStmtIsGNURange() is true.
1419  //
1420  // * A "Stmt *" for the substatement of the case statement. Always present.
1421  //
1422  // * A SourceLocation for the location of the ... if this is a case statement
1423  //   with a range. Present if and only if caseStmtIsGNURange() is true.
1424  enum { LhsOffset = 0SubStmtOffsetFromRhs = 1 };
1425  enum { NumMandatoryStmtPtr = 2 };
1426
1427  unsigned numTrailingObjects(OverloadToken<Stmt *>) const {
1428    return NumMandatoryStmtPtr + caseStmtIsGNURange();
1429  }
1430
1431  unsigned numTrailingObjects(OverloadToken<SourceLocation>) const {
1432    return caseStmtIsGNURange();
1433  }
1434
1435  unsigned lhsOffset() const { return LhsOffset; }
1436  unsigned rhsOffset() const { return LhsOffset + caseStmtIsGNURange(); }
1437  unsigned subStmtOffset() const { return rhsOffset() + SubStmtOffsetFromRhs; }
1438
1439  /// Build a case statement assuming that the storage for the
1440  /// trailing objects has been properly allocated.
1441  CaseStmt(Expr *lhsExpr *rhsSourceLocation caseLoc,
1442           SourceLocation ellipsisLocSourceLocation colonLoc)
1443      : SwitchCase(CaseStmtClass, caseLoc, colonLoc) {
1444    // Handle GNU case statements of the form LHS ... RHS.
1445    bool IsGNURange = rhs != nullptr;
1446    SwitchCaseBits.CaseStmtIsGNURange = IsGNURange;
1447    setLHS(lhs);
1448    setSubStmt(nullptr);
1449    if (IsGNURange) {
1450      setRHS(rhs);
1451      setEllipsisLoc(ellipsisLoc);
1452    }
1453  }
1454
1455  /// Build an empty switch case statement.
1456  explicit CaseStmt(EmptyShell Emptybool CaseStmtIsGNURange)
1457      : SwitchCase(CaseStmtClass, Empty) {
1458    SwitchCaseBits.CaseStmtIsGNURange = CaseStmtIsGNURange;
1459  }
1460
1461public:
1462  /// Build a case statement.
1463  static CaseStmt *Create(const ASTContext &CtxExpr *lhsExpr *rhs,
1464                          SourceLocation caseLocSourceLocation ellipsisLoc,
1465                          SourceLocation colonLoc);
1466
1467  /// Build an empty case statement.
1468  static CaseStmt *CreateEmpty(const ASTContext &Ctxbool CaseStmtIsGNURange);
1469
1470  /// True if this case statement is of the form case LHS ... RHS, which
1471  /// is a GNU extension. In this case the RHS can be obtained with getRHS()
1472  /// and the location of the ellipsis can be obtained with getEllipsisLoc().
1473  bool caseStmtIsGNURange() const { return SwitchCaseBits.CaseStmtIsGNURange; }
1474
1475  SourceLocation getCaseLoc() const { return getKeywordLoc(); }
1476  void setCaseLoc(SourceLocation L) { setKeywordLoc(L); }
1477
1478  /// Get the location of the ... in a case statement of the form LHS ... RHS.
1479  SourceLocation getEllipsisLoc() const {
1480    return caseStmtIsGNURange() ? *getTrailingObjects<SourceLocation>()
1481                                : SourceLocation();
1482  }
1483
1484  /// Set the location of the ... in a case statement of the form LHS ... RHS.
1485  /// Assert that this case statement is of this form.
1486  void setEllipsisLoc(SourceLocation L) {
1487     (0) . __assert_fail ("caseStmtIsGNURange() && \"setEllipsisLoc but this is not a case stmt of the form LHS ... RHS!\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/Stmt.h", 1489, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(
1488 (0) . __assert_fail ("caseStmtIsGNURange() && \"setEllipsisLoc but this is not a case stmt of the form LHS ... RHS!\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/Stmt.h", 1489, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">        caseStmtIsGNURange() &&
1489 (0) . __assert_fail ("caseStmtIsGNURange() && \"setEllipsisLoc but this is not a case stmt of the form LHS ... RHS!\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/Stmt.h", 1489, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">        "setEllipsisLoc but this is not a case stmt of the form LHS ... RHS!");
1490    *getTrailingObjects<SourceLocation>() = L;
1491  }
1492
1493  Expr *getLHS() {
1494    return reinterpret_cast<Expr *>(getTrailingObjects<Stmt *>()[lhsOffset()]);
1495  }
1496
1497  const Expr *getLHS() const {
1498    return reinterpret_cast<Expr *>(getTrailingObjects<Stmt *>()[lhsOffset()]);
1499  }
1500
1501  void setLHS(Expr *Val) {
1502    getTrailingObjects<Stmt *>()[lhsOffset()] = reinterpret_cast<Stmt *>(Val);
1503  }
1504
1505  Expr *getRHS() {
1506    return caseStmtIsGNURange() ? reinterpret_cast<Expr *>(
1507                                      getTrailingObjects<Stmt *>()[rhsOffset()])
1508                                : nullptr;
1509  }
1510
1511  const Expr *getRHS() const {
1512    return caseStmtIsGNURange() ? reinterpret_cast<Expr *>(
1513                                      getTrailingObjects<Stmt *>()[rhsOffset()])
1514                                : nullptr;
1515  }
1516
1517  void setRHS(Expr *Val) {
1518     (0) . __assert_fail ("caseStmtIsGNURange() && \"setRHS but this is not a case stmt of the form LHS ... RHS!\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/Stmt.h", 1519, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(caseStmtIsGNURange() &&
1519 (0) . __assert_fail ("caseStmtIsGNURange() && \"setRHS but this is not a case stmt of the form LHS ... RHS!\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/Stmt.h", 1519, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">           "setRHS but this is not a case stmt of the form LHS ... RHS!");
1520    getTrailingObjects<Stmt *>()[rhsOffset()] = reinterpret_cast<Stmt *>(Val);
1521  }
1522
1523  Stmt *getSubStmt() { return getTrailingObjects<Stmt *>()[subStmtOffset()]; }
1524  const Stmt *getSubStmt() const {
1525    return getTrailingObjects<Stmt *>()[subStmtOffset()];
1526  }
1527
1528  void setSubStmt(Stmt *S) {
1529    getTrailingObjects<Stmt *>()[subStmtOffset()] = S;
1530  }
1531
1532  SourceLocation getBeginLoc() const { return getKeywordLoc(); }
1533  SourceLocation getEndLoc() const LLVM_READONLY {
1534    // Handle deeply nested case statements with iteration instead of recursion.
1535    const CaseStmt *CS = this;
1536    while (const auto *CS2 = dyn_cast<CaseStmt>(CS->getSubStmt()))
1537      CS = CS2;
1538
1539    return CS->getSubStmt()->getEndLoc();
1540  }
1541
1542  static bool classof(const Stmt *T) {
1543    return T->getStmtClass() == CaseStmtClass;
1544  }
1545
1546  // Iterators
1547  child_range children() {
1548    return child_range(getTrailingObjects<Stmt *>(),
1549                       getTrailingObjects<Stmt *>() +
1550                           numTrailingObjects(OverloadToken<Stmt *>()));
1551  }
1552};
1553
1554class DefaultStmt : public SwitchCase {
1555  Stmt *SubStmt;
1556
1557public:
1558  DefaultStmt(SourceLocation DLSourceLocation CLStmt *substmt)
1559      : SwitchCase(DefaultStmtClass, DL, CL), SubStmt(substmt) {}
1560
1561  /// Build an empty default statement.
1562  explicit DefaultStmt(EmptyShell Empty)
1563      : SwitchCase(DefaultStmtClass, Empty) {}
1564
1565  Stmt *getSubStmt() { return SubStmt; }
1566  const Stmt *getSubStmt() const { return SubStmt; }
1567  void setSubStmt(Stmt *S) { SubStmt = S; }
1568
1569  SourceLocation getDefaultLoc() const { return getKeywordLoc(); }
1570  void setDefaultLoc(SourceLocation L) { setKeywordLoc(L); }
1571
1572  SourceLocation getBeginLoc() const { return getKeywordLoc(); }
1573  SourceLocation getEndLoc() const LLVM_READONLY {
1574    return SubStmt->getEndLoc();
1575  }
1576
1577  static bool classof(const Stmt *T) {
1578    return T->getStmtClass() == DefaultStmtClass;
1579  }
1580
1581  // Iterators
1582  child_range children() { return child_range(&SubStmt, &SubStmt + 1); }
1583};
1584
1585SourceLocation SwitchCase::getEndLoc() const {
1586  if (const auto *CS = dyn_cast<CaseStmt>(this))
1587    return CS->getEndLoc();
1588  else if (const auto *DS = dyn_cast<DefaultStmt>(this))
1589    return DS->getEndLoc();
1590  llvm_unreachable("SwitchCase is neither a CaseStmt nor a DefaultStmt!");
1591}
1592
1593Stmt *SwitchCase::getSubStmt() {
1594  if (auto *CS = dyn_cast<CaseStmt>(this))
1595    return CS->getSubStmt();
1596  else if (auto *DS = dyn_cast<DefaultStmt>(this))
1597    return DS->getSubStmt();
1598  llvm_unreachable("SwitchCase is neither a CaseStmt nor a DefaultStmt!");
1599}
1600
1601/// Represents a statement that could possibly have a value and type. This
1602/// covers expression-statements, as well as labels and attributed statements.
1603///
1604/// Value statements have a special meaning when they are the last non-null
1605/// statement in a GNU statement expression, where they determine the value
1606/// of the statement expression.
1607class ValueStmt : public Stmt {
1608protected:
1609  using Stmt::Stmt;
1610
1611public:
1612  const Expr *getExprStmt() const;
1613  Expr *getExprStmt() {
1614    const ValueStmt *ConstThis = this;
1615    return const_cast<Expr*>(ConstThis->getExprStmt());
1616  }
1617
1618  static bool classof(const Stmt *T) {
1619    return T->getStmtClass() >= firstValueStmtConstant &&
1620           T->getStmtClass() <= lastValueStmtConstant;
1621  }
1622};
1623
1624/// LabelStmt - Represents a label, which has a substatement.  For example:
1625///    foo: return;
1626class LabelStmt : public ValueStmt {
1627  LabelDecl *TheDecl;
1628  Stmt *SubStmt;
1629
1630public:
1631  /// Build a label statement.
1632  LabelStmt(SourceLocation ILLabelDecl *DStmt *substmt)
1633      : ValueStmt(LabelStmtClass), TheDecl(D), SubStmt(substmt) {
1634    setIdentLoc(IL);
1635  }
1636
1637  /// Build an empty label statement.
1638  explicit LabelStmt(EmptyShell Empty) : ValueStmt(LabelStmtClass, Empty) {}
1639
1640  SourceLocation getIdentLoc() const { return LabelStmtBits.IdentLoc; }
1641  void setIdentLoc(SourceLocation L) { LabelStmtBits.IdentLoc = L; }
1642
1643  LabelDecl *getDecl() const { return TheDecl; }
1644  void setDecl(LabelDecl *D) { TheDecl = D; }
1645
1646  const char *getName() const;
1647  Stmt *getSubStmt() { return SubStmt; }
1648
1649  const Stmt *getSubStmt() const { return SubStmt; }
1650  void setSubStmt(Stmt *SS) { SubStmt = SS; }
1651
1652  SourceLocation getBeginLoc() const { return getIdentLoc(); }
1653  SourceLocation getEndLoc() const LLVM_READONLY { return SubStmt->getEndLoc();}
1654
1655  child_range children() { return child_range(&SubStmt, &SubStmt + 1); }
1656
1657  static bool classof(const Stmt *T) {
1658    return T->getStmtClass() == LabelStmtClass;
1659  }
1660};
1661
1662/// Represents an attribute applied to a statement.
1663///
1664/// Represents an attribute applied to a statement. For example:
1665///   [[omp::for(...)]] for (...) { ... }
1666class AttributedStmt final
1667    : public ValueStmt,
1668      private llvm::TrailingObjects<AttributedStmt, const Attr *> {
1669  friend class ASTStmtReader;
1670  friend TrailingObjects;
1671
1672  Stmt *SubStmt;
1673
1674  AttributedStmt(SourceLocation LocArrayRef<const Attr *> Attrs,
1675                 Stmt *SubStmt)
1676      : ValueStmt(AttributedStmtClass), SubStmt(SubStmt) {
1677    AttributedStmtBits.NumAttrs = Attrs.size();
1678    AttributedStmtBits.AttrLoc = Loc;
1679    std::copy(Attrs.begin(), Attrs.end(), getAttrArrayPtr());
1680  }
1681
1682  explicit AttributedStmt(EmptyShell Emptyunsigned NumAttrs)
1683      : ValueStmt(AttributedStmtClass, Empty) {
1684    AttributedStmtBits.NumAttrs = NumAttrs;
1685    AttributedStmtBits.AttrLoc = SourceLocation{};
1686    std::fill_n(getAttrArrayPtr(), NumAttrsnullptr);
1687  }
1688
1689  const Attr *const *getAttrArrayPtr() const {
1690    return getTrailingObjects<const Attr *>();
1691  }
1692  const Attr **getAttrArrayPtr() { return getTrailingObjects<const Attr *>(); }
1693
1694public:
1695  static AttributedStmt *Create(const ASTContext &CSourceLocation Loc,
1696                                ArrayRef<const Attr *> AttrsStmt *SubStmt);
1697
1698  // Build an empty attributed statement.
1699  static AttributedStmt *CreateEmpty(const ASTContext &Cunsigned NumAttrs);
1700
1701  SourceLocation getAttrLoc() const { return AttributedStmtBits.AttrLoc; }
1702  ArrayRef<const Attr *> getAttrs() const {
1703    return llvm::makeArrayRef(getAttrArrayPtr(), AttributedStmtBits.NumAttrs);
1704  }
1705
1706  Stmt *getSubStmt() { return SubStmt; }
1707  const Stmt *getSubStmt() const { return SubStmt; }
1708
1709  SourceLocation getBeginLoc() const { return getAttrLoc(); }
1710  SourceLocation getEndLoc() const LLVM_READONLY { return SubStmt->getEndLoc();}
1711
1712  child_range children() { return child_range(&SubStmt, &SubStmt + 1); }
1713
1714  static bool classof(const Stmt *T) {
1715    return T->getStmtClass() == AttributedStmtClass;
1716  }
1717};
1718
1719/// IfStmt - This represents an if/then/else.
1720class IfStmt final
1721    : public Stmt,
1722      private llvm::TrailingObjects<IfStmt, Stmt *, SourceLocation> {
1723  friend TrailingObjects;
1724
1725  // IfStmt is followed by several trailing objects, some of which optional.
1726  // Note that it would be more convenient to put the optional trailing
1727  // objects at then end but this would change the order of the children.
1728  // The trailing objects are in order:
1729  //
1730  // * A "Stmt *" for the init statement.
1731  //    Present if and only if hasInitStorage().
1732  //
1733  // * A "Stmt *" for the condition variable.
1734  //    Present if and only if hasVarStorage(). This is in fact a "DeclStmt *".
1735  //
1736  // * A "Stmt *" for the condition.
1737  //    Always present. This is in fact a "Expr *".
1738  //
1739  // * A "Stmt *" for the then statement.
1740  //    Always present.
1741  //
1742  // * A "Stmt *" for the else statement.
1743  //    Present if and only if hasElseStorage().
1744  //
1745  // * A "SourceLocation" for the location of the "else".
1746  //    Present if and only if hasElseStorage().
1747  enum { InitOffset = 0ThenOffsetFromCond = 1ElseOffsetFromCond = 2 };
1748  enum { NumMandatoryStmtPtr = 2 };
1749
1750  unsigned numTrailingObjects(OverloadToken<Stmt *>) const {
1751    return NumMandatoryStmtPtr + hasElseStorage() + hasVarStorage() +
1752           hasInitStorage();
1753  }
1754
1755  unsigned numTrailingObjects(OverloadToken<SourceLocation>) const {
1756    return hasElseStorage();
1757  }
1758
1759  unsigned initOffset() const { return InitOffset; }
1760  unsigned varOffset() const { return InitOffset + hasInitStorage(); }
1761  unsigned condOffset() const {
1762    return InitOffset + hasInitStorage() + hasVarStorage();
1763  }
1764  unsigned thenOffset() const { return condOffset() + ThenOffsetFromCond; }
1765  unsigned elseOffset() const { return condOffset() + ElseOffsetFromCond; }
1766
1767  /// Build an if/then/else statement.
1768  IfStmt(const ASTContext &CtxSourceLocation ILbool IsConstexprStmt *Init,
1769         VarDecl *VarExpr *CondStmt *ThenSourceLocation ELStmt *Else);
1770
1771  /// Build an empty if/then/else statement.
1772  explicit IfStmt(EmptyShell Emptybool HasElsebool HasVarbool HasInit);
1773
1774public:
1775  /// Create an IfStmt.
1776  static IfStmt *Create(const ASTContext &CtxSourceLocation IL,
1777                        bool IsConstexprStmt *InitVarDecl *VarExpr *Cond,
1778                        Stmt *ThenSourceLocation EL = SourceLocation(),
1779                        Stmt *Else = nullptr);
1780
1781  /// Create an empty IfStmt optionally with storage for an else statement,
1782  /// condition variable and init expression.
1783  static IfStmt *CreateEmpty(const ASTContext &Ctxbool HasElsebool HasVar,
1784                             bool HasInit);
1785
1786  /// True if this IfStmt has the storage for an init statement.
1787  bool hasInitStorage() const { return IfStmtBits.HasInit; }
1788
1789  /// True if this IfStmt has storage for a variable declaration.
1790  bool hasVarStorage() const { return IfStmtBits.HasVar; }
1791
1792  /// True if this IfStmt has storage for an else statement.
1793  bool hasElseStorage() const { return IfStmtBits.HasElse; }
1794
1795  Expr *getCond() {
1796    return reinterpret_cast<Expr *>(getTrailingObjects<Stmt *>()[condOffset()]);
1797  }
1798
1799  const Expr *getCond() const {
1800    return reinterpret_cast<Expr *>(getTrailingObjects<Stmt *>()[condOffset()]);
1801  }
1802
1803  void setCond(Expr *Cond) {
1804    getTrailingObjects<Stmt *>()[condOffset()] = reinterpret_cast<Stmt *>(Cond);
1805  }
1806
1807  Stmt *getThen() { return getTrailingObjects<Stmt *>()[thenOffset()]; }
1808  const Stmt *getThen() const {
1809    return getTrailingObjects<Stmt *>()[thenOffset()];
1810  }
1811
1812  void setThen(Stmt *Then) {
1813    getTrailingObjects<Stmt *>()[thenOffset()] = Then;
1814  }
1815
1816  Stmt *getElse() {
1817    return hasElseStorage() ? getTrailingObjects<Stmt *>()[elseOffset()]
1818                            : nullptr;
1819  }
1820
1821  const Stmt *getElse() const {
1822    return hasElseStorage() ? getTrailingObjects<Stmt *>()[elseOffset()]
1823                            : nullptr;
1824  }
1825
1826  void setElse(Stmt *Else) {
1827     (0) . __assert_fail ("hasElseStorage() && \"This if statement has no storage for an else statement!\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/Stmt.h", 1828, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(hasElseStorage() &&
1828 (0) . __assert_fail ("hasElseStorage() && \"This if statement has no storage for an else statement!\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/Stmt.h", 1828, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">           "This if statement has no storage for an else statement!");
1829    getTrailingObjects<Stmt *>()[elseOffset()] = Else;
1830  }
1831
1832  /// Retrieve the variable declared in this "if" statement, if any.
1833  ///
1834  /// In the following example, "x" is the condition variable.
1835  /// \code
1836  /// if (int x = foo()) {
1837  ///   printf("x is %d", x);
1838  /// }
1839  /// \endcode
1840  VarDecl *getConditionVariable();
1841  const VarDecl *getConditionVariable() const {
1842    return const_cast<IfStmt *>(this)->getConditionVariable();
1843  }
1844
1845  /// Set the condition variable for this if statement.
1846  /// The if statement must have storage for the condition variable.
1847  void setConditionVariable(const ASTContext &CtxVarDecl *V);
1848
1849  /// If this IfStmt has a condition variable, return the faux DeclStmt
1850  /// associated with the creation of that condition variable.
1851  DeclStmt *getConditionVariableDeclStmt() {
1852    return hasVarStorage() ? static_cast<DeclStmt *>(
1853                                 getTrailingObjects<Stmt *>()[varOffset()])
1854                           : nullptr;
1855  }
1856
1857  const DeclStmt *getConditionVariableDeclStmt() const {
1858    return hasVarStorage() ? static_cast<DeclStmt *>(
1859                                 getTrailingObjects<Stmt *>()[varOffset()])
1860                           : nullptr;
1861  }
1862
1863  Stmt *getInit() {
1864    return hasInitStorage() ? getTrailingObjects<Stmt *>()[initOffset()]
1865                            : nullptr;
1866  }
1867
1868  const Stmt *getInit() const {
1869    return hasInitStorage() ? getTrailingObjects<Stmt *>()[initOffset()]
1870                            : nullptr;
1871  }
1872
1873  void setInit(Stmt *Init) {
1874     (0) . __assert_fail ("hasInitStorage() && \"This if statement has no storage for an init statement!\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/Stmt.h", 1875, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(hasInitStorage() &&
1875 (0) . __assert_fail ("hasInitStorage() && \"This if statement has no storage for an init statement!\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/Stmt.h", 1875, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">           "This if statement has no storage for an init statement!");
1876    getTrailingObjects<Stmt *>()[initOffset()] = Init;
1877  }
1878
1879  SourceLocation getIfLoc() const { return IfStmtBits.IfLoc; }
1880  void setIfLoc(SourceLocation IfLoc) { IfStmtBits.IfLoc = IfLoc; }
1881
1882  SourceLocation getElseLoc() const {
1883    return hasElseStorage() ? *getTrailingObjects<SourceLocation>()
1884                            : SourceLocation();
1885  }
1886
1887  void setElseLoc(SourceLocation ElseLoc) {
1888     (0) . __assert_fail ("hasElseStorage() && \"This if statement has no storage for an else statement!\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/Stmt.h", 1889, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(hasElseStorage() &&
1889 (0) . __assert_fail ("hasElseStorage() && \"This if statement has no storage for an else statement!\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/Stmt.h", 1889, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">           "This if statement has no storage for an else statement!");
1890    *getTrailingObjects<SourceLocation>() = ElseLoc;
1891  }
1892
1893  bool isConstexpr() const { return IfStmtBits.IsConstexpr; }
1894  void setConstexpr(bool C) { IfStmtBits.IsConstexpr = C; }
1895
1896  bool isObjCAvailabilityCheck() const;
1897
1898  SourceLocation getBeginLoc() const { return getIfLoc(); }
1899  SourceLocation getEndLoc() const LLVM_READONLY {
1900    if (getElse())
1901      return getElse()->getEndLoc();
1902    return getThen()->getEndLoc();
1903  }
1904
1905  // Iterators over subexpressions.  The iterators will include iterating
1906  // over the initialization expression referenced by the condition variable.
1907  child_range children() {
1908    return child_range(getTrailingObjects<Stmt *>(),
1909                       getTrailingObjects<Stmt *>() +
1910                           numTrailingObjects(OverloadToken<Stmt *>()));
1911  }
1912
1913  static bool classof(const Stmt *T) {
1914    return T->getStmtClass() == IfStmtClass;
1915  }
1916};
1917
1918/// SwitchStmt - This represents a 'switch' stmt.
1919class SwitchStmt final : public Stmt,
1920                         private llvm::TrailingObjects<SwitchStmt, Stmt *> {
1921  friend TrailingObjects;
1922
1923  /// Points to a linked list of case and default statements.
1924  SwitchCase *FirstCase;
1925
1926  // SwitchStmt is followed by several trailing objects,
1927  // some of which optional. Note that it would be more convenient to
1928  // put the optional trailing objects at the end but this would change
1929  // the order in children().
1930  // The trailing objects are in order:
1931  //
1932  // * A "Stmt *" for the init statement.
1933  //    Present if and only if hasInitStorage().
1934  //
1935  // * A "Stmt *" for the condition variable.
1936  //    Present if and only if hasVarStorage(). This is in fact a "DeclStmt *".
1937  //
1938  // * A "Stmt *" for the condition.
1939  //    Always present. This is in fact an "Expr *".
1940  //
1941  // * A "Stmt *" for the body.
1942  //    Always present.
1943  enum { InitOffset = 0BodyOffsetFromCond = 1 };
1944  enum { NumMandatoryStmtPtr = 2 };
1945
1946  unsigned numTrailingObjects(OverloadToken<Stmt *>) const {
1947    return NumMandatoryStmtPtr + hasInitStorage() + hasVarStorage();
1948  }
1949
1950  unsigned initOffset() const { return InitOffset; }
1951  unsigned varOffset() const { return InitOffset + hasInitStorage(); }
1952  unsigned condOffset() const {
1953    return InitOffset + hasInitStorage() + hasVarStorage();
1954  }
1955  unsigned bodyOffset() const { return condOffset() + BodyOffsetFromCond; }
1956
1957  /// Build a switch statement.
1958  SwitchStmt(const ASTContext &CtxStmt *InitVarDecl *VarExpr *Cond);
1959
1960  /// Build a empty switch statement.
1961  explicit SwitchStmt(EmptyShell Emptybool HasInitbool HasVar);
1962
1963public:
1964  /// Create a switch statement.
1965  static SwitchStmt *Create(const ASTContext &CtxStmt *InitVarDecl *Var,
1966                            Expr *Cond);
1967
1968  /// Create an empty switch statement optionally with storage for
1969  /// an init expression and a condition variable.
1970  static SwitchStmt *CreateEmpty(const ASTContext &Ctxbool HasInit,
1971                                 bool HasVar);
1972
1973  /// True if this SwitchStmt has storage for an init statement.
1974  bool hasInitStorage() const { return SwitchStmtBits.HasInit; }
1975
1976  /// True if this SwitchStmt has storage for a condition variable.
1977  bool hasVarStorage() const { return SwitchStmtBits.HasVar; }
1978
1979  Expr *getCond() {
1980    return reinterpret_cast<Expr *>(getTrailingObjects<Stmt *>()[condOffset()]);
1981  }
1982
1983  const Expr *getCond() const {
1984    return reinterpret_cast<Expr *>(getTrailingObjects<Stmt *>()[condOffset()]);
1985  }
1986
1987  void setCond(Expr *Cond) {
1988    getTrailingObjects<Stmt *>()[condOffset()] = reinterpret_cast<Stmt *>(Cond);
1989  }
1990
1991  Stmt *getBody() { return getTrailingObjects<Stmt *>()[bodyOffset()]; }
1992  const Stmt *getBody() const {
1993    return getTrailingObjects<Stmt *>()[bodyOffset()];
1994  }
1995
1996  void setBody(Stmt *Body) {
1997    getTrailingObjects<Stmt *>()[bodyOffset()] = Body;
1998  }
1999
2000  Stmt *getInit() {
2001    return hasInitStorage() ? getTrailingObjects<Stmt *>()[initOffset()]
2002                            : nullptr;
2003  }
2004
2005  const Stmt *getInit() const {
2006    return hasInitStorage() ? getTrailingObjects<Stmt *>()[initOffset()]
2007                            : nullptr;
2008  }
2009
2010  void setInit(Stmt *Init) {
2011     (0) . __assert_fail ("hasInitStorage() && \"This switch statement has no storage for an init statement!\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/Stmt.h", 2012, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(hasInitStorage() &&
2012 (0) . __assert_fail ("hasInitStorage() && \"This switch statement has no storage for an init statement!\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/Stmt.h", 2012, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">           "This switch statement has no storage for an init statement!");
2013    getTrailingObjects<Stmt *>()[initOffset()] = Init;
2014  }
2015
2016  /// Retrieve the variable declared in this "switch" statement, if any.
2017  ///
2018  /// In the following example, "x" is the condition variable.
2019  /// \code
2020  /// switch (int x = foo()) {
2021  ///   case 0: break;
2022  ///   // ...
2023  /// }
2024  /// \endcode
2025  VarDecl *getConditionVariable();
2026  const VarDecl *getConditionVariable() const {
2027    return const_cast<SwitchStmt *>(this)->getConditionVariable();
2028  }
2029
2030  /// Set the condition variable in this switch statement.
2031  /// The switch statement must have storage for it.
2032  void setConditionVariable(const ASTContext &CtxVarDecl *VD);
2033
2034  /// If this SwitchStmt has a condition variable, return the faux DeclStmt
2035  /// associated with the creation of that condition variable.
2036  DeclStmt *getConditionVariableDeclStmt() {
2037    return hasVarStorage() ? static_cast<DeclStmt *>(
2038                                 getTrailingObjects<Stmt *>()[varOffset()])
2039                           : nullptr;
2040  }
2041
2042  const DeclStmt *getConditionVariableDeclStmt() const {
2043    return hasVarStorage() ? static_cast<DeclStmt *>(
2044                                 getTrailingObjects<Stmt *>()[varOffset()])
2045                           : nullptr;
2046  }
2047
2048  SwitchCase *getSwitchCaseList() { return FirstCase; }
2049  const SwitchCase *getSwitchCaseList() const { return FirstCase; }
2050  void setSwitchCaseList(SwitchCase *SC) { FirstCase = SC; }
2051
2052  SourceLocation getSwitchLoc() const { return SwitchStmtBits.SwitchLoc; }
2053  void setSwitchLoc(SourceLocation L) { SwitchStmtBits.SwitchLoc = L; }
2054
2055  void setBody(Stmt *SSourceLocation SL) {
2056    setBody(S);
2057    setSwitchLoc(SL);
2058  }
2059
2060  void addSwitchCase(SwitchCase *SC) {
2061     (0) . __assert_fail ("!SC->getNextSwitchCase() && \"case/default already added to a switch\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/Stmt.h", 2062, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(!SC->getNextSwitchCase() &&
2062 (0) . __assert_fail ("!SC->getNextSwitchCase() && \"case/default already added to a switch\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/Stmt.h", 2062, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">           "case/default already added to a switch");
2063    SC->setNextSwitchCase(FirstCase);
2064    FirstCase = SC;
2065  }
2066
2067  /// Set a flag in the SwitchStmt indicating that if the 'switch (X)' is a
2068  /// switch over an enum value then all cases have been explicitly covered.
2069  void setAllEnumCasesCovered() { SwitchStmtBits.AllEnumCasesCovered = true; }
2070
2071  /// Returns true if the SwitchStmt is a switch of an enum value and all cases
2072  /// have been explicitly covered.
2073  bool isAllEnumCasesCovered() const {
2074    return SwitchStmtBits.AllEnumCasesCovered;
2075  }
2076
2077  SourceLocation getBeginLoc() const { return getSwitchLoc(); }
2078  SourceLocation getEndLoc() const LLVM_READONLY {
2079    return getBody() ? getBody()->getEndLoc()
2080                     : reinterpret_cast<const Stmt *>(getCond())->getEndLoc();
2081  }
2082
2083  // Iterators
2084  child_range children() {
2085    return child_range(getTrailingObjects<Stmt *>(),
2086                       getTrailingObjects<Stmt *>() +
2087                           numTrailingObjects(OverloadToken<Stmt *>()));
2088  }
2089
2090  static bool classof(const Stmt *T) {
2091    return T->getStmtClass() == SwitchStmtClass;
2092  }
2093};
2094
2095/// WhileStmt - This represents a 'while' stmt.
2096class WhileStmt final : public Stmt,
2097                        private llvm::TrailingObjects<WhileStmt, Stmt *> {
2098  friend TrailingObjects;
2099
2100  // WhileStmt is followed by several trailing objects,
2101  // some of which optional. Note that it would be more
2102  // convenient to put the optional trailing object at the end
2103  // but this would affect children().
2104  // The trailing objects are in order:
2105  //
2106  // * A "Stmt *" for the condition variable.
2107  //    Present if and only if hasVarStorage(). This is in fact a "DeclStmt *".
2108  //
2109  // * A "Stmt *" for the condition.
2110  //    Always present. This is in fact an "Expr *".
2111  //
2112  // * A "Stmt *" for the body.
2113  //    Always present.
2114  //
2115  enum { VarOffset = 0BodyOffsetFromCond = 1 };
2116  enum { NumMandatoryStmtPtr = 2 };
2117
2118  unsigned varOffset() const { return VarOffset; }
2119  unsigned condOffset() const { return VarOffset + hasVarStorage(); }
2120  unsigned bodyOffset() const { return condOffset() + BodyOffsetFromCond; }
2121
2122  unsigned numTrailingObjects(OverloadToken<Stmt *>) const {
2123    return NumMandatoryStmtPtr + hasVarStorage();
2124  }
2125
2126  /// Build a while statement.
2127  WhileStmt(const ASTContext &CtxVarDecl *VarExpr *CondStmt *Body,
2128            SourceLocation WL);
2129
2130  /// Build an empty while statement.
2131  explicit WhileStmt(EmptyShell Emptybool HasVar);
2132
2133public:
2134  /// Create a while statement.
2135  static WhileStmt *Create(const ASTContext &CtxVarDecl *VarExpr *Cond,
2136                           Stmt *BodySourceLocation WL);
2137
2138  /// Create an empty while statement optionally with storage for
2139  /// a condition variable.
2140  static WhileStmt *CreateEmpty(const ASTContext &Ctxbool HasVar);
2141
2142  /// True if this WhileStmt has storage for a condition variable.
2143  bool hasVarStorage() const { return WhileStmtBits.HasVar; }
2144
2145  Expr *getCond() {
2146    return reinterpret_cast<Expr *>(getTrailingObjects<Stmt *>()[condOffset()]);
2147  }
2148
2149  const Expr *getCond() const {
2150    return reinterpret_cast<Expr *>(getTrailingObjects<Stmt *>()[condOffset()]);
2151  }
2152
2153  void setCond(Expr *Cond) {
2154    getTrailingObjects<Stmt *>()[condOffset()] = reinterpret_cast<Stmt *>(Cond);
2155  }
2156
2157  Stmt *getBody() { return getTrailingObjects<Stmt *>()[bodyOffset()]; }
2158  const Stmt *getBody() const {
2159    return getTrailingObjects<Stmt *>()[bodyOffset()];
2160  }
2161
2162  void setBody(Stmt *Body) {
2163    getTrailingObjects<Stmt *>()[bodyOffset()] = Body;
2164  }
2165
2166  /// Retrieve the variable declared in this "while" statement, if any.
2167  ///
2168  /// In the following example, "x" is the condition variable.
2169  /// \code
2170  /// while (int x = random()) {
2171  ///   // ...
2172  /// }
2173  /// \endcode
2174  VarDecl *getConditionVariable();
2175  const VarDecl *getConditionVariable() const {
2176    return const_cast<WhileStmt *>(this)->getConditionVariable();
2177  }
2178
2179  /// Set the condition variable of this while statement.
2180  /// The while statement must have storage for it.
2181  void setConditionVariable(const ASTContext &CtxVarDecl *V);
2182
2183  /// If this WhileStmt has a condition variable, return the faux DeclStmt
2184  /// associated with the creation of that condition variable.
2185  DeclStmt *getConditionVariableDeclStmt() {
2186    return hasVarStorage() ? static_cast<DeclStmt *>(
2187                                 getTrailingObjects<Stmt *>()[varOffset()])
2188                           : nullptr;
2189  }
2190
2191  const DeclStmt *getConditionVariableDeclStmt() const {
2192    return hasVarStorage() ? static_cast<DeclStmt *>(
2193                                 getTrailingObjects<Stmt *>()[varOffset()])
2194                           : nullptr;
2195  }
2196
2197  SourceLocation getWhileLoc() const { return WhileStmtBits.WhileLoc; }
2198  void setWhileLoc(SourceLocation L) { WhileStmtBits.WhileLoc = L; }
2199
2200  SourceLocation getBeginLoc() const { return getWhileLoc(); }
2201  SourceLocation getEndLoc() const LLVM_READONLY {
2202    return getBody()->getEndLoc();
2203  }
2204
2205  static bool classof(const Stmt *T) {
2206    return T->getStmtClass() == WhileStmtClass;
2207  }
2208
2209  // Iterators
2210  child_range children() {
2211    return child_range(getTrailingObjects<Stmt *>(),
2212                       getTrailingObjects<Stmt *>() +
2213                           numTrailingObjects(OverloadToken<Stmt *>()));
2214  }
2215};
2216
2217/// DoStmt - This represents a 'do/while' stmt.
2218class DoStmt : public Stmt {
2219  enum { BODYCONDEND_EXPR };
2220  Stmt *SubExprs[END_EXPR];
2221  SourceLocation WhileLoc;
2222  SourceLocation RParenLoc// Location of final ')' in do stmt condition.
2223
2224public:
2225  DoStmt(Stmt *BodyExpr *CondSourceLocation DLSourceLocation WL,
2226         SourceLocation RP)
2227      : Stmt(DoStmtClass), WhileLoc(WL), RParenLoc(RP) {
2228    setCond(Cond);
2229    setBody(Body);
2230    setDoLoc(DL);
2231  }
2232
2233  /// Build an empty do-while statement.
2234  explicit DoStmt(EmptyShell Empty) : Stmt(DoStmtClass, Empty) {}
2235
2236  Expr *getCond() { return reinterpret_cast<Expr *>(SubExprs[COND]); }
2237  const Expr *getCond() const {
2238    return reinterpret_cast<Expr *>(SubExprs[COND]);
2239  }
2240
2241  void setCond(Expr *Cond) { SubExprs[COND] = reinterpret_cast<Stmt *>(Cond); }
2242
2243  Stmt *getBody() { return SubExprs[BODY]; }
2244  const Stmt *getBody() const { return SubExprs[BODY]; }
2245  void setBody(Stmt *Body) { SubExprs[BODY] = Body; }
2246
2247  SourceLocation getDoLoc() const { return DoStmtBits.DoLoc; }
2248  void setDoLoc(SourceLocation L) { DoStmtBits.DoLoc = L; }
2249  SourceLocation getWhileLoc() const { return WhileLoc; }
2250  void setWhileLoc(SourceLocation L) { WhileLoc = L; }
2251  SourceLocation getRParenLoc() const { return RParenLoc; }
2252  void setRParenLoc(SourceLocation L) { RParenLoc = L; }
2253
2254  SourceLocation getBeginLoc() const { return getDoLoc(); }
2255  SourceLocation getEndLoc() const { return getRParenLoc(); }
2256
2257  static bool classof(const Stmt *T) {
2258    return T->getStmtClass() == DoStmtClass;
2259  }
2260
2261  // Iterators
2262  child_range children() {
2263    return child_range(&SubExprs[0], &SubExprs[0] + END_EXPR);
2264  }
2265};
2266
2267/// ForStmt - This represents a 'for (init;cond;inc)' stmt.  Note that any of
2268/// the init/cond/inc parts of the ForStmt will be null if they were not
2269/// specified in the source.
2270class ForStmt : public Stmt {
2271  enum { INITCONDVARCONDINCBODYEND_EXPR };
2272  StmtSubExprs[END_EXPR]; // SubExprs[INIT] is an expression or declstmt.
2273  SourceLocation LParenLocRParenLoc;
2274
2275public:
2276  ForStmt(const ASTContext &CStmt *InitExpr *CondVarDecl *condVar,
2277          Expr *IncStmt *BodySourceLocation FLSourceLocation LP,
2278          SourceLocation RP);
2279
2280  /// Build an empty for statement.
2281  explicit ForStmt(EmptyShell Empty) : Stmt(ForStmtClass, Empty) {}
2282
2283  Stmt *getInit() { return SubExprs[INIT]; }
2284
2285  /// Retrieve the variable declared in this "for" statement, if any.
2286  ///
2287  /// In the following example, "y" is the condition variable.
2288  /// \code
2289  /// for (int x = random(); int y = mangle(x); ++x) {
2290  ///   // ...
2291  /// }
2292  /// \endcode
2293  VarDecl *getConditionVariable() const;
2294  void setConditionVariable(const ASTContext &CVarDecl *V);
2295
2296  /// If this ForStmt has a condition variable, return the faux DeclStmt
2297  /// associated with the creation of that condition variable.
2298  const DeclStmt *getConditionVariableDeclStmt() const {
2299    return reinterpret_cast<DeclStmt*>(SubExprs[CONDVAR]);
2300  }
2301
2302  Expr *getCond() { return reinterpret_cast<Expr*>(SubExprs[COND]); }
2303  Expr *getInc()  { return reinterpret_cast<Expr*>(SubExprs[INC]); }
2304  Stmt *getBody() { return SubExprs[BODY]; }
2305
2306  const Stmt *getInit() const { return SubExprs[INIT]; }
2307  const Expr *getCond() const { return reinterpret_cast<Expr*>(SubExprs[COND]);}
2308  const Expr *getInc()  const { return reinterpret_cast<Expr*>(SubExprs[INC]); }
2309  const Stmt *getBody() const { return SubExprs[BODY]; }
2310
2311  void setInit(Stmt *S) { SubExprs[INIT] = S; }
2312  void setCond(Expr *E) { SubExprs[COND] = reinterpret_cast<Stmt*>(E); }
2313  void setInc(Expr *E) { SubExprs[INC] = reinterpret_cast<Stmt*>(E); }
2314  void setBody(Stmt *S) { SubExprs[BODY] = S; }
2315
2316  SourceLocation getForLoc() const { return ForStmtBits.ForLoc; }
2317  void setForLoc(SourceLocation L) { ForStmtBits.ForLoc = L; }
2318  SourceLocation getLParenLoc() const { return LParenLoc; }
2319  void setLParenLoc(SourceLocation L) { LParenLoc = L; }
2320  SourceLocation getRParenLoc() const { return RParenLoc; }
2321  void setRParenLoc(SourceLocation L) { RParenLoc = L; }
2322
2323  SourceLocation getBeginLoc() const { return getForLoc(); }
2324  SourceLocation getEndLoc() const { return getBody()->getEndLoc(); }
2325
2326  static bool classof(const Stmt *T) {
2327    return T->getStmtClass() == ForStmtClass;
2328  }
2329
2330  // Iterators
2331  child_range children() {
2332    return child_range(&SubExprs[0], &SubExprs[0]+END_EXPR);
2333  }
2334};
2335
2336/// GotoStmt - This represents a direct goto.
2337class GotoStmt : public Stmt {
2338  LabelDecl *Label;
2339  SourceLocation LabelLoc;
2340
2341public:
2342  GotoStmt(LabelDecl *labelSourceLocation GLSourceLocation LL)
2343      : Stmt(GotoStmtClass), Label(label), LabelLoc(LL) {
2344    setGotoLoc(GL);
2345  }
2346
2347  /// Build an empty goto statement.
2348  explicit GotoStmt(EmptyShell Empty) : Stmt(GotoStmtClass, Empty) {}
2349
2350  LabelDecl *getLabel() const { return Label; }
2351  void setLabel(LabelDecl *D) { Label = D; }
2352
2353  SourceLocation getGotoLoc() const { return GotoStmtBits.GotoLoc; }
2354  void setGotoLoc(SourceLocation L) { GotoStmtBits.GotoLoc = L; }
2355  SourceLocation getLabelLoc() const { return LabelLoc; }
2356  void setLabelLoc(SourceLocation L) { LabelLoc = L; }
2357
2358  SourceLocation getBeginLoc() const { return getGotoLoc(); }
2359  SourceLocation getEndLoc() const { return getLabelLoc(); }
2360
2361  static bool classof(const Stmt *T) {
2362    return T->getStmtClass() == GotoStmtClass;
2363  }
2364
2365  // Iterators
2366  child_range children() {
2367    return child_range(child_iterator(), child_iterator());
2368  }
2369};
2370
2371/// IndirectGotoStmt - This represents an indirect goto.
2372class IndirectGotoStmt : public Stmt {
2373  SourceLocation StarLoc;
2374  Stmt *Target;
2375
2376public:
2377  IndirectGotoStmt(SourceLocation gotoLocSourceLocation starLocExpr *target)
2378      : Stmt(IndirectGotoStmtClass), StarLoc(starLoc) {
2379    setTarget(target);
2380    setGotoLoc(gotoLoc);
2381  }
2382
2383  /// Build an empty indirect goto statement.
2384  explicit IndirectGotoStmt(EmptyShell Empty)
2385      : Stmt(IndirectGotoStmtClass, Empty) {}
2386
2387  void setGotoLoc(SourceLocation L) { GotoStmtBits.GotoLoc = L; }
2388  SourceLocation getGotoLoc() const { return GotoStmtBits.GotoLoc; }
2389  void setStarLoc(SourceLocation L) { StarLoc = L; }
2390  SourceLocation getStarLoc() const { return StarLoc; }
2391
2392  Expr *getTarget() { return reinterpret_cast<Expr *>(Target); }
2393  const Expr *getTarget() const {
2394    return reinterpret_cast<const Expr *>(Target);
2395  }
2396  void setTarget(Expr *E) { Target = reinterpret_cast<Stmt *>(E); }
2397
2398  /// getConstantTarget - Returns the fixed target of this indirect
2399  /// goto, if one exists.
2400  LabelDecl *getConstantTarget();
2401  const LabelDecl *getConstantTarget() const {
2402    return const_cast<IndirectGotoStmt *>(this)->getConstantTarget();
2403  }
2404
2405  SourceLocation getBeginLoc() const { return getGotoLoc(); }
2406  SourceLocation getEndLoc() const LLVM_READONLY { return Target->getEndLoc(); }
2407
2408  static bool classof(const Stmt *T) {
2409    return T->getStmtClass() == IndirectGotoStmtClass;
2410  }
2411
2412  // Iterators
2413  child_range children() { return child_range(&Target, &Target + 1); }
2414};
2415
2416/// ContinueStmt - This represents a continue.
2417class ContinueStmt : public Stmt {
2418public:
2419  ContinueStmt(SourceLocation CL) : Stmt(ContinueStmtClass) {
2420    setContinueLoc(CL);
2421  }
2422
2423  /// Build an empty continue statement.
2424  explicit ContinueStmt(EmptyShell Empty) : Stmt(ContinueStmtClass, Empty) {}
2425
2426  SourceLocation getContinueLoc() const { return ContinueStmtBits.ContinueLoc; }
2427  void setContinueLoc(SourceLocation L) { ContinueStmtBits.ContinueLoc = L; }
2428
2429  SourceLocation getBeginLoc() const { return getContinueLoc(); }
2430  SourceLocation getEndLoc() const { return getContinueLoc(); }
2431
2432  static bool classof(const Stmt *T) {
2433    return T->getStmtClass() == ContinueStmtClass;
2434  }
2435
2436  // Iterators
2437  child_range children() {
2438    return child_range(child_iterator(), child_iterator());
2439  }
2440};
2441
2442/// BreakStmt - This represents a break.
2443class BreakStmt : public Stmt {
2444public:
2445  BreakStmt(SourceLocation BL) : Stmt(BreakStmtClass) {
2446    setBreakLoc(BL);
2447  }
2448
2449  /// Build an empty break statement.
2450  explicit BreakStmt(EmptyShell Empty) : Stmt(BreakStmtClass, Empty) {}
2451
2452  SourceLocation getBreakLoc() const { return BreakStmtBits.BreakLoc; }
2453  void setBreakLoc(SourceLocation L) { BreakStmtBits.BreakLoc = L; }
2454
2455  SourceLocation getBeginLoc() const { return getBreakLoc(); }
2456  SourceLocation getEndLoc() const { return getBreakLoc(); }
2457
2458  static bool classof(const Stmt *T) {
2459    return T->getStmtClass() == BreakStmtClass;
2460  }
2461
2462  // Iterators
2463  child_range children() {
2464    return child_range(child_iterator(), child_iterator());
2465  }
2466};
2467
2468/// ReturnStmt - This represents a return, optionally of an expression:
2469///   return;
2470///   return 4;
2471///
2472/// Note that GCC allows return with no argument in a function declared to
2473/// return a value, and it allows returning a value in functions declared to
2474/// return void.  We explicitly model this in the AST, which means you can't
2475/// depend on the return type of the function and the presence of an argument.
2476class ReturnStmt final
2477    : public Stmt,
2478      private llvm::TrailingObjects<ReturnStmt, const VarDecl *> {
2479  friend TrailingObjects;
2480
2481  /// The return expression.
2482  Stmt *RetExpr;
2483
2484  // ReturnStmt is followed optionally by a trailing "const VarDecl *"
2485  // for the NRVO candidate. Present if and only if hasNRVOCandidate().
2486
2487  /// True if this ReturnStmt has storage for an NRVO candidate.
2488  bool hasNRVOCandidate() const { return ReturnStmtBits.HasNRVOCandidate; }
2489
2490  unsigned numTrailingObjects(OverloadToken<const VarDecl *>) const {
2491    return hasNRVOCandidate();
2492  }
2493
2494  /// Build a return statement.
2495  ReturnStmt(SourceLocation RLExpr *Econst VarDecl *NRVOCandidate);
2496
2497  /// Build an empty return statement.
2498  explicit ReturnStmt(EmptyShell Emptybool HasNRVOCandidate);
2499
2500public:
2501  /// Create a return statement.
2502  static ReturnStmt *Create(const ASTContext &CtxSourceLocation RLExpr *E,
2503                            const VarDecl *NRVOCandidate);
2504
2505  /// Create an empty return statement, optionally with
2506  /// storage for an NRVO candidate.
2507  static ReturnStmt *CreateEmpty(const ASTContext &Ctxbool HasNRVOCandidate);
2508
2509  Expr *getRetValue() { return reinterpret_cast<Expr *>(RetExpr); }
2510  const Expr *getRetValue() const { return reinterpret_cast<Expr *>(RetExpr); }
2511  void setRetValue(Expr *E) { RetExpr = reinterpret_cast<Stmt *>(E); }
2512
2513  /// Retrieve the variable that might be used for the named return
2514  /// value optimization.
2515  ///
2516  /// The optimization itself can only be performed if the variable is
2517  /// also marked as an NRVO object.
2518  const VarDecl *getNRVOCandidate() const {
2519    return hasNRVOCandidate() ? *getTrailingObjects<const VarDecl *>()
2520                              : nullptr;
2521  }
2522
2523  /// Set the variable that might be used for the named return value
2524  /// optimization. The return statement must have storage for it,
2525  /// which is the case if and only if hasNRVOCandidate() is true.
2526  void setNRVOCandidate(const VarDecl *Var) {
2527     (0) . __assert_fail ("hasNRVOCandidate() && \"This return statement has no storage for an NRVO candidate!\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/Stmt.h", 2528, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(hasNRVOCandidate() &&
2528 (0) . __assert_fail ("hasNRVOCandidate() && \"This return statement has no storage for an NRVO candidate!\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/Stmt.h", 2528, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">           "This return statement has no storage for an NRVO candidate!");
2529    *getTrailingObjects<const VarDecl *>() = Var;
2530  }
2531
2532  SourceLocation getReturnLoc() const { return ReturnStmtBits.RetLoc; }
2533  void setReturnLoc(SourceLocation L) { ReturnStmtBits.RetLoc = L; }
2534
2535  SourceLocation getBeginLoc() const { return getReturnLoc(); }
2536  SourceLocation getEndLoc() const LLVM_READONLY {
2537    return RetExpr ? RetExpr->getEndLoc() : getReturnLoc();
2538  }
2539
2540  static bool classof(const Stmt *T) {
2541    return T->getStmtClass() == ReturnStmtClass;
2542  }
2543
2544  // Iterators
2545  child_range children() {
2546    if (RetExpr)
2547      return child_range(&RetExpr, &RetExpr + 1);
2548    return child_range(child_iterator(), child_iterator());
2549  }
2550};
2551
2552/// AsmStmt is the base class for GCCAsmStmt and MSAsmStmt.
2553class AsmStmt : public Stmt {
2554protected:
2555  friend class ASTStmtReader;
2556
2557  SourceLocation AsmLoc;
2558
2559  /// True if the assembly statement does not have any input or output
2560  /// operands.
2561  bool IsSimple;
2562
2563  /// If true, treat this inline assembly as having side effects.
2564  /// This assembly statement should not be optimized, deleted or moved.
2565  bool IsVolatile;
2566
2567  unsigned NumOutputs;
2568  unsigned NumInputs;
2569  unsigned NumClobbers;
2570
2571  Stmt **Exprs = nullptr;
2572
2573  AsmStmt(StmtClass SCSourceLocation asmlocbool issimplebool isvolatile,
2574          unsigned numoutputsunsigned numinputsunsigned numclobbers)
2575      : Stmt (SC), AsmLoc(asmloc), IsSimple(issimple), IsVolatile(isvolatile),
2576        NumOutputs(numoutputs), NumInputs(numinputs),
2577        NumClobbers(numclobbers) {}
2578
2579public:
2580  /// Build an empty inline-assembly statement.
2581  explicit AsmStmt(StmtClass SCEmptyShell Empty) : Stmt(SCEmpty) {}
2582
2583  SourceLocation getAsmLoc() const { return AsmLoc; }
2584  void setAsmLoc(SourceLocation L) { AsmLoc = L; }
2585
2586  bool isSimple() const { return IsSimple; }
2587  void setSimple(bool V) { IsSimple = V; }
2588
2589  bool isVolatile() const { return IsVolatile; }
2590  void setVolatile(bool V) { IsVolatile = V; }
2591
2592  SourceLocation getBeginLoc() const LLVM_READONLY { return {}; }
2593  SourceLocation getEndLoc() const LLVM_READONLY { return {}; }
2594
2595  //===--- Asm String Analysis ---===//
2596
2597  /// Assemble final IR asm string.
2598  std::string generateAsmString(const ASTContext &C) const;
2599
2600  //===--- Output operands ---===//
2601
2602  unsigned getNumOutputs() const { return NumOutputs; }
2603
2604  /// getOutputConstraint - Return the constraint string for the specified
2605  /// output operand.  All output constraints are known to be non-empty (either
2606  /// '=' or '+').
2607  StringRef getOutputConstraint(unsigned iconst;
2608
2609  /// isOutputPlusConstraint - Return true if the specified output constraint
2610  /// is a "+" constraint (which is both an input and an output) or false if it
2611  /// is an "=" constraint (just an output).
2612  bool isOutputPlusConstraint(unsigned iconst {
2613    return getOutputConstraint(i)[0] == '+';
2614  }
2615
2616  const Expr *getOutputExpr(unsigned iconst;
2617
2618  /// getNumPlusOperands - Return the number of output operands that have a "+"
2619  /// constraint.
2620  unsigned getNumPlusOperands() const;
2621
2622  //===--- Input operands ---===//
2623
2624  unsigned getNumInputs() const { return NumInputs; }
2625
2626  /// getInputConstraint - Return the specified input constraint.  Unlike output
2627  /// constraints, these can be empty.
2628  StringRef getInputConstraint(unsigned iconst;
2629
2630  const Expr *getInputExpr(unsigned iconst;
2631
2632  //===--- Other ---===//
2633
2634  unsigned getNumClobbers() const { return NumClobbers; }
2635  StringRef getClobber(unsigned iconst;
2636
2637  static bool classof(const Stmt *T) {
2638    return T->getStmtClass() == GCCAsmStmtClass ||
2639      T->getStmtClass() == MSAsmStmtClass;
2640  }
2641
2642  // Input expr iterators.
2643
2644  using inputs_iterator = ExprIterator;
2645  using const_inputs_iterator = ConstExprIterator;
2646  using inputs_range = llvm::iterator_range<inputs_iterator>;
2647  using inputs_const_range = llvm::iterator_range<const_inputs_iterator>;
2648
2649  inputs_iterator begin_inputs() {
2650    return &Exprs[0] + NumOutputs;
2651  }
2652
2653  inputs_iterator end_inputs() {
2654    return &Exprs[0] + NumOutputs + NumInputs;
2655  }
2656
2657  inputs_range inputs() { return inputs_range(begin_inputs(), end_inputs()); }
2658
2659  const_inputs_iterator begin_inputs() const {
2660    return &Exprs[0] + NumOutputs;
2661  }
2662
2663  const_inputs_iterator end_inputs() const {
2664    return &Exprs[0] + NumOutputs + NumInputs;
2665  }
2666
2667  inputs_const_range inputs() const {
2668    return inputs_const_range(begin_inputs(), end_inputs());
2669  }
2670
2671  // Output expr iterators.
2672
2673  using outputs_iterator = ExprIterator;
2674  using const_outputs_iterator = ConstExprIterator;
2675  using outputs_range = llvm::iterator_range<outputs_iterator>;
2676  using outputs_const_range = llvm::iterator_range<const_outputs_iterator>;
2677
2678  outputs_iterator begin_outputs() {
2679    return &Exprs[0];
2680  }
2681
2682  outputs_iterator end_outputs() {
2683    return &Exprs[0] + NumOutputs;
2684  }
2685
2686  outputs_range outputs() {
2687    return outputs_range(begin_outputs(), end_outputs());
2688  }
2689
2690  const_outputs_iterator begin_outputs() const {
2691    return &Exprs[0];
2692  }
2693
2694  const_outputs_iterator end_outputs() const {
2695    return &Exprs[0] + NumOutputs;
2696  }
2697
2698  outputs_const_range outputs() const {
2699    return outputs_const_range(begin_outputs(), end_outputs());
2700  }
2701
2702  child_range children() {
2703    return child_range(&Exprs[0], &Exprs[0] + NumOutputs + NumInputs);
2704  }
2705};
2706
2707/// This represents a GCC inline-assembly statement extension.
2708class GCCAsmStmt : public AsmStmt {
2709  friend class ASTStmtReader;
2710
2711  SourceLocation RParenLoc;
2712  StringLiteral *AsmStr;
2713
2714  // FIXME: If we wanted to, we could allocate all of these in one big array.
2715  StringLiteral **Constraints = nullptr;
2716  StringLiteral **Clobbers = nullptr;
2717  IdentifierInfo **Names = nullptr;
2718
2719public:
2720  GCCAsmStmt(const ASTContext &CSourceLocation asmlocbool issimple,
2721             bool isvolatileunsigned numoutputsunsigned numinputs,
2722             IdentifierInfo **namesStringLiteral **constraintsExpr **exprs,
2723             StringLiteral *asmstrunsigned numclobbers,
2724             StringLiteral **clobbersSourceLocation rparenloc);
2725
2726  /// Build an empty inline-assembly statement.
2727  explicit GCCAsmStmt(EmptyShell Empty) : AsmStmt(GCCAsmStmtClass, Empty) {}
2728
2729  SourceLocation getRParenLoc() const { return RParenLoc; }
2730  void setRParenLoc(SourceLocation L) { RParenLoc = L; }
2731
2732  //===--- Asm String Analysis ---===//
2733
2734  const StringLiteral *getAsmString() const { return AsmStr; }
2735  StringLiteral *getAsmString() { return AsmStr; }
2736  void setAsmString(StringLiteral *E) { AsmStr = E; }
2737
2738  /// AsmStringPiece - this is part of a decomposed asm string specification
2739  /// (for use with the AnalyzeAsmString function below).  An asm string is
2740  /// considered to be a concatenation of these parts.
2741  class AsmStringPiece {
2742  public:
2743    enum Kind {
2744      String,  // String in .ll asm string form, "$" -> "$$" and "%%" -> "%".
2745      Operand  // Operand reference, with optional modifier %c4.
2746    };
2747
2748  private:
2749    Kind MyKind;
2750    std::string Str;
2751    unsigned OperandNo;
2752
2753    // Source range for operand references.
2754    CharSourceRange Range;
2755
2756  public:
2757    AsmStringPiece(const std::string &S) : MyKind(String), Str(S) {}
2758    AsmStringPiece(unsigned OpNoconst std::string &SSourceLocation Begin,
2759                   SourceLocation End)
2760        : MyKind(Operand), Str(S), OperandNo(OpNo),
2761          Range(CharSourceRange::getCharRange(BeginEnd)) {}
2762
2763    bool isString() const { return MyKind == String; }
2764    bool isOperand() const { return MyKind == Operand; }
2765
2766    const std::string &getString() const { return Str; }
2767
2768    unsigned getOperandNo() const {
2769      assert(isOperand());
2770      return OperandNo;
2771    }
2772
2773    CharSourceRange getRange() const {
2774       (0) . __assert_fail ("isOperand() && \"Range is currently used only for Operands.\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/Stmt.h", 2774, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(isOperand() && "Range is currently used only for Operands.");
2775      return Range;
2776    }
2777
2778    /// getModifier - Get the modifier for this operand, if present.  This
2779    /// returns '\0' if there was no modifier.
2780    char getModifier() const;
2781  };
2782
2783  /// AnalyzeAsmString - Analyze the asm string of the current asm, decomposing
2784  /// it into pieces.  If the asm string is erroneous, emit errors and return
2785  /// true, otherwise return false.  This handles canonicalization and
2786  /// translation of strings from GCC syntax to LLVM IR syntax, and handles
2787  //// flattening of named references like %[foo] to Operand AsmStringPiece's.
2788  unsigned AnalyzeAsmString(SmallVectorImpl<AsmStringPiece> &Pieces,
2789                            const ASTContext &Cunsigned &DiagOffsconst;
2790
2791  /// Assemble final IR asm string.
2792  std::string generateAsmString(const ASTContext &Cconst;
2793
2794  //===--- Output operands ---===//
2795
2796  IdentifierInfo *getOutputIdentifier(unsigned iconst { return Names[i]; }
2797
2798  StringRef getOutputName(unsigned iconst {
2799    if (IdentifierInfo *II = getOutputIdentifier(i))
2800      return II->getName();
2801
2802    return {};
2803  }
2804
2805  StringRef getOutputConstraint(unsigned iconst;
2806
2807  const StringLiteral *getOutputConstraintLiteral(unsigned iconst {
2808    return Constraints[i];
2809  }
2810  StringLiteral *getOutputConstraintLiteral(unsigned i) {
2811    return Constraints[i];
2812  }
2813
2814  Expr *getOutputExpr(unsigned i);
2815
2816  const Expr *getOutputExpr(unsigned iconst {
2817    return const_cast<GCCAsmStmt*>(this)->getOutputExpr(i);
2818  }
2819
2820  //===--- Input operands ---===//
2821
2822  IdentifierInfo *getInputIdentifier(unsigned iconst {
2823    return Names[i + NumOutputs];
2824  }
2825
2826  StringRef getInputName(unsigned iconst {
2827    if (IdentifierInfo *II = getInputIdentifier(i))
2828      return II->getName();
2829
2830    return {};
2831  }
2832
2833  StringRef getInputConstraint(unsigned iconst;
2834
2835  const StringLiteral *getInputConstraintLiteral(unsigned iconst {
2836    return Constraints[i + NumOutputs];
2837  }
2838  StringLiteral *getInputConstraintLiteral(unsigned i) {
2839    return Constraints[i + NumOutputs];
2840  }
2841
2842  Expr *getInputExpr(unsigned i);
2843  void setInputExpr(unsigned iExpr *E);
2844
2845  const Expr *getInputExpr(unsigned iconst {
2846    return const_cast<GCCAsmStmt*>(this)->getInputExpr(i);
2847  }
2848
2849private:
2850  void setOutputsAndInputsAndClobbers(const ASTContext &C,
2851                                      IdentifierInfo **Names,
2852                                      StringLiteral **Constraints,
2853                                      Stmt **Exprs,
2854                                      unsigned NumOutputs,
2855                                      unsigned NumInputs,
2856                                      StringLiteral **Clobbers,
2857                                      unsigned NumClobbers);
2858
2859public:
2860  //===--- Other ---===//
2861
2862  /// getNamedOperand - Given a symbolic operand reference like %[foo],
2863  /// translate this into a numeric value needed to reference the same operand.
2864  /// This returns -1 if the operand name is invalid.
2865  int getNamedOperand(StringRef SymbolicNameconst;
2866
2867  StringRef getClobber(unsigned iconst;
2868
2869  StringLiteral *getClobberStringLiteral(unsigned i) { return Clobbers[i]; }
2870  const StringLiteral *getClobberStringLiteral(unsigned iconst {
2871    return Clobbers[i];
2872  }
2873
2874  SourceLocation getBeginLoc() const LLVM_READONLY { return AsmLoc; }
2875  SourceLocation getEndLoc() const LLVM_READONLY { return RParenLoc; }
2876
2877  static bool classof(const Stmt *T) {
2878    return T->getStmtClass() == GCCAsmStmtClass;
2879  }
2880};
2881
2882/// This represents a Microsoft inline-assembly statement extension.
2883class MSAsmStmt : public AsmStmt {
2884  friend class ASTStmtReader;
2885
2886  SourceLocation LBraceLocEndLoc;
2887  StringRef AsmStr;
2888
2889  unsigned NumAsmToks = 0;
2890
2891  Token *AsmToks = nullptr;
2892  StringRef *Constraints = nullptr;
2893  StringRef *Clobbers = nullptr;
2894
2895public:
2896  MSAsmStmt(const ASTContext &CSourceLocation asmloc,
2897            SourceLocation lbracelocbool issimplebool isvolatile,
2898            ArrayRef<Tokenasmtoksunsigned numoutputsunsigned numinputs,
2899            ArrayRef<StringRefconstraints,
2900            ArrayRef<Expr*> exprsStringRef asmstr,
2901            ArrayRef<StringRefclobbersSourceLocation endloc);
2902
2903  /// Build an empty MS-style inline-assembly statement.
2904  explicit MSAsmStmt(EmptyShell Empty) : AsmStmt(MSAsmStmtClass, Empty) {}
2905
2906  SourceLocation getLBraceLoc() const { return LBraceLoc; }
2907  void setLBraceLoc(SourceLocation L) { LBraceLoc = L; }
2908  SourceLocation getEndLoc() const { return EndLoc; }
2909  void setEndLoc(SourceLocation L) { EndLoc = L; }
2910
2911  bool hasBraces() const { return LBraceLoc.isValid(); }
2912
2913  unsigned getNumAsmToks() { return NumAsmToks; }
2914  Token *getAsmToks() { return AsmToks; }
2915
2916  //===--- Asm String Analysis ---===//
2917  StringRef getAsmString() const { return AsmStr; }
2918
2919  /// Assemble final IR asm string.
2920  std::string generateAsmString(const ASTContext &Cconst;
2921
2922  //===--- Output operands ---===//
2923
2924  StringRef getOutputConstraint(unsigned iconst {
2925    assert(i < NumOutputs);
2926    return Constraints[i];
2927  }
2928
2929  Expr *getOutputExpr(unsigned i);
2930
2931  const Expr *getOutputExpr(unsigned iconst {
2932    return const_cast<MSAsmStmt*>(this)->getOutputExpr(i);
2933  }
2934
2935  //===--- Input operands ---===//
2936
2937  StringRef getInputConstraint(unsigned iconst {
2938    assert(i < NumInputs);
2939    return Constraints[i + NumOutputs];
2940  }
2941
2942  Expr *getInputExpr(unsigned i);
2943  void setInputExpr(unsigned iExpr *E);
2944
2945  const Expr *getInputExpr(unsigned iconst {
2946    return const_cast<MSAsmStmt*>(this)->getInputExpr(i);
2947  }
2948
2949  //===--- Other ---===//
2950
2951  ArrayRef<StringRefgetAllConstraints() const {
2952    return llvm::makeArrayRef(Constraints, NumInputs + NumOutputs);
2953  }
2954
2955  ArrayRef<StringRefgetClobbers() const {
2956    return llvm::makeArrayRef(Clobbers, NumClobbers);
2957  }
2958
2959  ArrayRef<Expr*> getAllExprs() const {
2960    return llvm::makeArrayRef(reinterpret_cast<Expr**>(Exprs),
2961                              NumInputs + NumOutputs);
2962  }
2963
2964  StringRef getClobber(unsigned iconst { return getClobbers()[i]; }
2965
2966private:
2967  void initialize(const ASTContext &CStringRef AsmString,
2968                  ArrayRef<TokenAsmToksArrayRef<StringRefConstraints,
2969                  ArrayRef<Expr*> ExprsArrayRef<StringRefClobbers);
2970
2971public:
2972  SourceLocation getBeginLoc() const LLVM_READONLY { return AsmLoc; }
2973
2974  static bool classof(const Stmt *T) {
2975    return T->getStmtClass() == MSAsmStmtClass;
2976  }
2977
2978  child_range children() {
2979    return child_range(&Exprs[0], &Exprs[NumInputs + NumOutputs]);
2980  }
2981};
2982
2983class SEHExceptStmt : public Stmt {
2984  friend class ASTReader;
2985  friend class ASTStmtReader;
2986
2987  SourceLocation  Loc;
2988  Stmt *Children[2];
2989
2990  enum { FILTER_EXPRBLOCK };
2991
2992  SEHExceptStmt(SourceLocation LocExpr *FilterExprStmt *Block);
2993  explicit SEHExceptStmt(EmptyShell E) : Stmt(SEHExceptStmtClass, E) {}
2994
2995public:
2996  static SEHExceptStmtCreate(const ASTContext &C,
2997                               SourceLocation ExceptLoc,
2998                               Expr *FilterExpr,
2999                               Stmt *Block);
3000
3001  SourceLocation getBeginLoc() const LLVM_READONLY { return getExceptLoc(); }
3002
3003  SourceLocation getExceptLoc() const { return Loc; }
3004  SourceLocation getEndLoc() const { return getBlock()->getEndLoc(); }
3005
3006  Expr *getFilterExpr() const {
3007    return reinterpret_cast<Expr*>(Children[FILTER_EXPR]);
3008  }
3009
3010  CompoundStmt *getBlock() const {
3011    return cast<CompoundStmt>(Children[BLOCK]);
3012  }
3013
3014  child_range children() {
3015    return child_range(Children, Children+2);
3016  }
3017
3018  static bool classof(const Stmt *T) {
3019    return T->getStmtClass() == SEHExceptStmtClass;
3020  }
3021};
3022
3023class SEHFinallyStmt : public Stmt {
3024  friend class ASTReader;
3025  friend class ASTStmtReader;
3026
3027  SourceLocation  Loc;
3028  Stmt *Block;
3029
3030  SEHFinallyStmt(SourceLocation LocStmt *Block);
3031  explicit SEHFinallyStmt(EmptyShell E) : Stmt(SEHFinallyStmtClass, E) {}
3032
3033public:
3034  static SEHFinallyStmtCreate(const ASTContext &C,
3035                                SourceLocation FinallyLoc,
3036                                Stmt *Block);
3037
3038  SourceLocation getBeginLoc() const LLVM_READONLY { return getFinallyLoc(); }
3039
3040  SourceLocation getFinallyLoc() const { return Loc; }
3041  SourceLocation getEndLoc() const { return Block->getEndLoc(); }
3042
3043  CompoundStmt *getBlock() const { return cast<CompoundStmt>(Block); }
3044
3045  child_range children() {
3046    return child_range(&Block,&Block+1);
3047  }
3048
3049  static bool classof(const Stmt *T) {
3050    return T->getStmtClass() == SEHFinallyStmtClass;
3051  }
3052};
3053
3054class SEHTryStmt : public Stmt {
3055  friend class ASTReader;
3056  friend class ASTStmtReader;
3057
3058  bool IsCXXTry;
3059  SourceLocation  TryLoc;
3060  Stmt *Children[2];
3061
3062  enum { TRY = 0HANDLER = 1 };
3063
3064  SEHTryStmt(bool isCXXTry// true if 'try' otherwise '__try'
3065             SourceLocation TryLoc,
3066             Stmt *TryBlock,
3067             Stmt *Handler);
3068
3069  explicit SEHTryStmt(EmptyShell E) : Stmt(SEHTryStmtClass, E) {}
3070
3071public:
3072  static SEHTryStmtCreate(const ASTContext &Cbool isCXXTry,
3073                            SourceLocation TryLocStmt *TryBlock,
3074                            Stmt *Handler);
3075
3076  SourceLocation getBeginLoc() const LLVM_READONLY { return getTryLoc(); }
3077
3078  SourceLocation getTryLoc() const { return TryLoc; }
3079  SourceLocation getEndLoc() const { return Children[HANDLER]->getEndLoc(); }
3080
3081  bool getIsCXXTry() const { return IsCXXTry; }
3082
3083  CompoundStmt* getTryBlock() const {
3084    return cast<CompoundStmt>(Children[TRY]);
3085  }
3086
3087  Stmt *getHandler() const { return Children[HANDLER]; }
3088
3089  /// Returns 0 if not defined
3090  SEHExceptStmt  *getExceptHandler() const;
3091  SEHFinallyStmt *getFinallyHandler() const;
3092
3093  child_range children() {
3094    return child_range(ChildrenChildren+2);
3095  }
3096
3097  static bool classof(const Stmt *T) {
3098    return T->getStmtClass() == SEHTryStmtClass;
3099  }
3100};
3101
3102/// Represents a __leave statement.
3103class SEHLeaveStmt : public Stmt {
3104  SourceLocation LeaveLoc;
3105
3106public:
3107  explicit SEHLeaveStmt(SourceLocation LL)
3108      : Stmt(SEHLeaveStmtClass), LeaveLoc(LL) {}
3109
3110  /// Build an empty __leave statement.
3111  explicit SEHLeaveStmt(EmptyShell Empty) : Stmt(SEHLeaveStmtClass, Empty) {}
3112
3113  SourceLocation getLeaveLoc() const { return LeaveLoc; }
3114  void setLeaveLoc(SourceLocation L) { LeaveLoc = L; }
3115
3116  SourceLocation getBeginLoc() const LLVM_READONLY { return LeaveLoc; }
3117  SourceLocation getEndLoc() const LLVM_READONLY { return LeaveLoc; }
3118
3119  static bool classof(const Stmt *T) {
3120    return T->getStmtClass() == SEHLeaveStmtClass;
3121  }
3122
3123  // Iterators
3124  child_range children() {
3125    return child_range(child_iterator(), child_iterator());
3126  }
3127};
3128
3129/// This captures a statement into a function. For example, the following
3130/// pragma annotated compound statement can be represented as a CapturedStmt,
3131/// and this compound statement is the body of an anonymous outlined function.
3132/// @code
3133/// #pragma omp parallel
3134/// {
3135///   compute();
3136/// }
3137/// @endcode
3138class CapturedStmt : public Stmt {
3139public:
3140  /// The different capture forms: by 'this', by reference, capture for
3141  /// variable-length array type etc.
3142  enum VariableCaptureKind {
3143    VCK_This,
3144    VCK_ByRef,
3145    VCK_ByCopy,
3146    VCK_VLAType,
3147  };
3148
3149  /// Describes the capture of either a variable, or 'this', or
3150  /// variable-length array type.
3151  class Capture {
3152    llvm::PointerIntPair<VarDecl *, 2, VariableCaptureKind> VarAndKind;
3153    SourceLocation Loc;
3154
3155  public:
3156    friend class ASTStmtReader;
3157
3158    /// Create a new capture.
3159    ///
3160    /// \param Loc The source location associated with this capture.
3161    ///
3162    /// \param Kind The kind of capture (this, ByRef, ...).
3163    ///
3164    /// \param Var The variable being captured, or null if capturing this.
3165    Capture(SourceLocation LocVariableCaptureKind Kind,
3166            VarDecl *Var = nullptr);
3167
3168    /// Determine the kind of capture.
3169    VariableCaptureKind getCaptureKind() const;
3170
3171    /// Retrieve the source location at which the variable or 'this' was
3172    /// first used.
3173    SourceLocation getLocation() const { return Loc; }
3174
3175    /// Determine whether this capture handles the C++ 'this' pointer.
3176    bool capturesThis() const { return getCaptureKind() == VCK_This; }
3177
3178    /// Determine whether this capture handles a variable (by reference).
3179    bool capturesVariable() const { return getCaptureKind() == VCK_ByRef; }
3180
3181    /// Determine whether this capture handles a variable by copy.
3182    bool capturesVariableByCopy() const {
3183      return getCaptureKind() == VCK_ByCopy;
3184    }
3185
3186    /// Determine whether this capture handles a variable-length array
3187    /// type.
3188    bool capturesVariableArrayType() const {
3189      return getCaptureKind() == VCK_VLAType;
3190    }
3191
3192    /// Retrieve the declaration of the variable being captured.
3193    ///
3194    /// This operation is only valid if this capture captures a variable.
3195    VarDecl *getCapturedVar() const;
3196  };
3197
3198private:
3199  /// The number of variable captured, including 'this'.
3200  unsigned NumCaptures;
3201
3202  /// The pointer part is the implicit the outlined function and the
3203  /// int part is the captured region kind, 'CR_Default' etc.
3204  llvm::PointerIntPair<CapturedDecl *, 2, CapturedRegionKind> CapDeclAndKind;
3205
3206  /// The record for captured variables, a RecordDecl or CXXRecordDecl.
3207  RecordDecl *TheRecordDecl = nullptr;
3208
3209  /// Construct a captured statement.
3210  CapturedStmt(Stmt *SCapturedRegionKind KindArrayRef<CaptureCaptures,
3211               ArrayRef<Expr *> CaptureInitsCapturedDecl *CDRecordDecl *RD);
3212
3213  /// Construct an empty captured statement.
3214  CapturedStmt(EmptyShell Emptyunsigned NumCaptures);
3215
3216  Stmt **getStoredStmts() { return reinterpret_cast<Stmt **>(this + 1); }
3217
3218  Stmt *const *getStoredStmts() const {
3219    return reinterpret_cast<Stmt *const *>(this + 1);
3220  }
3221
3222  Capture *getStoredCaptures() const;
3223
3224  void setCapturedStmt(Stmt *S) { getStoredStmts()[NumCaptures] = S; }
3225
3226public:
3227  friend class ASTStmtReader;
3228
3229  static CapturedStmt *Create(const ASTContext &ContextStmt *S,
3230                              CapturedRegionKind Kind,
3231                              ArrayRef<CaptureCaptures,
3232                              ArrayRef<Expr *> CaptureInits,
3233                              CapturedDecl *CDRecordDecl *RD);
3234
3235  static CapturedStmt *CreateDeserialized(const ASTContext &Context,
3236                                          unsigned NumCaptures);
3237
3238  /// Retrieve the statement being captured.
3239  Stmt *getCapturedStmt() { return getStoredStmts()[NumCaptures]; }
3240  const Stmt *getCapturedStmt() const { return getStoredStmts()[NumCaptures]; }
3241
3242  /// Retrieve the outlined function declaration.
3243  CapturedDecl *getCapturedDecl();
3244  const CapturedDecl *getCapturedDecl() const;
3245
3246  /// Set the outlined function declaration.
3247  void setCapturedDecl(CapturedDecl *D);
3248
3249  /// Retrieve the captured region kind.
3250  CapturedRegionKind getCapturedRegionKind() const;
3251
3252  /// Set the captured region kind.
3253  void setCapturedRegionKind(CapturedRegionKind Kind);
3254
3255  /// Retrieve the record declaration for captured variables.
3256  const RecordDecl *getCapturedRecordDecl() const { return TheRecordDecl; }
3257
3258  /// Set the record declaration for captured variables.
3259  void setCapturedRecordDecl(RecordDecl *D) {
3260     (0) . __assert_fail ("D && \"null RecordDecl\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/Stmt.h", 3260, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(D && "null RecordDecl");
3261    TheRecordDecl = D;
3262  }
3263
3264  /// True if this variable has been captured.
3265  bool capturesVariable(const VarDecl *Varconst;
3266
3267  /// An iterator that walks over the captures.
3268  using capture_iterator = Capture *;
3269  using const_capture_iterator = const Capture *;
3270  using capture_range = llvm::iterator_range<capture_iterator>;
3271  using capture_const_range = llvm::iterator_range<const_capture_iterator>;
3272
3273  capture_range captures() {
3274    return capture_range(capture_begin(), capture_end());
3275  }
3276  capture_const_range captures() const {
3277    return capture_const_range(capture_begin(), capture_end());
3278  }
3279
3280  /// Retrieve an iterator pointing to the first capture.
3281  capture_iterator capture_begin() { return getStoredCaptures(); }
3282  const_capture_iterator capture_begin() const { return getStoredCaptures(); }
3283
3284  /// Retrieve an iterator pointing past the end of the sequence of
3285  /// captures.
3286  capture_iterator capture_end() const {
3287    return getStoredCaptures() + NumCaptures;
3288  }
3289
3290  /// Retrieve the number of captures, including 'this'.
3291  unsigned capture_size() const { return NumCaptures; }
3292
3293  /// Iterator that walks over the capture initialization arguments.
3294  using capture_init_iterator = Expr **;
3295  using capture_init_range = llvm::iterator_range<capture_init_iterator>;
3296
3297  /// Const iterator that walks over the capture initialization
3298  /// arguments.
3299  using const_capture_init_iterator = Expr *const *;
3300  using const_capture_init_range =
3301      llvm::iterator_range<const_capture_init_iterator>;
3302
3303  capture_init_range capture_inits() {
3304    return capture_init_range(capture_init_begin(), capture_init_end());
3305  }
3306
3307  const_capture_init_range capture_inits() const {
3308    return const_capture_init_range(capture_init_begin(), capture_init_end());
3309  }
3310
3311  /// Retrieve the first initialization argument.
3312  capture_init_iterator capture_init_begin() {
3313    return reinterpret_cast<Expr **>(getStoredStmts());
3314  }
3315
3316  const_capture_init_iterator capture_init_begin() const {
3317    return reinterpret_cast<Expr *const *>(getStoredStmts());
3318  }
3319
3320  /// Retrieve the iterator pointing one past the last initialization
3321  /// argument.
3322  capture_init_iterator capture_init_end() {
3323    return capture_init_begin() + NumCaptures;
3324  }
3325
3326  const_capture_init_iterator capture_init_end() const {
3327    return capture_init_begin() + NumCaptures;
3328  }
3329
3330  SourceLocation getBeginLoc() const LLVM_READONLY {
3331    return getCapturedStmt()->getBeginLoc();
3332  }
3333
3334  SourceLocation getEndLoc() const LLVM_READONLY {
3335    return getCapturedStmt()->getEndLoc();
3336  }
3337
3338  SourceRange getSourceRange() const LLVM_READONLY {
3339    return getCapturedStmt()->getSourceRange();
3340  }
3341
3342  static bool classof(const Stmt *T) {
3343    return T->getStmtClass() == CapturedStmtClass;
3344  }
3345
3346  child_range children();
3347};
3348
3349// namespace clang
3350
3351#endif // LLVM_CLANG_AST_STMT_H
3352
clang::Stmt::StmtClass
clang::Stmt::StmtBitfields
clang::Stmt::StmtBitfields::sClass
clang::Stmt::StmtBitfields::IsOMPStructuredBlock
clang::Stmt::NullStmtBitfields
clang::Stmt::NullStmtBitfields::HasLeadingEmptyMacro
clang::Stmt::NullStmtBitfields::SemiLoc
clang::Stmt::CompoundStmtBitfields
clang::Stmt::CompoundStmtBitfields::NumStmts
clang::Stmt::CompoundStmtBitfields::LBraceLoc
clang::Stmt::LabelStmtBitfields
clang::Stmt::LabelStmtBitfields::IdentLoc
clang::Stmt::AttributedStmtBitfields
clang::Stmt::AttributedStmtBitfields::NumAttrs
clang::Stmt::AttributedStmtBitfields::AttrLoc
clang::Stmt::IfStmtBitfields
clang::Stmt::IfStmtBitfields::IsConstexpr
clang::Stmt::IfStmtBitfields::HasElse
clang::Stmt::IfStmtBitfields::HasVar
clang::Stmt::IfStmtBitfields::HasInit
clang::Stmt::IfStmtBitfields::IfLoc
clang::Stmt::SwitchStmtBitfields
clang::Stmt::SwitchStmtBitfields::HasInit
clang::Stmt::SwitchStmtBitfields::HasVar
clang::Stmt::SwitchStmtBitfields::AllEnumCasesCovered
clang::Stmt::SwitchStmtBitfields::SwitchLoc
clang::Stmt::WhileStmtBitfields
clang::Stmt::WhileStmtBitfields::HasVar
clang::Stmt::WhileStmtBitfields::WhileLoc
clang::Stmt::DoStmtBitfields
clang::Stmt::DoStmtBitfields::DoLoc
clang::Stmt::ForStmtBitfields
clang::Stmt::ForStmtBitfields::ForLoc
clang::Stmt::GotoStmtBitfields
clang::Stmt::GotoStmtBitfields::GotoLoc
clang::Stmt::ContinueStmtBitfields
clang::Stmt::ContinueStmtBitfields::ContinueLoc
clang::Stmt::BreakStmtBitfields
clang::Stmt::BreakStmtBitfields::BreakLoc
clang::Stmt::ReturnStmtBitfields
clang::Stmt::ReturnStmtBitfields::HasNRVOCandidate
clang::Stmt::ReturnStmtBitfields::RetLoc
clang::Stmt::SwitchCaseBitfields
clang::Stmt::SwitchCaseBitfields::CaseStmtIsGNURange
clang::Stmt::SwitchCaseBitfields::KeywordLoc
clang::Stmt::ExprBitfields
clang::Stmt::ExprBitfields::ValueKind
clang::Stmt::ExprBitfields::ObjectKind
clang::Stmt::ExprBitfields::TypeDependent
clang::Stmt::ExprBitfields::ValueDependent
clang::Stmt::ExprBitfields::InstantiationDependent
clang::Stmt::ExprBitfields::ContainsUnexpandedParameterPack
clang::Stmt::PredefinedExprBitfields
clang::Stmt::PredefinedExprBitfields::Kind
clang::Stmt::PredefinedExprBitfields::HasFunctionName
clang::Stmt::PredefinedExprBitfields::Loc
clang::Stmt::DeclRefExprBitfields
clang::Stmt::DeclRefExprBitfields::HasQualifier
clang::Stmt::DeclRefExprBitfields::HasTemplateKWAndArgsInfo
clang::Stmt::DeclRefExprBitfields::HasFoundDecl
clang::Stmt::DeclRefExprBitfields::HadMultipleCandidates
clang::Stmt::DeclRefExprBitfields::RefersToEnclosingVariableOrCapture
clang::Stmt::DeclRefExprBitfields::Loc
clang::Stmt::APFloatSemantics
clang::Stmt::FloatingLiteralBitfields
clang::Stmt::FloatingLiteralBitfields::Semantics
clang::Stmt::FloatingLiteralBitfields::IsExact
clang::Stmt::StringLiteralBitfields
clang::Stmt::StringLiteralBitfields::Kind
clang::Stmt::StringLiteralBitfields::CharByteWidth
clang::Stmt::StringLiteralBitfields::IsPascal
clang::Stmt::StringLiteralBitfields::NumConcatenated
clang::Stmt::CharacterLiteralBitfields
clang::Stmt::CharacterLiteralBitfields::Kind
clang::Stmt::UnaryOperatorBitfields
clang::Stmt::UnaryOperatorBitfields::Opc
clang::Stmt::UnaryOperatorBitfields::CanOverflow
clang::Stmt::UnaryOperatorBitfields::Loc
clang::Stmt::UnaryExprOrTypeTraitExprBitfields
clang::Stmt::UnaryExprOrTypeTraitExprBitfields::Kind
clang::Stmt::UnaryExprOrTypeTraitExprBitfields::IsType
clang::Stmt::ArraySubscriptExprBitfields
clang::Stmt::ArraySubscriptExprBitfields::RBracketLoc
clang::Stmt::CallExprBitfields
clang::Stmt::CallExprBitfields::NumPreArgs
clang::Stmt::CallExprBitfields::UsesADL
clang::Stmt::CallExprBitfields::OffsetToTrailingObjects
clang::Stmt::MemberExprBitfields
clang::Stmt::MemberExprBitfields::IsArrow
clang::Stmt::MemberExprBitfields::HasQualifierOrFoundDecl
clang::Stmt::MemberExprBitfields::HasTemplateKWAndArgsInfo
clang::Stmt::MemberExprBitfields::HadMultipleCandidates
clang::Stmt::MemberExprBitfields::OperatorLoc
clang::Stmt::CastExprBitfields
clang::Stmt::CastExprBitfields::Kind
clang::Stmt::CastExprBitfields::PartOfExplicitCast
clang::Stmt::CastExprBitfields::BasePathSize
clang::Stmt::BinaryOperatorBitfields
clang::Stmt::BinaryOperatorBitfields::Opc
clang::Stmt::BinaryOperatorBitfields::FPFeatures
clang::Stmt::BinaryOperatorBitfields::OpLoc
clang::Stmt::InitListExprBitfields
clang::Stmt::InitListExprBitfields::HadArrayRangeDesignator
clang::Stmt::ParenListExprBitfields
clang::Stmt::ParenListExprBitfields::NumExprs
clang::Stmt::GenericSelectionExprBitfields
clang::Stmt::GenericSelectionExprBitfields::GenericLoc
clang::Stmt::PseudoObjectExprBitfields
clang::Stmt::PseudoObjectExprBitfields::NumSubExprs
clang::Stmt::PseudoObjectExprBitfields::ResultIndex
clang::Stmt::CXXOperatorCallExprBitfields
clang::Stmt::CXXOperatorCallExprBitfields::OperatorKind
clang::Stmt::CXXOperatorCallExprBitfields::FPFeatures
clang::Stmt::CXXBoolLiteralExprBitfields
clang::Stmt::CXXBoolLiteralExprBitfields::Value
clang::Stmt::CXXBoolLiteralExprBitfields::Loc
clang::Stmt::CXXNullPtrLiteralExprBitfields
clang::Stmt::CXXNullPtrLiteralExprBitfields::Loc
clang::Stmt::CXXThisExprBitfields
clang::Stmt::CXXThisExprBitfields::IsImplicit
clang::Stmt::CXXThisExprBitfields::Loc
clang::Stmt::CXXThrowExprBitfields
clang::Stmt::CXXThrowExprBitfields::IsThrownVariableInScope
clang::Stmt::CXXThrowExprBitfields::ThrowLoc
clang::Stmt::CXXDefaultArgExprBitfields
clang::Stmt::CXXDefaultArgExprBitfields::Loc
clang::Stmt::CXXDefaultInitExprBitfields
clang::Stmt::CXXDefaultInitExprBitfields::Loc
clang::Stmt::CXXScalarValueInitExprBitfields
clang::Stmt::CXXScalarValueInitExprBitfields::RParenLoc
clang::Stmt::CXXNewExprBitfields
clang::Stmt::CXXNewExprBitfields::IsGlobalNew
clang::Stmt::CXXNewExprBitfields::IsArray
clang::Stmt::CXXNewExprBitfields::ShouldPassAlignment
clang::Stmt::CXXNewExprBitfields::UsualArrayDeleteWantsSize
clang::Stmt::CXXNewExprBitfields::StoredInitializationStyle
clang::Stmt::CXXNewExprBitfields::IsParenTypeId
clang::Stmt::CXXNewExprBitfields::NumPlacementArgs
clang::Stmt::CXXDeleteExprBitfields
clang::Stmt::CXXDeleteExprBitfields::GlobalDelete
clang::Stmt::CXXDeleteExprBitfields::ArrayForm
clang::Stmt::CXXDeleteExprBitfields::ArrayFormAsWritten
clang::Stmt::CXXDeleteExprBitfields::UsualArrayDeleteWantsSize
clang::Stmt::CXXDeleteExprBitfields::Loc
clang::Stmt::TypeTraitExprBitfields
clang::Stmt::TypeTraitExprBitfields::Kind
clang::Stmt::TypeTraitExprBitfields::Value
clang::Stmt::TypeTraitExprBitfields::NumArgs
clang::Stmt::DependentScopeDeclRefExprBitfields
clang::Stmt::DependentScopeDeclRefExprBitfields::HasTemplateKWAndArgsInfo
clang::Stmt::CXXConstructExprBitfields
clang::Stmt::CXXConstructExprBitfields::Elidable
clang::Stmt::CXXConstructExprBitfields::HadMultipleCandidates
clang::Stmt::CXXConstructExprBitfields::ListInitialization
clang::Stmt::CXXConstructExprBitfields::StdInitListInitialization
clang::Stmt::CXXConstructExprBitfields::ZeroInitialization
clang::Stmt::CXXConstructExprBitfields::ConstructionKind
clang::Stmt::CXXConstructExprBitfields::Loc
clang::Stmt::ExprWithCleanupsBitfields
clang::Stmt::ExprWithCleanupsBitfields::CleanupsHaveSideEffects
clang::Stmt::ExprWithCleanupsBitfields::NumObjects
clang::Stmt::CXXUnresolvedConstructExprBitfields
clang::Stmt::CXXUnresolvedConstructExprBitfields::NumArgs
clang::Stmt::CXXDependentScopeMemberExprBitfields
clang::Stmt::CXXDependentScopeMemberExprBitfields::IsArrow
clang::Stmt::CXXDependentScopeMemberExprBitfields::HasTemplateKWAndArgsInfo
clang::Stmt::CXXDependentScopeMemberExprBitfields::HasFirstQualifierFoundInScope
clang::Stmt::CXXDependentScopeMemberExprBitfields::OperatorLoc
clang::Stmt::OverloadExprBitfields
clang::Stmt::OverloadExprBitfields::HasTemplateKWAndArgsInfo
clang::Stmt::OverloadExprBitfields::NumResults
clang::Stmt::UnresolvedLookupExprBitfields
clang::Stmt::UnresolvedLookupExprBitfields::RequiresADL
clang::Stmt::UnresolvedLookupExprBitfields::Overloaded
clang::Stmt::UnresolvedMemberExprBitfields
clang::Stmt::UnresolvedMemberExprBitfields::IsArrow
clang::Stmt::UnresolvedMemberExprBitfields::HasUnresolvedUsing
clang::Stmt::CXXNoexceptExprBitfields
clang::Stmt::CXXNoexceptExprBitfields::Value
clang::Stmt::SubstNonTypeTemplateParmExprBitfields
clang::Stmt::SubstNonTypeTemplateParmExprBitfields::NameLoc
clang::Stmt::CoawaitExprBitfields
clang::Stmt::CoawaitExprBitfields::IsImplicit
clang::Stmt::ObjCIndirectCopyRestoreExprBitfields
clang::Stmt::ObjCIndirectCopyRestoreExprBitfields::ShouldCopy
clang::Stmt::OpaqueValueExprBitfields
clang::Stmt::OpaqueValueExprBitfields::IsUnique
clang::Stmt::OpaqueValueExprBitfields::Loc
clang::Stmt::(anonymous union)::StmtBits
clang::Stmt::(anonymous union)::NullStmtBits
clang::Stmt::(anonymous union)::CompoundStmtBits
clang::Stmt::(anonymous union)::LabelStmtBits
clang::Stmt::(anonymous union)::AttributedStmtBits
clang::Stmt::(anonymous union)::IfStmtBits
clang::Stmt::(anonymous union)::SwitchStmtBits
clang::Stmt::(anonymous union)::WhileStmtBits
clang::Stmt::(anonymous union)::DoStmtBits
clang::Stmt::(anonymous union)::ForStmtBits
clang::Stmt::(anonymous union)::GotoStmtBits
clang::Stmt::(anonymous union)::ContinueStmtBits
clang::Stmt::(anonymous union)::BreakStmtBits
clang::Stmt::(anonymous union)::ReturnStmtBits
clang::Stmt::(anonymous union)::SwitchCaseBits
clang::Stmt::(anonymous union)::ExprBits
clang::Stmt::(anonymous union)::PredefinedExprBits
clang::Stmt::(anonymous union)::DeclRefExprBits
clang::Stmt::(anonymous union)::FloatingLiteralBits
clang::Stmt::(anonymous union)::StringLiteralBits
clang::Stmt::(anonymous union)::CharacterLiteralBits
clang::Stmt::(anonymous union)::UnaryOperatorBits
clang::Stmt::(anonymous union)::UnaryExprOrTypeTraitExprBits
clang::Stmt::(anonymous union)::ArraySubscriptExprBits
clang::Stmt::(anonymous union)::CallExprBits
clang::Stmt::(anonymous union)::MemberExprBits
clang::Stmt::(anonymous union)::CastExprBits
clang::Stmt::(anonymous union)::BinaryOperatorBits
clang::Stmt::(anonymous union)::InitListExprBits
clang::Stmt::(anonymous union)::ParenListExprBits
clang::Stmt::(anonymous union)::GenericSelectionExprBits
clang::Stmt::(anonymous union)::PseudoObjectExprBits
clang::Stmt::(anonymous union)::CXXOperatorCallExprBits
clang::Stmt::(anonymous union)::CXXBoolLiteralExprBits
clang::Stmt::(anonymous union)::CXXNullPtrLiteralExprBits
clang::Stmt::(anonymous union)::CXXThisExprBits
clang::Stmt::(anonymous union)::CXXThrowExprBits
clang::Stmt::(anonymous union)::CXXDefaultArgExprBits
clang::Stmt::(anonymous union)::CXXDefaultInitExprBits
clang::Stmt::(anonymous union)::CXXScalarValueInitExprBits
clang::Stmt::(anonymous union)::CXXNewExprBits
clang::Stmt::(anonymous union)::CXXDeleteExprBits
clang::Stmt::(anonymous union)::TypeTraitExprBits
clang::Stmt::(anonymous union)::DependentScopeDeclRefExprBits
clang::Stmt::(anonymous union)::CXXConstructExprBits
clang::Stmt::(anonymous union)::ExprWithCleanupsBits
clang::Stmt::(anonymous union)::CXXUnresolvedConstructExprBits
clang::Stmt::(anonymous union)::CXXDependentScopeMemberExprBits
clang::Stmt::(anonymous union)::OverloadExprBits
clang::Stmt::(anonymous union)::UnresolvedLookupExprBits
clang::Stmt::(anonymous union)::UnresolvedMemberExprBits
clang::Stmt::(anonymous union)::CXXNoexceptExprBits
clang::Stmt::(anonymous union)::SubstNonTypeTemplateParmExprBits
clang::Stmt::(anonymous union)::CoawaitBits
clang::Stmt::(anonymous union)::ObjCIndirectCopyRestoreExprBits
clang::Stmt::(anonymous union)::OpaqueValueExprBits
clang::Stmt::EmptyShell
clang::Stmt::CastIterator
clang::Stmt::StatisticsEnabled
clang::Stmt::getStmtClass
clang::Stmt::getStmtClassName
clang::Stmt::isOMPStructuredBlock
clang::Stmt::setIsOMPStructuredBlock
clang::Stmt::getSourceRange
clang::Stmt::getBeginLoc
clang::Stmt::getEndLoc
clang::Stmt::addStmtClass
clang::Stmt::EnableStatistics
clang::Stmt::PrintStats
clang::Stmt::dump
clang::Stmt::dump
clang::Stmt::dump
clang::Stmt::dump
clang::Stmt::getID
clang::Stmt::dumpColor
clang::Stmt::dumpPretty
clang::Stmt::printPretty
clang::Stmt::viewAST
clang::Stmt::IgnoreContainers
clang::Stmt::IgnoreContainers
clang::Stmt::stripLabelLikeStatements
clang::Stmt::stripLabelLikeStatements
clang::Stmt::children
clang::Stmt::children
clang::Stmt::child_begin
clang::Stmt::child_end
clang::Stmt::child_begin
clang::Stmt::child_end
clang::Stmt::Profile
clang::Stmt::ProcessODRHash
clang::DeclStmt::DG
clang::DeclStmt::StartLoc
clang::DeclStmt::EndLoc
clang::DeclStmt::isSingleDecl
clang::DeclStmt::getSingleDecl
clang::DeclStmt::getSingleDecl
clang::DeclStmt::getDeclGroup
clang::DeclStmt::getDeclGroup
clang::DeclStmt::setDeclGroup
clang::DeclStmt::setStartLoc
clang::DeclStmt::getEndLoc
clang::DeclStmt::setEndLoc
clang::DeclStmt::getBeginLoc
clang::DeclStmt::decls
clang::DeclStmt::decls
clang::DeclStmt::decl_begin
clang::DeclStmt::decl_end
clang::DeclStmt::decl_begin
clang::DeclStmt::decl_end
clang::DeclStmt::decl_rbegin
clang::DeclStmt::decl_rend
clang::NullStmt::getSemiLoc
clang::NullStmt::setSemiLoc
clang::NullStmt::hasLeadingEmptyMacro
clang::NullStmt::getBeginLoc
clang::NullStmt::getEndLoc
clang::NullStmt::classof
clang::NullStmt::children
clang::CompoundStmt::RBraceLoc
clang::CompoundStmt::setStmts
clang::CompoundStmt::Create
clang::CompoundStmt::CreateEmpty
clang::CompoundStmt::body_empty
clang::CompoundStmt::size
clang::CompoundStmt::body
clang::CompoundStmt::body_begin
clang::CompoundStmt::body_end
clang::CompoundStmt::body_front
clang::CompoundStmt::body_back
clang::CompoundStmt::setLastStmt
clang::CompoundStmt::body
clang::CompoundStmt::body_begin
clang::CompoundStmt::body_end
clang::CompoundStmt::body_front
clang::CompoundStmt::body_back
clang::CompoundStmt::body_rbegin
clang::CompoundStmt::body_rend
clang::CompoundStmt::body_rbegin
clang::CompoundStmt::body_rend
clang::CompoundStmt::getBeginLoc
clang::CompoundStmt::getEndLoc
clang::CompoundStmt::getLBracLoc
clang::CompoundStmt::getRBracLoc
clang::CompoundStmt::classof
clang::CompoundStmt::children
clang::CompoundStmt::children
clang::SwitchCase::ColonLoc
clang::SwitchCase::NextSwitchCase
clang::SwitchCase::getNextSwitchCase
clang::SwitchCase::getNextSwitchCase
clang::SwitchCase::setNextSwitchCase
clang::SwitchCase::getKeywordLoc
clang::SwitchCase::setKeywordLoc
clang::SwitchCase::getColonLoc
clang::SwitchCase::setColonLoc
clang::SwitchCase::getSubStmt
clang::SwitchCase::getSubStmt
clang::SwitchCase::getBeginLoc
clang::SwitchCase::getEndLoc
clang::SwitchCase::classof
clang::CaseStmt::numTrailingObjects
clang::CaseStmt::lhsOffset
clang::CaseStmt::rhsOffset
clang::CaseStmt::subStmtOffset
clang::CaseStmt::Create
clang::CaseStmt::CreateEmpty
clang::CaseStmt::caseStmtIsGNURange
clang::CaseStmt::getCaseLoc
clang::CaseStmt::setCaseLoc
clang::CaseStmt::getEllipsisLoc
clang::CaseStmt::setEllipsisLoc
clang::CaseStmt::getLHS
clang::CaseStmt::getLHS
clang::CaseStmt::setLHS
clang::CaseStmt::getRHS
clang::CaseStmt::getRHS
clang::CaseStmt::setRHS
clang::CaseStmt::getSubStmt
clang::CaseStmt::getSubStmt
clang::CaseStmt::setSubStmt
clang::CaseStmt::getBeginLoc
clang::CaseStmt::getEndLoc
clang::DefaultStmt::SubStmt
clang::DefaultStmt::getSubStmt
clang::DefaultStmt::getSubStmt
clang::DefaultStmt::setSubStmt
clang::DefaultStmt::getDefaultLoc
clang::DefaultStmt::setDefaultLoc
clang::DefaultStmt::getBeginLoc
clang::DefaultStmt::getEndLoc
clang::SwitchCase::getEndLoc
clang::SwitchCase::getSubStmt
clang::ValueStmt::getExprStmt
clang::ValueStmt::getExprStmt
clang::ValueStmt::classof
clang::LabelStmt::TheDecl
clang::LabelStmt::SubStmt
clang::LabelStmt::getIdentLoc
clang::LabelStmt::setIdentLoc
clang::LabelStmt::getDecl
clang::LabelStmt::setDecl
clang::LabelStmt::getName
clang::LabelStmt::getSubStmt
clang::LabelStmt::getSubStmt
clang::LabelStmt::setSubStmt
clang::LabelStmt::getBeginLoc
clang::LabelStmt::getEndLoc
clang::AttributedStmt::SubStmt
clang::AttributedStmt::getAttrArrayPtr
clang::AttributedStmt::getAttrArrayPtr
clang::AttributedStmt::Create
clang::AttributedStmt::CreateEmpty
clang::AttributedStmt::getAttrLoc
clang::AttributedStmt::getAttrs
clang::AttributedStmt::getSubStmt
clang::AttributedStmt::getSubStmt
clang::AttributedStmt::getBeginLoc
clang::AttributedStmt::getEndLoc
clang::IfStmt::numTrailingObjects
clang::IfStmt::initOffset
clang::IfStmt::varOffset
clang::IfStmt::condOffset
clang::IfStmt::thenOffset
clang::IfStmt::elseOffset
clang::IfStmt::Create
clang::IfStmt::CreateEmpty
clang::IfStmt::hasInitStorage
clang::IfStmt::hasVarStorage
clang::IfStmt::hasElseStorage
clang::IfStmt::getCond
clang::IfStmt::getCond
clang::IfStmt::setCond
clang::IfStmt::getThen
clang::IfStmt::getThen
clang::IfStmt::setThen
clang::IfStmt::getElse
clang::IfStmt::getElse
clang::IfStmt::setElse
clang::IfStmt::getConditionVariable
clang::IfStmt::getConditionVariable
clang::IfStmt::setConditionVariable
clang::IfStmt::getConditionVariableDeclStmt
clang::IfStmt::getConditionVariableDeclStmt
clang::IfStmt::getInit
clang::IfStmt::getInit
clang::IfStmt::setInit
clang::IfStmt::getIfLoc
clang::IfStmt::setIfLoc
clang::IfStmt::getElseLoc
clang::IfStmt::setElseLoc
clang::IfStmt::isConstexpr
clang::IfStmt::setConstexpr
clang::IfStmt::isObjCAvailabilityCheck
clang::IfStmt::getBeginLoc
clang::IfStmt::getEndLoc
clang::SwitchStmt::FirstCase
clang::SwitchStmt::numTrailingObjects
clang::SwitchStmt::initOffset
clang::SwitchStmt::varOffset
clang::SwitchStmt::condOffset
clang::SwitchStmt::bodyOffset
clang::SwitchStmt::Create
clang::SwitchStmt::CreateEmpty
clang::SwitchStmt::hasInitStorage
clang::SwitchStmt::hasVarStorage
clang::SwitchStmt::getCond
clang::SwitchStmt::getCond
clang::SwitchStmt::setCond
clang::SwitchStmt::getBody
clang::SwitchStmt::getBody
clang::SwitchStmt::setBody
clang::SwitchStmt::getInit
clang::SwitchStmt::getInit
clang::SwitchStmt::setInit
clang::SwitchStmt::getConditionVariable
clang::SwitchStmt::getConditionVariable
clang::SwitchStmt::setConditionVariable
clang::SwitchStmt::getConditionVariableDeclStmt
clang::SwitchStmt::getConditionVariableDeclStmt
clang::SwitchStmt::getSwitchCaseList
clang::SwitchStmt::getSwitchCaseList
clang::SwitchStmt::setSwitchCaseList
clang::SwitchStmt::getSwitchLoc
clang::SwitchStmt::setSwitchLoc
clang::SwitchStmt::setBody
clang::SwitchStmt::addSwitchCase
clang::SwitchStmt::setAllEnumCasesCovered
clang::SwitchStmt::isAllEnumCasesCovered
clang::SwitchStmt::getBeginLoc
clang::SwitchStmt::getEndLoc
clang::WhileStmt::varOffset
clang::WhileStmt::condOffset
clang::WhileStmt::bodyOffset
clang::WhileStmt::numTrailingObjects
clang::WhileStmt::Create
clang::WhileStmt::CreateEmpty
clang::WhileStmt::hasVarStorage
clang::WhileStmt::getCond
clang::WhileStmt::getCond
clang::WhileStmt::setCond
clang::WhileStmt::getBody
clang::WhileStmt::getBody
clang::WhileStmt::setBody
clang::WhileStmt::getConditionVariable
clang::WhileStmt::getConditionVariable
clang::WhileStmt::setConditionVariable
clang::WhileStmt::getConditionVariableDeclStmt
clang::WhileStmt::getConditionVariableDeclStmt
clang::WhileStmt::getWhileLoc
clang::WhileStmt::setWhileLoc
clang::WhileStmt::getBeginLoc
clang::WhileStmt::getEndLoc
clang::DoStmt::SubExprs
clang::DoStmt::WhileLoc
clang::DoStmt::RParenLoc
clang::DoStmt::getCond
clang::DoStmt::getCond
clang::DoStmt::setCond
clang::DoStmt::getBody
clang::DoStmt::getBody
clang::DoStmt::setBody
clang::DoStmt::getDoLoc
clang::DoStmt::setDoLoc
clang::DoStmt::getWhileLoc
clang::DoStmt::setWhileLoc
clang::DoStmt::getRParenLoc
clang::DoStmt::setRParenLoc
clang::DoStmt::getBeginLoc
clang::DoStmt::getEndLoc
clang::DoStmt::classof
clang::DoStmt::children
clang::ForStmt::SubExprs
clang::ForStmt::LParenLoc
clang::ForStmt::RParenLoc
clang::ForStmt::getInit
clang::ForStmt::getConditionVariable
clang::ForStmt::setConditionVariable
clang::ForStmt::getConditionVariableDeclStmt
clang::ForStmt::getCond
clang::ForStmt::getInc
clang::ForStmt::getBody
clang::ForStmt::getInit
clang::ForStmt::getCond
clang::ForStmt::getInc
clang::ForStmt::getBody
clang::ForStmt::setInit
clang::ForStmt::setCond
clang::ForStmt::setInc
clang::ForStmt::setBody
clang::ForStmt::getForLoc
clang::ForStmt::setForLoc
clang::ForStmt::getLParenLoc
clang::ForStmt::setLParenLoc
clang::ForStmt::getRParenLoc
clang::ForStmt::setRParenLoc
clang::ForStmt::getBeginLoc
clang::ForStmt::getEndLoc
clang::ForStmt::classof
clang::ForStmt::children
clang::GotoStmt::Label
clang::GotoStmt::LabelLoc
clang::GotoStmt::getLabel
clang::GotoStmt::setLabel
clang::GotoStmt::getGotoLoc
clang::GotoStmt::setGotoLoc
clang::GotoStmt::getLabelLoc
clang::GotoStmt::setLabelLoc
clang::GotoStmt::getBeginLoc
clang::GotoStmt::getEndLoc
clang::GotoStmt::classof
clang::GotoStmt::children
clang::IndirectGotoStmt::StarLoc
clang::IndirectGotoStmt::Target
clang::IndirectGotoStmt::setGotoLoc
clang::IndirectGotoStmt::getGotoLoc
clang::IndirectGotoStmt::setStarLoc
clang::IndirectGotoStmt::getStarLoc
clang::IndirectGotoStmt::getTarget
clang::IndirectGotoStmt::getTarget
clang::IndirectGotoStmt::setTarget
clang::IndirectGotoStmt::getConstantTarget
clang::IndirectGotoStmt::getConstantTarget
clang::IndirectGotoStmt::getBeginLoc
clang::IndirectGotoStmt::getEndLoc
clang::ContinueStmt::getContinueLoc
clang::ContinueStmt::setContinueLoc
clang::ContinueStmt::getBeginLoc
clang::ContinueStmt::getEndLoc
clang::ContinueStmt::classof
clang::ContinueStmt::children
clang::BreakStmt::getBreakLoc
clang::BreakStmt::setBreakLoc
clang::BreakStmt::getBeginLoc
clang::BreakStmt::getEndLoc
clang::BreakStmt::classof
clang::BreakStmt::children
clang::ReturnStmt::RetExpr
clang::ReturnStmt::hasNRVOCandidate
clang::ReturnStmt::numTrailingObjects
clang::ReturnStmt::Create
clang::ReturnStmt::CreateEmpty
clang::ReturnStmt::getRetValue
clang::ReturnStmt::getRetValue
clang::ReturnStmt::setRetValue
clang::ReturnStmt::getNRVOCandidate
clang::ReturnStmt::setNRVOCandidate
clang::ReturnStmt::getReturnLoc
clang::ReturnStmt::setReturnLoc
clang::ReturnStmt::getBeginLoc
clang::ReturnStmt::getEndLoc
clang::AsmStmt::AsmLoc
clang::AsmStmt::IsSimple
clang::AsmStmt::IsVolatile
clang::AsmStmt::NumOutputs
clang::AsmStmt::NumInputs
clang::AsmStmt::NumClobbers
clang::AsmStmt::Exprs
clang::AsmStmt::getAsmLoc
clang::AsmStmt::setAsmLoc
clang::AsmStmt::isSimple
clang::AsmStmt::setSimple
clang::AsmStmt::isVolatile
clang::AsmStmt::setVolatile
clang::AsmStmt::getBeginLoc
clang::AsmStmt::getNumOutputs
clang::AsmStmt::getOutputConstraint
clang::AsmStmt::isOutputPlusConstraint
clang::AsmStmt::getOutputExpr
clang::AsmStmt::getNumPlusOperands
clang::AsmStmt::getNumInputs
clang::AsmStmt::getInputConstraint
clang::AsmStmt::getInputExpr
clang::AsmStmt::getNumClobbers
clang::AsmStmt::getClobber
clang::AsmStmt::classof
clang::AsmStmt::begin_inputs
clang::AsmStmt::end_inputs
clang::AsmStmt::inputs
clang::AsmStmt::begin_inputs
clang::AsmStmt::end_inputs
clang::AsmStmt::inputs
clang::AsmStmt::begin_outputs
clang::AsmStmt::end_outputs
clang::AsmStmt::outputs
clang::AsmStmt::begin_outputs
clang::AsmStmt::end_outputs
clang::AsmStmt::outputs
clang::AsmStmt::children
clang::GCCAsmStmt::RParenLoc
clang::GCCAsmStmt::AsmStr
clang::GCCAsmStmt::Constraints
clang::GCCAsmStmt::Clobbers
clang::GCCAsmStmt::Names
clang::GCCAsmStmt::getRParenLoc
clang::GCCAsmStmt::setRParenLoc
clang::GCCAsmStmt::getAsmString
clang::GCCAsmStmt::getAsmString
clang::GCCAsmStmt::setAsmString
clang::GCCAsmStmt::AsmStringPiece
clang::GCCAsmStmt::AsmStringPiece::Kind
clang::GCCAsmStmt::AsmStringPiece::MyKind
clang::GCCAsmStmt::AsmStringPiece::Str
clang::GCCAsmStmt::AsmStringPiece::OperandNo
clang::GCCAsmStmt::AsmStringPiece::Range
clang::GCCAsmStmt::AsmStringPiece::isString
clang::GCCAsmStmt::AsmStringPiece::isOperand
clang::GCCAsmStmt::AsmStringPiece::getString
clang::GCCAsmStmt::AsmStringPiece::getOperandNo
clang::GCCAsmStmt::AsmStringPiece::getRange
clang::GCCAsmStmt::AsmStringPiece::getModifier
clang::GCCAsmStmt::AnalyzeAsmString
clang::GCCAsmStmt::generateAsmString
clang::GCCAsmStmt::getOutputIdentifier
clang::GCCAsmStmt::getOutputName
clang::GCCAsmStmt::getOutputConstraint
clang::GCCAsmStmt::getOutputConstraintLiteral
clang::GCCAsmStmt::getOutputConstraintLiteral
clang::GCCAsmStmt::getOutputExpr
clang::GCCAsmStmt::getOutputExpr
clang::GCCAsmStmt::getInputIdentifier
clang::GCCAsmStmt::getInputName
clang::GCCAsmStmt::getInputConstraint
clang::GCCAsmStmt::getInputConstraintLiteral
clang::GCCAsmStmt::getInputConstraintLiteral
clang::GCCAsmStmt::getInputExpr
clang::GCCAsmStmt::setInputExpr
clang::GCCAsmStmt::getInputExpr
clang::GCCAsmStmt::setOutputsAndInputsAndClobbers
clang::GCCAsmStmt::getNamedOperand
clang::GCCAsmStmt::getClobber
clang::GCCAsmStmt::getClobberStringLiteral
clang::GCCAsmStmt::getClobberStringLiteral
clang::GCCAsmStmt::getBeginLoc
clang::MSAsmStmt::LBraceLoc
clang::MSAsmStmt::EndLoc
clang::MSAsmStmt::AsmStr
clang::MSAsmStmt::NumAsmToks
clang::MSAsmStmt::AsmToks
clang::MSAsmStmt::Constraints
clang::MSAsmStmt::Clobbers
clang::MSAsmStmt::getLBraceLoc
clang::MSAsmStmt::setLBraceLoc
clang::MSAsmStmt::getEndLoc
clang::MSAsmStmt::setEndLoc
clang::MSAsmStmt::hasBraces
clang::MSAsmStmt::getNumAsmToks
clang::MSAsmStmt::getAsmToks
clang::MSAsmStmt::getAsmString
clang::MSAsmStmt::generateAsmString
clang::MSAsmStmt::getOutputConstraint
clang::MSAsmStmt::getOutputExpr
clang::MSAsmStmt::getOutputExpr
clang::MSAsmStmt::getInputConstraint
clang::MSAsmStmt::getInputExpr
clang::MSAsmStmt::setInputExpr
clang::MSAsmStmt::getInputExpr
clang::MSAsmStmt::getAllConstraints
clang::MSAsmStmt::getClobbers
clang::MSAsmStmt::getAllExprs
clang::MSAsmStmt::getClobber
clang::MSAsmStmt::initialize
clang::MSAsmStmt::getBeginLoc
clang::SEHExceptStmt::Loc
clang::SEHExceptStmt::Children
clang::SEHExceptStmt::Create
clang::SEHExceptStmt::getBeginLoc
clang::SEHFinallyStmt::Loc
clang::SEHFinallyStmt::Block
clang::SEHFinallyStmt::Create
clang::SEHFinallyStmt::getBeginLoc
clang::SEHTryStmt::IsCXXTry
clang::SEHTryStmt::TryLoc
clang::SEHTryStmt::Children
clang::SEHTryStmt::Create
clang::SEHTryStmt::getBeginLoc
clang::SEHTryStmt::getFinallyHandler
clang::SEHTryStmt::children
clang::SEHTryStmt::classof
clang::SEHLeaveStmt::LeaveLoc
clang::SEHLeaveStmt::getLeaveLoc
clang::SEHLeaveStmt::setLeaveLoc
clang::SEHLeaveStmt::getBeginLoc
clang::CapturedStmt::VariableCaptureKind
clang::CapturedStmt::Capture
clang::CapturedStmt::Capture::VarAndKind
clang::CapturedStmt::Capture::Loc
clang::CapturedStmt::Capture::getCaptureKind
clang::CapturedStmt::Capture::getLocation
clang::CapturedStmt::Capture::capturesThis
clang::CapturedStmt::Capture::capturesVariable
clang::CapturedStmt::Capture::capturesVariableByCopy
clang::CapturedStmt::Capture::capturesVariableArrayType
clang::CapturedStmt::Capture::getCapturedVar
clang::CapturedStmt::NumCaptures
clang::CapturedStmt::CapDeclAndKind
clang::CapturedStmt::TheRecordDecl
clang::CapturedStmt::getStoredStmts
clang::CapturedStmt::getStoredStmts
clang::CapturedStmt::getStoredCaptures
clang::CapturedStmt::setCapturedStmt
clang::CapturedStmt::Create
clang::CapturedStmt::CreateDeserialized
clang::CapturedStmt::getCapturedStmt
clang::CapturedStmt::getCapturedStmt
clang::CapturedStmt::getCapturedDecl
clang::CapturedStmt::getCapturedDecl
clang::CapturedStmt::setCapturedDecl
clang::CapturedStmt::getCapturedRegionKind
clang::CapturedStmt::setCapturedRegionKind
clang::CapturedStmt::getCapturedRecordDecl
clang::CapturedStmt::setCapturedRecordDecl
clang::CapturedStmt::capturesVariable
clang::CapturedStmt::captures
clang::CapturedStmt::captures
clang::CapturedStmt::capture_begin
clang::CapturedStmt::capture_begin
clang::CapturedStmt::capture_end
clang::CapturedStmt::capture_size
clang::CapturedStmt::capture_inits
clang::CapturedStmt::capture_inits
clang::CapturedStmt::capture_init_begin
clang::CapturedStmt::capture_init_begin
clang::CapturedStmt::capture_init_end
clang::CapturedStmt::capture_init_end
clang::CapturedStmt::getBeginLoc