[LLVMbugs] [Bug 16913] New: Warning for failure to initialize base class constructor

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Aug 16 05:50:42 PDT 2013


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

            Bug ID: 16913
           Summary: Warning for failure to initialize base class
                    constructor
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: aaron at aaronballman.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 11049
  --> http://llvm.org/bugs/attachment.cgi?id=11049&action=edit
Test file

It would be nice to have a warning when an interesting base class constructor
is available, but not initialized by the derived class constructor.

struct B {
  B() : i(0) {}

private:
  int i;
};

struct C : B {
  C() {}  // Warning here about not initiaizing base class would be nice.
};

int main() {
  C *c = new C;
  return 0;
}

c:\official-llvm\build>clang -fsyntax-only "C:\Users\Aaron
Ballman\Desktop\test.
cpp"

c:\official-llvm\build>

-- 
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/20130816/b3f35658/attachment.html>


More information about the llvm-bugs mailing list