http://llvm.org/bugs/show_bug.cgi?id=12508

             Bug #: 12508
           Summary: clang fails to consider inheritance-path access
                    control for implicit calls to special members of
                    virtual bases
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified


clang needs to be considering whether the inheritance path to a virtual base
constrains access when checking implicit calls to special members in the
following cases:
  - when deciding whether or not to define an implicit member as deleted (in
C++11)
  - when initializing a base-class subobject in a ctor
  - when checking access to subobject destructors in a ctor/dtor

As examples, I believe each of the following cases is ill-formed:
  struct A {
    A(); A(const A&); ~A();
  };
  class B : private virtual A {};

  class C : public B {
    C() : A() {} // explicit base init, implicit base destroy
    C(int) {} // implicit base init, implicit base destroy
    ~C() {} // implicit base destroy
  };

  class D {
    // In C++11, the implicit dtor, default ctor, and copy ctor here should all
be defined as deleted
  };

It looks like we currently get the explicit base-init case right, but not the
others.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- 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