[PATCH] D134804: [clang][Interp] Implement bitwise Not operations

Shafik Yaghmour via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 28 10:21:50 PDT 2022


shafik added inline comments.


================
Comment at: clang/test/AST/Interp/literals.cpp:72
+static_assert(~-1 == 0, "");
+static_assert(~255 == -256, "");
+
----------------
Some more tests covering `~INT_MIN == INT_MAX` and vice versa and unscoped enum case as well e.g.

```
enum E {};
E e = static_cast<E>(0);
static_assert(~e == -1, "");
```


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

https://reviews.llvm.org/D134804



More information about the cfe-commits mailing list