get_method_overrides
Resolve C++ virtual method overrides across class hierarchies: find the base method overridden and derived methods that override it, even across translation units.
Instructions
Return C++ virtual method override information — libclang-powered vtable analysis. Resolves virtual dispatch across class hierarchies: shows which base-class method this overrides, and which derived-class methods override this one. Text-based search cannot resolve virtual dispatch across translation units.
Shows what base-class method this method overrides, and what derived-class
methods override this one. Built from the overrides table which is
populated during fw-context index via post-processing of the inheritance
graph and virtual method signatures.
For class-level inheritance, use get_inheritance_chain. For symbol
details, use get_symbol_context.
Read-only. No side effects.
Args:
method_name: Method name to get override information for. Use
qualified name for disambiguation, e.g.
'UART_DRIVER::write'.
project_root: Project root. Auto-detected if omitted.
project: Project name or project_id — call list_projects to get them. Use
it to ask about a project that is not the project of the current
directory. It is an alternative to project_root, which takes a root
path. Give one of the two, not both.
variant: Variant of the build (a board, or a PlatformIO
environment). On a project of more than one build, give the
arguments of one build as the refusal lists them: the
variant, the image, or the two. fw-context does not select a
build. One query answers for ONE build.
image: Image of the build: a separate program, such as the
application or the bootloader. Give it when the build has an
image name.
Returns: dict: { name, qualified_name, kind, file, line, signature, overrides: [{usr, name, qualified_name, kind, file, line}], overridden_by: [{usr, name, qualified_name, kind, file, line}] }
When a file of the answer changed after the last index run, the
dict adds ``stale`` (True) and ``stale_warning`` (str).
On failure the dict holds ``error`` with the reason.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| image | No | Image of the build: a separate program, such as the application or the bootloader. On a project of more than one build, give it when that build has an image name, as the refusal lists it. | |
| project | No | Project name or project_id — call list_projects to get them. Use it to ask about a project that is not the project of the current directory. It is an alternative to project_root, which takes a root path. Give one of the two, not both. | |
| variant | No | Variant of the build (a board, or a PlatformIO environment). On a project of more than one build, give the arguments of one build as the refusal lists them: the variant, the image, or the two. fw-context does not select a build for you. One query answers for ONE build. | |
| method_name | Yes | Method name to get override information for. Use qualified name for disambiguation, e.g. 'UART_DRIVER::write'. | |
| project_root | No | Project root. Auto-detected if omitted. This field also accepts a project name or a project_id, but project is the clear field for those. |