Putting back deleted file, and deprecating instead. Deprecating mayThrowException as well.

This commit is contained in:
REDMOND\brodes
2024-11-19 12:57:50 -05:00
parent 1c874d3221
commit 26d590a616
2 changed files with 20 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
/**
* Provides an abstract class for modeling functions that never throw.
*/
import semmle.code.cpp.Function
import semmle.code.cpp.models.Models
/**
* A function that is guaranteed to never throw.
*
* DEPRECATED: use `NonThrowingFunction` in `semmle.code.cpp.models.Models.Interfaces.Throwing` instead.
*/
abstract deprecated class NonThrowingFunction extends Function { }

View File

@@ -68,6 +68,13 @@ abstract class ThrowingFunction extends ExceptionAnnotation {
*/
abstract predicate raisesException(boolean unconditional);
/**
* DEPRECATES: use/extend `raisesException` instead.
*/
deprecated predicate mayThrowException(boolean unconditional){
this.raisesException(unconditional)
}
/**
* Holds if this function will always raise an exception if called
*/