[LLVMbugs] [Bug 12497] New: protected destructor is considered to be inaccessible
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Apr 8 10:44:14 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=12497
Bug #: 12497
Summary: protected destructor is considered to be inaccessible
Product: clang
Version: trunk
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: C++11
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: jonathan.sauer at gmx.de
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu,
rjmccall at apple.com
Classification: Unclassified
The following code does not compile with clang r154288:
class Foo {
protected:
Foo() {}
~Foo() {}
};
class Bar: public Foo {
public:
Bar() {}
};
int main(int, char**)
{
Bar b;
}
$ $ ~/LLVM/build/Release+Asserts/bin/clang -std=c++11 -v clang.cpp
clang version 3.1 (trunk 154288)
Target: x86_64-apple-darwin10.8.0
Thread model: posix
[...]
clang.cpp:14:9: error: attempt to use a deleted function
Bar b;
^
clang.cpp:7:12: note: destructor of 'Bar' is implicitly deleted because base
class 'Foo' has an
inaccessible destructor
class Bar: public Foo {
^
1 error generated.
This only happens in C++11 mode. In C++03 mode, the code compiles.
cc-ing John McCall, as this might be a result of his changes in r154248.
--
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