clang-tools  10.0.0svn
Classes | Namespaces | Macros | Functions
Tweak.h File Reference
#include "ParsedAST.h"
#include "Path.h"
#include "Protocol.h"
#include "Selection.h"
#include "SourceCode.h"
#include "clang/Tooling/Core/Replacement.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Error.h"
#include <string>
Include dependency graph for Tweak.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  clang::clangd::Tweak
 An interface base for small context-sensitive refactoring actions. More...
 
struct  clang::clangd::Tweak::Selection
 Input to prepare and apply tweaks. More...
 
struct  clang::clangd::Tweak::Effect
 

Namespaces

 clang
 ===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
 
 clang::clangd
 

Macros

#define REGISTER_TWEAK(Subclass)
 

Functions

std::vector< std::unique_ptr< Tweak > > clang::clangd::prepareTweaks (const Tweak::Selection &S, llvm::function_ref< bool(const Tweak &)> Filter)
 Calls prepare() on all tweaks that satisfy the filter, returning those that can run on the selection. More...
 
llvm::Expected< std::unique_ptr< Tweak > > clang::clangd::prepareTweak (StringRef ID, const Tweak::Selection &S)
 

Macro Definition Documentation

◆ REGISTER_TWEAK

#define REGISTER_TWEAK (   Subclass)
Value:
::llvm::Registry<::clang::clangd::Tweak>::Add<Subclass> \
TweakRegistrationFor##Subclass(#Subclass, /*Description=*/""); \
const char *Subclass::id() const { return #Subclass; }

Definition at line 127 of file Tweak.h.