NoQ accepted this revision.
NoQ added a comment.
This revision is now accepted and ready to land.

Looks great, thanks!



================
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 ()`
----------------
vabridgers wrote:
> 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. 
Yes, it's absolutely fine to investigate this separately :)


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