Skip to content

Commit 26d590a

Browse files
committed
Putting back deleted file, and deprecating instead. Deprecating mayThrowException as well.
1 parent 1c874d3 commit 26d590a

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* Provides an abstract class for modeling functions that never throw.
3+
*/
4+
5+
import semmle.code.cpp.Function
6+
import semmle.code.cpp.models.Models
7+
8+
/**
9+
* A function that is guaranteed to never throw.
10+
*
11+
* DEPRECATED: use `NonThrowingFunction` in `semmle.code.cpp.models.Models.Interfaces.Throwing` instead.
12+
*/
13+
abstract deprecated class NonThrowingFunction extends Function { }

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ abstract class ThrowingFunction extends ExceptionAnnotation {
6868
*/
6969
abstract predicate raisesException(boolean unconditional);
7070

71+
/**
72+
* DEPRECATES: use/extend `raisesException` instead.
73+
*/
74+
deprecated predicate mayThrowException(boolean unconditional){
75+
this.raisesException(unconditional)
76+
}
77+
7178
/**
7279
* Holds if this function will always raise an exception if called
7380
*/

0 commit comments

Comments
 (0)