clang-tools 20.0.0git
Public Types | Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
clang::clangd::TweakTest Class Reference

#include <TweakTesting.h>

Inheritance diagram for clang::clangd::TweakTest:
Inheritance graph
[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()

TweakTest::WrappedAST clang::clangd::TweakTest::build ( llvm::StringRef  Code) const
protected

◆ 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 Code.

◆ decorate() [2/2]

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

Definition at line 153 of file TweakTesting.cpp.

References Code.

◆ isAvailable()

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

Definition at line 129 of file TweakTesting.cpp.

Member Data Documentation

◆ Context

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

Definition at line 73 of file TweakTesting.h.

◆ ExtraArgs

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

Definition at line 70 of file TweakTesting.h.

◆ ExtraFiles

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

Definition at line 57 of file TweakTesting.h.

◆ FileName

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

Definition at line 67 of file TweakTesting.h.

◆ Header

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

Definition at line 65 of file TweakTesting.h.

◆ Index

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

Definition at line 76 of file TweakTesting.h.


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