Skip to content

Commit b226506

Browse files
Update checkassert.cpp
1 parent dfcec18 commit b226506

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

lib/checkassert.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ void CheckAssertImpl::assertWithSideEffects()
7878
continue;
7979
}
8080

81+
const Token* parent = tmp->astParent();
82+
while (Token::Match(parent, ".|::"))
83+
parent = parent->astParent();
84+
if (!Token::simpleMatch(parent, "("))
85+
continue;
8186
const Function* f = tmp->function();
8287
const Scope* scope = f->functionScope;
8388
if (!scope) {

0 commit comments

Comments
 (0)