File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -244,11 +244,19 @@ void CheckClass::constructors()
244244 if (!var.isPointer () && !var.isPointerArray () && var.isClass () && func.type == FunctionType::eConstructor) {
245245 // Unknown type so assume it is initialized
246246 if (!var.type ()) {
247- if (var.isStlType () && var.valueType () && var.valueType ()->containerTypeToken && var.getTypeName () == " std::array" ) {
248- const Token* ctt = var.valueType ()->containerTypeToken ;
249- if (!ctt->isStandardType () &&
250- (!ctt->type () || ctt->type ()->needInitialization != Type::NeedInitialization::True) &&
251- !mSettings ->library .podtype (ctt->str ())) // TODO: handle complex type expression
247+ if (var.isStlType () && var.valueType () && var.valueType ()->containerTypeToken ) {
248+ if (var.valueType ()->type == ValueType::Type::ITERATOR)
249+ {
250+ // needs initialization
251+ }
252+ else if (var.getTypeName () == " std::array" ) {
253+ const Token* ctt = var.valueType ()->containerTypeToken ;
254+ if (!ctt->isStandardType () &&
255+ (!ctt->type () || ctt->type ()->needInitialization != Type::NeedInitialization::True) &&
256+ !mSettings ->library .podtype (ctt->str ())) // TODO: handle complex type expression
257+ continue ;
258+ }
259+ else
252260 continue ;
253261 }
254262 else
You can’t perform that action at this time.
0 commit comments