[LLVMbugs] [Bug 16911] New: __uuidof should leak through templated types
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Aug 16 01:44:51 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=16911
Bug ID: 16911
Summary: __uuidof should leak through templated types
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: david.majnemer at gmail.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
consider:
struct __declspec(uuid("{12345678-1234-1234-1234-1234567890aB}")) uuid;
template <typename T>
struct thing {
};
const struct _GUID *x = &__uuidof(thing<uuid>);
We reject this because thing has no uuid declspec. However, the "appropriate"
thing to do is to actually imbue 'thing' instantiated with 'uuid' with the
declspec on 'uuid'.
However, the following is invalid and must be rejected:
struct __declspec(uuid("{12345678-1234-1234-1234-1234567890aB}")) uuid;
struct __declspec(uuid("{22345678-1234-1234-1234-1234567890aB}")) uuid2;
template <typename T, typename T2>
struct thing {
};
const struct _GUID *x = __uuidof(thing<uuid, uuid2>);
MSVC raises:
"more than one GUID associated with this object"
BUT, the following is OK:
struct __declspec(uuid("{12345678-1234-1234-1234-1234567890aB}")) uuid;
template <typename T, typename T2>
struct thing {
};
const struct _GUID *x = __uuidof(thing<uuid, uuid>);
--
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/20130816/24fc03bc/attachment.html>
More information about the llvm-bugs
mailing list