[Tooling] Add more scope specifiers until spelling is not ambiguous.
authorEric Liu <ioeric@google.com>
Tue, 19 Mar 2019 10:12:15 +0000 (10:12 +0000)
committerEric Liu <ioeric@google.com>
Tue, 19 Mar 2019 10:12:15 +0000 (10:12 +0000)
commit52b49ab3fd92339cec96156396f6b7a6d48e17b2
tree6a7d797648ddb94be7d7fbed176d58bbe7ad5095
parent8665802202689b4014bde7f5aa64f0a3c1a045f7
[Tooling] Add more scope specifiers until spelling is not ambiguous.

Summary:
Previously, when the renamed spelling is ambiguous, we simply use the
full-qualfied name (with leading "::"). This patch makes it try adding
additional specifiers one at a time until name is no longer ambiguous,
which allows us to find better disambuguated spelling.

Reviewers: kadircet, gribozavr

Subscribers: jdoerfert, cfe-commits

Tags: #clang

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

llvm-svn: 356446
clang/lib/Tooling/Core/Lookup.cpp
clang/unittests/Tooling/LookupTest.cpp