Open
Description
The built-in interpretation of boolean equality forgets to check for nullness before checking for pointer equality:
Value *LHSValue = Env.getValue(LHS);
Value *RHSValue = Env.getValue(RHS);
if (LHSValue == RHSValue)
return Env.getBoolLiteralValue(true);
llvm-project/clang/lib/Analysis/FlowSensitive/Transfer.cpp
Lines 58 to 59 in dfa1d9b
Therefore, when both are null, the equality will be interpreted as true.