[PATCH] D99343: [Analyzer] Infer 0 value when the divisible is 0 (bug fix)

Valeriy Savchenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 25 08:17:02 PDT 2021


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

Looks great!



================
Comment at: clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:655
         return makeSymExprValNN(op, InputLHS, InputRHS, resultTy);
+      case BO_Div:
       case BO_Rem:
----------------
I think we should either add: `// 0 / x == 0` or modify the comment for `BO_Rem`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99343



More information about the cfe-commits mailing list