diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 98f9aa50e..26f9c5f56 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -9456,7 +9456,7 @@ void Tokenizer::simplifyAsm() Token::eraseTokens(tok, tok->next()->link()->next()); } - else if (Token::Match(tok, "asm|__asm|__asm__ volatile|__volatile__| (")) { + else if (Token::Match(tok, "asm|__asm|__asm__ volatile|__volatile|__volatile__| (")) { // Goto "(" Token *partok = tok->next(); if (partok->str() != "(") diff --git a/test/testtokenize.cpp b/test/testtokenize.cpp index 27f094c53..4b6e09174 100644 --- a/test/testtokenize.cpp +++ b/test/testtokenize.cpp @@ -1132,6 +1132,7 @@ private: ASSERT_EQUALS("asm ( \"\"fnstcw %0\" : \"= m\" ( old_cw )\" ) ;", tokenizeAndStringify("asm volatile (\"fnstcw %0\" : \"= m\" (old_cw));")); ASSERT_EQUALS("asm ( \"\"fnstcw %0\" : \"= m\" ( old_cw )\" ) ;", tokenizeAndStringify(" __asm__ (\"fnstcw %0\" : \"= m\" (old_cw));")); ASSERT_EQUALS("asm ( \"\"ddd\"\" ) ;", tokenizeAndStringify(" __asm __volatile__ (\"ddd\") ;")); + ASSERT_EQUALS("asm ( \"\"ddd\"\" ) ;", tokenizeAndStringify(" __asm __volatile (\"ddd\") ;")); ASSERT_EQUALS("asm ( \"\"mov ax,bx\"\" ) ;", tokenizeAndStringify("__asm__ volatile ( \"mov ax,bx\" );")); // 'asm ( ) ;' should be in the same line