File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -72,14 +72,12 @@ class OsCloseCall extends FileClose {
72
72
73
73
/** A `with` statement. */
74
74
class WithStatement extends FileClose {
75
- With w ;
76
-
77
- WithStatement ( ) { this .asExpr ( ) = w .getContextExpr ( ) }
75
+ WithStatement ( ) { this .asExpr ( ) = any ( With w ) .getContextExpr ( ) }
78
76
}
79
77
80
78
/** Holds if an exception may be raised at `raises` if `file` is a file object. */
81
79
private predicate mayRaiseWithFile ( DataFlow:: CfgNode file , DataFlow:: CfgNode raises ) {
82
- // Currently just consider any method called on `node `; e.g. `file.write()`; as potentially raising an exception
80
+ // Currently just consider any method called on `file `; e.g. `file.write()`; as potentially raising an exception
83
81
raises .( DataFlow:: MethodCallNode ) .getObject ( ) = file and
84
82
not file instanceof FileOpen and
85
83
not file instanceof FileClose
You can’t perform that action at this time.
0 commit comments