Gday,
The following outlines some issues:
The following results in a cppcheck crash. var->valueType() can be nullptr.
out << " access=\"" << accessControlToString(var->mAccess) << '\"'; out << " scope=\"" << var->scope() << '\"'; out << " constness=\"" << var->valueType()->constness << '\"'; // THIS out << " isArgument=\"" << var->isArgument() << '\"'; out << " isArray=\"" << var->isArray() << '\"';
Also here:
if (var->valueType()->type == ValueType::Type::CONTAINER) { } else if (var->type() && !var->type()->isEnumType()) { // Check if type is a struct or class. // Ensure that it is a large object. if (!var->type()->classScope) inconclusive = true; else if (estimateSize(var->type(), mSettings, symbolDatabase) <= 2 * mSettings->sizeof_pointer) continue; } else continue;
The code that reproduces it is something like this, tough to reproduce outside of my project...
struct Thing { struct B { const Command Code; }; union { B Bits; bytes<1u> Write; }; PowerDown(decltype(Write) args) noexcept : Write{ args } {} };
The variable args doesn't get a valueType.
Thanks! I created ticket https://trac.cppcheck.net/ticket/10003
Log in to post a comment.
Gday,
The following outlines some issues:
The following results in a cppcheck crash. var->valueType() can be nullptr.
Also here:
The code that reproduces it is something like this, tough to reproduce outside of my project...
The variable args doesn't get a valueType.
Thanks! I created ticket https://trac.cppcheck.net/ticket/10003