1class AttrSubject;
2
3class Stmt<bit abstract = 0> : AttrSubject {
4  bit Abstract = abstract;
5}
6
7class DStmt<Stmt base, bit abstract = 0> : Stmt<abstract> {
8  Stmt Base = base;
9}
10
11// Statements
12def NullStmt : Stmt;
13def CompoundStmt : Stmt;
14def LabelStmt : Stmt;
15def AttributedStmt : Stmt;
16def IfStmt : Stmt;
17def SwitchStmt : Stmt;
18def WhileStmt : Stmt;
19def DoStmt : Stmt;
20def ForStmt : Stmt;
21def GotoStmt : Stmt;
22def IndirectGotoStmt : Stmt;
23def ContinueStmt : Stmt;
24def BreakStmt : Stmt;
25def ReturnStmt : Stmt;
26def DeclStmt  : Stmt;
27def SwitchCase : Stmt<1>;
28def CaseStmt : DStmt<SwitchCase>;
29def DefaultStmt : DStmt<SwitchCase>;
30def CapturedStmt : Stmt;
31
32// Asm statements
33def AsmStmt : Stmt<1>;
34def GCCAsmStmt : DStmt<AsmStmt>;
35def MSAsmStmt : DStmt<AsmStmt>;
36
37// Obj-C statements
38def ObjCAtTryStmt : Stmt;
39def ObjCAtCatchStmt : Stmt;
40def ObjCAtFinallyStmt : Stmt;
41def ObjCAtThrowStmt : Stmt;
42def ObjCAtSynchronizedStmt : Stmt;
43def ObjCForCollectionStmt : Stmt;
44def ObjCAutoreleasePoolStmt : Stmt;
45
46// C++ statments
47def CXXCatchStmt : Stmt;
48def CXXTryStmt : Stmt;
49def CXXForRangeStmt : Stmt;
50
51// C++ Coroutines TS statements
52def CoroutineBodyStmt : Stmt;
53def CoreturnStmt : Stmt;
54
55// Expressions
56def Expr : Stmt<1>;
57def PredefinedExpr : DStmt<Expr>;
58def DeclRefExpr : DStmt<Expr>;
59def IntegerLiteral : DStmt<Expr>;
60def FloatingLiteral : DStmt<Expr>;
61def ImaginaryLiteral : DStmt<Expr>;
62def StringLiteral : DStmt<Expr>;
63def CharacterLiteral : DStmt<Expr>;
64def ParenExpr : DStmt<Expr>;
65def UnaryOperator : DStmt<Expr>;
66def OffsetOfExpr : DStmt<Expr>;
67def UnaryExprOrTypeTraitExpr : DStmt<Expr>;
68def ArraySubscriptExpr : DStmt<Expr>;
69def OMPArraySectionExpr : DStmt<Expr>;
70def CallExpr : DStmt<Expr>;
71def MemberExpr : DStmt<Expr>;
72def CastExpr : DStmt<Expr, 1>;
73def BinaryOperator : DStmt<Expr>;
74def CompoundAssignOperator : DStmt<BinaryOperator>;
75def AbstractConditionalOperator : DStmt<Expr, 1>;
76def ConditionalOperator : DStmt<AbstractConditionalOperator>;
77def BinaryConditionalOperator : DStmt<AbstractConditionalOperator>;
78def ImplicitCastExpr : DStmt<CastExpr>;
79def ExplicitCastExpr : DStmt<CastExpr, 1>;
80def CStyleCastExpr : DStmt<ExplicitCastExpr>;
81def CompoundLiteralExpr : DStmt<Expr>;
82def ExtVectorElementExpr : DStmt<Expr>;
83def InitListExpr : DStmt<Expr>;
84def DesignatedInitExpr : DStmt<Expr>;
85def DesignatedInitUpdateExpr : DStmt<Expr>;
86def ImplicitValueInitExpr : DStmt<Expr>;
87def NoInitExpr : DStmt<Expr>;
88def ParenListExpr : DStmt<Expr>;
89def VAArgExpr : DStmt<Expr>;
90def GenericSelectionExpr : DStmt<Expr>;
91def PseudoObjectExpr : DStmt<Expr>;
92
93// Atomic expressions
94def AtomicExpr : DStmt<Expr>;
95
96// GNU Extensions.
97def AddrLabelExpr : DStmt<Expr>;
98def StmtExpr : DStmt<Expr>;
99def ChooseExpr : DStmt<Expr>;
100def GNUNullExpr : DStmt<Expr>;
101
102// C++ Expressions.
103def CXXOperatorCallExpr : DStmt<CallExpr>;
104def CXXMemberCallExpr : DStmt<CallExpr>;
105def CXXNamedCastExpr : DStmt<ExplicitCastExpr, 1>;
106def CXXStaticCastExpr : DStmt<CXXNamedCastExpr>;
107def CXXDynamicCastExpr : DStmt<CXXNamedCastExpr>;
108def CXXReinterpretCastExpr : DStmt<CXXNamedCastExpr>;
109def CXXConstCastExpr : DStmt<CXXNamedCastExpr>;
110def CXXFunctionalCastExpr : DStmt<ExplicitCastExpr>;
111def CXXTypeidExpr : DStmt<Expr>;
112def UserDefinedLiteral : DStmt<CallExpr>;
113def CXXBoolLiteralExpr : DStmt<Expr>;
114def CXXNullPtrLiteralExpr : DStmt<Expr>;
115def CXXThisExpr : DStmt<Expr>;
116def CXXThrowExpr : DStmt<Expr>;
117def CXXDefaultArgExpr : DStmt<Expr>;
118def CXXDefaultInitExpr : DStmt<Expr>;
119def CXXScalarValueInitExpr : DStmt<Expr>;
120def CXXStdInitializerListExpr : DStmt<Expr>;
121def CXXNewExpr : DStmt<Expr>;
122def CXXDeleteExpr : DStmt<Expr>;
123def CXXPseudoDestructorExpr : DStmt<Expr>;
124def TypeTraitExpr : DStmt<Expr>;
125def ArrayTypeTraitExpr : DStmt<Expr>;
126def ExpressionTraitExpr : DStmt<Expr>;
127def DependentScopeDeclRefExpr : DStmt<Expr>;
128def CXXConstructExpr : DStmt<Expr>;
129def CXXInheritedCtorInitExpr : DStmt<Expr>;
130def CXXBindTemporaryExpr : DStmt<Expr>;
131def ExprWithCleanups : DStmt<Expr>;
132def CXXTemporaryObjectExpr : DStmt<CXXConstructExpr>;
133def CXXUnresolvedConstructExpr : DStmt<Expr>;
134def CXXDependentScopeMemberExpr : DStmt<Expr>;
135def OverloadExpr : DStmt<Expr, 1>;
136def UnresolvedLookupExpr : DStmt<OverloadExpr>;
137def UnresolvedMemberExpr : DStmt<OverloadExpr>;
138def CXXNoexceptExpr : DStmt<Expr>;
139def PackExpansionExpr : DStmt<Expr>;
140def SizeOfPackExpr : DStmt<Expr>;
141def SubstNonTypeTemplateParmExpr : DStmt<Expr>;
142def SubstNonTypeTemplateParmPackExpr : DStmt<Expr>;
143def FunctionParmPackExpr : DStmt<Expr>;
144def MaterializeTemporaryExpr : DStmt<Expr>;
145def LambdaExpr : DStmt<Expr>;
146def CXXFoldExpr : DStmt<Expr>;
147
148// C++ Coroutines TS expressions
149def CoroutineSuspendExpr : DStmt<Expr, 1>;
150def CoawaitExpr : DStmt<CoroutineSuspendExpr>;
151def CoyieldExpr : DStmt<CoroutineSuspendExpr>;
152
153// Obj-C Expressions.
154def ObjCStringLiteral : DStmt<Expr>;
155def ObjCBoxedExpr : DStmt<Expr>;
156def ObjCArrayLiteral : DStmt<Expr>;
157def ObjCDictionaryLiteral : DStmt<Expr>;
158def ObjCEncodeExpr : DStmt<Expr>;
159def ObjCMessageExpr : DStmt<Expr>;
160def ObjCSelectorExpr : DStmt<Expr>;
161def ObjCProtocolExpr : DStmt<Expr>;
162def ObjCIvarRefExpr : DStmt<Expr>;
163def ObjCPropertyRefExpr : DStmt<Expr>;
164def ObjCIsaExpr : DStmt<Expr>;
165def ObjCIndirectCopyRestoreExpr : DStmt<Expr>;
166def ObjCBoolLiteralExpr : DStmt<Expr>;
167def ObjCSubscriptRefExpr : DStmt<Expr>;
168
169// Obj-C ARC Expressions.
170def ObjCBridgedCastExpr : DStmt<ExplicitCastExpr>;
171
172// CUDA Expressions.
173def CUDAKernelCallExpr : DStmt<CallExpr>;
174
175// Clang Extensions.
176def ShuffleVectorExpr : DStmt<Expr>;
177def ConvertVectorExpr : DStmt<Expr>;
178def BlockExpr : DStmt<Expr>;
179def OpaqueValueExpr : DStmt<Expr>;
180def TypoExpr : DStmt<Expr>;
181
182// Microsoft Extensions.
183def MSPropertyRefExpr : DStmt<Expr>;
184def MSPropertySubscriptExpr : DStmt<Expr>;
185def CXXUuidofExpr : DStmt<Expr>;
186def SEHTryStmt : Stmt;
187def SEHExceptStmt : Stmt;
188def SEHFinallyStmt : Stmt;
189def SEHLeaveStmt : Stmt;
190def MSDependentExistsStmt : Stmt;
191
192// OpenCL Extensions.
193def AsTypeExpr : DStmt<Expr>;
194
195// OpenMP Directives.
196def OMPExecutableDirective : Stmt<1>;
197def OMPLoopDirective : DStmt<OMPExecutableDirective, 1>;
198def OMPParallelDirective : DStmt<OMPExecutableDirective>;
199def OMPSimdDirective : DStmt<OMPLoopDirective>;
200def OMPForDirective : DStmt<OMPLoopDirective>;
201def OMPForSimdDirective : DStmt<OMPLoopDirective>;
202def OMPSectionsDirective : DStmt<OMPExecutableDirective>;
203def OMPSectionDirective : DStmt<OMPExecutableDirective>;
204def OMPSingleDirective : DStmt<OMPExecutableDirective>;
205def OMPMasterDirective : DStmt<OMPExecutableDirective>;
206def OMPCriticalDirective : DStmt<OMPExecutableDirective>;
207def OMPParallelForDirective : DStmt<OMPLoopDirective>;
208def OMPParallelForSimdDirective : DStmt<OMPLoopDirective>;
209def OMPParallelSectionsDirective : DStmt<OMPExecutableDirective>;
210def OMPTaskDirective : DStmt<OMPExecutableDirective>;
211def OMPTaskyieldDirective : DStmt<OMPExecutableDirective>;
212def OMPBarrierDirective : DStmt<OMPExecutableDirective>;
213def OMPTaskwaitDirective : DStmt<OMPExecutableDirective>;
214def OMPTaskgroupDirective : DStmt<OMPExecutableDirective>;
215def OMPFlushDirective : DStmt<OMPExecutableDirective>;
216def OMPOrderedDirective : DStmt<OMPExecutableDirective>;
217def OMPAtomicDirective : DStmt<OMPExecutableDirective>;
218def OMPTargetDirective : DStmt<OMPExecutableDirective>;
219def OMPTargetDataDirective : DStmt<OMPExecutableDirective>;
220def OMPTargetEnterDataDirective : DStmt<OMPExecutableDirective>;
221def OMPTargetExitDataDirective : DStmt<OMPExecutableDirective>;
222def OMPTargetParallelDirective : DStmt<OMPExecutableDirective>;
223def OMPTargetParallelForDirective : DStmt<OMPExecutableDirective>;
224def OMPTargetUpdateDirective : DStmt<OMPExecutableDirective>;
225def OMPTeamsDirective : DStmt<OMPExecutableDirective>;
226def OMPCancellationPointDirective : DStmt<OMPExecutableDirective>;
227def OMPCancelDirective : DStmt<OMPExecutableDirective>;
228def OMPTaskLoopDirective : DStmt<OMPLoopDirective>;
229def OMPTaskLoopSimdDirective : DStmt<OMPLoopDirective>;
230def OMPDistributeDirective : DStmt<OMPLoopDirective>;
231def OMPDistributeParallelForDirective : DStmt<OMPLoopDirective>;
232def OMPDistributeParallelForSimdDirective : DStmt<OMPLoopDirective>;
233def OMPDistributeSimdDirective : DStmt<OMPLoopDirective>;
234def OMPTargetParallelForSimdDirective : DStmt<OMPLoopDirective>;
235