[PATCH] D130337: [pseudo] Eliminate multiple-specified-types ambiguities using guards
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 22 02:32:21 PDT 2022
sammccall added a comment.
Implementation choices here:
- we walk through the whole tree everytime we see decl-specifier-seq: this is dumb but we to reuse work we either need to add extra rules to the grammar (D130150 <https://reviews.llvm.org/D130150>) or an explicit cache. Caching is likely a good idea but not added in this patch.
- we handle *all* rules for the interesting node types explicitly, rather than `default: return false`. This allows us to assert that all cases are handled, so things don't "fall through the cracks" after grammar changes. Alternative suggestions welcome. (I have a feeling this "exhaustive pattern-matching" idea will come up again...)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130337/new/
https://reviews.llvm.org/D130337
More information about the cfe-commits
mailing list