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 | ||
| 38 | StringRef | |
| lib/ASTMatchers/Dynamic/Marshallers.h | ||
| 207 | 100? | |
| 258 | Comment these. | |
| 363 | This is repeated with FixedArgCountMatcherDesc. Factor this out into a function. | |
| 382 | You could make this field also const if BuildReturnTypeVector<> returned the vector instead of taking by ref. | |
| 541 | Please add a check that all the overloads have the same properties. | |
| 549 | This has the potential to give invalid autocomplete. | |
| 605 | You are not using LLVM_OVERRIDE consistently. | |
| 663 | 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 | ||
| 38 | Done. | |
| lib/ASTMatchers/Dynamic/Marshallers.h | ||
| 207 | Arbitrary. I think that if we have an inheritance hierarchy 100 levels deep we probably have bigger problems than this constant :) | |
| 258 | I think the function names are self explanatory. | |
| 363 | Done. | |
| 382 | Probably, but I don't think it matters too much whether this is const or not. All the member functions are const qualified anyway. | |
| 541 | Done. | |
| 549 | 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. | |
| 605 | I'm using it consistently wherever I intend to override a non-pure virtual function. | |
| 663 | 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.