Skip to content

Commit 4a8ca1a

Browse files
committed
Rename type2identifier to type_to_partial_identifier
Because the return value of this function does not uniquely identify a type, it is only used as part of a unique identifier.
1 parent 6a6a6bd commit 4a8ca1a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/ansi-c/c_typecheck_expr.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1893,15 +1893,15 @@ void c_typecheck_baset::typecheck_side_effect_function_call(
18931893
/// XXX why are we only looking at the type of the first parameter?
18941894
if(parameters.front().type().id() == ID_pointer)
18951895
{
1896-
identifier_with_type =
1897-
id2string(identifier) + "_" +
1898-
type2identifier(parameters.front().type().subtype(), *this);
1896+
identifier_with_type = id2string(identifier) + "_" +
1897+
type_to_partial_identifier(
1898+
parameters.front().type().subtype(), *this);
18991899
}
19001900
else
19011901
{
19021902
identifier_with_type =
19031903
id2string(identifier) + "_" +
1904-
type2identifier(parameters.front().type(), *this);
1904+
type_to_partial_identifier(parameters.front().type(), *this);
19051905
}
19061906
gcc_polymorphic->set_identifier(identifier_with_type);
19071907

src/ansi-c/type2name.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ std::string type_name2type_identifier(const std::string &name)
324324
replace_special_characters(name))));
325325
}
326326

327-
std::string type2identifier(const typet &type, const namespacet &ns)
327+
std::string type_to_partial_identifier(const typet &type, const namespacet &ns)
328328
{
329329
return type_name2type_identifier(type2name(type, ns));
330330
}

src/ansi-c/type2name.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ std::string type2name(const typet &type, const namespacet &ns);
2929
* depends.
3030
* @return An identifying string which can be used as part of a `C` identifier.
3131
*/
32-
std::string type2identifier(const typet &type, const namespacet &ns);
32+
std::string type_to_partial_identifier(const typet &type, const namespacet &ns);
3333

3434
#endif // CPROVER_ANSI_C_TYPE2NAME_H

0 commit comments

Comments
 (0)