Fix Issue 18409 - DScanner SEGFAULTS on CircleCI
This commit is contained in:
parent
6ba4053753
commit
7dd95b2083
|
@ -45,6 +45,7 @@ class IncorrectInfiniteRangeCheck : BaseAnalyzer
|
||||||
if (fb.bodyStatement !is null)
|
if (fb.bodyStatement !is null)
|
||||||
visit(fb.bodyStatement.blockStatement);
|
visit(fb.bodyStatement.blockStatement);
|
||||||
else
|
else
|
||||||
|
if (fb.blockStatement !is null)
|
||||||
visit(fb.blockStatement);
|
visit(fb.blockStatement);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,6 +110,12 @@ unittest
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://issues.dlang.org/show_bug.cgi?id=18409
|
||||||
|
struct Foo
|
||||||
|
{
|
||||||
|
~this() nothrow @nogc;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool empty() { return false; }
|
bool empty() { return false; }
|
||||||
|
@ -116,5 +123,6 @@ class C { bool empty() { return false; } } // [warn]: %1$s
|
||||||
|
|
||||||
}c
|
}c
|
||||||
.format(IncorrectInfiniteRangeCheck.MESSAGE), sac);
|
.format(IncorrectInfiniteRangeCheck.MESSAGE), sac);
|
||||||
|
|
||||||
stderr.writeln("Unittest for IncorrectInfiniteRangeCheck passed.");
|
stderr.writeln("Unittest for IncorrectInfiniteRangeCheck passed.");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue