diff --git a/test/testtokenize.cpp b/test/testtokenize.cpp index c85138264..36df7f1f5 100644 --- a/test/testtokenize.cpp +++ b/test/testtokenize.cpp @@ -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;))");