From 481a6bd15c4fb99429c3337584c66b40384cb09c Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 27 Sep 2019 15:46:20 +0200 Subject: qapi: Improve reporting of member name clashes We report name clashes like this: struct-base-clash.json: In struct 'Sub': struct-base-clash.json:5: 'name' (member of Sub) collides with 'name' (member of Base) The "(member of Sub)" is redundant with "In struct 'Sub'". Comes from QAPISchemaMember.describe(). Pass info to it, so it can detect the redundancy and avoid it. Result: struct-base-clash.json: In struct 'Sub': struct-base-clash.json:5: member 'name' collides with member 'name' of type 'Base' Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20190927134639.4284-8-armbru@redhat.com> --- tests/qapi-schema/flat-union-clash-member.err | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/qapi-schema/flat-union-clash-member.err') diff --git a/tests/qapi-schema/flat-union-clash-member.err b/tests/qapi-schema/flat-union-clash-member.err index 48e939d..40f1068 100644 --- a/tests/qapi-schema/flat-union-clash-member.err +++ b/tests/qapi-schema/flat-union-clash-member.err @@ -1,2 +1,2 @@ tests/qapi-schema/flat-union-clash-member.json: In union 'TestUnion': -tests/qapi-schema/flat-union-clash-member.json:11: 'name' (member of Branch1) collides with 'name' (member of Base) +tests/qapi-schema/flat-union-clash-member.json:11: member 'name' of type 'Branch1' collides with member 'name' of type 'Base' -- cgit v1.1