[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)
Ilia Kuklin via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 31 12:04:49 PST 2025
================
@@ -2367,11 +2369,36 @@ size_t DWARFASTParserClang::ParseChildEnumerators(
}
if (name && name[0] && got_value) {
- m_ast.AddEnumerationValueToEnumerationType(
+ auto ECD = m_ast.AddEnumerationValueToEnumerationType(
----------------
kuilpd wrote:
> > Iteration over elements in SemaDecl.cpp checks for the element is a EnumConstantDecl, otherwise it's skipped, so I had to create a separate collection in case something is removed, and then pass that one to computeEnumBits
>
> Could you elaborate on this? LLDB only ever puts `EnumConstantDecl`s there right?
This line: [SemaDecl.cpp:20070](https://github.com/llvm/llvm-project/blob/1141fd0bf847b54d9b12c3a0aff093c02792e4de/clang/lib/Sema/SemaDecl.cpp#L20070), if it discards something, I cannot pass the original `Elements` to `computeEnumBits`.
https://github.com/llvm/llvm-project/pull/115005
More information about the cfe-commits
mailing list