Skip to content

Commit

Permalink
Refined entity query at method def lookup to avoid finding types (#683)
Browse files Browse the repository at this point in the history
  • Loading branch information
Seeker04 committed Apr 13, 2024
1 parent 22794ff commit fca32b9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions plugins/cpp_metrics/parser/src/cppmetricsparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ void CppMetricsParser::typeMcCabe()
// Lookup the definition (different AST node if not defined in class body)
const auto methodDef = _ctx.db->query_one<AstNode>(
odb::query<AstNode>::entityHash == methodAstNode->entityHash &&
odb::query<AstNode>::symbolType == AstNode::SymbolType::Function &&
odb::query<AstNode>::astType == AstNode::AstType::Definition);
if (!methodDef)
continue;
Expand Down

0 comments on commit fca32b9

Please sign in to comment.