From 73dbeadbc7d32a086eca39a75ee303d85d225183 Mon Sep 17 00:00:00 2001 From: Michael Tautschnig Date: Sat, 10 Nov 2018 11:57:29 +0000 Subject: [PATCH] Do not shadow "type" function parameter One is the function type, the other is the parameter type. --- src/ansi-c/c_typecheck_type.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ansi-c/c_typecheck_type.cpp b/src/ansi-c/c_typecheck_type.cpp index 060694cd963..d7bb9334b31 100644 --- a/src/ansi-c/c_typecheck_type.cpp +++ b/src/ansi-c/c_typecheck_type.cpp @@ -439,13 +439,13 @@ void c_typecheck_baset::typecheck_code_type(code_typet &type) code_typet::parametert parameter; // first fix type - typet &type=parameter.type(); - type=declaration.full_type(declaration.declarator()); + typet ¶m_type = parameter.type(); + param_type = declaration.full_type(declaration.declarator()); std::list tmp_clean_code; tmp_clean_code.swap(clean_code); // ignore side-effects - typecheck_type(type); + typecheck_type(param_type); tmp_clean_code.swap(clean_code); - adjust_function_parameter(type); + adjust_function_parameter(param_type); // adjust the identifier irep_idt identifier=declaration.declarator().get_name(); @@ -459,7 +459,7 @@ void c_typecheck_baset::typecheck_code_type(code_typet &type) else { // make visible now, later parameters might use it - parameter_map[identifier]=type; + parameter_map[identifier] = param_type; parameter.set_base_name(declaration.declarator().get_base_name()); parameter.add_source_location()= declaration.declarator().source_location();