Stop trying to override the top level of an empty nullability vector.
PiperOrigin-RevId: 578238245
Change-Id: I87c9a059e0ec2b58651019fcefd9a197c68f37d1
diff --git a/nullability/inference/collect_evidence_test.cc b/nullability/inference/collect_evidence_test.cc
index 7ec9411..814ee15 100644
--- a/nullability/inference/collect_evidence_test.cc
+++ b/nullability/inference/collect_evidence_test.cc
@@ -463,6 +463,14 @@
functionNamed("target"))));
}
+// A crash repro involving callable parameters.
+TEST(CollectEvidenceFromImplementationTest, FunctionPointerParam) {
+ static constexpr llvm::StringRef Src = R"cc(
+ void target(void (*f)()) { f(); }
+ )cc";
+ EXPECT_THAT(collectEvidenceFromTargetFunction(Src), IsEmpty());
+}
+
TEST(CollectEvidenceFromImplementationTest, NotInferenceTarget) {
static constexpr llvm::StringRef Src = R"cc(
template <typename T>