[PATCH] D140753: [clang][dataflow] Fix crash when having boolean-to-integral casts.

Dmitri Gribenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 29 19:55:33 PST 2022


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


================
Comment at: clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp:97-106
+    // FIXME: This is sort of workaround. Since now we just ignore all (implicit)
+    // integral casts, treating the resulting value as the same as the underlying
+    // value, it could cause inconsistency between values after `Join` if in
+    // some paths the type doesn't strictly match:
+    //
+    // std::optional<bool> o;
+    // int x;
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140753



More information about the cfe-commits mailing list