Document the invariant around PointerValue modelling We have recently introduced crashes by violating this invarinat. This is unfortunately easy and maybe we should address that, but documenting the requirement seems like a good start. PiperOrigin-RevId: 583304560 Change-Id: Ib7467d9532ab5f6e41e66faad74001b899668ab9
diff --git a/bazel/llvm.bzl b/bazel/llvm.bzl index 832e438..d960fc7 100644 --- a/bazel/llvm.bzl +++ b/bazel/llvm.bzl
@@ -58,7 +58,7 @@ new_git_repository( name = "llvm-raw", build_file_content = "# empty", - commit = "LLVM_COMMIT_HASH_TO_BE_POPULATED_BY_COPYBARA", + commit = "00da5eb86ed0b86002b0947643f7da72faa4fd42", remote = "https://github.com/llvm/llvm-project.git", )
diff --git a/nullability/pointer_nullability_analysis.cc b/nullability/pointer_nullability_analysis.cc index 0afdf13..5b851b9 100644 --- a/nullability/pointer_nullability_analysis.cc +++ b/nullability/pointer_nullability_analysis.cc
@@ -882,6 +882,11 @@ } auto buildFlowSensitiveTransferer() { + // The flow sensitive transfer functions must establish: + // - if we're transferring over an Expr + // - and the Expr has a supported pointer type + // - and the Expr's value is modeled by the framework (or this analysis) + // - then the PointerValue has nullability properties (is_null/from_nullable) return CFGMatchSwitchBuilder<TransferState<PointerNullabilityLattice>>() // Handles initialization of the null states of pointers. .CaseOfCFGStmt<Expr>(isAddrOf(), transferFlowSensitiveNotNullPointer)