This revision was automatically updated to reflect the committed changes.
sammccall marked an inline comment as done.
Closed by commit rG43d0b1c9c16c: [clangd] Reject renames to non-identifier
characters (authored by sammccall).
Herald added a project: clang-tools-extra.
Changed prior to commit:
usaxena95 accepted this revision.
usaxena95 added a comment.
This revision is now accepted and ready to land.
LGTM. Thanks.
Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:466
+case InvalidName::BadIdentifier:
+ return "the chosen name \"{0}\" is not a valid i
sammccall added inline comments.
Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:473-488
+static bool mayBeValidIdentifier(llvm::StringRef Ident) {
+ assert(llvm::json::isUTF8(Ident));
+ if (Ident.empty())
+return false;
+ // We don't check all the rules for non-a
njames93 added inline comments.
Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:473-488
+static bool mayBeValidIdentifier(llvm::StringRef Ident) {
+ assert(llvm::json::isUTF8(Ident));
+ if (Ident.empty())
+return false;
+ // We don't check all the rules for non-as
sammccall created this revision.
sammccall added a reviewer: usaxena95.
Herald added subscribers: kadircet, arphaman.
sammccall requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.
Herald added a project: clang.
Repository:
rG LLVM Github Monorepo
ht