[PATCH] D67079: [analyzer] CastValueChecker: Model inheritance

Csaba Dabis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 2 08:15:37 PDT 2019


Charusso marked 2 inline comments as done.
Charusso added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp:211
       },
-      /*IsPrunable=*/true);
+      /*IsPrunable=*/!CastCtx.CastSucceeds);
 }
----------------
That could be helpful, but I am not sure.


================
Comment at: clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp:239
+    C.generateSink(C.getState(), C.getPredecessor());
     return;
+  }
----------------
Previously possible false positives happened because we kept flow the modeling.


================
Comment at: clang/lib/StaticAnalyzer/Core/DynamicType.cpp:42
+  return MR->StripCasts();
+}
+
----------------
Probably a consistent way of `MemRegion` handling is more appropriate.


Repository:
  rC Clang

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

https://reviews.llvm.org/D67079





More information about the cfe-commits mailing list