For the following example:
struct Base { int x; }; // In a different translation unit struct Derived : public Base { Derived() {} };
For a call to Derived::Derived(), we'll receive a note that this->x is uninitialized. Since x is not a direct field of Derived, it could be a little confusing. This patch aims to fix this, as well as the case when the derived object has a field that has the name as an inherited uninitialized data member:
struct Base { int x; // note: uninitialized field 'this->Base::x' }; struct Derived : public Base { int x = 5; Derived() {} };
This patch is also meant as a conversation starter, as the way base classes were handled has been long debated.
Maybe just BaseClassT->getAsCXXRecordDecl()->getName()?