hokein added inline comments.

================
Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:218
+    case ReasonToReject::SameName:
+      return "new name should differ from the old name";
     }
----------------
returning an error seems to be an interesting idea, thinking more about that, 
it might be better than just returning an empty workspaceEdit silently without 
noticing user.



================
Comment at: clang-tools-extra/clangd/unittests/RenameTests.cpp:900
+  EXPECT_THAT(llvm::toString(Results.takeError()),
+              testing::HasSubstr("new name should differ"));
+
----------------
this test is for prepareRename, I think we should put it to `TEST(RenameTest, 
Renameable)`. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91134/new/

https://reviews.llvm.org/D91134

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to