Added unit test for #4525

This commit is contained in:
Alexander Mai 2013-02-19 21:56:13 +01:00 committed by PKEuS
parent d9f982443d
commit 34c3697750
1 changed files with 11 additions and 0 deletions

View File

@ -59,6 +59,7 @@ private:
TEST_CASE(tokenize24); // #4195 (segmentation fault)
TEST_CASE(tokenize25); // #4239 (segmentation fault)
TEST_CASE(tokenize26); // #4245 (segmentation fault)
TEST_CASE(tokenize27); // #4525 (segmentation fault)
// don't freak out when the syntax is wrong
TEST_CASE(wrong_syntax1);
@ -690,6 +691,16 @@ private:
tokenizeAndStringify("class x { protected : template < int y = } ;");
}
// #4525 - segfault
void tokenize27() {
tokenizeAndStringify("struct except_spec_d_good : except_spec_a, except_spec_b {\n"
"~except_spec_d_good();\n"
"};\n"
"struct S { S(); };\n"
"S::S() __attribute((pure)) = default;"
);
}
void wrong_syntax1() {
{
const std::string code("TR(kvmpio, PROTO(int rw), ARGS(rw), TP_(aa->rw;))");