tokenizer: simplify assembler (#270), fix _asm also.
http://apps.sourceforge.net/trac/cppcheck/ticket/270
This commit is contained in:
parent
a46de47158
commit
bc4fb21325
|
@ -433,7 +433,7 @@ void Tokenizer::tokenize(std::istream &code, const char FileName[])
|
|||
// Remove __asm..
|
||||
for (Token *tok = _tokens; tok; tok = tok->next())
|
||||
{
|
||||
if (Token::Match(tok->next(), "__asm|asm {"))
|
||||
if (Token::Match(tok->next(), "__asm|_asm|asm {"))
|
||||
{
|
||||
while (tok->next())
|
||||
{
|
||||
|
|
|
@ -230,6 +230,11 @@ private:
|
|||
ASSERT_EQUALS("abc def", tokenizeAndStringify(code));
|
||||
}
|
||||
|
||||
{
|
||||
const char code[] = "abc _asm { mov ax,bx } def";
|
||||
ASSERT_EQUALS("abc def", tokenizeAndStringify(code));
|
||||
}
|
||||
|
||||
{
|
||||
const char code[] = "abc __asm { mov ax,bx } def";
|
||||
ASSERT_EQUALS("abc def", tokenizeAndStringify(code));
|
||||
|
|
Loading…
Reference in New Issue