clang-tools  14.0.0git
Public Attributes | List of all members
clang::clangd::ReferenceLoc Struct Reference

Information about a reference written in the source code, independent of the actual AST node that this reference lives in. More...

#include <FindTarget.h>

Collaboration diagram for clang::clangd::ReferenceLoc:
Collaboration graph
[legend]

Public Attributes

NestedNameSpecifierLoc Qualifier
 Contains qualifier written in the code, if any, e.g. 'ns::' for 'ns::foo'. More...
 
SourceLocation NameLoc
 Start location of the last name part, i.e. 'foo' in 'ns::foo<int>'. More...
 
bool IsDecl = false
 True if the reference is a declaration or definition;. More...
 
llvm::SmallVector< const NamedDecl *, 1 > Targets
 A list of targets referenced by this name. More...
 

Detailed Description

Information about a reference written in the source code, independent of the actual AST node that this reference lives in.

Useful for tools that are source-aware, e.g. refactorings.

Definition at line 129 of file FindTarget.h.

Member Data Documentation

◆ IsDecl

bool clang::clangd::ReferenceLoc::IsDecl = false

True if the reference is a declaration or definition;.

Definition at line 135 of file FindTarget.h.

Referenced by clang::clangd::operator<<().

◆ NameLoc

SourceLocation clang::clangd::ReferenceLoc::NameLoc

Start location of the last name part, i.e. 'foo' in 'ns::foo<int>'.

Definition at line 133 of file FindTarget.h.

◆ Qualifier

NestedNameSpecifierLoc clang::clangd::ReferenceLoc::Qualifier

Contains qualifier written in the code, if any, e.g. 'ns::' for 'ns::foo'.

Definition at line 131 of file FindTarget.h.

Referenced by clang::clangd::operator<<().

◆ Targets

llvm::SmallVector<const NamedDecl *, 1> clang::clangd::ReferenceLoc::Targets

A list of targets referenced by this name.

Normally this has a single element, but multiple is also possible, e.g. in case of using declarations or unresolved overloaded functions. For dependent and unresolved references, Targets can also be empty.

Definition at line 141 of file FindTarget.h.

Referenced by clang::clangd::getSemanticHighlightings(), and clang::clangd::operator<<().


The documentation for this struct was generated from the following file: