I don't have an immediate use for this, but I had already implemented
it, so I better make a diff for this.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I don't have a hard objection to this, but if we're don't have a use for it, I don't see a need for adding it right now.
Particularly as it sounds weird to me that "user commands" are not a subset of "commands". I know that is how the underlying api works, but the underlying api looks weird to me too. However, that one (unlike the SB version) can be changed whenever we want.
As for the test, the same remarks I made on the other review apply here too.
I think the part of the patch that adds documentation to the existing method should go in (In general all patches that just add documentation have my blanket approval, so please just commit those).
For the additional function: If you just change that CommandExists also checks user commands, I think that seems reasonable to me.
About that... the existing practice has been to attach documentation to the python versions of these interfaces (bindings/interface/*.i). Now we started to add it to the c++ headers too. More documentation is always better, but OTOH repetition creates maintenance problems and increases the risk of it going stale. Should choose one of the two interfaces and put all documentation there (and maybe have a way to auto-generate the other one) ?
We need to keep the documentation in the interface files, that's what produces the python and online doc help. That's where the vast majority of users of the API will go to find help for it. But the C++ docs do go into the C++ API docs on the website so they also have some (if not as much) value. Having a way to salt one from the other would be ideal, though sometimes the Python API needs a little extra color so this isn't entirely trivial.
clang-format-diff not found in user's PATH; not linting file.