Michael Buch
140bcd369b
[LLDB][ClangExpression] Fix initialization of static enum alias members
...
`IntegerLiteral::Create` operates on integer types. For that reason
when we parse DWARF into an AST, when we encounter a constant
initialized enum member variable, we try to determine the underlying
integer type before creating the `IntegerLiteral`. However, we
currently don't desugar the type and for enum typedefs
`dyn_cast<EnumType>` fails. In debug builds this triggers following
assert:
```
Assertion failed: (type->isIntegerType() && "Illegal type in IntegerLiteral"), function IntegerLiteral, file Expr.cpp, line 892
```
This patch turns the `dyn_cast<EnumType>` into a `getAs<EnumType>`
which `dyn_cast`s the canonical type, allowing us to get to the
underlying integer type.
**Testing**
* API test
* Manual repro is fixed
Differential Revision: https://reviews.llvm.org/D130213
2022-07-21 14:23:41 +01:00
..
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-07-08 00:12:29 +00:00
2022-07-21 14:23:41 +01:00
2022-07-15 10:52:35 +00:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-07-10 18:56:06 -07:00
2022-06-30 14:06:21 +04:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00