[clang] 935f7d6 - [clang][Interp][NFC] We do support complex bitint now

Timm Bäder via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 9 08:05:53 PST 2024


Author: Timm Bäder
Date: 2024-02-09T17:05:41+01:00
New Revision: 935f7d633374f7073fec14927922a2d534c8795f

URL: https://github.com/llvm/llvm-project/commit/935f7d633374f7073fec14927922a2d534c8795f
DIFF: https://github.com/llvm/llvm-project/commit/935f7d633374f7073fec14927922a2d534c8795f.diff

LOG: [clang][Interp][NFC] We do support complex bitint now

Remove a stale FIXME comment and improve the test.

Added: 
    

Modified: 
    clang/test/AST/Interp/complex.cpp

Removed: 
    


################################################################################
diff  --git a/clang/test/AST/Interp/complex.cpp b/clang/test/AST/Interp/complex.cpp
index 7d625ab1f378e..9fdaabd9081d5 100644
--- a/clang/test/AST/Interp/complex.cpp
+++ b/clang/test/AST/Interp/complex.cpp
@@ -98,8 +98,9 @@ constexpr _Complex int I3 = {15};
 static_assert(__real(I3) == 15, "");
 static_assert(__imag(I3) == 0, "");
 
-/// FIXME: This should work in the new interpreter as well.
-// constexpr _Complex _BitInt(8) A = 0;// = {4};
+constexpr _Complex _BitInt(8) A = {4};
+static_assert(__real(A) == 4, "");
+static_assert(__imag(A) == 0, "");
 
 
 constexpr _Complex double Doubles[4] = {{1.0, 2.0}};


        


More information about the cfe-commits mailing list