[PATCH] D77062: [analyzer] Added check for unacceptable equality operation between Loc and NonLoc types

Denys Petrov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 10 07:55:18 PDT 2020


ASDenysPetrov added a comment.

@NoQ , 
sorry for the late response, was working on other patch.

> Why are we getting a compound value here?

We are getting **nonloc::SymbolVal** here, not a compound value, since //* *ptr// result is unknown after //*ptr = foo();// (look at the test sample).
The root cause was that we compared **nonloc** with Zero sval which was **loc** and we got an assertion as a result.
Here I've improved and simplified a bit and now it is handles OK without assertions and passes all the tests.
 What do you think, is it worth to be landed?


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

https://reviews.llvm.org/D77062





More information about the cfe-commits mailing list