C++: Deprecate ThrowingFunction and no longer use in IR

This commit is contained in:
Jeroen Ketema
2024-12-10 14:44:58 +01:00
parent 70647ce290
commit 0038d0f17c
2 changed files with 3 additions and 5 deletions

View File

@@ -363,14 +363,10 @@ class TranslatedFunctionCall extends TranslatedCallExpr, TranslatedDirectCall {
}
final override predicate mayThrowException() {
expr.getTarget().(ThrowingFunction).mayThrowException(_)
or
expr.getTarget() instanceof AlwaysSehThrowingFunction
}
final override predicate mustThrowException() {
expr.getTarget().(ThrowingFunction).mayThrowException(true)
or
expr.getTarget() instanceof AlwaysSehThrowingFunction
}
}

View File

@@ -12,8 +12,10 @@ import semmle.code.cpp.models.interfaces.FunctionInputsAndOutputs
/**
* A function that is known to raise an exception.
*
* DEPRECATED: use `AlwaysSehThrowingFunction` instead.
*/
abstract class ThrowingFunction extends Function {
abstract deprecated class ThrowingFunction extends Function {
/**
* Holds if this function may throw an exception during evaluation.
* If `unconditional` is `true` the function always throws an exception.