parent
74c4daaadf
commit
41bdd87d30
|
@ -4259,10 +4259,9 @@ private:
|
||||||
static bool hasBorrowingVariables(const std::list<Variable>& vars, const std::vector<const Token*>& args, int depth = 10)
|
static bool hasBorrowingVariables(const std::list<Variable>& vars, const std::vector<const Token*>& args, int depth = 10)
|
||||||
{
|
{
|
||||||
if (depth < 0)
|
if (depth < 0)
|
||||||
return false;
|
return true;
|
||||||
return std::any_of(vars.cbegin(), vars.cend(), [&](const Variable& var) {
|
return std::any_of(vars.cbegin(), vars.cend(), [&](const Variable& var) {
|
||||||
const ValueType* vt = var.valueType();
|
if (const ValueType* vt = var.valueType()) {
|
||||||
if (vt) {
|
|
||||||
if (vt->pointer > 0 &&
|
if (vt->pointer > 0 &&
|
||||||
std::none_of(args.begin(), args.end(), [vt](const Token* arg) {
|
std::none_of(args.begin(), args.end(), [vt](const Token* arg) {
|
||||||
return arg->valueType() && arg->valueType()->type == vt->type;
|
return arg->valueType() && arg->valueType()->type == vt->type;
|
||||||
|
|
|
@ -7359,6 +7359,17 @@ private:
|
||||||
" if (llabs(0x80000000ffffffffL) == 0x7fffffff00000001L) {}\n"
|
" if (llabs(0x80000000ffffffffL) == 0x7fffffff00000001L) {}\n"
|
||||||
"}\n";
|
"}\n";
|
||||||
valueOfTok(code, "f");
|
valueOfTok(code, "f");
|
||||||
|
|
||||||
|
code = "struct T {\n"
|
||||||
|
" T();\n"
|
||||||
|
" static T a[6][64];\n"
|
||||||
|
" static T b[2][64];\n"
|
||||||
|
" static T c[64][64];\n"
|
||||||
|
" static T d[2][64];\n"
|
||||||
|
" static T e[64];\n"
|
||||||
|
" static T f[64];\n"
|
||||||
|
"};\n";
|
||||||
|
valueOfTok(code, "(");
|
||||||
}
|
}
|
||||||
|
|
||||||
void valueFlowCrashConstructorInitialization() { // #9577
|
void valueFlowCrashConstructorInitialization() { // #9577
|
||||||
|
|
Loading…
Reference in New Issue