[PATCH] D88019: [analyzer][solver] Fix issue with symbol non-equality tracking
    Valeriy Savchenko via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Mon Sep 21 05:49:41 PDT 2020
    
    
  
vsavchenko added a comment.
After this "accepted" and a huge thank you 😄
================
Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1350-1371
   ProgramStateRef trackEQ(ProgramStateRef State, SymbolRef Sym,
                           const llvm::APSInt &Int,
                           const llvm::APSInt &Adjustment) {
     if (auto Equality = EqualityInfo::extract(Sym, Int, Adjustment)) {
       // Extract function assumes that we gave it Sym + Adjustment != Int,
       // so the result should be opposite.
       Equality->invert();
----------------
I suggest to change these two functions this way, so we can avoid the same pattern in 4 different functions
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88019/new/
https://reviews.llvm.org/D88019
    
    
More information about the cfe-commits
mailing list