This relands a patch previously reverted
in `181d6e24ca3c09bfd6ec7c3b20affde3e5ea9b40`.
This wasn't quite working on Linux because we
weren't populating the manual DWARF index with
`DW_TAG_imported_declaration`. The relanded patch
does this.
**Summary**
This patch makes the expression evaluator understand
namespace aliases.
This will become important once `std::ranges` become
more widespread since `std::views` is defined as:
```
namespace std {
namespace ranges::views {}
namespace views = ranges::views;
}
```
**Testing**
* Added API test
Differential Revision: https://reviews.llvm.org/D143398
22 lines
324 B
C++
22 lines
324 B
C++
namespace A {
|
|
inline namespace _A {
|
|
namespace B {
|
|
namespace C {
|
|
int a = -1;
|
|
|
|
int func() { return 0; }
|
|
} // namespace C
|
|
} // namespace B
|
|
|
|
namespace C = B::C;
|
|
namespace D = B::C;
|
|
|
|
} // namespace _A
|
|
} // namespace A
|
|
|
|
namespace E = A;
|
|
namespace F = E::C;
|
|
namespace G = F;
|
|
|
|
int main(int argc, char **argv) { return A::B::C::a; }
|