[PATCH] D127734: [analyzer][NFC] Substitute the SVal::evalMinus and evalComplement functions

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 14 08:26:59 PDT 2022


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

LGTM



================
Comment at: clang/lib/StaticAnalyzer/Core/SValBuilder.cpp:447
   case nonloc::ConcreteIntKind:
-    return val.castAs<nonloc::ConcreteInt>().evalMinus(*this);
+    return makeIntVal(-X.castAs<nonloc::ConcreteInt>().getValue());
   case nonloc::SymbolValKind:
----------------
Maybe it's just me, but for me it is easier to read with surrounding parentheses.
Same below.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127734



More information about the cfe-commits mailing list