if (const function_type* ty1 = is_function_type(first))
{
const function_type* ty2 = is_function_type(second);
- if (!was_indirect_type)
- {
- if (!types_have_similar_structure(ty1->get_return_type(),
- ty2->get_return_type()))
- return false;
+ if (!ty2)
+ return false;
- if (ty1->get_parameters().size() != ty2->get_parameters().size())
- return false;
+ if (!types_have_similar_structure(ty1->get_return_type(),
+ ty2->get_return_type()))
+ return false;
- for (function_type::parameters::const_iterator
- i = ty1->get_parameters().begin(),
- j = ty2->get_parameters().begin();
- (i != ty1->get_parameters().end()
- && j != ty2->get_parameters().end());
- ++i, ++j)
- if (!types_have_similar_structure((*i)->get_type(),
- (*j)->get_type()))
- return false;
- }
+ if (ty1->get_parameters().size() != ty2->get_parameters().size())
+ return false;
+
+ for (function_type::parameters::const_iterator
+ i = ty1->get_parameters().begin(),
+ j = ty2->get_parameters().begin();
+ (i != ty1->get_parameters().end()
+ && j != ty2->get_parameters().end());
+ ++i, ++j)
+ if (!types_have_similar_structure((*i)->get_type(),
+ (*j)->get_type()))
+ return false;
return true;
}
test-abidiff-exit/test-leaf1-v1.cc \
test-abidiff-exit/test-leaf1-v1.o \
test-abidiff-exit/test-leaf1-report.txt \
+test-abidiff-exit/test-leaf2-v0.cc \
+test-abidiff-exit/test-leaf2-v0.o \
+test-abidiff-exit/test-leaf2-v1.cc \
+test-abidiff-exit/test-leaf2-v1.o \
+test-abidiff-exit/test-leaf2-report.txt \
test-abidiff-exit/test-leaf3-v0.c \
test-abidiff-exit/test-leaf3-v0.o \
test-abidiff-exit/test-leaf3-v1.c \
--- /dev/null
+Leaf changes summary: 1 artifact changed
+Changed leaf types summary: 1 leaf type changed
+Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
+Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable
+
+'struct ops' changed:
+ type size hasn't changed
+ there are data member changes:
+ type 'void (int)*' of 'ops::munge' changed:
+ pointer type changed from: 'void (int)*' to: 'char (long int, bool)*'
+
+
--- /dev/null
+struct ops {
+ void (*munge)(int x);
+};
+
+void register_ops(const ops&) {
+}
--- /dev/null
+struct ops {
+ char (*munge)(long x, bool gunk);
+};
+
+void register_ops(const ops&) {
+}
"data/test-abidiff-exit/test-leaf1-report.txt",
"output/test-abidiff-exit/test-leaf1-report.txt"
},
+ {
+ "data/test-abidiff-exit/test-leaf2-v0.o",
+ "data/test-abidiff-exit/test-leaf2-v1.o",
+ "",
+ "--no-show-locs --leaf-changes-only",
+ abigail::tools_utils::ABIDIFF_ABI_CHANGE,
+ "data/test-abidiff-exit/test-leaf2-report.txt",
+ "output/test-abidiff-exit/test-leaf2-report.txt"
+ },
{
"data/test-abidiff-exit/test-leaf3-v0.o",
"data/test-abidiff-exit/test-leaf3-v1.o",