aboutsummaryrefslogtreecommitdiff
path: root/include/clang/AST/StmtNodes.def
blob: ab6524663d6324dc3b808674527d66dca390859c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
//===-- StmtNodes.def - Metadata about Stmt AST nodes -----------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
//  This file defines the AST Node info database.
//
//===----------------------------------------------------------------------===//

#ifndef FIRST_STMT
#define FIRST_STMT(CLASS)
#define LAST_STMT(CLASS)
#endif

#ifndef FIRST_EXPR
#define FIRST_EXPR(CLASS)
#define LAST_EXPR(CLASS)
#endif

#ifndef EXPR
#  define EXPR(Type, Base) STMT(Type, Base)
#endif

// Normal Statements.
STMT(NullStmt        , Stmt)
FIRST_STMT(NullStmt)
STMT(CompoundStmt    , Stmt)
STMT(CaseStmt        , SwitchCase)
STMT(DefaultStmt     , SwitchCase)
STMT(LabelStmt       , Stmt)
STMT(IfStmt          , Stmt)
STMT(SwitchStmt      , Stmt)
STMT(WhileStmt       , Stmt)
STMT(DoStmt          , Stmt)
STMT(ForStmt         , Stmt)
STMT(GotoStmt        , Stmt)
STMT(IndirectGotoStmt, Stmt)
STMT(ContinueStmt    , Stmt)
STMT(BreakStmt       , Stmt)
STMT(ReturnStmt      , Stmt)
STMT(DeclStmt        , Stmt)
STMT(SwitchCase      , Stmt)

// GNU Stmt Extensions
STMT(AsmStmt         , Stmt)

// Obj-C statements
STMT(ObjCAtTryStmt        , Stmt)
STMT(ObjCAtCatchStmt      , Stmt)
STMT(ObjCAtFinallyStmt    , Stmt)
STMT(ObjCAtThrowStmt      , Stmt)
STMT(ObjCAtSynchronizedStmt , Stmt)
// Obj-C2 statements
STMT(ObjCForCollectionStmt, Stmt)

// C++ statements
STMT(CXXCatchStmt, Stmt)
STMT(CXXTryStmt  , Stmt)

LAST_STMT(CXXTryStmt)

// Expressions.
EXPR(Expr                  , Stmt)
FIRST_EXPR(Expr)
EXPR(PredefinedExpr        , Expr)
EXPR(DeclRefExpr           , Expr)
EXPR(IntegerLiteral        , Expr)
EXPR(FloatingLiteral       , Expr)
EXPR(ImaginaryLiteral      , Expr)
EXPR(StringLiteral         , Expr)
EXPR(CharacterLiteral      , Expr)
EXPR(ParenExpr             , Expr)
EXPR(UnaryOperator         , Expr)
EXPR(SizeOfAlignOfExpr     , Expr)
EXPR(ArraySubscriptExpr    , Expr)
EXPR(CallExpr              , Expr)
EXPR(MemberExpr            , Expr)
EXPR(CastExpr              , Expr)
EXPR(BinaryOperator        , Expr)
EXPR(CompoundAssignOperator, BinaryOperator)
EXPR(ConditionalOperator   , Expr)
EXPR(ImplicitCastExpr      , CastExpr)
EXPR(ExplicitCastExpr      , CastExpr)
EXPR(CStyleCastExpr        , ExplicitCastExpr)
EXPR(CompoundLiteralExpr   , Expr)
EXPR(ExtVectorElementExpr  , Expr)
EXPR(InitListExpr          , Expr)
EXPR(DesignatedInitExpr    , Expr)
EXPR(ImplicitValueInitExpr , Expr)
EXPR(VAArgExpr             , Expr)

// GNU Extensions.
EXPR(AddrLabelExpr        , Expr)
EXPR(StmtExpr             , Expr)
EXPR(TypesCompatibleExpr  , Expr)
EXPR(ChooseExpr           , Expr)
EXPR(GNUNullExpr          , Expr)

// C++ Expressions.
EXPR(CXXOperatorCallExpr    , CallExpr)
EXPR(CXXMemberCallExpr      , CallExpr)
EXPR(CXXNamedCastExpr       , ExplicitCastExpr)
EXPR(CXXStaticCastExpr      , CXXNamedCastExpr)
EXPR(CXXDynamicCastExpr     , CXXNamedCastExpr)
EXPR(CXXReinterpretCastExpr , CXXNamedCastExpr)
EXPR(CXXConstCastExpr       , CXXNamedCastExpr)
EXPR(CXXFunctionalCastExpr  , ExplicitCastExpr)
EXPR(CXXTypeidExpr          , Expr)
EXPR(CXXBoolLiteralExpr     , Expr)
EXPR(CXXNullPtrLiteralExpr  , Expr)
EXPR(CXXThisExpr            , Expr)
EXPR(CXXThrowExpr           , Expr)
EXPR(CXXDefaultArgExpr      , Expr)
EXPR(CXXZeroInitValueExpr   , Expr)
EXPR(CXXConditionDeclExpr   , DeclRefExpr)
EXPR(CXXNewExpr             , Expr)
EXPR(CXXDeleteExpr          , Expr)
EXPR(UnresolvedFunctionNameExpr , Expr)
EXPR(UnaryTypeTraitExpr     , Expr)
EXPR(QualifiedDeclRefExpr   , DeclRefExpr)
EXPR(UnresolvedDeclRefExpr  , Expr)
EXPR(CXXConstructExpr       , Expr)
EXPR(CXXBindTemporaryExpr   , Expr)
EXPR(CXXExprWithTemporaries , Expr)
EXPR(CXXTemporaryObjectExpr , CXXConstructExpr)
EXPR(CXXUnresolvedConstructExpr, Expr)
EXPR(CXXUnresolvedMemberExpr, Expr)

// Obj-C Expressions.
EXPR(ObjCStringLiteral    , Expr)
EXPR(ObjCEncodeExpr       , Expr)
EXPR(ObjCMessageExpr      , Expr)
EXPR(ObjCSelectorExpr     , Expr)
EXPR(ObjCProtocolExpr     , Expr)
EXPR(ObjCIvarRefExpr      , Expr)
EXPR(ObjCPropertyRefExpr  , Expr)
EXPR(ObjCKVCRefExpr       , Expr)
EXPR(ObjCSuperExpr        , Expr)

// Clang Extensions.
EXPR(ShuffleVectorExpr    , Expr)
EXPR(BlockExpr            , Expr)
EXPR(BlockDeclRefExpr     , Expr)

LAST_EXPR(BlockDeclRefExpr)

#undef STMT
#undef EXPR
#undef FIRST_STMT
#undef LAST_STMT
#undef FIRST_EXPR
#undef LAST_EXPR