Remove the unused function expression_is_variable().
authorChristoph Mallon <christoph.mallon@gmx.de>
Tue, 22 May 2012 19:42:56 +0000 (21:42 +0200)
committerChristoph Mallon <christoph.mallon@gmx.de>
Wed, 23 May 2012 05:31:15 +0000 (07:31 +0200)
parser.c
parser.h

index d3984e1..e87bbb2 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -9414,22 +9414,6 @@ static bool expression_is_local_variable(const expression_t *expression)
        return is_local_variable(entity);
 }
 
-/**
- * Check if a given expression represents a local variable and
- * return its declaration then, else return NULL.
- */
-entity_t *expression_is_variable(const expression_t *expression)
-{
-       if (expression->base.kind != EXPR_REFERENCE) {
-               return NULL;
-       }
-       entity_t *entity = expression->reference.entity;
-       if (entity->kind != ENTITY_VARIABLE)
-               return NULL;
-
-       return entity;
-}
-
 static void err_or_warn(source_position_t const *const pos, char const *const msg)
 {
        if (c_mode & _CXX || strict_mode) {
index 085c75f..a0ee51c 100644 (file)
--- a/parser.h
+++ b/parser.h
@@ -51,8 +51,7 @@ void parse(void);
  */
 translation_unit_t *finish_parsing(void);
 
-type_t   *revert_automatic_type_conversion(const expression_t *expression);
-entity_t *expression_is_variable(const expression_t *expression);
+type_t *revert_automatic_type_conversion(const expression_t *expression);
 
 entity_t *record_entity(entity_t *entity, bool is_definition);