diff --git a/lib/checkother.cpp b/lib/checkother.cpp index e9f19776b..8104a7b00 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -1097,7 +1097,7 @@ void CheckOther::checkVariableScope() const SymbolDatabase *symbolDatabase = mTokenizer->getSymbolDatabase(); for (const Variable* var : symbolDatabase->variableList()) { - if (!var || !var->isLocal() || (!var->isPointer() && !var->typeStartToken()->isStandardType())) + if (!var || !var->isLocal() || (!var->isPointer() && var->valueType()->type <= ValueType::Type::RECORD)) continue; if (var->isConst())