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

            Bug ID: 36569
           Summary: No warning when inherited types are reordered
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangb...@nondot.org
          Reporter: d...@znu.io
                CC: dgre...@apple.com, llvm-bugs@lists.llvm.org

The code below causes the compiler to silently reorder the types inherited by
'Fob'. I wish the compiler emitted a warning when this was happening.

class Foo {
    int a, b, c;
};

class Bar {
    int j, k, l;
public:
    virtual ~Bar();
};

class Fob : public Foo, public Bar { // Foo and Bar are swapped in the LLVM IR.
    int x, y, z;
};

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to