From 3155f15325069ccc9351c09890c8a2957052904a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 24 Jun 2018 16:14:11 +0200 Subject: [PATCH] CheckClass: Use Variable::valueType() --- lib/checkclass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checkclass.cpp b/lib/checkclass.cpp index e604c1963..0efa0cc01 100644 --- a/lib/checkclass.cpp +++ b/lib/checkclass.cpp @@ -931,7 +931,7 @@ void CheckClass::initializationListUsage() if (Token::Match(tok, "%var% =") && tok->strAt(-1) != "*") { const Variable* var = tok->variable(); if (var && var->scope() == owner && !var->isStatic()) { - if (var->isPointer() || var->isReference() || var->isEnumType() || (!var->type() && !var->isStlStringType() && !(Token::Match(var->typeStartToken(), "std :: %type% <") && !Token::simpleMatch(var->typeStartToken()->linkAt(3), "> ::")))) + if (var->isPointer() || var->isReference() || var->isEnumType() || var->valueType()->type > ValueType::Type::ITERATOR) continue; bool allowed = true;