Style check
This commit is contained in:
parent
ba4754a784
commit
741073cc21
|
@ -200,7 +200,7 @@ void CheckAutoVariables::autoVariables()
|
||||||
{
|
{
|
||||||
addVD(tok->tokAt(2));
|
addVD(tok->tokAt(2));
|
||||||
}
|
}
|
||||||
// Inside a function body
|
// Inside a function body
|
||||||
else if (bindent > 0 && Token::Match(tok, "%type% %var% ["))
|
else if (bindent > 0 && Token::Match(tok, "%type% %var% ["))
|
||||||
{
|
{
|
||||||
addVDA(tok->tokAt(1));
|
addVDA(tok->tokAt(1));
|
||||||
|
@ -241,15 +241,15 @@ void CheckAutoVariables::autoVariables()
|
||||||
"autoVariables",
|
"autoVariables",
|
||||||
"Return of the address of an auto-variable");
|
"Return of the address of an auto-variable");
|
||||||
}
|
}
|
||||||
// Invalid pointer deallocation
|
// Invalid pointer deallocation
|
||||||
else if (bindent > 0 && Token::Match(tok, "free ( %var% ) ;"))
|
else if (bindent > 0 && Token::Match(tok, "free ( %var% ) ;"))
|
||||||
{
|
{
|
||||||
if (isAutoVarArray(tok->tokAt(2)))
|
if (isAutoVarArray(tok->tokAt(2)))
|
||||||
reportError(tok,
|
reportError(tok,
|
||||||
Severity::error,
|
Severity::error,
|
||||||
"autoVariables",
|
"autoVariables",
|
||||||
"Invalid deallocation");
|
"Invalid deallocation");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
vd_list.clear();
|
vd_list.clear();
|
||||||
vda_list.clear();
|
vda_list.clear();
|
||||||
|
|
Loading…
Reference in New Issue