Add regression tests for #678,#6834 - crashes on garbage code
This commit is contained in:
parent
d0ab00b100
commit
890343dad0
|
@ -164,6 +164,7 @@ private:
|
|||
TEST_CASE(garbageCode122); // #6303
|
||||
TEST_CASE(garbageCode123);
|
||||
TEST_CASE(garbageCode124); // 6948
|
||||
TEST_CASE(garbageCode125); // 6782, 6834
|
||||
|
||||
TEST_CASE(garbageValueFlow);
|
||||
TEST_CASE(garbageSymbolDatabase);
|
||||
|
@ -938,6 +939,13 @@ private:
|
|||
checkCode("+---+");
|
||||
}
|
||||
|
||||
void garbageCode125() {
|
||||
ASSERT_THROW(checkCode("{ T struct B : T valueA_AA ; } T : [ T > ( ) { B } template < T > struct A < > : ] { ( ) { return valueA_AC struct { : } } b A < int > AC ( ) a_aa.M ; ( ) ( ) }"),
|
||||
InternalError);
|
||||
ASSERT_THROW(checkCode("template < Types > struct S :{ ( S < ) S >} { ( ) { } } ( ) { return S < void > ( ) }"),
|
||||
InternalError);
|
||||
}
|
||||
|
||||
void garbageValueFlow() {
|
||||
// #6089
|
||||
const char* code = "{} int foo(struct, x1, struct x2, x3, int, x5, x6, x7)\n"
|
||||
|
|
Loading…
Reference in New Issue