From 4ff2f8b3e25dbc78312e2e92f5e76c00dc525ce4 Mon Sep 17 00:00:00 2001 From: Simon Martin Date: Sat, 23 May 2015 20:29:44 +0200 Subject: [PATCH] Ticket #5760: Added test case since the issue has been fixed with PR#596. --- test/testgarbage.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/testgarbage.cpp b/test/testgarbage.cpp index 5239dbe94..e7d8d9805 100644 --- a/test/testgarbage.cpp +++ b/test/testgarbage.cpp @@ -80,6 +80,7 @@ private: TEST_CASE(garbageCode39); // #6686 TEST_CASE(garbageCode40); // #6620 TEST_CASE(garbageCode41); // #6685 + TEST_CASE(garbageCode42); // #5760 TEST_CASE(garbageValueFlow); TEST_CASE(garbageSymbolDatabase); @@ -465,6 +466,10 @@ private: ASSERT_THROW(checkCode(" { } { return } *malloc(__SIZE_TYPE__ size); *memcpy(void n); static * const () { memcpy (*slot, 3); } { (); } { }"), InternalError); } + void garbageCode42() { // #5760 + ASSERT_THROW(checkCode("{ } * const ( ) { }"), InternalError); + } + void garbageValueFlow() { // #6089 const char* code = "{} int foo(struct, x1, struct x2, x3, int, x5, x6, x7)\n"