Skip to content

Commit 9db8b99

Browse files
committed
C#: Remove two deprecated predicates
1 parent 6f03a0b commit 9db8b99

File tree

1 file changed

+2
-22
lines changed
  • csharp/ql/src/semmle/code/csharp

1 file changed

+2
-22
lines changed

csharp/ql/src/semmle/code/csharp/Stmt.qll

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,26 +1160,6 @@ class UsingStmt extends Stmt, @using_stmt {
11601160
* ```
11611161
*/
11621162
Expr getAnExpr() { none() }
1163-
1164-
/**
1165-
* DEPRECATED: Use UsingBlockStmt.getExpr() instead.
1166-
* Gets the expression directly used by this `using` statement, if any. For
1167-
* example, `f` on line 2 in
1168-
*
1169-
* ```
1170-
* var f = File.Open("settings.xml");
1171-
* using (f) {
1172-
* ...
1173-
* }
1174-
* ```
1175-
*/
1176-
deprecated Expr getExpr() { none() }
1177-
1178-
/**
1179-
* DEPRECATED: Use UsingBlockStmt.getBody() instead.
1180-
* Gets the body of this `using` statement.
1181-
*/
1182-
deprecated Stmt getBody() { none() }
11831163
}
11841164

11851165
/**
@@ -1212,7 +1192,7 @@ class UsingBlockStmt extends UsingStmt, @using_block_stmt {
12121192
* }
12131193
* ```
12141194
*/
1215-
override Expr getExpr() { result = this.getChild(0) }
1195+
Expr getExpr() { result = this.getChild(0) }
12161196

12171197
override Expr getAnExpr() {
12181198
result = this.getAVariableDeclExpr().getInitializer()
@@ -1221,7 +1201,7 @@ class UsingBlockStmt extends UsingStmt, @using_block_stmt {
12211201
}
12221202

12231203
/** Gets the body of this `using` statement. */
1224-
override Stmt getBody() { result.getParent() = this }
1204+
Stmt getBody() { result.getParent() = this }
12251205

12261206
override string toString() { result = "using (...) {...}" }
12271207
}

0 commit comments

Comments
 (0)