#6732 segmentation fault (invalid code) in Tokenizer::simplifyEmptyNamespaces. Add testcase, segfault seems to have been fixed by previous commit. Run astyle

This commit is contained in:
Alexander Mai 2015-06-01 13:46:13 +02:00
parent b81e82d462
commit fb2bd978ad
2 changed files with 11 additions and 5 deletions

View File

@ -96,6 +96,7 @@ private:
TEST_CASE(garbageCode55); // #6724
TEST_CASE(garbageCode56); // #6713
TEST_CASE(garbageCode57); // #6733
TEST_CASE(garbageCode58); // #6732
TEST_CASE(garbageValueFlow);
TEST_CASE(garbageSymbolDatabase);
@ -545,6 +546,11 @@ private:
ASSERT_THROW(checkCode("{ } if () try { } catch (...) B::~B { }"), InternalError);
}
void garbageCode58() { // #6732
ASSERT_THROW(checkCode("{ }> {= ~A()^{} }P { }"), InternalError);
}
void garbageValueFlow() {
// #6089
const char* code = "{} int foo(struct, x1, struct x2, x3, int, x5, x6, x7)\n"