File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -391,11 +391,10 @@ static bool iscast(const Token *tok)
391391 if (!Token::Match (tok, " ( ::| %name%" ))
392392 return false ;
393393
394- const Token *prevTok = tok->previous ();
395- if (prevTok && prevTok->isName () && prevTok->str () != " return" )
394+ if (tok->previous () && tok->previous ()->isName () && tok->previous ()->str () != " return" )
396395 return false ;
397396
398- if (Token::simpleMatch (prevTok , " >" ) && prevTok ->link ())
397+ if (Token::simpleMatch (tok-> previous () , " >" ) && tok-> previous () ->link ())
399398 return false ;
400399
401400 if (Token::Match (tok, " ( (| typeof (" ) && Token::Match (tok->link (), " ) %num%" ))
@@ -407,7 +406,7 @@ static bool iscast(const Token *tok)
407406 if (Token::Match (tok->link (), " ) %cop%" ) && !Token::Match (tok->link (), " ) [&*+-~]" ))
408407 return false ;
409408
410- if (Token::Match (prevTok , " = ( %name% ) {" ) && tok->next ()->varId () == 0 )
409+ if (Token::Match (tok-> previous () , " = ( %name% ) {" ) && tok->next ()->varId () == 0 )
411410 return true ;
412411
413412 bool type = false ;
You can’t perform that action at this time.
0 commit comments