NoQ added a comment. I think this is a plausible use case, previously I thought it's too much work but it seems reasonable last time I looked into it, so I'm glad to see it going on!
Can you add a comment explaining that the new code is necessary for architectures with varying pointer bit width? That's often unobvious. ================ Comment at: clang/lib/StaticAnalyzer/Core/SValBuilder.cpp:718 + QualType Ty = Sym->getType(); + // FIXME: Why did we have references at this point? + // FIXME: Cleanup remainder of `getZeroWithPtrWidth ()` ---------------- I guess something like this? ```lang=c++ void foo(int &x) { int *p = &x; // 'p' is the same SVal as 'x' bool b = p; } ``` I think we should return a concrete `true` in the reference case. We already know that such symbol is true-ish but returning a concrete `true` might be easier on the solver. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105974/new/ https://reviews.llvm.org/D105974 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits