clang-tools 22.0.0git
|
A name of a symbol that should be renamed. More...
#include <Rename.h>
Public Member Functions | |
RenameSymbolName () | |
RenameSymbolName (ArrayRef< std::string > NamePieces) | |
Create a new SymbolName with the specified pieces. | |
RenameSymbolName (const DeclarationName &Name) | |
ArrayRef< std::string > | getNamePieces () const |
std::optional< std::string > | getSinglePiece () const |
If this symbol consists of a single piece return it, otherwise return None. | |
std::string | getAsString () const |
Returns a human-readable version of this symbol name. | |
void | print (raw_ostream &OS) const |
bool | operator== (const RenameSymbolName &Other) const |
A name of a symbol that should be renamed.
Symbol's name can be composed of multiple strings. For example, Objective-C methods can contain multiple argument labels:
clang::clangd::RenameSymbolName::RenameSymbolName | ( | ) |
Definition at line 1015 of file Rename.cpp.
Referenced by operator==(), and RenameSymbolName().
|
explicit |
Create a new SymbolName
with the specified pieces.
Definition at line 1036 of file Rename.cpp.
|
explicit |
Definition at line 1033 of file Rename.cpp.
References RenameSymbolName().
std::string clang::clangd::RenameSymbolName::getAsString | ( | ) | const |
Returns a human-readable version of this symbol name.
If the symbol consists of multiple pieces (aka. it is an Objective-C selector/method name), the pieces are separated by :, otherwise just an identifier name.
Definition at line 1048 of file Rename.cpp.
References print().
|
inline |
Definition at line 58 of file Rename.h.
Referenced by getSinglePiece().
std::optional< std::string > clang::clangd::RenameSymbolName::getSinglePiece | ( | ) | const |
If this symbol consists of a single piece return it, otherwise return None.
Only symbols in Objective-C can consist of multiple pieces, so this function always returns a value for non-Objective-C symbols.
Definition at line 1041 of file Rename.cpp.
References getNamePieces().
|
inline |
Definition at line 76 of file Rename.h.
References RenameSymbolName().
void clang::clangd::RenameSymbolName::print | ( | raw_ostream & | OS | ) | const |
Definition at line 1055 of file Rename.cpp.
Referenced by getAsString().