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