| //===-- StmtXML.def - Metadata about Stmt XML 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 XML statement database structure as written in |
| // <TranslationUnit> sub-nodes of the XML document. |
| // The semantics of the attributes and enums are mostly self-documenting |
| // by looking at the appropriate internally used functions and values. |
| // The following macros are used: |
| // |
| // NODE_XML( CLASS, NAME ) - A node of name NAME denotes a concrete |
| // statement of class CLASS where CLASS is a class name used internally by clang. |
| // After a NODE_XML the definition of all (optional) attributes of that statement |
| // node and possible sub-nodes follows. |
| // |
| // END_NODE_XML - Closes the attribute definition of the current node. |
| // |
| // ID_ATTRIBUTE_XML - Some statement nodes have an "id" attribute containing a |
| // string, which value uniquely identify that statement. Other nodes may refer |
| // by reference attributes to this value (currently used only for Label). |
| // |
| // TYPE_ATTRIBUTE_XML( FN ) - Type nodes refer to the result type id of an |
| // expression by a "type" attribute. FN is internally used by clang. |
| // |
| // ATTRIBUTE_XML( FN, NAME ) - An attribute named NAME. FN is internally |
| // used by clang. A boolean attribute have the values "0" or "1". |
| // |
| // ATTRIBUTE_SPECIAL_XML( FN, NAME ) - An attribute named NAME which deserves |
| // a special handling. See the appropriate documentations. |
| // |
| // ATTRIBUTE_FILE_LOCATION_XML - A bunch of attributes denoting the location of |
| // a statement in the source file(s). |
| // |
| // ATTRIBUTE_OPT_XML( FN, NAME ) - An optional attribute named NAME. |
| // Optional attributes are omitted for boolean types, if the value is false, |
| // for integral types, if the value is null and for strings, |
| // if the value is the empty string. FN is internally used by clang. |
| // |
| // ATTRIBUTE_ENUM[_OPT]_XML( FN, NAME ) - An attribute named NAME. The value |
| // is an enumeration defined with ENUM_XML macros immediately following after |
| // that macro. An optional attribute is ommited, if the particular enum is the |
| // empty string. FN is internally used by clang. |
| // |
| // ENUM_XML( VALUE, NAME ) - An enumeration element named NAME. VALUE is |
| // internally used by clang. |
| // |
| // END_ENUM_XML - Closes the enumeration definition of the current attribute. |
| // |
| // SUB_NODE_XML( CLASS ) - A mandatory sub-node of class CLASS or its sub-classes. |
| // |
| // SUB_NODE_OPT_XML( CLASS ) - An optional sub-node of class CLASS or its sub-classes. |
| // |
| // SUB_NODE_SEQUENCE_XML( CLASS ) - Zero or more sub-nodes of class CLASS or |
| // its sub-classes. |
| // |
| //===----------------------------------------------------------------------===// |
| |
| #ifndef ATTRIBUTE_FILE_LOCATION_XML |
| # define ATTRIBUTE_FILE_LOCATION_XML \ |
| ATTRIBUTE_XML(getFilename(), "file") \ |
| ATTRIBUTE_XML(getLine(), "line") \ |
| ATTRIBUTE_XML(getColumn(), "col") \ |
| ATTRIBUTE_OPT_XML(getFilename(), "endfile") \ |
| ATTRIBUTE_OPT_XML(getLine(), "endline") \ |
| ATTRIBUTE_OPT_XML(getColumn(), "endcol") |
| #endif |
| |
| #ifndef TYPE_ATTRIBUTE_XML |
| # define TYPE_ATTRIBUTE_XML( FN ) ATTRIBUTE_XML(FN, "type") |
| #endif |
| |
| #ifndef CONTEXT_ATTRIBUTE_XML |
| # define CONTEXT_ATTRIBUTE_XML( FN ) ATTRIBUTE_XML(FN, "context") |
| #endif |
| |
| NODE_XML(Stmt, "Stmt_Unsupported") // fallback for unsupproted statements |
| ATTRIBUTE_FILE_LOCATION_XML |
| END_NODE_XML |
| |
| NODE_XML(NullStmt, "NullStmt") |
| ATTRIBUTE_FILE_LOCATION_XML |
| END_NODE_XML |
| |
| NODE_XML(CompoundStmt, "CompoundStmt") |
| ATTRIBUTE_FILE_LOCATION_XML |
| ATTRIBUTE_XML(size(), "num_stmts") |
| SUB_NODE_SEQUENCE_XML(Stmt) |
| END_NODE_XML |
| |
| NODE_XML(CaseStmt, "CaseStmt") // case expr: body; |
| ATTRIBUTE_FILE_LOCATION_XML |
| SUB_NODE_XML(Stmt) // body |
| SUB_NODE_XML(Expr) // expr |
| SUB_NODE_XML(Expr) // rhs expr in gc extension: case expr .. expr: body; |
| END_NODE_XML |
| |
| NODE_XML(DefaultStmt, "DefaultStmt") // default: body; |
| ATTRIBUTE_FILE_LOCATION_XML |
| SUB_NODE_XML(Stmt) // body |
| END_NODE_XML |
| |
| NODE_XML(LabelStmt, "LabelStmt") // Label: body; |
| ID_ATTRIBUTE_XML |
| ATTRIBUTE_FILE_LOCATION_XML |
| ATTRIBUTE_XML(getName(), "name") // string |
| SUB_NODE_XML(Stmt) // body |
| END_NODE_XML |
| |
| NODE_XML(IfStmt, "IfStmt") // if (cond) stmt1; else stmt2; |
| ATTRIBUTE_FILE_LOCATION_XML |
| SUB_NODE_XML(Expr) // cond |
| SUB_NODE_XML(Stmt) // stmt1 |
| SUB_NODE_XML(Stmt) // stmt2 |
| END_NODE_XML |
| |
| NODE_XML(SwitchStmt, "SwitchStmt") // switch (cond) body; |
| ATTRIBUTE_FILE_LOCATION_XML |
| SUB_NODE_XML(Expr) // cond |
| SUB_NODE_XML(Stmt) // body |
| END_NODE_XML |
| |
| NODE_XML(WhileStmt, "WhileStmt") // while (cond) body; |
| ATTRIBUTE_FILE_LOCATION_XML |
| SUB_NODE_XML(Expr) // cond |
| SUB_NODE_XML(Stmt) // body |
| END_NODE_XML |
| |
| NODE_XML(DoStmt, "DoStmt") // do body while (cond); |
| ATTRIBUTE_FILE_LOCATION_XML |
| SUB_NODE_XML(Expr) // cond |
| SUB_NODE_XML(Stmt) // body |
| END_NODE_XML |
| |
| NODE_XML(ForStmt, "ForStmt") // for (init; cond; inc) body; |
| ATTRIBUTE_FILE_LOCATION_XML |
| SUB_NODE_XML(Stmt) // init |
| SUB_NODE_XML(Expr) // cond |
| SUB_NODE_XML(Expr) // inc |
| SUB_NODE_XML(Stmt) // body |
| END_NODE_XML |
| |
| NODE_XML(GotoStmt, "GotoStmt") // goto label; |
| ATTRIBUTE_FILE_LOCATION_XML |
| ATTRIBUTE_XML(getLabel()->getName(), "name") // informal string |
| ATTRIBUTE_XML(getLabel(), "ref") // id string |
| END_NODE_XML |
| |
| NODE_XML(IndirectGotoStmt, "IndirectGotoStmt") // goto expr; |
| ATTRIBUTE_FILE_LOCATION_XML |
| SUB_NODE_XML(Expr) // expr |
| END_NODE_XML |
| |
| NODE_XML(ContinueStmt, "ContinueStmt") // continue |
| ATTRIBUTE_FILE_LOCATION_XML |
| END_NODE_XML |
| |
| NODE_XML(BreakStmt, "BreakStmt") // break |
| ATTRIBUTE_FILE_LOCATION_XML |
| END_NODE_XML |
| |
| NODE_XML(ReturnStmt, "ReturnStmt") // return expr; |
| ATTRIBUTE_FILE_LOCATION_XML |
| SUB_NODE_XML(Expr) // expr |
| END_NODE_XML |
| |
| NODE_XML(AsmStmt, "AsmStmt") // GNU inline-assembly statement extension |
| ATTRIBUTE_FILE_LOCATION_XML |
| // FIXME |
| END_NODE_XML |
| |
| NODE_XML(DeclStmt, "DeclStmt") // a declaration statement |
| ATTRIBUTE_FILE_LOCATION_XML |
| SUB_NODE_SEQUENCE_XML(Decl) |
| END_NODE_XML |
| |
| // C++ statements |
| NODE_XML(CXXTryStmt, "CXXTryStmt") // try CompoundStmt CXXCatchStmt1 CXXCatchStmt2 .. |
| ATTRIBUTE_FILE_LOCATION_XML |
| ATTRIBUTE_XML(getNumHandlers(), "num_handlers") |
| SUB_NODE_XML(CompoundStmt) |
| SUB_NODE_SEQUENCE_XML(CXXCatchStmt) |
| END_NODE_XML |
| |
| NODE_XML(CXXCatchStmt, "CXXCatchStmt") // catch (decl) Stmt |
| ATTRIBUTE_FILE_LOCATION_XML |
| SUB_NODE_XML(VarDecl) |
| SUB_NODE_XML(Stmt) |
| END_NODE_XML |
| |
| // Expressions |
| NODE_XML(PredefinedExpr, "PredefinedExpr") |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| ATTRIBUTE_ENUM_XML(getIdentType(), "kind") |
| ENUM_XML(PredefinedExpr::Func, "__func__") |
| ENUM_XML(PredefinedExpr::Function, "__FUNCTION__") |
| ENUM_XML(PredefinedExpr::PrettyFunction, "__PRETTY_FUNCTION__") |
| END_ENUM_XML |
| END_NODE_XML |
| |
| NODE_XML(DeclRefExpr, "DeclRefExpr") // an expression referring to a declared entity |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| ATTRIBUTE_XML(getDecl(), "ref") // id string of the declaration |
| ATTRIBUTE_XML(getDecl()->getNameAsString(), "name") // informal |
| //ATTRIBUTE_ENUM_XML(getDecl()->getKind(), "kind") // really needed here? |
| END_NODE_XML |
| |
| NODE_XML(IntegerLiteral, "IntegerLiteral") |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| ATTRIBUTE_XML(getValue(), "value") // (signed) integer |
| END_NODE_XML |
| |
| NODE_XML(CharacterLiteral, "CharacterLiteral") |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| ATTRIBUTE_XML(getValue(), "value") // unsigned |
| END_NODE_XML |
| |
| NODE_XML(FloatingLiteral, "FloatingLiteral") |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| // FIXME: output float as written in source (no approximation or the like) |
| //ATTRIBUTE_XML(getValueAsApproximateDouble(), "value") // float |
| END_NODE_XML |
| |
| NODE_XML(StringLiteral, "StringLiteral") |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| ATTRIBUTE_SPECIAL_XML(getStrData(), "value") // string, special handling for escaping needed |
| ATTRIBUTE_OPT_XML(isWide(), "is_wide") // boolean |
| END_NODE_XML |
| |
| NODE_XML(UnaryOperator, "UnaryOperator") // op(expr) or (expr)op |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| ATTRIBUTE_ENUM_XML(getOpcode(), "kind") |
| ENUM_XML(UnaryOperator::PostInc, "postinc") |
| ENUM_XML(UnaryOperator::PostDec, "postdec") |
| ENUM_XML(UnaryOperator::PreInc, "preinc") |
| ENUM_XML(UnaryOperator::PreDec, "predec") |
| ENUM_XML(UnaryOperator::AddrOf, "addrof") |
| ENUM_XML(UnaryOperator::Deref, "deref") |
| ENUM_XML(UnaryOperator::Plus, "plus") |
| ENUM_XML(UnaryOperator::Minus, "minus") |
| ENUM_XML(UnaryOperator::Not, "not") // bitwise not |
| ENUM_XML(UnaryOperator::LNot, "lnot") // boolean not |
| ENUM_XML(UnaryOperator::Real, "__real") |
| ENUM_XML(UnaryOperator::Imag, "__imag") |
| ENUM_XML(UnaryOperator::Extension, "__extension__") |
| ENUM_XML(UnaryOperator::OffsetOf, "__builtin_offsetof") |
| END_ENUM_XML |
| SUB_NODE_XML(Expr) // expr |
| END_NODE_XML |
| |
| NODE_XML(BinaryOperator, "BinaryOperator") // (expr1) op (expr2) |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| ATTRIBUTE_ENUM_XML(getOpcode(), "kind") |
| ENUM_XML(BinaryOperator::PtrMemD , "ptrmemd") |
| ENUM_XML(BinaryOperator::PtrMemI , "ptrmemi") |
| ENUM_XML(BinaryOperator::Mul , "mul") |
| ENUM_XML(BinaryOperator::Div , "div") |
| ENUM_XML(BinaryOperator::Rem , "rem") |
| ENUM_XML(BinaryOperator::Add , "add") |
| ENUM_XML(BinaryOperator::Sub , "sub") |
| ENUM_XML(BinaryOperator::Shl , "shl") |
| ENUM_XML(BinaryOperator::Shr , "shr") |
| ENUM_XML(BinaryOperator::LT , "lt") |
| ENUM_XML(BinaryOperator::GT , "gt") |
| ENUM_XML(BinaryOperator::LE , "le") |
| ENUM_XML(BinaryOperator::GE , "ge") |
| ENUM_XML(BinaryOperator::EQ , "eq") |
| ENUM_XML(BinaryOperator::NE , "ne") |
| ENUM_XML(BinaryOperator::And , "and") // bitwise and |
| ENUM_XML(BinaryOperator::Xor , "xor") |
| ENUM_XML(BinaryOperator::Or , "or") // bitwise or |
| ENUM_XML(BinaryOperator::LAnd , "land") // boolean and |
| ENUM_XML(BinaryOperator::LOr , "lor") // boolean or |
| ENUM_XML(BinaryOperator::Assign , "assign") |
| ENUM_XML(BinaryOperator::MulAssign, "mulassign") |
| ENUM_XML(BinaryOperator::DivAssign, "divassign") |
| ENUM_XML(BinaryOperator::RemAssign, "remassign") |
| ENUM_XML(BinaryOperator::AddAssign, "addassign") |
| ENUM_XML(BinaryOperator::SubAssign, "subassign") |
| ENUM_XML(BinaryOperator::ShlAssign, "shlassign") |
| ENUM_XML(BinaryOperator::ShrAssign, "shrassign") |
| ENUM_XML(BinaryOperator::AndAssign, "andassign") |
| ENUM_XML(BinaryOperator::XorAssign, "xorassign") |
| ENUM_XML(BinaryOperator::OrAssign , "orassign") |
| ENUM_XML(BinaryOperator::Comma , "comma") |
| END_ENUM_XML |
| SUB_NODE_XML(Expr) // expr1 |
| SUB_NODE_XML(Expr) // expr2 |
| END_NODE_XML |
| |
| // FIXME: is there a special class needed or is BinaryOperator sufficient? |
| //NODE_XML(CompoundAssignOperator, "CompoundAssignOperator") |
| |
| NODE_XML(ConditionalOperator, "ConditionalOperator") // expr1 ? expr2 : expr3 |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| SUB_NODE_XML(Expr) // expr1 |
| SUB_NODE_XML(Expr) // expr2 |
| SUB_NODE_XML(Expr) // expr3 |
| END_NODE_XML |
| |
| NODE_XML(SizeOfAlignOfExpr, "SizeOfAlignOfExpr") // sizeof(expr) or alignof(expr) |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| ATTRIBUTE_XML(isSizeOf(), "is_sizeof") |
| ATTRIBUTE_XML(isArgumentType(), "is_type") // "1" if expr denotes a type |
| ATTRIBUTE_SPECIAL_XML(getArgumentType(), "type_ref") // optional, denotes the type of expr, if is_type=="1", special handling needed since getArgumentType() could assert |
| SUB_NODE_OPT_XML(Expr) // expr, if is_type=="0" |
| END_NODE_XML |
| |
| NODE_XML(ArraySubscriptExpr, "ArraySubscriptExpr") // expr1[expr2] |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| SUB_NODE_XML(Expr) // expr1 |
| SUB_NODE_XML(Expr) // expr2 |
| END_NODE_XML |
| |
| NODE_XML(CallExpr, "CallExpr") // fnexpr(arg1, arg2, ...) |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| ATTRIBUTE_XML(getNumArgs(), "num_args") // unsigned |
| SUB_NODE_XML(Expr) // fnexpr |
| SUB_NODE_SEQUENCE_XML(Expr) // arg1..argN |
| END_NODE_XML |
| |
| NODE_XML(MemberExpr, "MemberExpr") // expr->F or expr.F |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| ATTRIBUTE_XML(isArrow(), "is_deref") |
| ATTRIBUTE_XML(getMemberDecl(), "ref") // refers to F |
| ATTRIBUTE_XML(getMemberDecl()->getNameAsString(), "name") // informal |
| SUB_NODE_XML(Expr) // expr |
| END_NODE_XML |
| |
| NODE_XML(CStyleCastExpr, "CStyleCastExpr") // (type)expr |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| ATTRIBUTE_XML(getTypeAsWritten(), "type_ref") // denotes the type as written in the source code |
| SUB_NODE_XML(Expr) // expr |
| END_NODE_XML |
| |
| NODE_XML(ImplicitCastExpr, "ImplicitCastExpr") |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| SUB_NODE_XML(Expr) |
| END_NODE_XML |
| |
| NODE_XML(CompoundLiteralExpr, "CompoundLiteralExpr") // [C99 6.5.2.5] |
| SUB_NODE_XML(Expr) // init |
| END_NODE_XML |
| |
| NODE_XML(ExtVectorElementExpr, "ExtVectorElementExpr") |
| SUB_NODE_XML(Expr) // base |
| END_NODE_XML |
| |
| NODE_XML(InitListExpr, "InitListExpr") // struct foo x = { expr1, { expr2, expr3 } }; |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| ATTRIBUTE_OPT_XML(getInitializedFieldInUnion(), "field_ref") // if a union is initialized, this refers to the initialized union field id |
| ATTRIBUTE_XML(getNumInits(), "num_inits") // unsigned |
| SUB_NODE_SEQUENCE_XML(Expr) // expr1..exprN |
| END_NODE_XML |
| |
| NODE_XML(DesignatedInitExpr, "DesignatedInitExpr") |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| END_NODE_XML |
| |
| NODE_XML(ImplicitValueInitExpr, "ImplicitValueInitExpr") // Implicit value initializations occur within InitListExpr |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| END_NODE_XML |
| |
| NODE_XML(VAArgExpr, "VAArgExpr") // used for the builtin function __builtin_va_start(expr) |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| SUB_NODE_XML(Expr) // expr |
| END_NODE_XML |
| |
| NODE_XML(ParenExpr, "ParenExpr") // this represents a parethesized expression "(expr)". Only formed if full location information is requested. |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| SUB_NODE_XML(Expr) // expr |
| END_NODE_XML |
| |
| // GNU Extensions |
| NODE_XML(AddrLabelExpr, "AddrLabelExpr") // the GNU address of label extension, representing &&label. |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| ATTRIBUTE_XML(getLabel(), "ref") // id string |
| SUB_NODE_XML(LabelStmt) // expr |
| END_NODE_XML |
| |
| NODE_XML(StmtExpr, "StmtExpr") // StmtExpr contains a single CompoundStmt node, which it evaluates and takes the value of the last subexpression. |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| SUB_NODE_XML(CompoundStmt) |
| END_NODE_XML |
| |
| NODE_XML(TypesCompatibleExpr, "TypesCompatibleExpr") // GNU builtin-in function __builtin_types_compatible_p |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| ATTRIBUTE_XML(getArgType1(), "type1_ref") // id of type1 |
| ATTRIBUTE_XML(getArgType2(), "type2_ref") // id of type2 |
| END_NODE_XML |
| |
| NODE_XML(ChooseExpr, "ChooseExpr") // GNU builtin-in function __builtin_choose_expr(expr1, expr2, expr3) |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| SUB_NODE_XML(Expr) // expr1 |
| SUB_NODE_XML(Expr) // expr2 |
| SUB_NODE_XML(Expr) // expr3 |
| END_NODE_XML |
| |
| NODE_XML(GNUNullExpr, "GNUNullExpr") // GNU __null extension |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| END_NODE_XML |
| |
| // C++ Expressions |
| NODE_XML(CXXOperatorCallExpr, "CXXOperatorCallExpr") // fnexpr(arg1, arg2, ...) |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| ATTRIBUTE_XML(getNumArgs(), "num_args") // unsigned |
| SUB_NODE_XML(Expr) // fnexpr |
| SUB_NODE_SEQUENCE_XML(Expr) // arg1..argN |
| END_NODE_XML |
| |
| NODE_XML(CXXNamedCastExpr, "CXXNamedCastExpr") // xxx_cast<type>(expr) |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| ATTRIBUTE_ENUM_XML(getStmtClass(), "kind") |
| ENUM_XML(Stmt::CXXStaticCastExprClass, "static_cast") |
| ENUM_XML(Stmt::CXXDynamicCastExprClass, "dynamic_cast") |
| ENUM_XML(Stmt::CXXReinterpretCastExprClass, "reinterpret_cast") |
| ENUM_XML(Stmt::CXXConstCastExprClass, "const_cast") |
| END_ENUM_XML |
| ATTRIBUTE_XML(getTypeAsWritten(), "type_ref") // denotes the type as written in the source code |
| SUB_NODE_XML(Expr) // expr |
| END_NODE_XML |
| |
| NODE_XML(CXXMemberCallExpr, "CXXMemberCallExpr") // fnexpr(arg1, arg2, ...) |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| ATTRIBUTE_XML(getNumArgs(), "num_args") // unsigned |
| SUB_NODE_XML(Expr) // fnexpr |
| SUB_NODE_SEQUENCE_XML(Expr) // arg1..argN |
| END_NODE_XML |
| |
| NODE_XML(CXXBoolLiteralExpr, "CXXBoolLiteralExpr") |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| ATTRIBUTE_XML(getValue(), "value") // boolean |
| END_NODE_XML |
| |
| NODE_XML(CXXNullPtrLiteralExpr, "CXXNullPtrLiteralExpr") // [C++0x 2.14.7] C++ Pointer Literal |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| END_NODE_XML |
| |
| NODE_XML(CXXTypeidExpr, "CXXTypeidExpr") // typeid(expr) |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| ATTRIBUTE_XML(isTypeOperand(), "is_type") // "1" if expr denotes a type |
| ATTRIBUTE_SPECIAL_XML(getTypeOperand(), "type_ref") // optional, denotes the type of expr, if is_type=="1", special handling needed since getTypeOperand() could assert |
| SUB_NODE_OPT_XML(Expr) // expr, if is_type=="0" |
| END_NODE_XML |
| |
| NODE_XML(CXXThisExpr, "CXXThisExpr") // this |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| END_NODE_XML |
| |
| NODE_XML(CXXThrowExpr, "CXXThrowExpr") // throw (expr); |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| SUB_NODE_XML(Expr) // NULL in case of "throw;" |
| END_NODE_XML |
| |
| NODE_XML(CXXDefaultArgExpr, "CXXDefaultArgExpr") |
| ATTRIBUTE_FILE_LOCATION_XML |
| TYPE_ATTRIBUTE_XML(getType()) |
| ATTRIBUTE_XML(getParam(), "ref") // id of the parameter declaration (the expression is a subnode of the declaration) |
| END_NODE_XML |
| |
| //===----------------------------------------------------------------------===// |
| #undef NODE_XML |
| #undef ID_ATTRIBUTE_XML |
| #undef TYPE_ATTRIBUTE_XML |
| #undef ATTRIBUTE_XML |
| #undef ATTRIBUTE_SPECIAL_XML |
| #undef ATTRIBUTE_OPT_XML |
| #undef ATTRIBUTE_ENUM_XML |
| #undef ATTRIBUTE_ENUM_OPT_XML |
| #undef ATTRIBUTE_FILE_LOCATION_XML |
| #undef ENUM_XML |
| #undef END_ENUM_XML |
| #undef END_NODE_XML |
| #undef SUB_NODE_XML |
| #undef SUB_NODE_SEQUENCE_XML |
| #undef SUB_NODE_OPT_XML |