[PATCH] D69599: [analyzer] DynamicSize: Remove 'getSizeInElements()' from store

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 1 13:00:11 PDT 2019


NoQ added a comment.

> This is the first step to mitigate that issue.

What's the issue?



================
Comment at: clang/lib/StaticAnalyzer/Core/DynamicSize.cpp:37-39
+  const llvm::APSInt *SizeInt = SVB.getKnownValue(State, Size);
+  if (!SizeInt)
+    return UnknownVal();
----------------
Even if the size is not concrete, you can ask `SValBuilder` to perform the division. It's going to be a symbolic expression which we won't be able to work with anyway, but these days we believe that it's still worth it, in hope that our constraint solver eventually gets better.


Repository:
  rC Clang

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

https://reviews.llvm.org/D69599





More information about the cfe-commits mailing list