[PATCH 7/7] abidiff: Remove new lines after parameter diffs.
Giuliano Procida
gprocida@google.com
Fri Mar 27 14:00:17 GMT 2020
These blank lines break up the output unexpectedly and often cause
double blank lines after reporting of function changes.
* src/abg-default-reporter.cc: (report_local_function_type_changes):
Remove unnecessary blank lines after lists of parameter changes.
* tests/data/test-*/test*report*.txt: Remove blank lines after
parameter change lists in 12 files.
Signed-off-by: Giuliano Procida <gprocida@google.com>
---
src/abg-default-reporter.cc | 9 ---------
.../data/test-diff-dwarf/test20-add-fn-parm-report-0.txt | 1 -
.../test-diff-dwarf/test24-added-fn-parms-report-0.txt | 1 -
.../test-diff-dwarf/test25-removed-fn-parms-report-0.txt | 1 -
.../test26-added-parms-before-variadic-report.txt | 4 ----
.../test-diff-dwarf/test32-fnptr-changes-report-0.txt | 1 -
.../test-diff-dwarf/test33-fnref-changes-report-0.txt | 1 -
.../test-diff-dwarf/test42-PR21296-clanggcc-report0.txt | 1 -
tests/data/test-diff-dwarf/test46-rust-report-0.txt | 1 -
.../test30-pr18904-rvalueref-report0.txt | 1 -
.../test30-pr18904-rvalueref-report1.txt | 1 -
.../test30-pr18904-rvalueref-report2.txt | 1 -
.../test35-pr18754-no-added-syms-report-0.txt | 1 -
13 files changed, 24 deletions(-)
diff --git a/src/abg-default-reporter.cc b/src/abg-default-reporter.cc
index 2754da4b..d2ac4a58 100644
--- a/src/abg-default-reporter.cc
+++ b/src/abg-default-reporter.cc
@@ -552,7 +552,6 @@ default_reporter::report_local_function_type_changes(const function_type_diff& d
// this shouldn't be as straightforward.
// Report about the parameters that got removed.
- bool emitted = false;
for (vector<function_decl::parameter_sptr>::const_iterator i =
d.priv_->sorted_deleted_parms_.begin();
i != d.priv_->sorted_deleted_parms_.end();
@@ -561,13 +560,9 @@ default_reporter::report_local_function_type_changes(const function_type_diff& d
out << indent << "parameter " << (*i)->get_index()
<< " of type '" << (*i)->get_type_pretty_representation()
<< "' was removed\n";
- emitted = true;
}
- if (emitted)
- out << "\n";
// Report about the parameters that got added
- emitted = false;
for (vector<function_decl::parameter_sptr>::const_iterator i =
d.priv_->sorted_added_parms_.begin();
i != d.priv_->sorted_added_parms_.end();
@@ -576,11 +571,7 @@ default_reporter::report_local_function_type_changes(const function_type_diff& d
out << indent << "parameter " << (*i)->get_index()
<< " of type '" << (*i)->get_type_pretty_representation()
<< "' was added\n";
- emitted = true;
}
-
- if (emitted)
- out << "\n";
}
/// Build and emit a textual report about a @ref function_type_diff.
diff --git a/tests/data/test-diff-dwarf/test20-add-fn-parm-report-0.txt b/tests/data/test-diff-dwarf/test20-add-fn-parm-report-0.txt
index 18b30645..022d0d11 100644
--- a/tests/data/test-diff-dwarf/test20-add-fn-parm-report-0.txt
+++ b/tests/data/test-diff-dwarf/test20-add-fn-parm-report-0.txt
@@ -6,4 +6,3 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
[C] 'function int add(int, int)' has some indirect sub-type changes:
parameter 3 of type 'int' was added
-
diff --git a/tests/data/test-diff-dwarf/test24-added-fn-parms-report-0.txt b/tests/data/test-diff-dwarf/test24-added-fn-parms-report-0.txt
index 8a21e38c..e270f48b 100644
--- a/tests/data/test-diff-dwarf/test24-added-fn-parms-report-0.txt
+++ b/tests/data/test-diff-dwarf/test24-added-fn-parms-report-0.txt
@@ -8,4 +8,3 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
parameter 2 of type 'char' was added
parameter 3 of type 'int' was added
-
diff --git a/tests/data/test-diff-dwarf/test25-removed-fn-parms-report-0.txt b/tests/data/test-diff-dwarf/test25-removed-fn-parms-report-0.txt
index 1253a8be..fab3a5f4 100644
--- a/tests/data/test-diff-dwarf/test25-removed-fn-parms-report-0.txt
+++ b/tests/data/test-diff-dwarf/test25-removed-fn-parms-report-0.txt
@@ -8,4 +8,3 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
parameter 2 of type 'char' was removed
parameter 3 of type 'int' was removed
-
diff --git a/tests/data/test-diff-dwarf/test26-added-parms-before-variadic-report.txt b/tests/data/test-diff-dwarf/test26-added-parms-before-variadic-report.txt
index 2432e53c..bfeb4f3b 100644
--- a/tests/data/test-diff-dwarf/test26-added-parms-before-variadic-report.txt
+++ b/tests/data/test-diff-dwarf/test26-added-parms-before-variadic-report.txt
@@ -9,25 +9,21 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
type size changed from 0 to 64 (in bits)
parameter 3 of type '...' was added
-
[C] 'function void fun2(const char*, ...)' has some indirect sub-type changes:
parameter 2 of type '...' changed:
entity changed from 'variadic parameter type' to 'const char*'
type size changed from 0 to 64 (in bits)
parameter 3 of type '...' was added
-
[C] 'function void fun3(const char*, const int*, ...)' has some indirect sub-type changes:
parameter 3 of type '...' changed:
entity changed from 'variadic parameter type' to 'const int*'
type size changed from 0 to 64 (in bits)
parameter 4 of type '...' was added
-
[C] 'function void fun4(const char*, const int*, ...)' has some indirect sub-type changes:
parameter 3 of type '...' changed:
entity changed from 'variadic parameter type' to 'const int*'
type size changed from 0 to 64 (in bits)
parameter 4 of type '...' was added
-
diff --git a/tests/data/test-diff-dwarf/test32-fnptr-changes-report-0.txt b/tests/data/test-diff-dwarf/test32-fnptr-changes-report-0.txt
index b3a0f9c4..8c6c6f73 100644
--- a/tests/data/test-diff-dwarf/test32-fnptr-changes-report-0.txt
+++ b/tests/data/test-diff-dwarf/test32-fnptr-changes-report-0.txt
@@ -33,7 +33,6 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
type of 'int ()* S::fnptr0' changed:
in pointed to type 'function type int ()':
parameter 1 of type 'double' was added
-
type of 'int ()* S::fnptr1' changed:
in pointed to type 'function type int ()':
entity changed from 'function type int ()' to 'void'
diff --git a/tests/data/test-diff-dwarf/test33-fnref-changes-report-0.txt b/tests/data/test-diff-dwarf/test33-fnref-changes-report-0.txt
index 8b529fdc..2e886cf6 100644
--- a/tests/data/test-diff-dwarf/test33-fnref-changes-report-0.txt
+++ b/tests/data/test-diff-dwarf/test33-fnref-changes-report-0.txt
@@ -34,7 +34,6 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
type of 'int ()& S::fnref0' changed:
in referenced type 'function type int ()':
parameter 1 of type 'double' was added
-
type of 'int ()& S::fnref1' changed:
in referenced type 'function type int ()':
entity changed from 'function type int ()' to 'int*'
diff --git a/tests/data/test-diff-dwarf/test42-PR21296-clanggcc-report0.txt b/tests/data/test-diff-dwarf/test42-PR21296-clanggcc-report0.txt
index b45fa918..ff9e2841 100644
--- a/tests/data/test-diff-dwarf/test42-PR21296-clanggcc-report0.txt
+++ b/tests/data/test-diff-dwarf/test42-PR21296-clanggcc-report0.txt
@@ -14,7 +14,6 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
name of symbol changed from _ZN3STRD1Ev to _ZN3STRD2Ev
parameter 1 of type 'int' was removed
-
[C] 'function std::tuple<STR&&> my_forward_as_tuple<STR>(STR&&)' has some indirect sub-type changes:
return type changed:
type name changed from 'std::tuple<STR&&>' to 'std::tuple<STR &&>'
diff --git a/tests/data/test-diff-dwarf/test46-rust-report-0.txt b/tests/data/test-diff-dwarf/test46-rust-report-0.txt
index 0c745256..0562456e 100644
--- a/tests/data/test-diff-dwarf/test46-rust-report-0.txt
+++ b/tests/data/test-diff-dwarf/test46-rust-report-0.txt
@@ -14,4 +14,3 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
name of 'one::Foo::a' changed to 'two::Foo::a'
parameter 2 of type 'u32' was added
-
diff --git a/tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt b/tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt
index 6867c0ea..79d41913 100644
--- a/tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt
+++ b/tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt
@@ -1318,7 +1318,6 @@ Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referen
type of 'void ()* InitTableEntry::func' changed:
in pointed to type 'function type void ()':
parameter 1 of type 'typedef MyoArena' was added
-
and name of 'InitTableEntry::func' changed to '__anonymous_struct__2::func'
[C] 'function int __offload_offload(OFFLOAD, const char*, int, int, VarDesc*, VarDesc2*, int, void**, void*, int, void*)' has some indirect sub-type changes:
diff --git a/tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt b/tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt
index 951f0605..215cfbea 100644
--- a/tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt
+++ b/tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt
@@ -1318,7 +1318,6 @@ Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referen
type of 'void ()* InitTableEntry::func' changed:
in pointed to type 'function type void ()':
parameter 1 of type 'typedef MyoArena' was added
-
and name of 'InitTableEntry::func' changed to '__anonymous_struct__2::func' at offload_table.h:295:1
[C] 'function int __offload_offload(OFFLOAD, const char*, int, int, VarDesc*, VarDesc2*, int, void**, void*, int, void*)' at compiler_if_host.cpp:456:1 has some indirect sub-type changes:
diff --git a/tests/data/test-diff-filter/test30-pr18904-rvalueref-report2.txt b/tests/data/test-diff-filter/test30-pr18904-rvalueref-report2.txt
index fdd96bc8..09fdb9c6 100644
--- a/tests/data/test-diff-filter/test30-pr18904-rvalueref-report2.txt
+++ b/tests/data/test-diff-filter/test30-pr18904-rvalueref-report2.txt
@@ -1318,7 +1318,6 @@ Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referen
type of 'void ()* InitTableEntry::func' changed:
in pointed to type 'function type void ()':
parameter 1 of type 'typedef MyoArena' was added
-
and name of 'InitTableEntry::func' changed to '__anonymous_struct__2::func' at offload_table.h:295:1
[C] 'function int __offload_offload(OFFLOAD, const char*, int, int, VarDesc*, VarDesc2*, int, void**, void*, int, void*)' at compiler_if_host.cpp:456:1 has some indirect sub-type changes:
diff --git a/tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-0.txt b/tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-0.txt
index c0e56207..1f6e3e79 100644
--- a/tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-0.txt
+++ b/tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-0.txt
@@ -234,7 +234,6 @@ Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referen
type of 'void ()* InitTableEntry::func' changed:
in pointed to type 'function type void ()':
parameter 1 of type 'typedef MyoArena' was added
-
and name of 'InitTableEntry::func' changed to '__anonymous_struct__2::func'
[C] 'function int __offload_offload(OFFLOAD, const char*, int, int, VarDesc*, VarDesc2*, int, void**, void*, int, void*)' has some indirect sub-type changes:
--
2.25.1.696.g5e7596f4ac-goog
More information about the Libabigail
mailing list