mirror of
https://github.com/github/codeql.git
synced 2026-04-25 16:55:19 +02:00
Putting back deleted file, and deprecating instead. Deprecating mayThrowException as well.
This commit is contained in:
13
cpp/ql/lib/semmle/code/cpp/models/interfaces/NonThrowing.qll
Normal file
13
cpp/ql/lib/semmle/code/cpp/models/interfaces/NonThrowing.qll
Normal 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 { }
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user