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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to