[PATCH] D37308: Interface class with uuid base record

Zahira Ammarguellat via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 13 15:23:45 PDT 2017


zahiraam added a comment.

MSVC and xmain compile this:
struct __declspec(uuid("00000000-0000-0000-C000-000000000046")) IUnknown {};
struct PageBase : public IUnknown {};
struct Page3 : public PageBase {};
struct Page4 : public PageBase {};
__interface PropertyPage : public Page4 {};

But MSVC doesn't compile this:

struct __declspec(uuid("00000000-0000-0000-C000-000000000046")) IUnknown {};
struct PageBase : public IUnknown {};
struct Page3 : public PageBase {};
struct Page4 : public PageBase {};
struct Page5 : public Page3, Page4{};
__interface PropertyPage : public Page5 {};

So a base of RD that has siblings and inherits from a Unknown is not permitted. 
Which means that if the number is siblings are greater than one, we should fail. I guess the current function doesn't take that into account.


https://reviews.llvm.org/D37308





More information about the cfe-commits mailing list