diff --git a/lib/checkassert.cpp b/lib/checkassert.cpp index 523963e1e18..3ed3ae12aa7 100644 --- a/lib/checkassert.cpp +++ b/lib/checkassert.cpp @@ -70,6 +70,9 @@ void CheckAssert::assertWithSideEffects() continue; if (tmp->str() == "get" && Token::simpleMatch(tmp->astParent(), ".") && astIsSmartPointer(tmp->astParent()->astOperand1())) continue; + if (f->containerYield == Library::Container::Yield::START_ITERATOR || // bailout for std::begin/end + f->containerYield == Library::Container::Yield::END_ITERATOR) + continue; sideEffectInAssertError(tmp, mSettings->library.getFunctionName(tmp)); } continue;