[Lldb-commits] [lldb] [lldb][DWARFASTParserClang] Handle pointer-to-member-data non-type template (PR #187598)
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Mon Mar 23 10:52:56 PDT 2026
================
@@ -2115,6 +2191,19 @@ bool DWARFASTParserClang::ParseTemplateDIE(
if (tag == DW_TAG_template_value_parameter && uval64_valid) {
if (auto value = MakeAPValue(ast, clang_type, uval64)) {
+ // For pointer-to-member types, try to resolve to the actual FieldDecl
+ if (clang_type.IsMemberDataPointerType()) {
+ if (auto *field =
+ ResolveMemberDataPointerToFieldDecl(die, uval64)) {
+ template_param_infos.InsertArg(
+ name, clang::TemplateArgument(
+ field, ClangUtil::GetQualType(clang_type),
+ is_default_template_arg));
+ return true;
+ }
+ // Failed to resolve FieldDecl, fall through to integer path
----------------
clayborg wrote:
There will probably be issues if using the expression parser on a template if we don't make a field decl and just left it as a integer value. We should stay as true as possible to what the compiler expects to avoid possible expression parser errors IMHO.
https://github.com/llvm/llvm-project/pull/187598
More information about the lldb-commits
mailing list