]> granicus.if.org Git - clang/commit
[Lookup] Invisible decls should not be ambiguous when renaming.
authorEric Liu <ioeric@google.com>
Mon, 15 Apr 2019 08:46:34 +0000 (08:46 +0000)
committerEric Liu <ioeric@google.com>
Mon, 15 Apr 2019 08:46:34 +0000 (08:46 +0000)
commitaba7c4a0f023aa3bb2b6d002d11d517254824fbd
tree9b73fe355f576a1ba656b70eefb64c00241ce8ab
parent070ab5cd47cde6bb757e1897a93e8c08edbdeaae
[Lookup] Invisible decls should not be ambiguous when renaming.

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.

Reviewers: hokein

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D60257

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@358378 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Tooling/Core/Lookup.h
lib/Tooling/Core/Lookup.cpp
lib/Tooling/Refactoring/Rename/USRLocFinder.cpp
unittests/Tooling/LookupTest.cpp