[llvm-bugs] [Bug 43213] New: LLVM's Itanium demangler can't unmangle manglings produced by P0428R2

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Sep 3 12:32:10 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=43213

            Bug ID: 43213
           Summary: LLVM's Itanium demangler can't unmangle manglings
                    produced by P0428R2
           Product: libc++abi
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: nicolasweber at gmx.de
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com

https://reviews.llvm.org/D36527 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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190903/1f6ad257/attachment-0001.html>


More information about the llvm-bugs mailing list