Virtual destructor : minor fix to avoid false positives when more modifiers are used
This commit is contained in:
parent
02f3196b24
commit
ddd20a2977
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* c++check - c/c++ syntax checking
|
||||
* Copyright (C) 2007 Daniel Marjamäki
|
||||
*
|
||||
|
@ -718,6 +718,9 @@ void CheckClass::virtualDestructor()
|
|||
while (TOKEN::Match(base, "::"))
|
||||
base = TOKEN::findmatch(base->next(), "%any% ~ %var1% (", baseName);
|
||||
|
||||
while (TOKEN::Match(base, "%var%") && !TOKEN::Match(base, "virtual"))
|
||||
base = base->previous();
|
||||
|
||||
// Check that there is a destructor..
|
||||
if ( ! base )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue