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

    <tr>
        <th>Summary</th>
        <td>
            Checking whether clang++ supports C++17 features failed
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    Here is a case generated when I compiled an application called moose with LLVM at the stage of configure, more specifically, Checking whether clang++ supports C++17 features. I extracted the codes raised the error.
```
//test.cpp
#include <initializer_list>
#include <utility>
#include <type_traits>

namespace test_structured_bindings
  {

    int arr[2] = { 1, 2 };
    std::pair<int, int> pr = { 1, 2 };

    auto f1() -> int(&)[2]
    {
      return arr;
    }

    auto f2() -> std::pair<int, int>&
    {
      return pr;
    }

    struct S
    {
      int x1 : 2;
      volatile double y1;
    };

    S f3()
    {
      return {};
    }

    auto [ x1, y1 ] = f1();
    auto& [ xr1, yr1 ] = f1();
    auto [ x2, y2 ] = f2();
    auto& [ xr2, yr2 ] = f2();
    const auto [ x3, y3 ] = f3();

  }

```
###  step to reproduce the error
**For debug version**

> clang++ -c -std=gnu++17 -g test.cpp

**For Release Version**

> clang++ -S -std=gnu++17 -g -emit-llvm -o test.ll

> opt -verify test.ll

```
test.ll:1268:175: error: missing required field 'name'
!140 = distinct !DIGlobalVariable(linkageName: "_ZN5cxx1724test_structured_bindingsDC2x12y1EE", scope: !81, file: !4, line: 742, type: !82, isLocal: false, isDefinition: true)
```

**Note** : the LLVM release version enables option  `-disable-llvm-verifier`, thus bypassing the verification of IR. However, the problem still exists.




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