[pseudo] Eliminate an ambiguity for the empty member declaration.
authorHaojian Wu <hokein.wu@gmail.com>
Thu, 11 Aug 2022 21:09:27 +0000 (23:09 +0200)
committerHaojian Wu <hokein.wu@gmail.com>
Fri, 12 Aug 2022 11:46:26 +0000 (13:46 +0200)
commita1a1a78ac8cf837e4c05152c9715f399b33bfb59
tree913b3879ceb317b423f02290323699b8d62f1572
parent435feefbdd6c91faf24fa5e69c4e7c3bc127568a
[pseudo] Eliminate an ambiguity for the empty member declaration.

We happened to introduce a `member-declaration := ;` rule
when inlining the `member-declaration := decl-specifier-seq_opt
member-declarator-list_opt ;`.
And with the `member-declaration := empty-declaration` rule, we had two parses of `;`.

This patch is to restrict the grammar to eliminate the
`member-declaration := ;` rule.

Differential Revision: https://reviews.llvm.org/D131724
clang-tools-extra/pseudo/lib/cxx/cxx.bnf
clang-tools-extra/pseudo/test/cxx/empty-member-declaration.cpp [new file with mode: 0644]