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

    <tr>
        <th>Summary</th>
        <td>
            error: cannot yet mangle expression type TypeTraitExpr after 4b163e343c
        </td>
    </tr>

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

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

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

<pre>
    In HEAD I get the following error on any file that includes `<memory>`.

```
In file included from /home/danakj/s/subspace/third_party/fmt/src/format.cc:8:
In file included from /home/danakj/s/subspace/third_party/fmt/include/fmt/format-inl.h:25:
In file included from /home/danakj/s/subspace/third_party/fmt/include/fmt/format.h:41:
In file included from /usr/include/c++/12/memory:72:
In file included from /usr/include/c++/12/bits/align.h:35:
/usr/include/c++/12/bit:84:10: error: cannot yet mangle expression type TypeTraitExpr
   84 |       && __is_trivially_copyable(_To) && __is_trivially_copyable(_From)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12/bit:84:42: error: cannot yet mangle expression type TypeTraitExpr
   84 |       && __is_trivially_copyable(_To) && __is_trivially_copyable(_From)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
```

I bisected to this:
```
commit 4b163e343cfa54c8d55c9da73c70d58f55ea9df2
Author: Richard Smith <richard@metafoo.co.uk>
Date:   Tue Sep 12 18:53:54 2023 -0700

 Implement mangling rules for C++20 concepts and requires-expressions.
 
    This implements proposals from:
    
    - https://github.com/itanium-cxx-abi/cxx-abi/issues/24: mangling for
 constraints, requires-clauses, requires-expressions.
    - https://github.com/itanium-cxx-abi/cxx-abi/issues/31: requires-clauses and
      template parameters in a lambda expression are mangled into the <lambda-sig>.
    - https://github.com/itanium-cxx-abi/cxx-abi/issues/47 (STEP 3): mangling for
      template argument is prefixed by mangling of template parameter declaration
      if it's not "obvious", for example because the template parameter is
      constrained (we already implemented STEP 1 and STEP 2).
```

@zygoloid 

Note that I did need to cherrypick `4af62db053413ea0b01e59adbd51677c5665328b` and `1aadd4766e97b80ba8e907e26603150c1238cf35` on top to make clang work at all.

This was mentioned in https://github.com/llvm/llvm-project/issues/66938 as well.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzcVk1v4zYT_jX0ZWCDIvVhHXzwJjHeXF4U3dyDETmyuaFIlaQ2cQ_97QVlJ07QdLvYDXqoIMsUJc7HM888IsZo9o5ow6pPrLpe4JQOPmw0Onz4sui8Pm5uHfzvZnsNt7CnBOlA0Htr_aNxe6AQfADvAN0RemMJ0gETGKfspCkCqzmTVwMNPhyZvGE1XzF-zfj2fK35-Zxvb93Jxnm5hj74AZjYHfxATOxOUTGxi_k3dXFElefTwQR9P2JIRyZ2_ZDy46Dy2IcB00opJrdrJrcf7-ds4-X-5HFpnF0dmNyK6l_0Onssi3_2OMXwxohi4tN87grBxO65XttG_LStzqScD1qzd3N88oLId63OlSuZ3Bacye2JcHmg0Dmf4EgJBnR7S0BPY6AYjXeQjiPB3XGku4Am3TyN4eQQANYlsOYKTgcTNRM13N-beJ-C-WrQ2uO98uMRO0tMrO_vPBPtd7y3C35gon1xk403V8Cqmz_-_vgBFErxn0PhGQdxSivCnhwFTKRX76rEmY_QmUgqkYbkIR1MvNDq7fvKD4NJUHZFLUmWUvVYlWqtq0q1GhupGq6rdV9VhK3uxWnRdtbBDPGvRh0waPg8mHQAJq_CaYKVfKCEvfcr5VfTQ5a3eek1JsoLAe4mgs80QiGgyOpTyXwpQXAhYckb_iYjuB1GSwO5cy2zvobJUoTeB7g6UUJwUN4pGlMEdBoC_TaZQHF5qXs8wwaXMtwdTATzbD7CGPzoI9o4d_ELcHO9XkZLOKQ0zrCKHRO7vUmHqVupXOKdSejMNCzV09MSO5M5-zIyMU6Um15kxl6S6f0zAZV3MQU0LmvD1SUJZXGK9HbuncQ-JDiZdfIvrjOor-mbaBgtJo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