[clang-tools-extra] [clangd] Use `SymbolName` to represent Objective-C selectors (PR #82061)
David Goldman via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 14 13:33:05 PDT 2025
================
@@ -35,6 +35,56 @@ struct RenameOptions {
bool RenameVirtual = true;
};
+/// 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:
+///
+/// \code
+/// - (void) myMethodNamePiece: (int)x anotherNamePieces:(int)y;
+/// // ^~ string 0 ~~~~~ ^~ string 1 ~~~~~
+/// \endcode
+class RenameSymbolName {
+ llvm::SmallVector<std::string, 1> NamePieces;
+
+public:
+ RenameSymbolName();
+
+ /// Create a new \c SymbolName with the specified pieces.
+ explicit RenameSymbolName(ArrayRef<std::string> NamePieces);
+
+ explicit RenameSymbolName(const DeclarationName &Name);
+
+ // /// Creates a \c SymbolName from the given string representation.
----------------
DavidGoldman wrote:
This is accidentally double commented, also looks like L63 SymbolName(...) is extraneous.
https://github.com/llvm/llvm-project/pull/82061
More information about the cfe-commits
mailing list