[PATCH] D83295: [Analyzer] Hotfix for various crashes in iterator checkers

Endre Fülöp via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 9 07:22:03 PDT 2020


gamesh411 accepted this revision.
gamesh411 added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp:275-276
   } else if (isRandomIncrOrDecrOperator(OK)) {
+    if (!BO->getRHS()->getType()->isIntegralOrEnumerationType())
+      return;
     handlePtrIncrOrDecr(C, BO->getLHS(),
----------------
Szelethus wrote:
> This doesn't look symmetrical. How does this patch interact with D83190?
I see that patch D83190 will need not only to be rebased, but modified slightly to take this early checking into account. I will refer to this review over there.


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

https://reviews.llvm.org/D83295





More information about the cfe-commits mailing list