Skip to content

Commit f65dd76

Browse files
committed
fix
1 parent c6f7fce commit f65dd76

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

lib/checkassert.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,8 @@ void CheckAssertImpl::assertWithSideEffects()
8080

8181
const Function* f = tmp->function();
8282
const Scope* scope = f->functionScope;
83-
if (!scope) {
84-
// guess that const method doesn't have side effects
85-
if (f->nestedIn->isClassOrStruct() && !f->isConst() && !f->isStatic())
86-
sideEffectInAssertError(tmp, f->name()); // Non-const member function called, assume it has side effects
83+
if (!scope)
8784
continue;
88-
}
8985

9086
for (const Token *tok2 = scope->bodyStart; tok2 != scope->bodyEnd; tok2 = tok2->next()) {
9187
if (!tok2->isAssignmentOp() && tok2->tokType() != Token::eIncDecOp)

0 commit comments

Comments
 (0)