From 5c3474ec5cefbf94832551e8626e36e02e580747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 23 May 2020 07:30:05 +0200 Subject: [PATCH] Renamed hasReturnFunction to hasNoreturFunction --- lib/astutils.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/astutils.cpp b/lib/astutils.cpp index 7662a4c1a..39ea80259 100644 --- a/lib/astutils.cpp +++ b/lib/astutils.cpp @@ -1085,7 +1085,7 @@ bool isEscapeFunction(const Token* ftok, const Library* library) return false; } -static bool hasReturnFunction(const Token* tok, const Library* library, const Token** unknownFunc) +static bool hasNoreturnFunction(const Token* tok, const Library* library, const Token** unknownFunc) { if (!tok) return false; @@ -1108,7 +1108,7 @@ static bool hasReturnFunction(const Token* tok, const Library* library, const To *unknownFunc = ftok; return false; } else if (tok->isConstOp()) { - return hasReturnFunction(tok->astOperand1(), library, unknownFunc) || hasReturnFunction(tok->astOperand2(), library, unknownFunc); + return hasNoreturnFunction(tok->astOperand1(), library, unknownFunc) || hasNoreturnFunction(tok->astOperand2(), library, unknownFunc); } return false; @@ -1139,7 +1139,7 @@ bool isReturnScope(const Token* const endToken, const Library* library, const To if (Token::Match(prev->link()->previous(), "[;{}] {")) return isReturnScope(prev, library, unknownFunc, functionScope); } else if (Token::simpleMatch(prev, ";")) { - if (prev->tokAt(-2) && hasReturnFunction(prev->tokAt(-2)->astTop(), library, unknownFunc)) + if (prev->tokAt(-2) && hasNoreturnFunction(prev->tokAt(-2)->astTop(), library, unknownFunc)) return true; // Unknown symbol if (Token::Match(prev->tokAt(-2), ";|}|{ %name% ;") && prev->previous()->isIncompleteVar()) {