Added testcase for #807 (cppcheck crashes scanning ruby 1.9.1)
This commit is contained in:
parent
b212d77b7c
commit
b67fe861b8
|
@ -81,6 +81,7 @@ private:
|
||||||
TEST_CASE(simplifyKnownVariables13);
|
TEST_CASE(simplifyKnownVariables13);
|
||||||
TEST_CASE(simplifyKnownVariables14);
|
TEST_CASE(simplifyKnownVariables14);
|
||||||
TEST_CASE(simplifyKnownVariables15);
|
TEST_CASE(simplifyKnownVariables15);
|
||||||
|
TEST_CASE(simplifyKnownVariables16);
|
||||||
|
|
||||||
TEST_CASE(match1);
|
TEST_CASE(match1);
|
||||||
|
|
||||||
|
@ -829,6 +830,13 @@ private:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void simplifyKnownVariables16()
|
||||||
|
{
|
||||||
|
// ticket #807 - segmentation fault when macro isn't found
|
||||||
|
const char code[] = "void f ( ) { int n = 1; DISPATCH(while); }";
|
||||||
|
simplifyKnownVariables(code);
|
||||||
|
}
|
||||||
|
|
||||||
void match1()
|
void match1()
|
||||||
{
|
{
|
||||||
// Match "%var% | %var%"
|
// Match "%var% | %var%"
|
||||||
|
|
Loading…
Reference in New Issue