[cfe-dev] DeclarationName for C++ destructor
章磊
ioripolo at gmail.com
Mon Oct 10 20:40:47 PDT 2011
Hi clang,
After read some code relevant to DeclarationName, i have a little
problem about it.
For some C++ destructor(compile generated?), the base class (have some
virtual member) destructor and the derived class destructor have the
same DeclarationName.
Examples:
class base {
virtual void foo() const {}
};
class child: public base {
void foo() {}
};
if i use LookupPtr to find declarations in the base class with the
derived class destructor's DeclarationName, i will get the base class
destructor. Is this expected? If so, what does this for?
--
Best regards!
Lei Zhang
More information about the cfe-dev
mailing list