Consider nested namespaces in the canonical namespace as canonical as well.
authorEric Liu <ioeric@google.com>
Fri, 25 Nov 2016 12:39:03 +0000 (12:39 +0000)
committerEric Liu <ioeric@google.com>
Fri, 25 Nov 2016 12:39:03 +0000 (12:39 +0000)
commiteddec09ee480ca575909efb95c64c992cbe83ce7
tree0673f1af0dae1d3aab6f70a2695291755e207484
parent59e391c0f8ae642dc747ae55566289c856e1cf26
Consider nested namespaces in the canonical namespace as canonical as well.

Summary:
For example, this case was missed when looking for different but canonical
namespaces. UseContext in this case should be considered as in the canonical
namespace.
```
namespace a { namespace b { <FromContext> } }
namespace a { namespace b { namespace c { <UseContext> } } }
```
Added some commenting.

Reviewers: bkramer

Subscribers: klimek, cfe-commits

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

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