llvm-project/clang/lib/Tooling/Core
Eric Liu db887cab7a Fully qualify the renamed symbol if the shortened name is ambiguous.
Summary:
For example, when renaming `a:🅱️:foo` to `y::foo` below, replacing
`x::foo()` with `y::foo()` can cause ambiguity. In such cases, we simply fully
qualify the name with leading `::`.
```
namespace a {
namespace b {
namespace x { void foo() {} }
namespace y { void foo() {} }
}
}

namespace a {
namespace b {
void f() { x::foo(); }
}
}
```

Reviewers: ilya-biryukov, hokein

Reviewed By: ilya-biryukov

Subscribers: cfe-commits

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

llvm-svn: 338832
2018-08-03 09:16:07 +00:00
..
CMakeLists.txt Reland "Move #include manipulation code to new lib/Tooling/Inclusions." 2018-06-04 09:04:12 +00:00
Diagnostic.cpp Add const to reference arguments of Diagnostic ctor 2017-07-05 11:45:09 +00:00
Lookup.cpp Fully qualify the renamed symbol if the shortened name is ambiguous. 2018-08-03 09:16:07 +00:00
Replacement.cpp Fix typos in clang 2018-04-06 15:14:32 +00:00