NoQ added inline comments. ================ Comment at: lib/StaticAnalyzer/Core/ExprEngineC.cpp:423 @@ +422,3 @@ + + if (!val.isZeroConstant()) { + val = getStoreManager().evalDynamicCast(val, T, Failed); ---------------- xazax.hun wrote: > NoQ wrote: > > I guess if `val` is a //non-zero// constant, it wouldn't make much > > difference. > I might be wrong, but isn't the only valid constant value for a pointer the > zero constant? Even if forbidden by the Standard in well-formed programs, we'd have to expect it here - after all, it's great if we analyze a program that has a bug :)
We also have this `FixedAddressChecker` thing, so even in our simplified model, there actually do exist non-zero constant pointers. That said, there's some bug i stepped into in explain-svals.cpp, which produces more zero constant pointers that one would expect, didn't have time to investigate yet... https://reviews.llvm.org/D23014 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits