clang-tools 22.0.0git
clang::clangd::TweakTest Class Reference

#include <TweakTesting.h>

Inheritance diagram for clang::clangd::TweakTest:
[legend]

Public Types

enum  CodeContext { File , Function , Expression }

Public Attributes

llvm::StringMap< std::string > ExtraFiles

Protected Types

using WrappedAST = std::pair<ParsedAST, unsigned>

Protected Member Functions

 TweakTest (const char *TweakID)
std::string apply (llvm::StringRef MarkedCode, llvm::StringMap< std::string > *EditedFiles=nullptr) const
WrappedAST build (llvm::StringRef) const
bool isAvailable (WrappedAST &, llvm::Annotations::Range) const

Static Protected Member Functions

static std::string decorate (llvm::StringRef, unsigned)
static std::string decorate (llvm::StringRef, llvm::Annotations::Range)

Protected Attributes

std::string Header
llvm::StringRef FileName = "TestTU.cpp"
std::vector< std::string > ExtraArgs
CodeContext Context = File
std::unique_ptr< const SymbolIndexIndex = nullptr

Detailed Description

Definition at line 41 of file TweakTesting.h.

Member Typedef Documentation

◆ WrappedAST

using clang::clangd::TweakTest::WrappedAST = std::pair<ParsedAST, unsigned>
protected

Definition at line 95 of file TweakTesting.h.

Member Enumeration Documentation

◆ CodeContext

Enumerator
File 
Function 
Expression 

Definition at line 47 of file TweakTesting.h.

Constructor & Destructor Documentation

◆ TweakTest()

clang::clangd::TweakTest::TweakTest ( const char * TweakID)
inlineprotected

Definition at line 60 of file TweakTesting.h.

Member Function Documentation

◆ apply()

std::string clang::clangd::TweakTest::apply ( llvm::StringRef MarkedCode,
llvm::StringMap< std::string > * EditedFiles = nullptr ) const
protected

◆ build()

◆ decorate() [1/2]

std::string clang::clangd::TweakTest::decorate ( llvm::StringRef Code,
llvm::Annotations::Range Range )
staticprotected

Definition at line 157 of file TweakTesting.cpp.

References decorate().

◆ decorate() [2/2]

std::string clang::clangd::TweakTest::decorate ( llvm::StringRef Code,
unsigned Point )
staticprotected

Definition at line 153 of file TweakTesting.cpp.

References decorate().

Referenced by decorate(), and decorate().

◆ isAvailable()

bool clang::clangd::TweakTest::isAvailable ( WrappedAST & AST,
llvm::Annotations::Range Range ) const
protected

Definition at line 129 of file TweakTesting.cpp.

References clang::clangd::AST, Index, and isAvailable().

Referenced by isAvailable().

Member Data Documentation

◆ Context

CodeContext clang::clangd::TweakTest::Context = File
protected

Definition at line 73 of file TweakTesting.h.

Referenced by apply(), and build().

◆ ExtraArgs

std::vector<std::string> clang::clangd::TweakTest::ExtraArgs
protected

Definition at line 70 of file TweakTesting.h.

Referenced by apply(), and build().

◆ ExtraFiles

llvm::StringMap<std::string> clang::clangd::TweakTest::ExtraFiles

Definition at line 57 of file TweakTesting.h.

Referenced by apply(), and build().

◆ FileName

llvm::StringRef clang::clangd::TweakTest::FileName = "TestTU.cpp"
protected

Definition at line 67 of file TweakTesting.h.

Referenced by apply(), and build().

◆ Header

std::string clang::clangd::TweakTest::Header
protected

Definition at line 65 of file TweakTesting.h.

Referenced by apply(), and build().

◆ Index

std::unique_ptr<const SymbolIndex> clang::clangd::TweakTest::Index = nullptr
protected

Definition at line 76 of file TweakTesting.h.

Referenced by apply(), and isAvailable().


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