================
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify
-fexperimental-new-constant-interpreter %s
+// RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify %s
+
+// expected-no-diagnostics
+
+void test_no_crash() {
+ _Complex int x = 1i;
+ (void)(x == 1i);
+}
+
+constexpr int test_side_effect() {
+ int k = 0;
+ (void)(1i == (++k, 1i));
+ return k;
+}
+static_assert(test_side_effect() == 1);
----------------
tbaederr wrote:
Don't add a new file, you can just add this to an exisiting one.
https://github.com/llvm/llvm-project/pull/177731
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits