[LLVMbugs] [Bug 23411] New: Clang accepts invalid covariant override
    bugzilla-daemon at llvm.org 
    bugzilla-daemon at llvm.org
       
    Mon May  4 14:47:22 PDT 2015
    
    
  
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: unassignedclangbugs at nondot.org
          Reporter: david.majnemer at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150504/a264bcfb/attachment.html>
    
    
More information about the llvm-bugs
mailing list