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: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected],
[email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs