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

            Bug ID: 23411
           Summary: Clang accepts invalid covariant override
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

consider:
struct W {};
struct X : W {};
struct Y : W {};
struct Z : X, Y {};

struct A {
  virtual W *f();
};
struct B : virtual A {
  virtual X *f();
};
struct C : virtual A {
  virtual Y *f();
};
struct D : B, C {
  virtual Z *f();
};

this is invalid because D::f returns a pointer to Z.  'W' is not an unambiguous
indirect base of 'Z' which makes this invalid.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to