[pseudo] Eliminate multiple-specified-types ambiguities using guards
authorSam McCall <sam.mccall@gmail.com>
Fri, 22 Jul 2022 09:28:51 +0000 (11:28 +0200)
committerSam McCall <sam.mccall@gmail.com>
Mon, 25 Jul 2022 10:57:07 +0000 (12:57 +0200)
commitb2b993a6ae675955b1112473c035ae6b4e3932a0
treeba24a9904d8aaa77b725b04ed64b6ec584541974
parent1defec87306593e71057de7baf9bd8e2389c2419
[pseudo] Eliminate multiple-specified-types ambiguities using guards

Motivating case: `foo bar;` is not a declaration of nothing with `foo` and `bar`
both types.

This is a common and critical ambiguity, clangd/AST.cpp has 20% fewer
ambiguous nodes (1674->1332) after this change.

Differential Revision: https://reviews.llvm.org/D130337
clang-tools-extra/pseudo/lib/cxx/CXX.cpp
clang-tools-extra/pseudo/lib/cxx/cxx.bnf
clang-tools-extra/pseudo/test/cxx/decl-specfier-seq.cpp [new file with mode: 0644]
clang-tools-extra/pseudo/test/fuzzer.cpp