[PATCH] D127285: [analyzer] Fix assertion failure after getKnownValue call

Balázs Benics via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 8 03:26:55 PDT 2022


steakhal added a comment.

LGTM
Schedule a measurement to see what changes. Let's hope it won't introduce more crashes.
If everything checks out, it gets approved.



================
Comment at: clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:25-28
+  // Query the constraint manager whether the SVal has only one possible
+  // (integer) value. If that is the case, the value is returned. Otherwise,
+  // returns NULL.
+  const llvm::APSInt *getConstValue(ProgramStateRef state, SVal V);
----------------
I'm also wondering if this should be at the top. I would rather put it below `simplifySValOnce()`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127285



More information about the cfe-commits mailing list