diff --git a/test/testgarbage.cpp b/test/testgarbage.cpp index b1043f949..c9b0de102 100644 --- a/test/testgarbage.cpp +++ b/test/testgarbage.cpp @@ -213,6 +213,7 @@ private: TEST_CASE(garbageCode182); // #4195 TEST_CASE(garbageCode183); // #7505 TEST_CASE(garbageCode184); // #7699 + TEST_CASE(garbageCode185); // #6011 TEST_CASE(garbageValueFlow); TEST_CASE(garbageSymbolDatabase); TEST_CASE(garbageAST); @@ -1407,6 +1408,18 @@ private: "}"); } + void garbageCode185() { // #6011 crash in libreoffice failure to create proper AST + checkCode( + "namespace binfilter\n" + "{\n" + " BOOL EnhWMFReader::ReadEnhWMF()\n" + " {\n" + " pOut->CreateObject( nIndex, GDI_BRUSH, new WinMtfFillStyle( ReadColor(), ( nStyle == BS_HOLLOW ) ? TRUE : FALSE ) );\n" + " return bStatus;\n" + " };\n" + "}\n"); + } + void syntaxErrorFirstToken() { ASSERT_THROW(checkCode("&operator(){[]};"), InternalError); // #7818 ASSERT_THROW(checkCode("*(*const<> (size_t); foo) { } *(*const (size_t)() ; foo) { }"), InternalError); // #6858