================
@@ -861,7 +861,11 @@ SVal SimpleSValBuilder::evalBinOpLL(ProgramStateRef state,
// If one of the operands is a symbol and the other is a constant,
// build an expression for use by the constraint manager.
- if (SymbolRef rSym = rhs.getAsLocSymbol()) {
+ // Pass IncludeBaseRegions so that &r->s (a field of a symbolic region)
+ // still counts as a symbol here, like the MemRegionVal case does below.
+ // Without it, `nullptr == &r->s` skips this and hits the "non-null region"
+ // case, which contradicts `&r->s == nullptr` and gives a false NPD
----------------
steakhal wrote:
Could you please drop this comment?
https://github.com/llvm/llvm-project/pull/209875
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits