[clang] [clang][Interp] Add basic support for _BitInt (PR #68069)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 10 06:34:12 PDT 2023


================
@@ -3,6 +3,14 @@
 // RUN: %clang_cc1 -std=c++11 -fms-extensions -verify=ref %s
 // RUN: %clang_cc1 -std=c++20 -fms-extensions -verify=ref %s
 
+
+constexpr _BitInt(2) A = 0;
+constexpr _BitInt(2) B = A + 1;
+constexpr _BitInt(2) C = B + 1; // expected-warning {{from 2 to -2}} \
----------------
erichkeane wrote:

Since `_BitInt` can end up being pretty sizable (I think we removed the size limit?), can we test something like a 1024 sized one?

https://github.com/llvm/llvm-project/pull/68069


More information about the cfe-commits mailing list