clang-tools 22.0.0git
|
#include <Tweak.h>
Static Public Member Functions | |
static Effect | showMessage (StringRef S) |
static llvm::Expected< std::pair< Path, Edit > > | fileEdit (const SourceManager &SM, FileID FID, tooling::Replacements Replacements) |
Path is the absolute, symlink-resolved path for the file pointed by FID in SM. | |
static llvm::Expected< Tweak::Effect > | mainFileEdit (const SourceManager &SM, tooling::Replacements Replacements) |
Creates an effect with an Edit for the main file. |
Public Attributes | |
std::optional< std::string > | ShowMessage |
A message to be displayed to the user. | |
FileEdits | ApplyEdits |
bool | FormatEdits = true |
Whether the edits should be formatted before presenting to the client. |
|
static |
Path is the absolute, symlink-resolved path for the file pointed by FID in SM.
Edit is generated from Replacements. Fails if cannot figure out absolute path for FID.
Definition at line 104 of file Tweak.cpp.
References clang::clangd::error(), and clang::clangd::getCanonicalPath().
Referenced by mainFileEdit().
|
static |
Creates an effect with an Edit for the main file.
Fails if cannot figure out absolute path for main file.
Definition at line 115 of file Tweak.cpp.
References ApplyEdits, and fileEdit().
|
inlinestatic |
Definition at line 82 of file Tweak.h.
References ShowMessage.
FileEdits clang::clangd::Tweak::Effect::ApplyEdits |
Definition at line 77 of file Tweak.h.
Referenced by mainFileEdit().
bool clang::clangd::Tweak::Effect::FormatEdits = true |
std::optional<std::string> clang::clangd::Tweak::Effect::ShowMessage |
A message to be displayed to the user.
Definition at line 76 of file Tweak.h.
Referenced by showMessage().