File tree Expand file tree Collapse file tree 1 file changed +0
-26
lines changed
csharp/ql/lib/semmle/code/csharp/dataflow/internal Expand file tree Collapse file tree 1 file changed +0
-26
lines changed Original file line number Diff line number Diff line change @@ -31,29 +31,3 @@ predicate alwaysNotNullCallable(Callable c) {
3131 forex ( Expr e | c .canReturn ( e ) | e instanceof NonNullExpr )
3232 )
3333}
34-
35- /** Holds if callable 'c' always throws an exception. */
36- predicate alwaysThrowsCallable ( Callable c ) {
37- finalCallable ( c ) and
38- (
39- forex ( ControlFlow:: Node pre | pre = c .getExitPoint ( ) .getAPredecessor ( ) |
40- pre .getElement ( ) instanceof ThrowElement
41- )
42- or
43- exists ( CIL:: Method m | m .matchesHandle ( c ) | CR:: alwaysThrowsMethod ( m ) )
44- )
45- }
46-
47- /** Holds if callable `c` always throws exception `ex`. */
48- predicate alwaysThrowsException ( Callable c , Class ex ) {
49- finalCallable ( c ) and
50- (
51- forex ( ControlFlow:: Node pre | pre = c .getExitPoint ( ) .getAPredecessor ( ) |
52- pre .getElement ( ) .( ThrowElement ) .getThrownExceptionType ( ) = ex
53- )
54- or
55- exists ( CIL:: Method m , CIL:: Type t | m .matchesHandle ( c ) |
56- CR:: alwaysThrowsException ( m , t ) and t .matchesHandle ( ex )
57- )
58- )
59- }
You can’t perform that action at this time.
0 commit comments