All nullability vectors can now store symbolic nullability
This means symbolic nullability fully participates in our non-flow-sensitive
type analysis.
This opens the door to inferring non-top-level nullability slots (e.g.
params of type `vector<int*>`), although actually binding variables to those
slots is not yet implemented.
Moreover it gives us a way to describe potential "nullability casts" uniformly across verification + inference. (Verification checks these, inference uses these to identify safety conditions). These are captured by the nullvec of the source, the nullvec of the target, and the nullability of the PointerValue if applicable (to implement exceptions like "if pointer is provably nonnull, allow cast from nullable<T> to nonnull<T>".
In inference, either the source or the target nullabilty may have symbolic entries.
While I had envisioned nullvec entries always being (nonnull, nullable) pairs of
BoolValues, this proved too unergonomic.
Instead the new PointerTypeNullability class is explicitly either a concrete
nonnull/nullable/unspecifed state, or a symbolic nullability.
PiperOrigin-RevId: 549175681
Change-Id: I9d10f8c44faaade2a35ca6ea138845c5d71c819f
diff --git a/nullability/BUILD b/nullability/BUILD
index 7abc7b6..fe0a564 100644
--- a/nullability/BUILD
+++ b/nullability/BUILD
@@ -126,6 +126,7 @@
],
deps = [
"@absl//absl/log:check",
+ "@llvm-project//clang:analysis",
"@llvm-project//clang:ast",
"@llvm-project//clang:basic",
"@llvm-project//llvm:Support",