[PATCH] D99181: [analyzer] Fix crash on spaceship operator (PR47511)

Valeriy Savchenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 24 07:48:52 PDT 2021


vsavchenko added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Core/BasicValueFactory.cpp:331
 
       // Note: LAnd, LOr, Comma are handled specially by higher-level logic.
 
----------------
steakhal wrote:
> So, there are some corner cases already.
> I can't see any way of implementing this reasonably here, as you pointed out the return value of the function is not a good fit.
> 
> Shouldn't put your mock 'implementation' to a different place?
> I'm just nitpicking though.
`evalAPSInt` is called in a lot of different contexts, I don't know how else to ensure that it won't crash on `BO_Cmp` in all of those contexts.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99181/new/

https://reviews.llvm.org/D99181



More information about the cfe-commits mailing list