 |
|
 |
|
| Files: |
1 |
|
Branches Taken: |
33.3% |
19 / 57 |
| Generated: |
2010-02-10 01:31 |
|
Branches Executed: |
91.2% |
52 / 57 |
| |
|
Line Coverage: |
62.6% |
181 / 289 |
| |
 |
|
 |
1 : //===-- StmtXML.def - Metadata about Stmt XML nodes ------------*- C++ -*-===//
2 : //
3 : // The LLVM Compiler Infrastructure
4 : //
5 : // This file is distributed under the University of Illinois Open Source
6 : // License. See LICENSE.TXT for details.
7 : //
8 : //===----------------------------------------------------------------------===//
9 : //
10 : // This file defines the XML statement database structure as written in
11 : // <TranslationUnit> sub-nodes of the XML document.
12 : // The semantics of the attributes and enums are mostly self-documenting
13 : // by looking at the appropriate internally used functions and values.
14 : // The following macros are used:
15 : //
16 : // NODE_XML( CLASS, NAME ) - A node of name NAME denotes a concrete
17 : // statement of class CLASS where CLASS is a class name used internally by clang.
18 : // After a NODE_XML the definition of all (optional) attributes of that statement
19 : // node and possible sub-nodes follows.
20 : //
21 : // END_NODE_XML - Closes the attribute definition of the current node.
22 : //
23 : // ID_ATTRIBUTE_XML - Some statement nodes have an "id" attribute containing a
24 : // string, which value uniquely identify that statement. Other nodes may refer
25 : // by reference attributes to this value (currently used only for Label).
26 : //
27 : // TYPE_ATTRIBUTE_XML( FN ) - Type nodes refer to the result type id of an
28 : // expression by a "type" attribute. FN is internally used by clang.
29 : //
30 : // ATTRIBUTE_XML( FN, NAME ) - An attribute named NAME. FN is internally
31 : // used by clang. A boolean attribute have the values "0" or "1".
32 : //
33 : // ATTRIBUTE_SPECIAL_XML( FN, NAME ) - An attribute named NAME which deserves
34 : // a special handling. See the appropriate documentations.
35 : //
36 : // ATTRIBUTE_FILE_LOCATION_XML - A bunch of attributes denoting the location of
37 : // a statement in the source file(s).
38 : //
39 : // ATTRIBUTE_OPT_XML( FN, NAME ) - An optional attribute named NAME.
40 : // Optional attributes are omitted for boolean types, if the value is false,
41 : // for integral types, if the value is null and for strings,
42 : // if the value is the empty string. FN is internally used by clang.
43 : //
44 : // ATTRIBUTE_ENUM[_OPT]_XML( FN, NAME ) - An attribute named NAME. The value
45 : // is an enumeration defined with ENUM_XML macros immediately following after
46 : // that macro. An optional attribute is ommited, if the particular enum is the
47 : // empty string. FN is internally used by clang.
48 : //
49 : // ENUM_XML( VALUE, NAME ) - An enumeration element named NAME. VALUE is
50 : // internally used by clang.
51 : //
52 : // END_ENUM_XML - Closes the enumeration definition of the current attribute.
53 : //
54 : // SUB_NODE_XML( CLASS ) - A mandatory sub-node of class CLASS or its sub-classes.
55 : //
56 : // SUB_NODE_OPT_XML( CLASS ) - An optional sub-node of class CLASS or its sub-classes.
57 : //
58 : // SUB_NODE_SEQUENCE_XML( CLASS ) - Zero or more sub-nodes of class CLASS or
59 : // its sub-classes.
60 : //
61 : //===----------------------------------------------------------------------===//
62 :
63 : #ifndef ATTRIBUTE_FILE_LOCATION_XML
64 : # define ATTRIBUTE_FILE_LOCATION_XML \
65 : ATTRIBUTE_XML(getFilename(), "file") \
66 : ATTRIBUTE_XML(getLine(), "line") \
67 : ATTRIBUTE_XML(getColumn(), "col") \
68 : ATTRIBUTE_OPT_XML(getFilename(), "endfile") \
69 : ATTRIBUTE_OPT_XML(getLine(), "endline") \
70 : ATTRIBUTE_OPT_XML(getColumn(), "endcol")
71 : #endif
72 :
73 : #ifndef TYPE_ATTRIBUTE_XML
74 : # define TYPE_ATTRIBUTE_XML( FN ) ATTRIBUTE_XML(FN, "type")
75 : #endif
76 :
77 : #ifndef CONTEXT_ATTRIBUTE_XML
78 : # define CONTEXT_ATTRIBUTE_XML( FN ) ATTRIBUTE_XML(FN, "context")
79 : #endif
80 :
81 0: NODE_XML(Stmt, "Stmt_Unsupported") // fallback for unsupproted statements
82 0: ATTRIBUTE_FILE_LOCATION_XML
83 0: END_NODE_XML
84 :
85 2: NODE_XML(NullStmt, "NullStmt")
86 2: ATTRIBUTE_FILE_LOCATION_XML
87 2: END_NODE_XML
88 :
89 18: NODE_XML(CompoundStmt, "CompoundStmt")
90 18: ATTRIBUTE_FILE_LOCATION_XML
91 18: ATTRIBUTE_XML(size(), "num_stmts")
92 : SUB_NODE_SEQUENCE_XML(Stmt)
93 18: END_NODE_XML
94 :
95 2: NODE_XML(CaseStmt, "CaseStmt") // case expr: body;
96 2: ATTRIBUTE_FILE_LOCATION_XML
97 : SUB_NODE_XML(Stmt) // body
98 : SUB_NODE_XML(Expr) // expr
99 : SUB_NODE_XML(Expr) // rhs expr in gc extension: case expr .. expr: body;
100 2: END_NODE_XML
101 :
102 1: NODE_XML(DefaultStmt, "DefaultStmt") // default: body;
103 1: ATTRIBUTE_FILE_LOCATION_XML
104 : SUB_NODE_XML(Stmt) // body
105 1: END_NODE_XML
106 :
107 1: NODE_XML(LabelStmt, "LabelStmt") // Label: body;
108 1: ID_ATTRIBUTE_XML
109 1: ATTRIBUTE_FILE_LOCATION_XML
110 1: ATTRIBUTE_XML(getName(), "name") // string
111 : SUB_NODE_XML(Stmt) // body
112 1: END_NODE_XML
113 :
114 2: NODE_XML(IfStmt, "IfStmt") // if (cond) stmt1; else stmt2;
115 2: ATTRIBUTE_FILE_LOCATION_XML
116 : SUB_NODE_XML(Expr) // cond
117 : SUB_NODE_XML(Stmt) // stmt1
118 : SUB_NODE_XML(Stmt) // stmt2
119 2: END_NODE_XML
120 :
121 1: NODE_XML(SwitchStmt, "SwitchStmt") // switch (cond) body;
122 1: ATTRIBUTE_FILE_LOCATION_XML
123 : SUB_NODE_XML(Expr) // cond
124 : SUB_NODE_XML(Stmt) // body
125 1: END_NODE_XML
126 :
127 1: NODE_XML(WhileStmt, "WhileStmt") // while (cond) body;
128 1: ATTRIBUTE_FILE_LOCATION_XML
129 : SUB_NODE_XML(Expr) // cond
130 : SUB_NODE_XML(Stmt) // body
131 1: END_NODE_XML
132 :
133 1: NODE_XML(DoStmt, "DoStmt") // do body while (cond);
134 1: ATTRIBUTE_FILE_LOCATION_XML
135 : SUB_NODE_XML(Expr) // cond
136 : SUB_NODE_XML(Stmt) // body
137 1: END_NODE_XML
138 :
139 1: NODE_XML(ForStmt, "ForStmt") // for (init; cond; inc) body;
140 1: ATTRIBUTE_FILE_LOCATION_XML
141 : SUB_NODE_XML(Stmt) // init
142 : SUB_NODE_XML(Expr) // cond
143 : SUB_NODE_XML(Expr) // inc
144 : SUB_NODE_XML(Stmt) // body
145 1: END_NODE_XML
146 :
147 1: NODE_XML(GotoStmt, "GotoStmt") // goto label;
148 1: ATTRIBUTE_FILE_LOCATION_XML
149 1: ATTRIBUTE_XML(getLabel()->getName(), "name") // informal string
150 1: ATTRIBUTE_XML(getLabel(), "ref") // id string
151 1: END_NODE_XML
152 :
153 1: NODE_XML(IndirectGotoStmt, "IndirectGotoStmt") // goto expr;
154 1: ATTRIBUTE_FILE_LOCATION_XML
155 : SUB_NODE_XML(Expr) // expr
156 1: END_NODE_XML
157 :
158 1: NODE_XML(ContinueStmt, "ContinueStmt") // continue
159 1: ATTRIBUTE_FILE_LOCATION_XML
160 1: END_NODE_XML
161 :
162 3: NODE_XML(BreakStmt, "BreakStmt") // break
163 3: ATTRIBUTE_FILE_LOCATION_XML
164 3: END_NODE_XML
165 :
166 1: NODE_XML(ReturnStmt, "ReturnStmt") // return expr;
167 1: ATTRIBUTE_FILE_LOCATION_XML
168 : SUB_NODE_XML(Expr) // expr
169 1: END_NODE_XML
170 :
171 1: NODE_XML(AsmStmt, "AsmStmt") // GNU inline-assembly statement extension
172 1: ATTRIBUTE_FILE_LOCATION_XML
173 : // FIXME
174 1: END_NODE_XML
175 :
176 54: NODE_XML(DeclStmt, "DeclStmt") // a declaration statement
177 54: ATTRIBUTE_FILE_LOCATION_XML
178 : SUB_NODE_SEQUENCE_XML(Decl)
179 54: END_NODE_XML
180 :
181 : // C++ statements
182 0: NODE_XML(CXXTryStmt, "CXXTryStmt") // try CompoundStmt CXXCatchStmt1 CXXCatchStmt2 ..
183 0: ATTRIBUTE_FILE_LOCATION_XML
184 0: ATTRIBUTE_XML(getNumHandlers(), "num_handlers")
185 : SUB_NODE_XML(CompoundStmt)
186 : SUB_NODE_SEQUENCE_XML(CXXCatchStmt)
187 0: END_NODE_XML
188 :
189 0: NODE_XML(CXXCatchStmt, "CXXCatchStmt") // catch (decl) Stmt
190 0: ATTRIBUTE_FILE_LOCATION_XML
191 : SUB_NODE_XML(VarDecl)
192 : SUB_NODE_XML(Stmt)
193 0: END_NODE_XML
194 :
195 : // Expressions
196 4: NODE_XML(PredefinedExpr, "PredefinedExpr")
197 4: ATTRIBUTE_FILE_LOCATION_XML
198 4: TYPE_ATTRIBUTE_XML(getType())
0: branch 1 not taken
1: branch 2 taken
2: branch 3 taken
1: branch 4 taken
199 4: ATTRIBUTE_ENUM_XML(getIdentType(), "kind")
200 1: ENUM_XML(PredefinedExpr::Func, "__func__")
201 2: ENUM_XML(PredefinedExpr::Function, "__FUNCTION__")
202 1: ENUM_XML(PredefinedExpr::PrettyFunction, "__PRETTY_FUNCTION__")
203 : END_ENUM_XML
204 4: END_NODE_XML
205 :
206 58: NODE_XML(DeclRefExpr, "DeclRefExpr") // an expression referring to a declared entity
207 58: ATTRIBUTE_FILE_LOCATION_XML
208 58: TYPE_ATTRIBUTE_XML(getType())
209 58: ATTRIBUTE_XML(getDecl(), "ref") // id string of the declaration
210 58: ATTRIBUTE_XML(getDecl()->getNameAsString(), "name") // informal
211 : //ATTRIBUTE_ENUM_XML(getDecl()->getKind(), "kind") // really needed here?
212 58: END_NODE_XML
213 :
214 23: NODE_XML(IntegerLiteral, "IntegerLiteral")
215 23: ATTRIBUTE_FILE_LOCATION_XML
216 23: TYPE_ATTRIBUTE_XML(getType())
217 23: ATTRIBUTE_XML(getValue(), "value") // (signed) integer
218 23: END_NODE_XML
219 :
220 1: NODE_XML(CharacterLiteral, "CharacterLiteral")
221 1: ATTRIBUTE_FILE_LOCATION_XML
222 1: TYPE_ATTRIBUTE_XML(getType())
223 1: ATTRIBUTE_XML(getValue(), "value") // unsigned
224 1: END_NODE_XML
225 :
226 0: NODE_XML(FloatingLiteral, "FloatingLiteral")
227 0: ATTRIBUTE_FILE_LOCATION_XML
228 0: TYPE_ATTRIBUTE_XML(getType())
229 : // FIXME: output float as written in source (no approximation or the like)
230 : //ATTRIBUTE_XML(getValueAsApproximateDouble(), "value") // float
231 0: END_NODE_XML
232 :
233 1: NODE_XML(StringLiteral, "StringLiteral")
234 1: ATTRIBUTE_FILE_LOCATION_XML
235 1: TYPE_ATTRIBUTE_XML(getType())
236 1: ATTRIBUTE_SPECIAL_XML(getStrData(), "value") // string, special handling for escaping needed
237 1: ATTRIBUTE_OPT_XML(isWide(), "is_wide") // boolean
238 1: END_NODE_XML
239 :
240 18: NODE_XML(UnaryOperator, "UnaryOperator") // op(expr) or (expr)op
241 18: ATTRIBUTE_FILE_LOCATION_XML
242 18: TYPE_ATTRIBUTE_XML(getType())
0: branch 1 not taken
1: branch 2 taken
0: branch 3 not taken
4: branch 4 taken
4: branch 5 taken
1: branch 6 taken
1: branch 7 taken
1: branch 8 taken
0: branch 9 not taken
0: branch 10 not taken
1: branch 11 taken
2: branch 12 taken
1: branch 13 taken
1: branch 14 taken
1: branch 15 taken
243 18: ATTRIBUTE_ENUM_XML(getOpcode(), "kind")
244 1: ENUM_XML(UnaryOperator::PostInc, "postinc")
245 0: ENUM_XML(UnaryOperator::PostDec, "postdec")
246 4: ENUM_XML(UnaryOperator::PreInc, "preinc")
247 4: ENUM_XML(UnaryOperator::PreDec, "predec")
248 1: ENUM_XML(UnaryOperator::AddrOf, "addrof")
249 1: ENUM_XML(UnaryOperator::Deref, "deref")
250 1: ENUM_XML(UnaryOperator::Plus, "plus")
251 0: ENUM_XML(UnaryOperator::Minus, "minus")
252 0: ENUM_XML(UnaryOperator::Not, "not") // bitwise not
253 1: ENUM_XML(UnaryOperator::LNot, "lnot") // boolean not
254 2: ENUM_XML(UnaryOperator::Real, "__real")
255 1: ENUM_XML(UnaryOperator::Imag, "__imag")
256 1: ENUM_XML(UnaryOperator::Extension, "__extension__")
257 1: ENUM_XML(UnaryOperator::OffsetOf, "__builtin_offsetof")
258 : END_ENUM_XML
259 : SUB_NODE_XML(Expr) // expr
260 18: END_NODE_XML
261 :
262 9: NODE_XML(BinaryOperator, "BinaryOperator") // (expr1) op (expr2)
263 9: ATTRIBUTE_FILE_LOCATION_XML
264 9: TYPE_ATTRIBUTE_XML(getType())
0: branch 1 not taken
0: branch 2 not taken
0: branch 3 not taken
0: branch 4 not taken
0: branch 5 not taken
2: branch 6 taken
0: branch 7 not taken
1: branch 8 taken
0: branch 9 not taken
0: branch 10 not taken
0: branch 11 not taken
0: branch 12 not taken
0: branch 13 not taken
0: branch 14 not taken
0: branch 15 not taken
0: branch 16 not taken
0: branch 17 not taken
1: branch 18 taken
0: branch 19 not taken
0: branch 20 not taken
0: branch 21 not taken
3: branch 22 taken
0: branch 23 not taken
0: branch 24 not taken
0: branch 25 not taken
2: branch 26 taken
0: branch 27 not taken
0: branch 28 not taken
0: branch 29 not taken
0: branch 30 not taken
0: branch 31 not taken
0: branch 32 not taken
0: branch 33 not taken
265 9: ATTRIBUTE_ENUM_XML(getOpcode(), "kind")
266 0: ENUM_XML(BinaryOperator::PtrMemD , "ptrmemd")
267 0: ENUM_XML(BinaryOperator::PtrMemI , "ptrmemi")
268 0: ENUM_XML(BinaryOperator::Mul , "mul")
269 0: ENUM_XML(BinaryOperator::Div , "div")
270 2: ENUM_XML(BinaryOperator::Rem , "rem")
271 0: ENUM_XML(BinaryOperator::Add , "add")
272 1: ENUM_XML(BinaryOperator::Sub , "sub")
273 0: ENUM_XML(BinaryOperator::Shl , "shl")
274 0: ENUM_XML(BinaryOperator::Shr , "shr")
275 0: ENUM_XML(BinaryOperator::LT , "lt")
276 0: ENUM_XML(BinaryOperator::GT , "gt")
277 0: ENUM_XML(BinaryOperator::LE , "le")
278 0: ENUM_XML(BinaryOperator::GE , "ge")
279 0: ENUM_XML(BinaryOperator::EQ , "eq")
280 0: ENUM_XML(BinaryOperator::NE , "ne")
281 0: ENUM_XML(BinaryOperator::And , "and") // bitwise and
282 1: ENUM_XML(BinaryOperator::Xor , "xor")
283 0: ENUM_XML(BinaryOperator::Or , "or") // bitwise or
284 0: ENUM_XML(BinaryOperator::LAnd , "land") // boolean and
285 0: ENUM_XML(BinaryOperator::LOr , "lor") // boolean or
286 3: ENUM_XML(BinaryOperator::Assign , "assign")
287 0: ENUM_XML(BinaryOperator::MulAssign, "mulassign")
288 0: ENUM_XML(BinaryOperator::DivAssign, "divassign")
289 0: ENUM_XML(BinaryOperator::RemAssign, "remassign")
290 2: ENUM_XML(BinaryOperator::AddAssign, "addassign")
291 0: ENUM_XML(BinaryOperator::SubAssign, "subassign")
292 0: ENUM_XML(BinaryOperator::ShlAssign, "shlassign")
293 0: ENUM_XML(BinaryOperator::ShrAssign, "shrassign")
294 0: ENUM_XML(BinaryOperator::AndAssign, "andassign")
295 0: ENUM_XML(BinaryOperator::XorAssign, "xorassign")
296 0: ENUM_XML(BinaryOperator::OrAssign , "orassign")
297 0: ENUM_XML(BinaryOperator::Comma , "comma")
298 : END_ENUM_XML
299 : SUB_NODE_XML(Expr) // expr1
300 : SUB_NODE_XML(Expr) // expr2
301 9: END_NODE_XML
302 :
303 : // FIXME: is there a special class needed or is BinaryOperator sufficient?
304 : //NODE_XML(CompoundAssignOperator, "CompoundAssignOperator")
305 :
306 4: NODE_XML(ConditionalOperator, "ConditionalOperator") // expr1 ? expr2 : expr3
307 4: ATTRIBUTE_FILE_LOCATION_XML
308 4: TYPE_ATTRIBUTE_XML(getType())
309 : SUB_NODE_XML(Expr) // expr1
310 : SUB_NODE_XML(Expr) // expr2
311 : SUB_NODE_XML(Expr) // expr3
312 4: END_NODE_XML
313 :
314 1: NODE_XML(SizeOfAlignOfExpr, "SizeOfAlignOfExpr") // sizeof(expr) or alignof(expr)
315 1: ATTRIBUTE_FILE_LOCATION_XML
316 1: TYPE_ATTRIBUTE_XML(getType())
317 1: ATTRIBUTE_XML(isSizeOf(), "is_sizeof")
318 1: ATTRIBUTE_XML(isArgumentType(), "is_type") // "1" if expr denotes a type
319 1: ATTRIBUTE_SPECIAL_XML(getArgumentType(), "type_ref") // optional, denotes the type of expr, if is_type=="1", special handling needed since getArgumentType() could assert
320 : SUB_NODE_OPT_XML(Expr) // expr, if is_type=="0"
321 1: END_NODE_XML
322 :
323 2: NODE_XML(ArraySubscriptExpr, "ArraySubscriptExpr") // expr1[expr2]
324 2: ATTRIBUTE_FILE_LOCATION_XML
325 2: TYPE_ATTRIBUTE_XML(getType())
326 : SUB_NODE_XML(Expr) // expr1
327 : SUB_NODE_XML(Expr) // expr2
328 2: END_NODE_XML
329 :
330 5: NODE_XML(CallExpr, "CallExpr") // fnexpr(arg1, arg2, ...)
331 5: ATTRIBUTE_FILE_LOCATION_XML
332 5: TYPE_ATTRIBUTE_XML(getType())
333 5: ATTRIBUTE_XML(getNumArgs(), "num_args") // unsigned
334 : SUB_NODE_XML(Expr) // fnexpr
335 : SUB_NODE_SEQUENCE_XML(Expr) // arg1..argN
336 5: END_NODE_XML
337 :
338 4: NODE_XML(MemberExpr, "MemberExpr") // expr->F or expr.F
339 4: ATTRIBUTE_FILE_LOCATION_XML
340 4: TYPE_ATTRIBUTE_XML(getType())
341 4: ATTRIBUTE_XML(isArrow(), "is_deref")
342 4: ATTRIBUTE_XML(getMemberDecl(), "ref") // refers to F
343 4: ATTRIBUTE_XML(getMemberDecl()->getNameAsString(), "name") // informal
344 : SUB_NODE_XML(Expr) // expr
345 4: END_NODE_XML
346 :
347 3: NODE_XML(CStyleCastExpr, "CStyleCastExpr") // (type)expr
348 3: ATTRIBUTE_FILE_LOCATION_XML
349 3: TYPE_ATTRIBUTE_XML(getType())
350 3: ATTRIBUTE_XML(getTypeAsWritten(), "type_ref") // denotes the type as written in the source code
351 : SUB_NODE_XML(Expr) // expr
352 3: END_NODE_XML
353 :
354 25: NODE_XML(ImplicitCastExpr, "ImplicitCastExpr")
355 25: ATTRIBUTE_FILE_LOCATION_XML
356 25: TYPE_ATTRIBUTE_XML(getType())
357 : SUB_NODE_XML(Expr)
358 25: END_NODE_XML
359 :
360 3: NODE_XML(CompoundLiteralExpr, "CompoundLiteralExpr") // [C99 6.5.2.5]
361 : SUB_NODE_XML(Expr) // init
362 3: END_NODE_XML
363 :
364 4: NODE_XML(ExtVectorElementExpr, "ExtVectorElementExpr")
365 : SUB_NODE_XML(Expr) // base
366 4: END_NODE_XML
367 :
368 5: NODE_XML(InitListExpr, "InitListExpr") // struct foo x = { expr1, { expr2, expr3 } };
369 5: ATTRIBUTE_FILE_LOCATION_XML
370 5: TYPE_ATTRIBUTE_XML(getType())
371 5: ATTRIBUTE_OPT_XML(getInitializedFieldInUnion(), "field_ref") // if a union is initialized, this refers to the initialized union field id
372 5: ATTRIBUTE_XML(getNumInits(), "num_inits") // unsigned
373 : SUB_NODE_SEQUENCE_XML(Expr) // expr1..exprN
374 5: END_NODE_XML
375 :
376 0: NODE_XML(DesignatedInitExpr, "DesignatedInitExpr")
377 0: ATTRIBUTE_FILE_LOCATION_XML
378 0: TYPE_ATTRIBUTE_XML(getType())
379 0: END_NODE_XML
380 :
381 2: NODE_XML(ImplicitValueInitExpr, "ImplicitValueInitExpr") // Implicit value initializations occur within InitListExpr
382 2: ATTRIBUTE_FILE_LOCATION_XML
383 2: TYPE_ATTRIBUTE_XML(getType())
384 2: END_NODE_XML
385 :
386 1: NODE_XML(VAArgExpr, "VAArgExpr") // used for the builtin function __builtin_va_start(expr)
387 1: ATTRIBUTE_FILE_LOCATION_XML
388 1: TYPE_ATTRIBUTE_XML(getType())
389 : SUB_NODE_XML(Expr) // expr
390 1: END_NODE_XML
391 :
392 3: NODE_XML(ParenExpr, "ParenExpr") // this represents a parethesized expression "(expr)". Only formed if full location information is requested.
393 3: ATTRIBUTE_FILE_LOCATION_XML
394 3: TYPE_ATTRIBUTE_XML(getType())
395 : SUB_NODE_XML(Expr) // expr
396 3: END_NODE_XML
397 :
398 : // GNU Extensions
399 1: NODE_XML(AddrLabelExpr, "AddrLabelExpr") // the GNU address of label extension, representing &&label.
400 1: ATTRIBUTE_FILE_LOCATION_XML
401 1: TYPE_ATTRIBUTE_XML(getType())
402 1: ATTRIBUTE_XML(getLabel(), "ref") // id string
403 : SUB_NODE_XML(LabelStmt) // expr
404 1: END_NODE_XML
405 :
406 0: NODE_XML(StmtExpr, "StmtExpr") // StmtExpr contains a single CompoundStmt node, which it evaluates and takes the value of the last subexpression.
407 0: ATTRIBUTE_FILE_LOCATION_XML
408 0: TYPE_ATTRIBUTE_XML(getType())
409 : SUB_NODE_XML(CompoundStmt)
410 0: END_NODE_XML
411 :
412 1: NODE_XML(TypesCompatibleExpr, "TypesCompatibleExpr") // GNU builtin-in function __builtin_types_compatible_p
413 1: ATTRIBUTE_FILE_LOCATION_XML
414 1: TYPE_ATTRIBUTE_XML(getType())
415 1: ATTRIBUTE_XML(getArgType1(), "type1_ref") // id of type1
416 1: ATTRIBUTE_XML(getArgType2(), "type2_ref") // id of type2
417 1: END_NODE_XML
418 :
419 0: NODE_XML(ChooseExpr, "ChooseExpr") // GNU builtin-in function __builtin_choose_expr(expr1, expr2, expr3)
420 0: ATTRIBUTE_FILE_LOCATION_XML
421 0: TYPE_ATTRIBUTE_XML(getType())
422 : SUB_NODE_XML(Expr) // expr1
423 : SUB_NODE_XML(Expr) // expr2
424 : SUB_NODE_XML(Expr) // expr3
425 0: END_NODE_XML
426 :
427 0: NODE_XML(GNUNullExpr, "GNUNullExpr") // GNU __null extension
428 0: ATTRIBUTE_FILE_LOCATION_XML
429 0: TYPE_ATTRIBUTE_XML(getType())
430 0: END_NODE_XML
431 :
432 : // C++ Expressions
433 0: NODE_XML(CXXOperatorCallExpr, "CXXOperatorCallExpr") // fnexpr(arg1, arg2, ...)
434 0: ATTRIBUTE_FILE_LOCATION_XML
435 0: TYPE_ATTRIBUTE_XML(getType())
436 0: ATTRIBUTE_XML(getNumArgs(), "num_args") // unsigned
437 : SUB_NODE_XML(Expr) // fnexpr
438 : SUB_NODE_SEQUENCE_XML(Expr) // arg1..argN
439 0: END_NODE_XML
440 :
441 0: NODE_XML(CXXNamedCastExpr, "CXXNamedCastExpr") // xxx_cast<type>(expr)
442 0: ATTRIBUTE_FILE_LOCATION_XML
443 0: TYPE_ATTRIBUTE_XML(getType())
0: branch 1 not taken
0: branch 2 not taken
0: branch 3 not taken
0: branch 4 not taken
0: branch 5 not taken
444 0: ATTRIBUTE_ENUM_XML(getStmtClass(), "kind")
445 0: ENUM_XML(Stmt::CXXStaticCastExprClass, "static_cast")
446 0: ENUM_XML(Stmt::CXXDynamicCastExprClass, "dynamic_cast")
447 0: ENUM_XML(Stmt::CXXReinterpretCastExprClass, "reinterpret_cast")
448 0: ENUM_XML(Stmt::CXXConstCastExprClass, "const_cast")
449 : END_ENUM_XML
450 0: ATTRIBUTE_XML(getTypeAsWritten(), "type_ref") // denotes the type as written in the source code
451 : SUB_NODE_XML(Expr) // expr
452 0: END_NODE_XML
453 :
454 0: NODE_XML(CXXMemberCallExpr, "CXXMemberCallExpr") // fnexpr(arg1, arg2, ...)
455 0: ATTRIBUTE_FILE_LOCATION_XML
456 0: TYPE_ATTRIBUTE_XML(getType())
457 0: ATTRIBUTE_XML(getNumArgs(), "num_args") // unsigned
458 : SUB_NODE_XML(Expr) // fnexpr
459 : SUB_NODE_SEQUENCE_XML(Expr) // arg1..argN
460 0: END_NODE_XML
461 :
462 0: NODE_XML(CXXBoolLiteralExpr, "CXXBoolLiteralExpr")
463 0: ATTRIBUTE_FILE_LOCATION_XML
464 0: TYPE_ATTRIBUTE_XML(getType())
465 0: ATTRIBUTE_XML(getValue(), "value") // boolean
466 0: END_NODE_XML
467 :
468 0: NODE_XML(CXXNullPtrLiteralExpr, "CXXNullPtrLiteralExpr") // [C++0x 2.14.7] C++ Pointer Literal
469 0: ATTRIBUTE_FILE_LOCATION_XML
470 0: TYPE_ATTRIBUTE_XML(getType())
471 0: END_NODE_XML
472 :
473 0: NODE_XML(CXXTypeidExpr, "CXXTypeidExpr") // typeid(expr)
474 0: ATTRIBUTE_FILE_LOCATION_XML
475 0: TYPE_ATTRIBUTE_XML(getType())
476 0: ATTRIBUTE_XML(isTypeOperand(), "is_type") // "1" if expr denotes a type
477 0: ATTRIBUTE_SPECIAL_XML(getTypeOperand(), "type_ref") // optional, denotes the type of expr, if is_type=="1", special handling needed since getTypeOperand() could assert
478 : SUB_NODE_OPT_XML(Expr) // expr, if is_type=="0"
479 0: END_NODE_XML
480 :
481 0: NODE_XML(CXXThisExpr, "CXXThisExpr") // this
482 0: ATTRIBUTE_FILE_LOCATION_XML
483 0: TYPE_ATTRIBUTE_XML(getType())
484 0: END_NODE_XML
485 :
486 0: NODE_XML(CXXThrowExpr, "CXXThrowExpr") // throw (expr);
487 0: ATTRIBUTE_FILE_LOCATION_XML
488 0: TYPE_ATTRIBUTE_XML(getType())
489 : SUB_NODE_XML(Expr) // NULL in case of "throw;"
490 0: END_NODE_XML
491 :
492 0: NODE_XML(CXXDefaultArgExpr, "CXXDefaultArgExpr")
493 0: ATTRIBUTE_FILE_LOCATION_XML
494 0: TYPE_ATTRIBUTE_XML(getType())
495 0: ATTRIBUTE_XML(getParam(), "ref") // id of the parameter declaration (the expression is a subnode of the declaration)
496 0: END_NODE_XML
497 :
498 : //===----------------------------------------------------------------------===//
499 : #undef NODE_XML
500 : #undef ID_ATTRIBUTE_XML
501 : #undef TYPE_ATTRIBUTE_XML
502 : #undef ATTRIBUTE_XML
503 : #undef ATTRIBUTE_SPECIAL_XML
504 : #undef ATTRIBUTE_OPT_XML
505 : #undef ATTRIBUTE_ENUM_XML
506 : #undef ATTRIBUTE_ENUM_OPT_XML
507 : #undef ATTRIBUTE_FILE_LOCATION_XML
508 : #undef ENUM_XML
509 : #undef END_ENUM_XML
510 : #undef END_NODE_XML
511 : #undef SUB_NODE_XML
512 : #undef SUB_NODE_SEQUENCE_XML
513 : #undef SUB_NODE_OPT_XML
Generated: 2010-02-10 01:31 by zcov