Fixed #1345 (Not initialised variables warning missing in classes with dllexport)
This commit is contained in:
parent
b01af012cd
commit
d3b5889f88
|
@ -1009,6 +1009,16 @@ bool Tokenizer::tokenize(std::istream &code, const char FileName[], const std::s
|
|||
}
|
||||
}
|
||||
|
||||
// Remove __declspec(dllexport)
|
||||
for (Token *tok = _tokens; tok; tok = tok->next())
|
||||
{
|
||||
if (Token::simpleMatch(tok, "__declspec ( dllexport )"))
|
||||
{
|
||||
Token::eraseTokens(tok, tok->tokAt(4));
|
||||
tok->deleteThis();
|
||||
}
|
||||
}
|
||||
|
||||
// typedef..
|
||||
simplifyTypedef();
|
||||
|
||||
|
|
|
@ -186,6 +186,8 @@ private:
|
|||
TEST_CASE(functionpointer);
|
||||
|
||||
TEST_CASE(removeRedundantAssignment);
|
||||
|
||||
TEST_CASE(removedeclspec);
|
||||
}
|
||||
|
||||
|
||||
|
@ -2900,6 +2902,11 @@ private:
|
|||
ASSERT_EQUALS("void f ( ) { ; int * q ; ; }", tokenizeAndStringify("void f() { int *p, *q; p = q; }", true));
|
||||
ASSERT_EQUALS("void f ( ) { ; ; int * q ; ; }", tokenizeAndStringify("void f() { int *p = 0, *q; p = q; }", true));
|
||||
}
|
||||
|
||||
void removedeclspec()
|
||||
{
|
||||
ASSERT_EQUALS("a b", tokenizeAndStringify("a __declspec ( dllexport ) b"));
|
||||
}
|
||||
};
|
||||
|
||||
REGISTER_TEST(TestTokenizer)
|
||||
|
|
Loading…
Reference in New Issue