================ @@ -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:
ah, I see. It's called on the negation of the violated constraint! Then the only remaining question I have is that do you think `describe` and `describeArgumentValue` should be allowed to be called on any constraint? For example, we cannot call `describe` on the `IsNull` constraint currently. But since `IsNull` is used in making assumptions on post-conditions, I imagine one may be interested in adding a description note to a state/node explaining where the assumption comes from. As far as I know, users sometimes struggle to understand where assumptions are made that eventually lead a path to an error. So I'd like to leave some comments there for a future developer who might attempt to call `describe` on `IsNull`. @balazske https://github.com/llvm/llvm-project/pull/131374 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits