================
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -verify -std=c++17 -pedantic-errors %s
+// RUN: cp %s %t
+// RUN: not %clang_cc1 -x c++ -std=c++17 -fixit %t
+// RUN: %clang_cc1 -Wall -pedantic-errors -x c++ -std=c++17 %t
+
+/* This is a test of the various code modification hints that only
+   apply in C++17. */
+template<int... args>
+int foo() {
+    return (args + 1 + ...); // expected-error {{expression not permitted as 
operand of fold expression}}
----------------
zwuis wrote:

Can you add these test cases?
```cpp
(args + 123 + ...); // long number
(... + args + 1); // left fold
```

https://github.com/llvm/llvm-project/pull/151790
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to