This revision was automatically updated to reflect the committed changes.
Closed by commit rL364537: [clangd] Fix a case where we fail to detect a
header-declared symbol in rename. (authored by hokein, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Changed
sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.
Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:157
assert(RenameDecl && "symbol must be found at this point");
+ RenameDecl = cast(RenameDecl->getCano
hokein added inline comments.
Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:157
assert(RenameDecl && "symbol must be found at this point");
+ RenameDecl = cast(RenameDecl->getCanonicalDecl());
if (auto Reject = renamableWithinFile(*RenameDecl, File, Index)) {
--
hokein updated this revision to Diff 206844.
hokein marked 2 inline comments as done.
hokein added a comment.
Address comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63872/new/
https://reviews.llvm.org/D63872
Files:
clang-tools-extra/clan
sammccall added inline comments.
Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:157
assert(RenameDecl && "symbol must be found at this point");
+ RenameDecl = cast(RenameDecl->getCanonicalDecl());
if (auto Reject = renamableWithinFile(*RenameDecl, File, Index)) {
hokein created this revision.
hokein added a reviewer: sammccall.
Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ilya-biryukov.
Herald added a project: clang.
Failing case:
#include "foo.h"
void fo^o() {}
getRenameDecl() returns the decl of the symbol under the cursor (which