clang-tools 20.0.0git
Public Member Functions | Public Attributes | List of all members
clang::clangd::Tweak::Selection Struct Reference

Input to prepare and apply tweaks. More...

#include <Tweak.h>

Public Member Functions

 Selection (const SymbolIndex *Index, ParsedAST &AST, unsigned RangeBegin, unsigned RangeEnd, SelectionTree ASTSelection, llvm::vfs::FileSystem *VFS)
 

Public Attributes

llvm::StringRef Code
 The text of the active document.
 
const SymbolIndexIndex = nullptr
 The Index for handling codebase related queries.
 
ParsedASTAST
 The parsed active file. Never null. (Pointer so Selection is movable).
 
SourceLocation Cursor
 A location of the cursor in the editor.
 
unsigned SelectionBegin
 The begin offset of the selection.
 
unsigned SelectionEnd
 The end offset of the selection.
 
SelectionTree ASTSelection
 The AST nodes that were selected.
 
llvm::vfs::FileSystem * FS = nullptr
 File system used to access source code (for cross-file tweaks).
 

Detailed Description

Input to prepare and apply tweaks.

Definition at line 49 of file Tweak.h.

Constructor & Destructor Documentation

◆ Selection()

clang::clangd::Tweak::Selection::Selection ( const SymbolIndex Index,
ParsedAST AST,
unsigned  RangeBegin,
unsigned  RangeEnd,
SelectionTree  ASTSelection,
llvm::vfs::FileSystem *  VFS 
)

Definition at line 60 of file Tweak.cpp.

References AST, Code, Cursor, and clang::clangd::ParsedAST::getSourceManager().

Member Data Documentation

◆ AST

ParsedAST* clang::clangd::Tweak::Selection::AST

The parsed active file. Never null. (Pointer so Selection is movable).

Definition at line 58 of file Tweak.h.

Referenced by Selection().

◆ ASTSelection

SelectionTree clang::clangd::Tweak::Selection::ASTSelection

The AST nodes that were selected.

Definition at line 67 of file Tweak.h.

◆ Code

llvm::StringRef clang::clangd::Tweak::Selection::Code

The text of the active document.

Definition at line 54 of file Tweak.h.

Referenced by Selection().

◆ Cursor

SourceLocation clang::clangd::Tweak::Selection::Cursor

A location of the cursor in the editor.

Definition at line 61 of file Tweak.h.

Referenced by Selection().

◆ FS

llvm::vfs::FileSystem* clang::clangd::Tweak::Selection::FS = nullptr

File system used to access source code (for cross-file tweaks).

This is only populated when applying a tweak, not during prepare.

Definition at line 70 of file Tweak.h.

◆ Index

const SymbolIndex* clang::clangd::Tweak::Selection::Index = nullptr

The Index for handling codebase related queries.

Definition at line 56 of file Tweak.h.

◆ SelectionBegin

unsigned clang::clangd::Tweak::Selection::SelectionBegin

The begin offset of the selection.

Definition at line 63 of file Tweak.h.

◆ SelectionEnd

unsigned clang::clangd::Tweak::Selection::SelectionEnd

The end offset of the selection.

Definition at line 65 of file Tweak.h.


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