Get rid of the tedious grammar command-flag handling, and simply the
code.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
As discussed offline:
- this should really be a cross-cutting change for all tools
- we're going to have multiple grammars or variants (e.g. c, c++, obj-c)
- it would be nice to preserve the ability for tools to use a grammar from a file
This all points at having a library shared between {fuzzer, clang-pseudo, benchmark} that supports --grammar=cxx and --grammar=/some/path.
It needs to depend on CXX but isn't itself CXX, so I think it's a new library. Maybe clangPseudoCLI? I think for now the easiest thing is for the library to define the cl::opt flags and just expose functions to get the "current" grammar. (And maybe langopts should go there too)