This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Don't rename on symbols from system headers.
ClosedPublic

Authored by hokein on Jan 5 2022, 1:45 AM.

Diff Detail

Event Timeline

hokein created this revision.Jan 5 2022, 1:45 AM
hokein requested review of this revision.Jan 5 2022, 1:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 5 2022, 1:45 AM
kbobyrev added inline comments.Jan 5 2022, 3:05 AM
clang-tools-extra/clangd/refactor/Rename.cpp
163

nit: "as renaming these symbols..."

164

nit: "unlikely to be good candidates for modification"

Maybe my wording is bad, too, but what I want to convey is that the problem isn't that they can't be modified but that we don't want them to be modified!

171

Any reason not to do this right now? (if we keep the comment, then it's probably better as "Remove this check because it is redundant in the presence of isInSystemHeader")

kbobyrev added inline comments.Jan 5 2022, 3:06 AM
clang-tools-extra/clangd/unittests/RenameTests.cpp
1202

Nit: capitalization.

hokein updated this revision to Diff 398588.Jan 10 2022, 5:15 AM
hokein marked 3 inline comments as done.

address comments.

hokein updated this revision to Diff 398589.Jan 10 2022, 5:15 AM

remove accident changes.

clang-tools-extra/clangd/refactor/Rename.cpp
171

We could do it in this patch, I slightly prefer to do it in a followup patch, it'd require some changes in the unittests. (this FIXME was added in the last minute -- at the very beginning I didn't notice that it could be simplified)

kbobyrev accepted this revision.Jan 11 2022, 10:55 PM

LG, thanks!

clang-tools-extra/clangd/refactor/Rename.cpp
171

Okay, makes sense, thanks for explaining!

This revision is now accepted and ready to land.Jan 11 2022, 10:55 PM
This revision was landed with ongoing or failed builds.Jan 17 2022, 6:10 AM
This revision was automatically updated to reflect the committed changes.