vabridgers added a comment.

Thanks for the updates, comments and the reproducer. I've added those in this 
update. If possible, I'd like to get this change accepted to avoid the crash we 
currently see, and I'll immediately follow up with the FIXMEs. Otherwise, I'll 
iterate quickly on the FIXMEs. - Vince



================
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 ()`
----------------
NoQ wrote:
> 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.
I think this comment is addressed by changing the comment, and deferring a 
subsequent follow up. I'd like to get this change submitted to at least avoid 
the crash if possible? Otherwise, if needed, I'll iterate quickly on trying to 
return a concrete 'true' for the reference case. 


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

Reply via email to