<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/64430>64430</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Missing or incorrect debug infos for placeholder variables (P2169) 
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            debuginfo,
            c++26
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          cor3ntin
      </td>
    </tr>
</table>

<pre>
    We added support for [P2169](https://wg21.link/P2169) ( placeholder with no name) https://reviews.llvm.org/D153536
However, this lacks debugger support and it would be nice to improve the situation before Clang 18.

In some cases the dwarf information does not contain the information for multiple placeholder, or they are reported at the same offset.

```cpp
struct t1 {
  int _;
  int _;
};
t1 v1;
```

```
0x0000002e:   DW_TAG_structure_type
 DW_AT_calling_convention        (DW_CC_pass_by_value)
 DW_AT_name      ("t1")
                DW_AT_byte_size (0x08)
 DW_AT_decl_file ("/usr/local/google/home/blaikie/dev/scratch/unused_member.cpp")
 DW_AT_decl_line (1)

0x00000034:     DW_TAG_member
 DW_AT_name    ("_")
                  DW_AT_type    (0x00000047 "int")
                  DW_AT_decl_file ("/usr/local/google/home/blaikie/dev/scratch/unused_member.cpp")
 DW_AT_decl_line       (2)
 DW_AT_data_member_location    (0x00)

0x0000003d:     DW_TAG_member
 DW_AT_name    ("_")
                  DW_AT_type (0x00000047 "int")
                  DW_AT_decl_file ("/usr/local/google/home/blaikie/dev/scratch/unused_member.cpp")
 DW_AT_decl_line       (2) 
 DW_AT_data_member_location    (0x00)  
```

The third `DW_AT_decl_line` should be 3, not 2.

When this is fixed, we should update the release notes of clang which currently mention this deficiency 

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzUVU2PqzYU_TVmc_UiMB9JFixmEtF2UamLJ2WJjH0Bd4yNbEMm_fWVIckk0_ee2kVV1YoC2PfL516dw5yTnUYsSf5K8mPEJt8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