parent
e8fb3c0546
commit
991191450a
|
@ -657,10 +657,10 @@ void CheckAutoVariables::checkVarLifetimeScope(const Token * start, const Token
|
||||||
}
|
}
|
||||||
if (tok->str() == "{" && tok->scope()) {
|
if (tok->str() == "{" && tok->scope()) {
|
||||||
// Check functions in local classes
|
// Check functions in local classes
|
||||||
if (tok->scope()->type == Scope::eClass ||
|
if (tok->scope()->type == Scope::eClass ||
|
||||||
tok->scope()->type == Scope::eStruct ||
|
tok->scope()->type == Scope::eStruct ||
|
||||||
tok->scope()->type == Scope::eUnion) {
|
tok->scope()->type == Scope::eUnion) {
|
||||||
for(const Function& f:tok->scope()->functionList) {
|
for (const Function& f:tok->scope()->functionList) {
|
||||||
if (f.functionScope)
|
if (f.functionScope)
|
||||||
checkVarLifetimeScope(f.functionScope->bodyStart, f.functionScope->bodyEnd);
|
checkVarLifetimeScope(f.functionScope->bodyStart, f.functionScope->bodyEnd);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue