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