[LLVMbugs] [Bug 16836] New: [-cxx-abi microsoft] __uuidof inside of a template argument cannot be mangled

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Aug 8 04:29:40 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=16836

            Bug ID: 16836
           Summary: [-cxx-abi microsoft] __uuidof inside of a template
                    argument cannot be mangled
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: david.majnemer at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

__uuidof mangling is quite special, consider the following:

typedef struct _GUID
{
    unsigned long  Data1;
    unsigned short Data2;
    unsigned short Data3;
    unsigned char  Data4[8];
} GUID;
struct __declspec(uuid("12345678-1234-1234-1234-123456789abC")) uuid;
template <const _GUID&>
struct bar {
};
bar<__uuidof(uuid)> x;

this should be mangled like such:
?x@@3U?$bar@$E?_GUID_12345678_1234_1234_1234_123456789abc@@3U__s_GUID@@B@@A

Essentially, this has to be handled as-if we had:

struct __s_GUID _GUID_12345678_1234_1234_1234_123456789abc;

There is a pretty obvious problem, what is __s_GUID? It doesn't exist in any
AST. Heck, it's technically the flat-out wrong type, we should be looking at a
_GUID.

-- 
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/20130808/025cdcab/attachment.html>


More information about the llvm-bugs mailing list