File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -9177,7 +9177,7 @@ void Tokenizer::simplifyCallingConvention()
91779177void Tokenizer::simplifyDeclspec ()
91789178{
91799179 for (Token *tok = list.front (); tok; tok = tok->next ()) {
9180- while (Token::simpleMatch (tok, " __declspec (" ) && tok->next ()->link () && tok->next ()->link ()->next ()) {
9180+ while (Token::Match (tok, " __declspec|_declspec (" ) && tok->next ()->link () && tok->next ()->link ()->next ()) {
91819181 if (Token::Match (tok->tokAt (2 ), " noreturn|nothrow" )) {
91829182 Token *tok1 = tok->next ()->link ()->next ();
91839183 while (tok1 && !Token::Match (tok1, " %name%" )) {
Original file line number Diff line number Diff line change @@ -5068,6 +5068,7 @@ class TestTokenizer : public TestFixture {
50685068
50695069 void removedeclspec () {
50705070 ASSERT_EQUALS (" a b" , tokenizeAndStringify (" a __declspec ( dllexport ) b" ));
5071+ ASSERT_EQUALS (" a b" , tokenizeAndStringify (" a _declspec ( dllexport ) b" ));
50715072 ASSERT_EQUALS (" int a ;" , tokenizeAndStringify (" __declspec(thread) __declspec(align(32)) int a;" ));
50725073 ASSERT_EQUALS (" int i ;" , tokenizeAndStringify (" __declspec(allocate(\" mycode\" )) int i;" ));
50735074 ASSERT_EQUALS (" struct IUnknown ;" , tokenizeAndStringify (" struct __declspec(uuid(\" 00000000-0000-0000-c000-000000000046\" )) IUnknown;" ));
You can’t perform that action at this time.
0 commit comments