================
@@ -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
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits