Variable usage : 2 more fixes
This commit is contained in:
parent
aaabacfe87
commit
20e28bb687
|
@ -844,7 +844,7 @@ static bool isOp(const TOKEN *tok)
|
|||
tok->str() == ">" ||
|
||||
tok->str() == ">=" ||
|
||||
tok->str() == "<<" ||
|
||||
TOKEN::Match(tok, "[+-*/&|,]")));
|
||||
TOKEN::Match(tok, "[+-*/&|,[]]")));
|
||||
}
|
||||
|
||||
void CheckOther::functionVariableUsage()
|
||||
|
@ -892,6 +892,9 @@ void CheckOther::functionVariableUsage()
|
|||
if ((TOKEN::Match(tok,"[(=&!]") || isOp(tok)) && TOKEN::Match(tok->next(), "%var%"))
|
||||
varUsage[ tok->strAt(1) ] |= USAGE_READ;
|
||||
|
||||
if (TOKEN::Match(tok, "-=|+=|*=|/= %var%"))
|
||||
varUsage[ tok->strAt(1) ] |= USAGE_READ;
|
||||
|
||||
if (TOKEN::Match(tok, "%var%") && (tok->next()->str()==")" || isOp(tok->next())))
|
||||
varUsage[ tok->str() ] |= USAGE_READ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue