Skip to content

Commit 4412691

Browse files
committed
Delaying deprecation of ThrowingFunction.
1 parent 9b2590e commit 4412691

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedCall.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,11 +363,11 @@ class TranslatedFunctionCall extends TranslatedCallExpr, TranslatedDirectCall {
363363
}
364364

365365
final override predicate mayThrowException() {
366-
expr.getTarget() instanceof AlwaysSehThrowingFunction
366+
expr.getTarget().(ThrowingFunction).mayThrowException(_)
367367
}
368368

369369
final override predicate mustThrowException() {
370-
expr.getTarget() instanceof AlwaysSehThrowingFunction
370+
expr.getTarget().(ThrowingFunction).mayThrowException(true)
371371
}
372372
}
373373

cpp/ql/lib/semmle/code/cpp/models/interfaces/Throwing.qll

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,15 @@ import semmle.code.cpp.models.interfaces.FunctionInputsAndOutputs
1212

1313
/**
1414
* A function that is known to raise an exception.
15-
*
16-
* DEPRECATED: use `AlwaysSehThrowingFunction` instead if a function unconditionally throws.
17-
* These are assumed the only case where functions throw/raise exceptions unconditionally.
18-
* For functions that may throw, this will be the default behavior in the IR.
1915
*/
20-
abstract deprecated class ThrowingFunction extends Function {
16+
abstract class ThrowingFunction extends Function {
2117
ThrowingFunction() { any() }
2218

2319
/**
2420
* Holds if this function may throw an exception during evaluation.
2521
* If `unconditional` is `true` the function always throws an exception.
26-
*
27-
* DPERECATED: for always throwing functions use `AlwaysSehThrowingFunction` instead.
28-
* For functions that may throw, this will be the default behavior in the IR.
2922
*/
30-
abstract deprecated predicate mayThrowException(boolean unconditional);
23+
abstract predicate mayThrowException(boolean unconditional);
3124
}
3225

3326
/**

0 commit comments

Comments
 (0)