diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index c19a1b9de..14b1390a9 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -9265,6 +9265,7 @@ void Tokenizer::simplifyAttribute() Token::eraseTokens(tok, tok->next()->link()->next()); tok->deleteThis(); + tok = tok->previous(); } } } diff --git a/test/testtokenize.cpp b/test/testtokenize.cpp index ddb2e8fb3..d23e5c63e 100644 --- a/test/testtokenize.cpp +++ b/test/testtokenize.cpp @@ -4885,6 +4885,7 @@ private: { ASSERT_EQUALS("short array [ 3 ] ;", tokenizeAndStringify("short array[3] __attribute__ ((aligned));")); ASSERT_EQUALS("int x [ 2 ] ;", tokenizeAndStringify("int x[2] __attribute__ ((packed));")); + ASSERT_EQUALS("int vecint ;", tokenizeAndStringify("int __attribute__((mode(SI))) __attribute__((vector_size (16))) vecint;")); } void cpp0xtemplate1()