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 LabelStmt : Stmt; 15 def AttributedStmt : Stmt; 16 def IfStmt : Stmt; 17 def SwitchStmt : Stmt; 18 def WhileStmt : Stmt; 19 def DoStmt : Stmt; 20 def ForStmt : Stmt; 21 def GotoStmt : Stmt; 22 def IndirectGotoStmt : Stmt; 23 def ContinueStmt : Stmt; 24 def BreakStmt : Stmt; 25 def ReturnStmt : Stmt; 26 def DeclStmt : Stmt; 27 def SwitchCase : Stmt<1>; 28 def CaseStmt : DStmt<SwitchCase>; 29 def DefaultStmt : DStmt<SwitchCase>; 30 def CapturedStmt : Stmt; 31 32 // Asm statements 33 def AsmStmt : Stmt<1>; 34 def GCCAsmStmt : DStmt<AsmStmt>; 35 def MSAsmStmt : DStmt<AsmStmt>; 36 37 // Obj-C statements 38 def ObjCAtTryStmt : Stmt; 39 def ObjCAtCatchStmt : Stmt; 40 def ObjCAtFinallyStmt : Stmt; 41 def ObjCAtThrowStmt : Stmt; 42 def ObjCAtSynchronizedStmt : Stmt; 43 def ObjCForCollectionStmt : Stmt; 44 def ObjCAutoreleasePoolStmt : Stmt; 45 46 // C++ statments 47 def CXXCatchStmt : Stmt; 48 def CXXTryStmt : Stmt; 49 def CXXForRangeStmt : Stmt; 50 51 // Expressions 52 def Expr : Stmt<1>; 53 def PredefinedExpr : DStmt<Expr>; 54 def DeclRefExpr : DStmt<Expr>; 55 def IntegerLiteral : DStmt<Expr>; 56 def FloatingLiteral : DStmt<Expr>; 57 def ImaginaryLiteral : DStmt<Expr>; 58 def StringLiteral : DStmt<Expr>; 59 def CharacterLiteral : DStmt<Expr>; 60 def ParenExpr : DStmt<Expr>; 61 def UnaryOperator : DStmt<Expr>; 62 def OffsetOfExpr : DStmt<Expr>; 63 def UnaryExprOrTypeTraitExpr : DStmt<Expr>; 64 def ArraySubscriptExpr : DStmt<Expr>; 65 def CallExpr : DStmt<Expr>; 66 def MemberExpr : DStmt<Expr>; 67 def CastExpr : DStmt<Expr, 1>; 68 def BinaryOperator : DStmt<Expr>; 69 def CompoundAssignOperator : DStmt<BinaryOperator>; 70 def AbstractConditionalOperator : DStmt<Expr, 1>; 71 def ConditionalOperator : DStmt<AbstractConditionalOperator>; 72 def BinaryConditionalOperator : DStmt<AbstractConditionalOperator>; 73 def ImplicitCastExpr : DStmt<CastExpr>; 74 def ExplicitCastExpr : DStmt<CastExpr, 1>; 75 def CStyleCastExpr : DStmt<ExplicitCastExpr>; 76 def CompoundLiteralExpr : DStmt<Expr>; 77 def ExtVectorElementExpr : DStmt<Expr>; 78 def InitListExpr : DStmt<Expr>; 79 def DesignatedInitExpr : DStmt<Expr>; 80 def ImplicitValueInitExpr : DStmt<Expr>; 81 def ParenListExpr : DStmt<Expr>; 82 def VAArgExpr : DStmt<Expr>; 83 def GenericSelectionExpr : DStmt<Expr>; 84 def PseudoObjectExpr : DStmt<Expr>; 85 86 // Atomic expressions 87 def AtomicExpr : DStmt<Expr>; 88 89 // GNU Extensions. 90 def AddrLabelExpr : DStmt<Expr>; 91 def StmtExpr : DStmt<Expr>; 92 def ChooseExpr : DStmt<Expr>; 93 def GNUNullExpr : DStmt<Expr>; 94 95 // C++ Expressions. 96 def CXXOperatorCallExpr : DStmt<CallExpr>; 97 def CXXMemberCallExpr : DStmt<CallExpr>; 98 def CXXNamedCastExpr : DStmt<ExplicitCastExpr, 1>; 99 def CXXStaticCastExpr : DStmt<CXXNamedCastExpr>; 100 def CXXDynamicCastExpr : DStmt<CXXNamedCastExpr>; 101 def CXXReinterpretCastExpr : DStmt<CXXNamedCastExpr>; 102 def CXXConstCastExpr : DStmt<CXXNamedCastExpr>; 103 def CXXFunctionalCastExpr : DStmt<ExplicitCastExpr>; 104 def CXXTypeidExpr : DStmt<Expr>; 105 def UserDefinedLiteral : DStmt<CallExpr>; 106 def CXXBoolLiteralExpr : DStmt<Expr>; 107 def CXXNullPtrLiteralExpr : DStmt<Expr>; 108 def CXXThisExpr : DStmt<Expr>; 109 def CXXThrowExpr : DStmt<Expr>; 110 def CXXDefaultArgExpr : DStmt<Expr>; 111 def CXXDefaultInitExpr : DStmt<Expr>; 112 def CXXScalarValueInitExpr : DStmt<Expr>; 113 def CXXStdInitializerListExpr : DStmt<Expr>; 114 def CXXNewExpr : DStmt<Expr>; 115 def CXXDeleteExpr : DStmt<Expr>; 116 def CXXPseudoDestructorExpr : DStmt<Expr>; 117 def TypeTraitExpr : DStmt<Expr>; 118 def ArrayTypeTraitExpr : DStmt<Expr>; 119 def ExpressionTraitExpr : DStmt<Expr>; 120 def DependentScopeDeclRefExpr : DStmt<Expr>; 121 def CXXConstructExpr : DStmt<Expr>; 122 def CXXBindTemporaryExpr : DStmt<Expr>; 123 def ExprWithCleanups : DStmt<Expr>; 124 def CXXTemporaryObjectExpr : DStmt<CXXConstructExpr>; 125 def CXXUnresolvedConstructExpr : DStmt<Expr>; 126 def CXXDependentScopeMemberExpr : DStmt<Expr>; 127 def OverloadExpr : DStmt<Expr, 1>; 128 def UnresolvedLookupExpr : DStmt<OverloadExpr>; 129 def UnresolvedMemberExpr : DStmt<OverloadExpr>; 130 def CXXNoexceptExpr : DStmt<Expr>; 131 def PackExpansionExpr : DStmt<Expr>; 132 def SizeOfPackExpr : DStmt<Expr>; 133 def SubstNonTypeTemplateParmExpr : DStmt<Expr>; 134 def SubstNonTypeTemplateParmPackExpr : DStmt<Expr>; 135 def FunctionParmPackExpr : DStmt<Expr>; 136 def MaterializeTemporaryExpr : DStmt<Expr>; 137 def LambdaExpr : DStmt<Expr>; 138 139 // Obj-C Expressions. 140 def ObjCStringLiteral : DStmt<Expr>; 141 def ObjCBoxedExpr : DStmt<Expr>; 142 def ObjCArrayLiteral : DStmt<Expr>; 143 def ObjCDictionaryLiteral : DStmt<Expr>; 144 def ObjCEncodeExpr : DStmt<Expr>; 145 def ObjCMessageExpr : DStmt<Expr>; 146 def ObjCSelectorExpr : DStmt<Expr>; 147 def ObjCProtocolExpr : DStmt<Expr>; 148 def ObjCIvarRefExpr : DStmt<Expr>; 149 def ObjCPropertyRefExpr : DStmt<Expr>; 150 def ObjCIsaExpr : DStmt<Expr>; 151 def ObjCIndirectCopyRestoreExpr : DStmt<Expr>; 152 def ObjCBoolLiteralExpr : DStmt<Expr>; 153 def ObjCSubscriptRefExpr : DStmt<Expr>; 154 155 // Obj-C ARC Expressions. 156 def ObjCBridgedCastExpr : DStmt<ExplicitCastExpr>; 157 158 // CUDA Expressions. 159 def CUDAKernelCallExpr : DStmt<CallExpr>; 160 161 // Clang Extensions. 162 def ShuffleVectorExpr : DStmt<Expr>; 163 def ConvertVectorExpr : DStmt<Expr>; 164 def BlockExpr : DStmt<Expr>; 165 def OpaqueValueExpr : DStmt<Expr>; 166 167 // Microsoft Extensions. 168 def MSPropertyRefExpr : DStmt<Expr>; 169 def CXXUuidofExpr : DStmt<Expr>; 170 def SEHTryStmt : Stmt; 171 def SEHExceptStmt : Stmt; 172 def SEHFinallyStmt : Stmt; 173 def SEHLeaveStmt : Stmt; 174 def MSDependentExistsStmt : Stmt; 175 176 // OpenCL Extensions. 177 def AsTypeExpr : DStmt<Expr>; 178 179 // OpenMP Directives. 180 def OMPExecutableDirective : Stmt<1>; 181 def OMPParallelDirective : DStmt<OMPExecutableDirective>; 182 def OMPSimdDirective : DStmt<OMPExecutableDirective>; 183 def OMPForDirective : DStmt<OMPExecutableDirective>; 184 def OMPSectionsDirective : DStmt<OMPExecutableDirective>; 185 def OMPSectionDirective : DStmt<OMPExecutableDirective>; 186 def OMPSingleDirective : DStmt<OMPExecutableDirective>; 187 def OMPParallelForDirective : DStmt<OMPExecutableDirective>; 188 def OMPParallelSectionsDirective : DStmt<OMPExecutableDirective>; 189