Merge pull request #597 from simartin/ticket_5760

Ticket #5760: Added test case since the issue has been fixed with PR#596
This commit is contained in:
amai2012 2015-05-23 20:52:34 +02:00
commit 1eba077c24
1 changed files with 5 additions and 0 deletions

View File

@ -80,6 +80,7 @@ private:
TEST_CASE(garbageCode39); // #6686 TEST_CASE(garbageCode39); // #6686
TEST_CASE(garbageCode40); // #6620 TEST_CASE(garbageCode40); // #6620
TEST_CASE(garbageCode41); // #6685 TEST_CASE(garbageCode41); // #6685
TEST_CASE(garbageCode42); // #5760
TEST_CASE(garbageValueFlow); TEST_CASE(garbageValueFlow);
TEST_CASE(garbageSymbolDatabase); 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); 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() { void garbageValueFlow() {
// #6089 // #6089
const char* code = "{} int foo(struct, x1, struct x2, x3, int, x5, x6, x7)\n" const char* code = "{} int foo(struct, x1, struct x2, x3, int, x5, x6, x7)\n"