<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - LLVM's Itanium demangler can't unmangle manglings produced by P0428R2"
   href="https://bugs.llvm.org/show_bug.cgi?id=43213">43213</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LLVM's Itanium demangler can't unmangle manglings produced by P0428R2
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libc++abi
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>nicolasweber@gmx.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre><a href="https://reviews.llvm.org/D36527">https://reviews.llvm.org/D36527</a> added Ty, Tn, Tt to mangleTemplateParamDecl()
for explicit lambda template parameters.


Consider this program:

$ cat test.cc
template <typename F> void visit(F &&f, int v) { return f(v); }

template <typename F> void visitMatrix(F &&f, int matrix) {
  visit([&f](auto &mat) { return f(mat); }, matrix);
}

void myfun() {
  visitMatrix([](auto& mat) {}, 15);
}


Before that patch, `clang -c test.cc -std=c++17 -S -emit-llvm -o test.ll`
produced the name `_ZZ11visitMatrixIZ5myfunvE3$_0EvOT_iENKUlRS1_E_clIiEEDaS3_`
for the lambda in the 2nd function.

After that patch, it produces
`_ZZ11visitMatrixIZ5myfunvE3$_0EvOT_iENKUlTyRS1_E_clIiEEDaS3_` which
llvm-c++filt can't unmangle.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>