[PATCH] D139683: [APInt] provide a safe API for zext value and sext value.

Thorsten via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 11 06:18:46 PST 2022


tschuett added inline comments.


================
Comment at: llvm/unittests/ADT/APIntTest.cpp:3136
 
+TEST(APIntTest, TryExt) {
+  APInt small(32, 42);
----------------
This is opinion and not review!!! For unit tests, I prefer `.has_value()` instead of the boolean conversion to make the intent clear.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139683



More information about the llvm-commits mailing list