[cfe-commits] r58866 - in /cfe/trunk: include/clang/AST/DeclBase.h include/clang/Basic/DiagnosticKinds.def lib/Parse/ParseDecl.cpp lib/Sema/SemaDecl.cpp test/SemaCXX/destructor.cpp
Sebastian Redl
sebastian.redl at getdesigned.at
Tue Nov 11 15:19:32 PST 2008
Argiris Kirtzidis wrote:
> Douglas Gregor wrote:
>
>> Destructors aren't found by name lookup, so the IdentifierResolver
>> never needs to see them. Same thing with conversion functions and
>> constructors.
>>
>
> gcc compiles:
>
> class C : public B {
> void m() {
> this->~B();
> }
> };
>
> Is this incorrect code ?
>
Yes, according to 5.2.4p2: "The type designated by the
pseudo-destructor-name shall be the same as the object type."
Sebastian
More information about the cfe-commits
mailing list