================
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -fexperimental-new-constant-interpreter -verify %s
+
+constexpr void foo(int n) {
+  return n > 1 ? foo(n - 1) : 0; // expected-error {{return type 'void' must 
match the return type 'int' of the expression}}
+}
+static_assert((foo(2), true), "");
----------------
tbaederr wrote:

Add this to an existing test case, where it will also be tested with the 
current interpreter.

https://github.com/llvm/llvm-project/pull/176550
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to