================
@@ -1165,7 +1165,7 @@ ProgramStateRef
StdLibraryFunctionsChecker::NotNullConstraint::apply(
return State->assume(L, CannotBeNull);
}
-void StdLibraryFunctionsChecker::NotNullConstraint::describe(
+void StdLibraryFunctionsChecker::NullnessConstraint::describe(
DescriptionKind DK, const CallEvent &Call, ProgramStateRef State,
const Summary &Summary, llvm::raw_ostream &Out) const {
assert(CannotBeNull &&
----------------
ziqingluo-90 wrote:
The flag `CannotBeNull` controls whether this constraint is checking for null
or non-null. But why `describe` function asserts `CannotBeNull` and below
`describeArgumentValue` function asserts `!CannotBeNull`?
My understanding is that `describe` and `describeArgumentValue` are used to
explain assumptions made by the checker to users during error reporting. I
suppose both can be called in either case.
https://github.com/llvm/llvm-project/pull/131374
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits