[Lldb-commits] [clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Fri Jan 31 11:57:46 PST 2025
================
@@ -2367,11 +2369,36 @@ size_t DWARFASTParserClang::ParseChildEnumerators(
}
if (name && name[0] && got_value) {
- m_ast.AddEnumerationValueToEnumerationType(
+ auto ECD = m_ast.AddEnumerationValueToEnumerationType(
----------------
Michael137 wrote:
> Mostly I'm just not sure if it's a problem or not that ASTContext.h contains a definition of a function.
Well if it's a template that has to be where it lives. Unless the Clang maintainers find a way to pass the iterator/arrayref as a non-template parameter I think this is fine
> isRepresentableIntegerValue is a static function in SemaDecl.cpp, I'd rather not move somewhere else as well, since it's not needed on LLDB side anyway
Yea I think that's also fine. If it's a private helper on `ASTContext`, I don't see that being a big deal. Especially because that doesn't need to be defined in the header.
> 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?
https://github.com/llvm/llvm-project/pull/115005
More information about the lldb-commits
mailing list