Fixed Ticket #202: Return of the address of an auto-variable
This commit is contained in:
parent
afcaa30b51
commit
a66cf8b20f
|
@ -206,7 +206,7 @@ void CheckAutoVariables::autoVariables()
|
||||||
"autoVariables",
|
"autoVariables",
|
||||||
"Wrong assignement of an auto-variable to an effective parameter of a function");
|
"Wrong assignement of an auto-variable to an effective parameter of a function");
|
||||||
}
|
}
|
||||||
else if (bindent > 0 && Token::Match(tok, "return & %var%")) //Critical return
|
else if (bindent > 0 && Token::Match(tok, "return & %var% ;")) //Critical return
|
||||||
{
|
{
|
||||||
if (isAutoVar(tok->tokAt(2)))
|
if (isAutoVar(tok->tokAt(2)))
|
||||||
reportError(tok,
|
reportError(tok,
|
||||||
|
|
Loading…
Reference in New Issue