@@ -1046,22 +1046,20 @@ void CheckMemoryLeakNoVarImpl::checkForUnreleasedInputArgument(const Scope *scop
10461046 const AllocType alloc = getAllocationType (arg, 0 );
10471047 if (alloc == No)
10481048 continue ;
1049- else {
1050- const Token* typeTok = arg->next ();
1051- bool bail = !typeTok->isStandardType () &&
1052- (!typeTok->valueType () ||
1053- (typeTok->valueType ()->type < ValueType::Type::SMART_POINTER &&
1054- typeTok->valueType ()->type != ValueType::Type::POD )) &&
1055- !mSettings .library .detectContainerOrIterator (typeTok) &&
1056- !mSettings .library .podtype (typeTok->expressionString ());
1057- if (bail && typeTok->type () && typeTok->type ()->classScope &&
1058- typeTok->type ()->classScope ->numConstructors == 0 &&
1059- typeTok->type ()->classScope ->getDestructor () == nullptr ) {
1060- bail = false ;
1061- }
1062- if (bail)
1063- continue ;
1049+ const Token* typeTok = arg->next ();
1050+ bool bail = !typeTok->isStandardType () &&
1051+ (!typeTok->valueType () ||
1052+ (typeTok->valueType ()->type < ValueType::Type::SMART_POINTER &&
1053+ typeTok->valueType ()->type != ValueType::Type::POD )) &&
1054+ !mSettings .library .detectContainerOrIterator (typeTok) &&
1055+ !mSettings .library .podtype (typeTok->expressionString ());
1056+ if (bail && typeTok->type () && typeTok->type ()->classScope &&
1057+ typeTok->type ()->classScope ->numConstructors == 0 &&
1058+ typeTok->type ()->classScope ->getDestructor () == nullptr ) {
1059+ bail = false ;
10641060 }
1061+ if (bail)
1062+ continue ;
10651063 if (isReopenStandardStream (arg))
10661064 continue ;
10671065 if (tok->function ()) {
0 commit comments