clang-tools 10.0.0

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:
[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 119 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 125 of file FindTarget.h.

## ◆ NameLoc

SourceLocation clang::clangd::ReferenceLoc::NameLoc

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

Definition at line 123 of file FindTarget.h.

Referenced by clang::clangd::getSemanticHighlightings().

## ◆ Qualifier

NestedNameSpecifierLoc clang::clangd::ReferenceLoc::Qualifier

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

Definition at line 121 of file FindTarget.h.

## ◆ 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 131 of file FindTarget.h.

Referenced by clang::clangd::getNonLocalDeclRefs().

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

- FindTarget.h