Skip to content

Commit b993726

Browse files
authored
Merge pull request #10584 from erik-krogh/csharp-unqueryable
C#: deprecate/delete some unused code
2 parents 9358070 + ae6dd05 commit b993726

File tree

2 files changed

+1
-27
lines changed

2 files changed

+1
-27
lines changed

csharp/ql/lib/semmle/code/csharp/dataflow/internal/CallableReturns.qll

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff 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-
}

csharp/ql/lib/semmle/code/csharp/security/cryptography/EncryptionKeyDataFlowQuery.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import csharp
66
private import semmle.code.csharp.frameworks.system.security.cryptography.SymmetricAlgorithm
77

88
/** Array of type Byte */
9-
class ByteArray extends ArrayType {
9+
deprecated class ByteArray extends ArrayType {
1010
ByteArray() { getElementType() instanceof ByteType }
1111
}
1212

0 commit comments

Comments
 (0)