Eric Blake <ebl...@redhat.com> writes: > On 10/09/2015 08:11 AM, Markus Armbruster wrote: >> Eric Blake <ebl...@redhat.com> writes: >> >>> Detect attempts to declare two object members that would result >>> in the same C member name, by keying the 'seen' dictionary off >>> of the C name rather than the qapi name. It also requires passing >>> info through some of the check() methods. >>> >>> This fixes two previously-broken tests, and the resulting error >>> messages demonstrate the utility of the .describe() method added >>> previously. No change to generated code. >>> >>> Signed-off-by: Eric Blake <ebl...@redhat.com> >>> > >>> +++ b/tests/qapi-schema/args-name-clash.err >>> @@ -0,0 +1 @@ >>> +tests/qapi-schema/args-name-clash.json:5: 'a_b' (member of oops >>> arguments) collides with 'a-b' (member of oops arguments) >> >> "(argument of oops)" would be better, but "(member of oops arguments)" >> will do. > > May be possible to tweak the describe() function in the previous commit > along those lines, especially since I'm already tweaking it to not have > space in the generated name. I'll have to play with it.
At some point, implementation simplicity trumps error message polish. Use your judgement.