[llvm-bugs] [Bug 39881] New: [Windows] __uuidof in a template parameter issue with MSVC abi
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Dec 4 16:23:30 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=39881
Bug ID: 39881
Summary: [Windows] __uuidof in a template parameter issue with
MSVC abi
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: mike.winterberg at gmail.com
CC: blitzrakete at gmail.com, dgregor at apple.com,
erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at metafoo.co.uk
Between r345380 and r346630 (likely, in r345692), in C++17 mode passing
__uuidof(X) to a template parameter started failing with the error "cannot yet
mangle expression type ConstantExpr" if the target is i386-pc-windows or
amd64-pc-windows.
Compiling this code:
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 baz {
};
baz<&__uuidof(uuid)> y;
as -std=c++17 -fms-extensions -target amd64-pc-windows results in this error:
uuidof.cc:12:5: error: cannot yet mangle expression type ConstantExpr
CE link just to show the effect of different flags:
https://gcc.godbolt.org/z/PXV4rO
--
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/20181205/ba5dd314/attachment.html>
More information about the llvm-bugs
mailing list