File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -110,8 +110,11 @@ namespace {
110110 {
111111 if (Token::simpleMatch (tok->tokAt (-2 ), " } else {" ))
112112 tok = tok->linkAt (-2 );
113- if (Token::simpleMatch (tok->previous (), " ) {" ))
113+ if (Token::simpleMatch (tok->previous (), " ) {" )) {
114+ if (Token::simpleMatch (tok->linkAt (-1 )->astOperand2 (), " ;" ))
115+ return tok->linkAt (-1 )->astOperand2 ();
114116 return tok->linkAt (-1 );
117+ }
115118 if (Token::simpleMatch (tok->previous (), " do {" ))
116119 return tok->previous ();
117120 return tok;
@@ -232,7 +235,7 @@ namespace {
232235 if (!Token::Match (assignTop->astOperand1 (), " %assign%" )) {
233236 continueB &= updateRecursive (assignTop->astOperand1 ());
234237 }
235- if (!assignTop->astParent ())
238+ if (!assignTop->astParent () || Token::simpleMatch (assignTop-> astParent (), " ; " ) )
236239 break ;
237240 assignTop = assignTop->astParent ();
238241 }
You can’t perform that action at this time.
0 commit comments