Skip to content

Commit 0038d0f

Browse files
committed
C++: Deprecate ThrowingFunction and no longer use in IR
1 parent 70647ce commit 0038d0f

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

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

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

365365
final override predicate mayThrowException() {
366-
expr.getTarget().(ThrowingFunction).mayThrowException(_)
367-
or
368366
expr.getTarget() instanceof AlwaysSehThrowingFunction
369367
}
370368

371369
final override predicate mustThrowException() {
372-
expr.getTarget().(ThrowingFunction).mayThrowException(true)
373-
or
374370
expr.getTarget() instanceof AlwaysSehThrowingFunction
375371
}
376372
}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ 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.
1517
*/
16-
abstract class ThrowingFunction extends Function {
18+
abstract deprecated class ThrowingFunction extends Function {
1719
/**
1820
* Holds if this function may throw an exception during evaluation.
1921
* If `unconditional` is `true` the function always throws an exception.

0 commit comments

Comments
 (0)