[PATCH] D123037: [clang][dataflow] Support integral casts

Yitzhak Mandelbaum via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 5 06:19:29 PDT 2022


ymandel marked an inline comment as done.
ymandel added inline comments.


================
Comment at: clang/unittests/Analysis/FlowSensitive/TransferTest.cpp:1904
-                const auto *FooVal =
-                    cast<IntegerValue>(Env.getValue(*FooDecl, SkipPast::None));
-                const auto *BarVal =
----------------
sgatev wrote:
> Why not assert the type of the value in this test and in `IntegralCast` below?
Sure, but went with an ASSERT, since it gives better error messages when it fails (rather than cast, which will crash the test).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123037



More information about the cfe-commits mailing list