[clang] [NFC][Static Analyzer] Rename and discuss about `NotNullConstraint` & `NotNullBufferConstraint` (PR #131374)

Ziqing Luo via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 20 11:53:46 PDT 2025


================
@@ -436,9 +436,9 @@ class StdLibraryFunctionsChecker
                                llvm::raw_ostream &Out) const override;
 
     ValueConstraintPtr negate() const override {
-      NotNullBufferConstraint Tmp(*this);
+      BufferNullnessConstraint Tmp(*this);
       Tmp.CannotBeNull = !this->CannotBeNull;
----------------
ziqingluo-90 wrote:

Oh, I somehow thought the checker passes a pre-condition `C` only when `State->assume(C) && !State->assume(!C))` but the reality is it reports a violation only when `State->assume(!C) && !State->assume(C)`.

Yes, you are right. This is fine.   

https://github.com/llvm/llvm-project/pull/131374


More information about the cfe-commits mailing list