kadircet added inline comments.
================ Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:378 + buildRenameEdit(FilePath, *AffectedFileCode, *RenameRanges, NewName, + RenameDecl.getNameAsString()); if (!RenameEdit) { ---------------- nit: move both this and invocation above(line 363) out of the loop into a `std::string OldName` ================ Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:565 + // cases where the might be incorrectly captured tokens. + if (*EndOffset > *StartOffset && + InitialCode.slice(*StartOffset, *EndOffset) == OldName) ---------------- maybe I am missing it but, it is unclear whether start to end is half-open/closed intervals. could you add a test case with a single character identifier(you might want to accept equality, if this is a closed interval) and add some comments to the `OccurrencesOffsets`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72071/new/ https://reviews.llvm.org/D72071 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits