Function isIterator() did not to set returned parameter always

This commit is contained in:
amai2012 2018-01-12 09:36:14 +01:00
parent 97ffec85c0
commit 2ef7c35cfd
1 changed files with 1 additions and 0 deletions

View File

@ -92,6 +92,7 @@ static bool isIterator(const Variable *var, bool& inconclusiveType)
if (!var || !var->isLocal() || !Token::Match(var->typeEndToken(), "iterator|const_iterator|reverse_iterator|const_reverse_iterator|auto")) if (!var || !var->isLocal() || !Token::Match(var->typeEndToken(), "iterator|const_iterator|reverse_iterator|const_reverse_iterator|auto"))
return false; return false;
inconclusiveType = false;
if (var->typeEndToken()->str() == "auto") if (var->typeEndToken()->str() == "auto")
return (var->nameToken()->valueType() && var->nameToken()->valueType()->type == ValueType::Type::ITERATOR); return (var->nameToken()->valueType() && var->nameToken()->valueType()->type == ValueType::Type::ITERATOR);