Skip to content

Commit

Permalink
Fix FP uselessOverride
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Jun 30, 2023
1 parent 24426ee commit d64aef2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/symboldatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4388,13 +4388,13 @@ const Function * Function::getOverriddenFunctionRecursive(const ::Type* baseType
auto range = parent->functionMap.equal_range(tokenDef->str());
for (std::multimap<std::string, const Function*>::const_iterator it = range.first; it != range.second; ++it) {
const Function * func = it->second;
if (func->hasVirtualSpecifier()) { // Base is virtual and of same name
if (func->isImplicitlyVirtual()) { // Base is virtual and of same name
const Token *temp1 = func->tokenDef->previous();
const Token *temp2 = tokenDef->previous();
bool match = true;

// check for matching return parameters
while (temp1->str() != "virtual") {
while (!Token::Match(temp1, "virtual|{|}|;")) {
if (temp1->str() != temp2->str() &&
!(temp1->str() == derivedFromType->name() &&
temp2->str() == baseType->name())) {
Expand Down

0 comments on commit d64aef2

Please sign in to comment.