Code Navigation
Go to Definition
Cross-TU go-to-definition
A use in one translation unit resolves to the definition supplied by a sibling source — the answer spans the project, not the current file alone
Definition and declaration alternate
Navigation alternates between a declaration and definition
A request from a use reaches the definition, while requests at the declaration or definition reach the other site. An inline symbol with no separate declaration keeps its definition as the answer.
Declaration-only navigation
Symbols that carry only a declaration — pure virtuals, extern variables, in-class static constants — resolve to that declaration instead of returning nothing
Go-to-definition on #include directives
Go-to-definition on an include opens the referenced file
Leading includes and ordinary includes later in the file behave alike.
Local symbol navigation
Go-to-definition on a local variable or parameter jumps to its declaration inside the function body
Macro wrapper navigation
A name spelled in a macro argument anchors at its spelling, so definition and declaration alternate there exactly as at a plain site, and a later use resolves through the wrapper to the function it declares
Macro-generated names
A name assembled by token paste has no spelling of its own in the source, so it anchors at the macro invocation that creates it: the invocation is its definition site, and a plain use of the name jumps back to that invocation
Macro body navigation
A token written inside a macro body has no meaning until an expansion assigns one, so navigation on it yields nothing, while the invocation token always resolves to the macro being expanded
Error recovery
An unresolved variable type prevents navigation to the variable's declaration
When a variable's type name fails to resolve, go-to-definition on a later use of the variable currently returns nothing, even though the variable's own declaration is still recorded.
Dependent member navigation
Inside a template that is never instantiated, a member accessed on an object of a dependent type resolves to the member declared on the corresponding class template
Template specialization navigation
Go-to-definition on the name of an explicit specialization resolves to the specialization itself; stepping from it to the primary template it specializes is not offered
Deduced auto type navigation
The auto keyword does not navigate to its deduced type yet
Dependent overload candidates
A dependent call that may reach several overloads lists each of them
Every candidate answers on its own: the definition where it has one, its declaration where it has none.
Dependent expression members
A member accessed on what a dependent subscript, call or auto variable evaluates to resolves to the member declared on the class template
Where the call has a const overload, the constness of the object picks the one it names; overloads that differ in their parameters are all listed.
Implicit targets
Navigate to definitions of implicitly invoked code. In C++ many constructs generate hidden calls to constructors, operators, conversions, etc. Navigating from the syntactic construct (a brace, a keyword, an operator token) to the actual function being called is essential for understanding what code is really executing.
Implicit navigation requires an unambiguous source token — patterns where the token already has a well-defined go-to-def target (e.g., a variable name always goes to its declaration) cannot be repurposed for implicit call navigation.
override / final
override and final do not navigate to the overridden base method yet
Go-to-definition on the override or final specifier does not reach the base class virtual method it overrides.
break / continue
break and continue do not navigate to their enclosing control statement yet
Go-to-definition on break or continue does not reach the head of the loop or switch it controls.
delete expression
delete does not navigate to the invoked destructor yet
Go-to-definition on delete does not reach the destructor it runs.
new expression
new navigates to an overloaded allocation function but not the constructor
Go-to-definition on new reaches the class's overloaded operator new. The constructor invoked by the same expression is not part of the reply.
Overloaded operators
An overloaded operator token navigates to its definition
Go-to-definition on an overloaded operator token reaches the operator's definition. The binary, subscript, call and arrow operators (+, [], (), ->) are all resolved.
C++20 rewritten operators
Rewritten comparisons navigate to the operator that implements them
For a comparison synthesized by the C++20 rewrite rules, go-to-definition on the written operator reaches the operator that actually implements it: != reaches operator==, and > reaches operator<=>.
User-defined literals
A literal suffix does not navigate to its user-defined literal operator yet
Go-to-definition on a user-defined-literal suffix does not reach its operator"".
Implicit conversion operators
Conversion contexts do not navigate to the invoked conversion operator yet
Go-to-definition from a context that runs a user-defined conversion (a condition, !, an explicit bool(...)) does not reach the conversion operator.
Cast conversion navigation
Constructing casts navigate to the selected constructor
A static_cast that runs a user-defined conversion operator does not yet reach that operator.
Range-based for
The range-for colon does not navigate to begin() or end() yet
Go-to-definition on the : of a range-based for does not reach the begin() or end() chosen for the range.
co_await / co_yield / co_return
co_yield navigates to its promise method, while other coroutine keywords do not
Go-to-definition on co_yield reaches the promise's yield_value. The co_await and co_return keywords do not yet reach the awaiter's or promise's methods.
Implicit Construction
Navigation from initialization, return, capture and decomposition syntax reaches constructors, aggregate definitions or bindings selected implicitly.
Constructor calls
Parentheses and braces navigate to the selected constructor
Go-to-definition on the opening parenthesis or brace of a constructor call reaches the constructor overload resolution selected, for both the T(args) and T{args} forms.
Copy/move construction and assignment
Assignment = navigates to the assignment operator, while copy and move initialization do not
Go-to-definition on the = of an assignment reaches the assignment operator. The = that introduces a copy- or move-initialization (T b = a;) is initialization syntax rather than an operator call and is not yet resolved.
CTAD
A CTAD construction navigates to the deduced specialization's constructor
When class template argument deduction picks a specialization, go-to- definition on the constructor call reaches the constructor that was selected, not merely the class template.
Aggregate initialization
Aggregate initializer braces navigate to the aggregate definition
An aggregate has no constructor, so go-to-definition on its initializer brace reaches the aggregate's definition.
Member initializer list
Member-initializer parentheses navigate to the selected base or member constructor
The base and member constructors run by an initializer list are reached from the opening parenthesis of each initializer. The initializer name itself resolves to the base type or the member, so navigation to the constructor goes through the parenthesis.
Delegating constructors
Delegating-constructor parentheses navigate to the target constructor
A delegating constructor's target is reached from the opening parenthesis of the delegated call. The constructor name itself resolves to the class type, so navigation to the target constructor goes through the parenthesis.
Inherited constructors
An inherited-constructor declaration navigates to every imported base constructor
Go-to-definition on an inherited-constructor declaration (using Base::Base;) lists each constructor of the base it imports.
Return value implicit construction
A braced return value navigates to the selected constructor
A braced return {args} implicitly constructs the function's return type; go-to-definition on the brace reaches the selected constructor.
Lambda init-capture
A lambda init-capture does not navigate to its move constructor yet
Go-to-definition on the = of a lambda init-capture does not reach the constructor that builds the captured value.
Structured bindings
Structured binding names navigate to the bindings, not underlying fields or accessors
Go-to-definition on a structured binding name resolves to the binding itself rather than the underlying field or accessor it names.
Go to Declaration
Navigate from a symbol usage or definition to its declaration. In C++, many entities have separate declarations and definitions.
clice returns the declaration locations plus the definition — symbols defined inline have no separate declaration — minus the site the cursor already stands on, so declaration and definition sites alternate just like go-to-definition.
Cross-TU go-to-declaration
Go-to-declaration on a use resolves sites in other files: the prototype lives in a shared header and the out-of-line definition in a sibling source, and both are offered from a use in another file
Functions
Uses and out-of-line definitions navigate to the function prototype
Go-to-declaration reaches a function's prototype both from a call site and from the out-of-line definition — the two non-cursor sites the prototype alternates with.
Forward-declared record types
A class with a forward declaration and a later definition offers both from a use — the forward declaration stays part of the declaration set rather than being dropped in favour of the definition
Static data member
Static member uses navigate to the in-class declaration
A static data member is declared inside the class and defined out of line; go-to-declaration on a use offers the in-class declaration alongside the definition.
extern variable
External variable uses navigate to their declaration
A use of an extern variable offers the extern declaration and the defining declaration together, so the header-side declaration is always reachable from a use.
Multiple declarations
A use navigates to every declaration site
When an entity is declared in several places, go-to-declaration on a use lists every declaration site, not only the nearest one.
Cosmetic signature differences
Parameter names, and a top-level const on a parameter, are not part of a function's type: the declaration and the definition below spell the same function differently, yet go-to-declaration still connects a use to the prototype
Go to Implementation
Override chain
Implementation navigation follows an override chain one level at a time
Along a three-level override chain, go-to-implementation from each method reaches the override one level down — base to middle, middle to leaf.
Sibling overrides
Implementation navigation lists every sibling override
Go-to-implementation on a virtual method lists every override across the sibling derived classes.
Non-virtual function
Non-virtual declarations do not navigate to out-of-line definitions yet
Go-to-implementation on a non-virtual function declaration does not reach its out-of-line definition and returns nothing.
Base class
Base classes navigate to every derived class
Go-to-implementation on a base class name lists the classes that derive from it.
Template duck-type navigation
Dependent calls do not resolve to methods of known instantiations yet
This applies to function templates and generic lambdas, but neither currently returns an implementation target.
Go to Type Definition
Navigate to the type definition of a symbol. Applicable to variables, parameters, fields, and any other named entity that has a type. When the type is a type alias or a pointer-like wrapper, navigation should unwrap to the underlying/pointee type.
Variables and parameters
Go-to-type-definition on a local variable or a parameter reaches the definition of its type
Class and struct fields
Go-to-type-definition on a field access reaches the definition of the field's type
auto-deduced variables
Auto-deduced variables do not navigate to their deduced type definitions yet
Smart-pointer pointee navigation
Go-to-type-definition on a smart-pointer variable reaches the wrapper type itself; unwrapping to the pointee type is not offered
Type aliases
Go-to-type-definition on a variable of an aliased type reaches the using or typedef declaration; it does not yet unwrap the alias to the underlying type's definition
Structured binding variables
Go-to-type-definition on a structured binding reaches the definition of the bound member's type
Pointers, references and arrays
Go-to-type-definition looks through pointers, references and arrays to the definition of the element type
Find References
Cross-TU find references
Find references gathers uses from other files too: a function defined in one source and called from a sibling reports both call sites together with the declaration in the shared header, not only the uses in the current file
Declarations among references
A reference query returns the declaration and the out-of-line definition together with every use, so the whole surface of a symbol is reachable from any one of its sites
Range-for references
Find references on begin reports only its own declaration; the range-based for loop that implicitly calls it is not included among the references
Implicit constructor and destructor calls
Find references on a constructor reports only its explicit sites; an object definition that implicitly invokes the constructor or its destructor is not included
References through forwarding functions
Find references on a constructor does not include call sites that reach it indirectly through a perfect-forwarding factory
Dependent template references
Find references on a member does not include dependent call sites in a template, even when the template is instantiated with the member's class
Read/write classification of references
The reference reply carries only locations, so a reader cannot tell a write from a read; annotating each result with its access kind is not offered
Reference enclosing context
Each reference is reported as a bare location; the name of the function that encloses it is not attached, so results carry no context beyond the file and line
Macro references
Macro reference searches include expansions, conditional tests and undefinitions
Each #define of a name is its own symbol, so a redefinition after #undef collects only its own uses.
Nested macro references
Find references on a macro does not include the mentions of it written inside the bodies of other macro definitions
Label and goto references
Find references on a label lists the label itself together with every goto that jumps to it
Call Hierarchy
Call hierarchy preparation
Preparing a call hierarchy works on a free function and on a member method alike, anchoring an item at the entity under the cursor
Incoming calls
Incoming calls list every caller of a function, and a caller that invokes it more than once contributes each call site
Outgoing calls
Outgoing calls list every function a body invokes, one entry per callee
Call hierarchy item details
A call hierarchy item carries only its name; the function signature is not attached in a detail field, so overloads are indistinguishable in the hierarchy
Qualified name for member functions
A member function's call hierarchy item is produced, but its name field carries only the bare method name (draw), not the qualified Circle::draw that would tell it apart from a free function
Follow virtual dispatch
Incoming calls of a base virtual method do not include calls made through derived overrides; a call to an override is attributed only to that override, never to the base it overrides
Non-function targets
Call hierarchy preparation returns nothing for variables and enum constants
Preparing a call hierarchy on a variable or an enum constant returns nothing; the request is offered only for functions and methods.
Calls inside lambdas
A call written in a lambda body appears in the incoming calls of the function it invokes, attributed to the function that encloses the lambda
Constructor calls through forwarding functions
Incoming calls of a constructor do not include the call sites that reach it through a perfect-forwarding factory
Type Hierarchy
Type hierarchy preparation
Preparing a type hierarchy anchors an item on any user-defined type tag — class, struct, enum and union alike
Supertypes
Supertypes list every direct base of a class, including each base of a multiple-inheritance derived type
Subtypes
Subtypes list every class that derives from a base, across sibling derived types
Template inheritance
Subtypes of a base include classes that derive from it through a class template, such as a CRTP wrapper
Template arguments in hierarchy
A subtype produced by a class template specialization is listed, but its item name carries only the bare template name (Derived), without the template arguments that would distinguish Derived<Foo>
Workspace Symbol
Search the whole project for a symbol by name (workspace/symbol).
Basic workspace-wide symbol search
Workspace symbol search matches names regardless of case
A query matches a symbol's name as a subsequence aligned to its words, ignoring case: functions, types, enumerators and macros all participate, and a query with no match returns an empty list rather than an error.
Search spans the whole project
Workspace symbol search returns hits from unopened project files
The query returns symbols from project files that are not even open in the editor: other.h stays closed here, so its hit is served by the background index.
Overload disambiguation
Workspace symbol results omit parameter types, leaving overloads ambiguous
Querying an overloaded name finds every overload, but each entry carries only the bare name — nothing tells the two process results apart short of opening both locations.
Fuzzy matching
A query matches a name as a subsequence aligned to its words
LinLis finds LinkedList and pconf finds parse_config: after its first letter, every letter of the query either continues a run or starts a word of the name, so pcfg finds nothing — its f lands in the middle of config. The name spelled exactly ranks first, then the names starting with the query, then matches deeper inside a name.
Qualified name search
A qualified query names the containers the symbol must lie in
net::Socket finds deep::net::Socket: the qualifiers must appear in the symbol's container chain in that order, with other containers allowed around them, while a leading :: demands exactly that chain. Replies to a qualified query spell the qualified name, so editors that filter results against the query text keep them.
Scoped enumerator lookup
An enum qualifies its enumerators like any other container
Alias ranking
The name spelled exactly ranks above the names merely starting with it
Connection lists the alias first and ConnectionImpl after it.
Search by mangled (linker) name
Mangled linker names do not resolve to their source functions yet
Query syntax
Quotes, wildcards, scopes and filters narrow a search
"process" matches the whole name only and proc* whatever it globs; io::* lists a namespace's members and io::** its whole subtree; kind:function keeps one kind. Terms combine, separated by spaces.
Module Navigation
Module import navigation
Go-to-definition on the name in an import declaration opens the module interface unit that exports it, and uses of an imported symbol reach its definition in that unit
Module partition navigation
Go-to-definition on the partition name after the colon in a partition import opens the partition unit that declares it
Module interface implementation navigation
Go-to-definition on the module name in an implementation unit (module m;) jumps to the interface unit that declares the module; the reverse direction, from the interface name to the implementation, is not offered
Dot-separated module name
Every segment of a dotted module name navigates to its interface
Go-to-definition on any segment of a dot-separated module name reaches the module's interface unit; the whole name is one reference.
Document Highlight
Highlight all references to the symbol under cursor within the current file (textDocument/documentHighlight).
Document reference highlights
Document highlights are not implemented, so declarations and uses are not highlighted
Read/write classification for symbol highlights
Document highlights do not report read and write access kinds yet
Control flow token highlighting
Control-flow keywords have no related document highlights yet
Switch Source/Header
Source-header switching
Source/header switching is not implemented, so users cannot jump directly between paired files
