This returns a list of valid (and useful) completions for a context (a list
of outer matchers), ordered by decreasing relevance then alphabetically. It
will be used by the matcher parser to implement completion.
Details
- Reviewers
klimek sbenza - Commits
- rL199950: Introduce Registry::getCompletions.
Diff Detail
Event Timeline
| include/clang/AST/ASTTypeTraits.h | ||
|---|---|---|
| 67 | Comment what is the meaning of A<B. It can't be used as a meaningful comparison between the types. | |
| include/clang/ASTMatchers/Dynamic/Registry.h | ||
| 39 | StringRef | |
| lib/ASTMatchers/Dynamic/Marshallers.h | ||
| 229 | 100? | |
| 357 | Comment these. | |
| 374 | This is repeated with FixedArgCountMatcherDesc. Factor this out into a function. | |
| 381 | You could make this field also const if BuildReturnTypeVector<> returned the vector instead of taking by ref. | |
| 542–588 | Please add a check that all the overloads have the same properties. | |
| 550 | This has the potential to give invalid autocomplete. | |
| 640 | You are not using LLVM_OVERRIDE consistently. | |
| 700 | Is the overload above used if you add this one? | |
- Address reviewer comments
| include/clang/AST/ASTTypeTraits.h | ||
|---|---|---|
| 67 | Done. | |
| include/clang/ASTMatchers/Dynamic/Registry.h | ||
| 39 | Done. | |
| lib/ASTMatchers/Dynamic/Marshallers.h | ||
| 229 | Arbitrary. I think that if we have an inheritance hierarchy 100 levels deep we probably have bigger problems than this constant :) | |
| 357 | I think the function names are self explanatory. | |
| 374 | Done. | |
| 381 | Probably, but I don't think it matters too much whether this is const or not. All the member functions are const qualified anyway. | |
| 542–588 | Done. | |
| 550 | Done. (This also applies to other matcher descriptors so I added the note to the base class.) This will probably have to be done by passing more context information through to getArgKinds. | |
| 640 | I'm using it consistently wherever I intend to override a non-pure virtual function. | |
| 700 | No. We check on lines 409 and 410 of RegistryTest.cpp that the correct overload is chosen for dyncast matchers. | |
Comment what is the meaning of A<B. It can't be used as a meaningful comparison between the types.