qapi: Reject blank 'if' conditions in addition to empty ones
authorMarkus Armbruster <armbru@redhat.com>
Sat, 14 Sep 2019 15:34:58 +0000 (17:34 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Tue, 24 Sep 2019 12:07:23 +0000 (14:07 +0200)
commitc2c7065e1752a3be1b437d1ea359cde35d28ee3b
tree309fd28ba39f32c26ebaaf9ca0b06852a5c67f2d
parent887a2069f76fa99b9755467126dd171a9bad34a3
qapi: Reject blank 'if' conditions in addition to empty ones

"'if': 'COND'" generates "#if COND".  We reject empty COND because it
won't compile.  Blank COND won't compile any better, so reject that,
too.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20190914153506.2151-12-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
scripts/qapi/common.py
tests/qapi-schema/bad-if-list.err
tests/qapi-schema/bad-if-list.json