Module Nullness
Provides predicates for performing nullness analyses.
Nullness analyses are used to identify places in a program where
a null pointer exception (NullReferenceException) may be thrown.
Example:
void M(string s) {
if (s != null) {
...
}
...
var i = s.IndexOf('a'); // s may be null
...
}
Import path
import semmle.code.csharp.dataflow.NullnessImports
| csharp | The default C# QL library. |
Predicates
Classes
| AlwaysNullExpr | An expression that is always |
| Dereference | An expression that dereferences a value. That is, an expression that may result in a |
| MaybeNullExpr | An expression that may be |
| NonNullExpr | An expression that is never |