@@ -9902,14 +9902,19 @@ void Tokenizer::simplifyAsm()
99029902 Token *endasm = tok->next ();
99039903 const Token *firstSemiColon = nullptr ;
99049904 int comment = 0 ;
9905- while (Token::Match (endasm, " %num%|%name%|,|:|;" ) || (endasm && (endasm->isLiteral () || endasm->linenr () == comment))) {
9905+ while (Token::Match (endasm, " %num%|%name%|,|:|;|*|( " ) || (endasm && (endasm->isLiteral () || endasm->linenr () == comment))) {
99069906 if (Token::Match (endasm, " _asm|__asm|__endasm" ))
99079907 break ;
99089908 if (endasm->str () == " ;" ) {
99099909 comment = endasm->linenr ();
99109910 if (!firstSemiColon)
99119911 firstSemiColon = endasm;
99129912 }
9913+ if (endasm->str () == " (" ) {
9914+ if (!firstSemiColon)
9915+ endasm = endasm->link ();
9916+ break ;
9917+ }
99139918 endasm = endasm->next ();
99149919 }
99159920 if (Token::simpleMatch (endasm, " __endasm" )) {
@@ -9920,6 +9925,12 @@ void Tokenizer::simplifyAsm()
99209925 } else if (firstSemiColon) {
99219926 instruction = tok->next ()->stringifyList (firstSemiColon);
99229927 Token::eraseTokens (tok, firstSemiColon);
9928+ } else if (Token::Match (endasm, " ) { !!}" )) {
9929+ tok->deleteThis ();
9930+ tok = endasm->tokAt (2 );
9931+ endasm = endasm->linkAt (1 );
9932+ instruction = tok->stringifyList (endasm);
9933+ Token::eraseTokens (tok, endasm);
99239934 } else if (!endasm) {
99249935 instruction = tok->next ()->stringifyList (endasm);
99259936 Token::eraseTokens (tok, endasm);
0 commit comments