Fixed #2693 (__declspec attribute not removed properly)

This commit is contained in:
Daniel Marjamäki 2011-03-30 19:49:55 +02:00
parent 675e63b6a7
commit ae2a8d839b
2 changed files with 4 additions and 3 deletions

View File

@ -2063,9 +2063,6 @@ bool Tokenizer::tokenize(std::istream &code,
}
}
// remove some unhandled macros in global scope
removeMacrosInGlobalScope();
// specify array size..
arraySize();
@ -2316,6 +2313,9 @@ bool Tokenizer::tokenize(std::istream &code,
// Remove __declspec()
simplifyDeclspec();
// remove some unhandled macros in global scope
removeMacrosInGlobalScope();
// remove calling conventions __cdecl, __stdcall..
simplifyCallingConvention();

View File

@ -5633,6 +5633,7 @@ private:
{
// remove some unhandled macros in the global scope.
ASSERT_EQUALS("void f ( ) { }", tokenizeAndStringify("void f() NOTHROW { }"));
ASSERT_EQUALS("struct Foo { } ;", tokenizeAndStringify("struct __declspec(dllexport) Foo {};"));
}
void multipleAssignment()