[llvm-bugs] [Bug 39294] New: Add mangling for TypeTraitExpr expressions

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Oct 15 06:24:09 PDT 2018


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

            Bug ID: 39294
           Summary: Add mangling for TypeTraitExpr expressions
           Product: clang
           Version: 7.0
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: bugmail.llvm at staktrace.com
                CC: llvm-bugs at lists.llvm.org

We have a clang plugin that at some point tries to get mangled names for
various C++ elements from the clang AST [1]. It uses the ItaniumMangle context
[2]. The plugin is loaded into clang-cl.exe RELEASE_700 and run on the
mozilla-central codebase, but it fails with an error on a particular file in
the Windows SDK. The error is this:

z:\task_1539529064\build\src\vs2017_15.8.4\SDK\Include\10.0.17134.0\winrt\wrl/client.h(205,63):
 error: cannot yet mangle expression type TypeTraitExpr
    ComPtr(const ComPtr<U> &other, typename
Details::EnableIf<__is_convertible_to(U*, T*), void *>::type * = 0) throw() :
                                                             
^~~~~~~~~~~~~~~~~~~~~~~~~~~

Is it possible to add mangling support for TypeTraitExpr?

Note: I haven't tried this using trunk clang since the setup to reproduce this
is rather involved, but the ItaniumMangle.cpp code that generates this error
looks like it still does so when encountering Expr::TypeTraitExprClass so I
presume that the error still occurs on clang trunk.

Also the above error comes from mozilla's CI infrastructure; when I tried
reproducing the error in a local setup it didn't reproduce, likely due to
slight environment differences that I haven't been able to pin down. I figured
I should file this anyway since the code in ItaniumMangle.cpp clearly says
"FIXME: invent manglings for all these" above the case expressions, and so it
seems like something that wasn't implemented because nobody ran into it yet. If
you need me to try harder to produce a reproducible case let me know and I can
try that.

[1]
https://searchfox.org/mozilla-central/rev/3a54520d8d2319a4116866371ed3d9ed2ec0cc2b/build/clang-plugin/mozsearch-plugin/MozsearchIndexer.cpp#367,372
[2]
https://searchfox.org/mozilla-central/rev/3a54520d8d2319a4116866371ed3d9ed2ec0cc2b/build/clang-plugin/mozsearch-plugin/MozsearchIndexer.cpp#458

-- 
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/20181015/28b00acf/attachment.html>


More information about the llvm-bugs mailing list