Virtual Destructors : pattern for declaring a derived class... "class %var% : public|protected|private %var% .."
This commit is contained in:
parent
984cd47aac
commit
b560215bc6
|
@ -670,11 +670,11 @@ void CheckClass::CheckOperatorEq1()
|
||||||
|
|
||||||
void CheckClass::virtualDestructor()
|
void CheckClass::virtualDestructor()
|
||||||
{
|
{
|
||||||
const TOKEN *derived = TOKEN::findmatch(_tokenizer->tokens(), "class %var% : public %var%");
|
const TOKEN *derived = TOKEN::findmatch(_tokenizer->tokens(), "class %var% : public|protected|private %var%");
|
||||||
while (derived)
|
while (derived)
|
||||||
{
|
{
|
||||||
// Iterate through each base class...
|
// Iterate through each base class...
|
||||||
for ( derived = derived->tokAt(3); TOKEN::Match(derived, "public %var%"); derived = derived->tokAt(3) )
|
for ( derived = derived->tokAt(3); TOKEN::Match(derived, "public|protected|private %var%"); derived = derived->tokAt(3) )
|
||||||
{
|
{
|
||||||
// Name of base class..
|
// Name of base class..
|
||||||
const char *baseName[2];
|
const char *baseName[2];
|
||||||
|
|
Loading…
Reference in New Issue