================
@@ -46,20 +46,22 @@ void test() {
     params<1>(0);  // expected-note{{here}} \
                    // expected-error@#error-param-size {{invalid index 1 for 
pack 'p' of size 1}}
     params<-1>(0); // expected-note{{here}} \
-                   // expected-error@#error-param-size {{invalid index -1 for 
pack 'p' of size 1}}
+                   // expected-error@#error-param-size {{evaluates to -1, 
which cannot be narrowed to type '__size_t' (aka 'unsigned long')}}
 
     test_types<-1>(); //expected-note {{in instantiation}} \
-                      // expected-error@#error-type-size {{invalid index -1 
for pack 'T' of size 0}}
-    test_types<-1, int>(); //expected-note {{in instantiation}} \
-                      // expected-error@#error-type-size {{invalid index -1 
for pack 'T' of size 1}}
+                      // expected-error@#error-type-size {{evaluates to -1, 
which cannot be narrowed to type '__size_t' (aka 'unsigned long')}}
+
+    test_types<-1, int>(); // expected-note {{in instantiation}} \
+                           // expected-error@#error-type-size {{evaluates to 
-1, which cannot be narrowed to type '__size_t' (aka 'unsigned long')}}
+
     test_types<0>(); //expected-note {{in instantiation}} \
                     // expected-error@#error-type-size {{invalid index 0 for 
pack 'T' of size 0}}
     test_types<1, int>(); //expected-note {{in instantiation}}  \
                          // expected-error@#error-type-size {{invalid index 1 
for pack 'T' of size 1}}
 }
 
 void invalid_indexes(auto... p) {
-    p...[non_constant_index()]; // expected-error {{array size is not a 
constant expression}}\
+    p...[non_constant_index()]; // expected-error {{pack index is not a 
constant expression}}\
----------------
cor3ntin wrote:

Yes, there is no array at all here.

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

Reply via email to