Page MenuHomePhabricator

[Lookup] Invisible decls should not be ambiguous when renaming.
ClosedPublic

Authored by ioeric on Apr 4 2019, 3:30 AM.

Details

Summary

For example, a renamed type in a header file can conflict with declaration in
a random file that includes the header, but we should not consider the decl ambiguous if
it's not visible at the rename location. This improves consistency of generated replacements
when header file is included in different TUs.

Diff Detail

Repository
rC Clang

Event Timeline

ioeric created this revision.Apr 4 2019, 3:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 4 2019, 3:30 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
hokein added inline comments.Apr 12 2019, 2:11 AM
unittests/Tooling/LookupTest.cpp
215

The test seems hard to understand what it actually does, could you explain it? which symbol is ambiguous here? What's the behavior of the test before vs after the fix?

ioeric updated this revision to Diff 194841.Apr 12 2019, 4:50 AM
ioeric marked 2 inline comments as done.
  • Add test comment.
unittests/Tooling/LookupTest.cpp
215

added comment. PTAL

hokein accepted this revision.Apr 12 2019, 6:41 AM
This revision is now accepted and ready to land.Apr 12 2019, 6:41 AM
This revision was automatically updated to reflect the committed changes.