testrunner: add testcode for #6781 (TemplateSimplifier::simplifyTemplateInstantiations causes heap corruption on invalid code)
This commit is contained in:
parent
b82bdb222a
commit
112b35a49e
|
@ -221,6 +221,7 @@ private:
|
|||
TEST_CASE(garbageCode170);
|
||||
TEST_CASE(garbageCode171);
|
||||
TEST_CASE(garbageCode172);
|
||||
TEST_CASE(garbageCode173); // #6781
|
||||
TEST_CASE(garbageValueFlow);
|
||||
TEST_CASE(garbageSymbolDatabase);
|
||||
TEST_CASE(garbageAST);
|
||||
|
@ -1454,6 +1455,11 @@ private:
|
|||
ASSERT_THROW(checkCode("p<e T=l[<]<>>,"), InternalError);
|
||||
}
|
||||
|
||||
void garbageCode173() {
|
||||
// #6781 heap corruption ; TemplateSimplifier::simplifyTemplateInstantiations
|
||||
ASSERT_THROW(checkCode(" template < Types > struct S : >( S < ...Types... > S <) > { ( ) { } } ( ) { return S < void > ( ) }"), InternalError);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
REGISTER_TEST(TestGarbage)
|
||||
|
|
Loading…
Reference in New Issue