From bc05ee62d58136797b55a45c2381d0e1e289fde7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Mon, 5 Apr 2021 05:17:29 +0200 Subject: [PATCH] CheckFunctions::checkIgnoredReturnValue; Fixed testrunner --- lib/checkfunctions.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/checkfunctions.cpp b/lib/checkfunctions.cpp index 68e29418e..7a410f1b0 100644 --- a/lib/checkfunctions.cpp +++ b/lib/checkfunctions.cpp @@ -205,8 +205,11 @@ void CheckFunctions::checkIgnoredReturnValue() continue; const Token *parent = tok->next()->astParent(); - while (Token::Match(parent, "%cop%")) + while (Token::Match(parent, "%cop%")) { + if (Token::Match(parent, "<<|>>") && !parent->astParent()) + break; parent = parent->astParent(); + } if (parent) continue;