[lldb][DWARFASTParserClang] Correctly resolve imported namespaces during expression...
authorMichael Buch <michaelbuch12@gmail.com>
Mon, 6 Feb 2023 13:54:32 +0000 (13:54 +0000)
committerMichael Buch <michaelbuch12@gmail.com>
Fri, 10 Feb 2023 01:33:52 +0000 (01:33 +0000)
commit1ba6ec0ba906472661506ef7bd2f0bf4efe4657e
tree797943bea40eaf59f1db47d2cbb1187315983992
parentccee9b7839a182fc692a65f563abf76f81dd436c
[lldb][DWARFASTParserClang] Correctly resolve imported namespaces during expression evaluation

**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
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h
lldb/test/API/commands/expression/namespace-alias/Makefile [new file with mode: 0644]
lldb/test/API/commands/expression/namespace-alias/TestInlineNamespaceAlias.py [new file with mode: 0644]
lldb/test/API/commands/expression/namespace-alias/main.cpp [new file with mode: 0644]