We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c6f7fce commit f65dd76Copy full SHA for f65dd76
1 file changed
lib/checkassert.cpp
@@ -80,12 +80,8 @@ void CheckAssertImpl::assertWithSideEffects()
80
81
const Function* f = tmp->function();
82
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
+ if (!scope)
87
continue;
88
- }
89
90
for (const Token *tok2 = scope->bodyStart; tok2 != scope->bodyEnd; tok2 = tok2->next()) {
91
if (!tok2->isAssignmentOp() && tok2->tokType() != Token::eIncDecOp)
0 commit comments