[LLVMbugs] [Bug 9238] New: overzealous virtual destructor warning due to virtual inheritance
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Feb 16 16:55:40 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=9238
Summary: overzealous virtual destructor warning due to virtual
inheritance
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: nlewycky at google.com
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
This program:
class B { public: ~B(); };
class C : virtual B { public: ~C() { } };
is actually fine (I think), but it triggers the clang warning about virtual
destructors:
$ llvm/Debug+Asserts/bin/clang -Wnon-virtual-dtor v.cc -fsyntax-only
v.cc:2:31: warning: 'C' has virtual functions but non-virtual destructor
[-Wnon-virtual-dtor]
class C : virtual B { public: ~C() { } };
^
1 warning generated.
I don't think that's correct in this case.
--
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.
More information about the llvm-bugs
mailing list