-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
Description
| Bugzilla Link | 9050 |
| Resolution | FIXED |
| Resolved on | Feb 01, 2011 09:53 |
| Version | trunk |
| OS | Linux |
| Reporter | LLVM Bugzilla Contributor |
| CC | @DougGregor |
Extended Description
clang version 2.9 (trunk 123315)
Target: i386-pc-linux-gnu
% cat test.cc
class a
{
public:
void killme() const
{
delete this;
}
protected:
~a()
{
}
};
int main()
{
const a* x = new a;
delete x;
}
% clang++ -Wall -W test.cc
%
clang++ seems to ignore that "protected:" specifier.
Here is the output from g++, for comparison:
% g++ -Wall -W test.cc
test.cc: In function ‘int main()’:
test.cc:10: error: ‘a::~a()’ is protected
test.cc:19: error: within this context