llvm-project/clang-tools-extra/unittests/include-fixer
Haojian Wu adedac68dc [include-fixer] Correct nested class search for identifiers with scoped information
Summary:
include-fixer will firstly try to use scoped namespace context information to
search identifier. However, in some cases, it's unsafe to do nested class
search, because it might treat the identifier as a nested class of scoped
namespace.

Given the following code, and the symbol database only has two classes: "foo" and
"b::Bar".

    namespace foo { Bar t; }

Before getting fixing, include-fixer will never search "Bar" symbol.
Because it firstly tries to search "foo::Bar", there is no "Bar" in foo namespace,
then it finds "foo" in database finally. So it treats "Bar" is a nested class
of "foo".

Reviewers: bkramer

Subscribers: cfe-commits

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

llvm-svn: 277442
2016-08-02 10:43:10 +00:00
..
find-all-symbols [include-fixer] reduce stack size by changing RegexHeaderMap to use const char * pair. 2016-07-04 13:34:11 +00:00
CMakeLists.txt IncludeFixerTests: Update libdeps. 2016-05-31 16:41:39 +00:00
IncludeFixerTest.cpp [include-fixer] Correct nested class search for identifiers with scoped information 2016-08-02 10:43:10 +00:00