EXPR_FUNCTION,
EXPR_PRETTY_FUNCTION,
+ EXPR_FUNCSIG, /**< MS function signature, aka ld_name */
+ EXPR_FUNCDNAME, /**< MS decorated name of a function */
EXPR_BUILTIN_SYMBOL,
EXPR_BUILTIN_CONSTANT_P,
EXPR_BUILTIN_PREFETCH,
DM_NOVTABLE = (1 << 8),
DM_NORETURN = (1 << 9),
DM_NOINLINE = (1 << 10),
- DM_DEPRECATED = (1 << 11)
+ DM_RESTRICT = (1 << 11),
+ DM_NOALIAS = (1 << 12)
} decl_modifier_t;
typedef unsigned short decl_modifiers_t;
unsigned char namespc;
unsigned char declared_storage_class;
unsigned char storage_class;
- unsigned char alignment; /**< Alignmnet of the declaration, 0 for default. */
+ unsigned char alignment; /**< Alignment of the declaration, 0 for default. */
decl_modifiers_t modifiers; /**< MS __declspec modifiers. */
const char *deprecated_string; /**< MS deprecated string if any. */
symbol_t *get_property_sym; /**< MS get property. */
unsigned int address_taken : 1;
unsigned int is_inline : 1;
unsigned int used : 1; /**< Set if the declaration is used. */
+ unsigned int deprecated : 1; /**< Microsoft of GNU deprecated attribute. */
type_t *type;
symbol_t *symbol;
source_position_t source_position;
typedef enum {
STATEMENT_INVALID,
+ STATEMENT_EMPTY,
STATEMENT_COMPOUND,
STATEMENT_RETURN,
STATEMENT_DECLARATION,
source_position_t source_position;
};
+struct invalid_statement_t {
+ statement_base_t base;
+};
+
+struct empty_statement_t {
+ statement_base_t base;
+};
+
struct return_statement_t {
statement_base_t base;
expression_t *value;
return obstack_alloc(&ast_obstack, size);
}
+static inline
+bool is_invalid_expression(expression_t *expression)
+{
+ return expression->base.kind == EXPR_INVALID;
+}
+
+static inline
+bool is_invalid_statement(statement_t *statement)
+{
+ return statement->base.kind == STATEMENT_INVALID;
+}
+
+
#define allocate_ast(size) _allocate_ast(size)
#endif