mizvekov updated this revision to Diff 378832.
mizvekov added a comment.

rebase.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110210/new/

https://reviews.llvm.org/D110210

Files:
  clang/test/CXX/expr/expr.prim/expr.prim.lambda/p4-cxx14.cpp
  clang/test/CXX/over/over.match/over.match.funcs/over.match.class.deduct/p2.cpp
  clang/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp
  clang/test/CXX/temp/temp.decls/temp.class.spec/p6.cpp
  clang/test/CXX/temp/temp.decls/temp.mem/p5.cpp
  clang/test/CXX/temp/temp.decls/temp.variadic/multi-level-substitution.cpp
  clang/test/SemaCXX/conversion-function.cpp
  clang/test/SemaCXX/cxx1y-generic-lambdas-variadics.cpp
  clang/test/SemaCXX/cxx1y-generic-lambdas.cpp
  clang/test/SemaCXX/cxx1z-decomposition.cpp
  clang/test/SemaCXX/deduced-return-type-cxx14.cpp
  clang/test/SemaCXX/recovery-expr-type.cpp
  clang/test/SemaCXX/redeclared-alias-template.cpp
  clang/test/SemaTemplate/instantiate-var-template.cpp
  clang/test/SemaTemplate/temp_arg_nontype.cpp
  clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp

Index: clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp
===================================================================
--- clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp
+++ clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp
@@ -43,7 +43,7 @@
   typedef A<void (*)(), i> d;
   typedef A<void (*)(), &i> d;
   typedef A<void (*)(), i<>> d;
-  typedef A<void (*)(), i<int>> e; // expected-error {{is not implicitly convertible}}
+  typedef A<void (*)(), i<int>> e; // expected-error {{value of type '<overloaded function type>' is not implicitly convertible to 'void (*)()'}}
 
   typedef A<void (*)(), 0> x; // expected-error {{not allowed in a converted constant}}
   typedef A<void (*)(), nullptr> y;
Index: clang/test/SemaTemplate/temp_arg_nontype.cpp
===================================================================
--- clang/test/SemaTemplate/temp_arg_nontype.cpp
+++ clang/test/SemaTemplate/temp_arg_nontype.cpp
@@ -437,7 +437,7 @@
 
   template<template<typename> class X> struct A {
     template<typename T, X<T> N> struct B; // expected-note 2{{here}}
-    template<typename T> struct B<T, 0> {}; // expected-error {{specializes a template parameter with dependent type 'Y<T>'}}
+    template<typename T> struct B<T, 0> {}; // expected-error {{non-type template argument specializes a template parameter with dependent type 'Y<T>' (aka 'type-parameter-0-0 *')}}
   };
   A<X>::B<int, 0> ax;
   A<Y>::B<int, &n> ay; // expected-error {{undefined}} expected-note {{instantiation of}}
Index: clang/test/SemaTemplate/instantiate-var-template.cpp
===================================================================
--- clang/test/SemaTemplate/instantiate-var-template.cpp
+++ clang/test/SemaTemplate/instantiate-var-template.cpp
@@ -31,7 +31,7 @@
   static_assert(b<char> == 1, ""); // expected-note {{in instantiation of}} expected-error {{not an integral constant}}
 
   template<typename T> void f() {
-    static_assert(a<sizeof(sizeof(f(T())))> == 0, ""); // expected-error {{static_assert failed}}
+    static_assert(a<sizeof(sizeof(f(T())))> == 0, ""); // expected-error {{static_assert failed due to requirement 'a<sizeof (sizeof (f(type-parameter-0-0())))> == 0'}}
   }
 }
 
Index: clang/test/SemaCXX/redeclared-alias-template.cpp
===================================================================
--- clang/test/SemaCXX/redeclared-alias-template.cpp
+++ clang/test/SemaCXX/redeclared-alias-template.cpp
@@ -5,7 +5,7 @@
 template<typename T1, typename T2> using A = T1; // expected-error {{too many template parameters in template redeclaration}}
 
 template<typename T1, typename T2> using B = T1; // expected-note {{previous}}
-template<typename T2, typename T1> using B = T1; // expected-error {{type alias template redefinition with different types}}
+template<typename T2, typename T1> using B = T1; // expected-error {{type alias template redefinition with different types ('T1' (aka 'type-parameter-0-1') vs 'T1' (aka 'type-parameter-0-0'))}}
 
 
 template<typename> struct S;
Index: clang/test/SemaCXX/recovery-expr-type.cpp
===================================================================
--- clang/test/SemaCXX/recovery-expr-type.cpp
+++ clang/test/SemaCXX/recovery-expr-type.cpp
@@ -133,7 +133,7 @@
 template <typename T> S(T t) -> S<void *>;
 
 void baz() {
-  bar(S(123)); // expected-error {{no matching conversion}}
+  bar(S(123)); // expected-error {{no matching conversion for functional-style cast from 'int' to 'test11::S<>'}}
 }
 } // namespace test11
 
Index: clang/test/SemaCXX/deduced-return-type-cxx14.cpp
===================================================================
--- clang/test/SemaCXX/deduced-return-type-cxx14.cpp
+++ clang/test/SemaCXX/deduced-return-type-cxx14.cpp
@@ -146,7 +146,7 @@
   auto fwd_decl(); // expected-note {{candidate template ignored: could not match 'auto ()' against 'int ()'}}
   int g = fwd_decl<char>();
 
-  auto (*p)() = f1; // expected-error {{incompatible initializer}}
+  auto (*p)() = f1; // expected-error {{variable 'p' with type 'auto (*)()' has incompatible initializer of type '<overloaded function type>'}}
   auto (*q)() = f1<int>; // ok
 
   typedef decltype(f2(1.2)) dbl; // cxx14_20-note {{previous}}
Index: clang/test/SemaCXX/cxx1z-decomposition.cpp
===================================================================
--- clang/test/SemaCXX/cxx1z-decomposition.cpp
+++ clang/test/SemaCXX/cxx1z-decomposition.cpp
@@ -70,7 +70,7 @@
 void bitfield() {
   struct { int a : 3, : 4, b : 5; } a;
   auto &[x, y] = a;
-  auto &[p, q, r] = a; // expected-error {{decomposes into 2 elements, but 3 names were provided}}
+  auto &[p, q, r] = a; // expected-error-re {{type '(unnamed struct at {{.*}})' decomposes into 2 elements, but 3 names were provided}}
 }
 
 void for_range() {
Index: clang/test/SemaCXX/cxx1y-generic-lambdas.cpp
===================================================================
--- clang/test/SemaCXX/cxx1y-generic-lambdas.cpp
+++ clang/test/SemaCXX/cxx1y-generic-lambdas.cpp
@@ -215,8 +215,9 @@
     auto L = [](auto a) -> int { return a; }; // expected-error {{cannot initialize}}
     int (*fp)(int) = L; 
     int (&fp2)(int) = [](auto a) { return a; };  // expected-error{{non-const lvalue}}
-    int (&&fp3)(int) = [](auto a) { return a; };  // expected-error{{no viable conversion}}\
-                                                  //expected-note{{candidate}}
+    int (&&fp3)(int) = [](auto a) { return a; };
+    // expected-error@-1   {{no viable conversion}}
+    // expected-note-re@-2 {{candidate template ignored: could not match 'auto (*)(type-parameter-0-0){{.*}}' against 'int (int)'}}
 
     using F = int(int);
     using G = int(void*);
@@ -290,8 +291,9 @@
 {
   auto L = [](auto a) ->decltype(a) {
     print("a = ", a, "\n");
-    return [](auto b) ->decltype(a) { //expected-error{{no viable conversion}}\
-                                      //expected-note{{candidate template ignored}}
+    return [](auto b) ->decltype(a) {
+      // expected-error@-1   {{no viable conversion}}
+      // expected-note-re@-2 {{candidate template ignored: could not match 'int (*)(type-parameter-0-0){{.*}}' against 'int'}}
       print("b = ", b, "\n");
       return b;
     };
Index: clang/test/SemaCXX/cxx1y-generic-lambdas-variadics.cpp
===================================================================
--- clang/test/SemaCXX/cxx1y-generic-lambdas-variadics.cpp
+++ clang/test/SemaCXX/cxx1y-generic-lambdas-variadics.cpp
@@ -104,7 +104,9 @@
 
 namespace PR33082 {
   template<int ...I> void a() {
-    int arr[] = { [](auto ...K) { (void)I; } ... }; // expected-error {{no viable conversion}} expected-note {{candidate}}
+    int arr[] = { [](auto ...K) { (void)I; } ... };
+    // expected-error@-1   {{no viable conversion}}
+    // expected-note-re@-2 {{candidate template ignored: could not match 'auto (*)(type-parameter-0-0...){{.*}}' against 'int'}}
   }
 
   template<typename ...T> struct Pack {};
Index: clang/test/SemaCXX/conversion-function.cpp
===================================================================
--- clang/test/SemaCXX/conversion-function.cpp
+++ clang/test/SemaCXX/conversion-function.cpp
@@ -189,7 +189,7 @@
   template<typename T>
   struct E2 {
     operator T
-    * // expected-error{{pointer to a reference}}
+    * // expected-error{{'operator type-parameter-0-0 *' declared as a pointer to a reference of type 'int &'}}
     () const;
   };
 
Index: clang/test/CXX/temp/temp.decls/temp.variadic/multi-level-substitution.cpp
===================================================================
--- clang/test/CXX/temp/temp.decls/temp.variadic/multi-level-substitution.cpp
+++ clang/test/CXX/temp/temp.decls/temp.variadic/multi-level-substitution.cpp
@@ -283,7 +283,9 @@
     template<typename...U>
     void g(U &&...u, T &&...t) {} // expected-note {{candidate}}
     template<typename...U>
-    void h(tuple<T, U> &&...) {} // expected-note 2{{candidate}}
+    void h(tuple<T, U> &&...) {}
+    // expected-note@-1 {{candidate template ignored: could not match 'tuple<type-parameter-0-0, type-parameter-0-0>' against 'int'}}
+    // expected-note@-2 {{candidate template ignored: substitution failure: deduced incomplete pack <(no value)> for template parameter 'U'}}
 
     template<typename...U>
     struct X {
Index: clang/test/CXX/temp/temp.decls/temp.mem/p5.cpp
===================================================================
--- clang/test/CXX/temp/temp.decls/temp.mem/p5.cpp
+++ clang/test/CXX/temp/temp.decls/temp.mem/p5.cpp
@@ -76,7 +76,7 @@
 
 template X0::operator const char*() const; // expected-note{{'X0::operator const char *<char>' requested here}}
 template X0::operator const int*(); // expected-note{{'X0::operator const int *<const int>' requested here}}
-template X0::operator float*() const; // expected-error{{explicit instantiation of undefined function template}}
+template X0::operator float*() const; // expected-error{{explicit instantiation of undefined function template 'operator type-parameter-0-0 *'}}
 
 void test_X0(X0 x0, const X0 &x0c) {
   x0.operator const int*(); // expected-note{{in instantiation of function template specialization}}
Index: clang/test/CXX/temp/temp.decls/temp.class.spec/p6.cpp
===================================================================
--- clang/test/CXX/temp/temp.decls/temp.class.spec/p6.cpp
+++ clang/test/CXX/temp/temp.decls/temp.class.spec/p6.cpp
@@ -38,7 +38,7 @@
 template<typename T, typename U>
 struct Outer {
   template<typename X, typename Y> struct Inner;
-  template<typename Y> struct Inner<T, Y> {}; // expected-note{{previous}}
+  template<typename Y> struct Inner<T, Y> {}; // expected-note{{previous declaration of class template partial specialization 'Inner<int, type-parameter-0-0>' is here}}
   template<typename Y> struct Inner<U, Y> {}; // expected-error{{cannot be redeclared}}
 };
 
Index: clang/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp
===================================================================
--- clang/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp
+++ clang/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp
@@ -336,9 +336,9 @@
   void use(NA::A a, NB::B b, NC::C c, ND::D d, NE::E e, NF::F f) {
     for (auto x : a) {}
     for (auto x : b) {}
-    for (auto x : c) {} // expected-error {{no viable 'end' function}}
-    for (auto x : d) {} // expected-error {{no viable 'begin' function}}
-    for (auto x : e) {} // expected-error {{no viable 'begin' function}}
-    for (auto x : f) {} // expected-error {{no viable 'end' function}}
+    for (auto x : c) {} // expected-error {{invalid range expression of type 'p0962r1::NC::C'; no viable 'end' function available}}
+    for (auto x : d) {} // expected-error {{invalid range expression of type 'p0962r1::ND::D'; no viable 'begin' function available}}
+    for (auto x : e) {} // expected-error {{invalid range expression of type 'p0962r1::NE::E'; no viable 'begin' function available}}
+    for (auto x : f) {} // expected-error {{invalid range expression of type 'p0962r1::NF::F'; no viable 'end' function available}}
   }
 }
Index: clang/test/CXX/over/over.match/over.match.funcs/over.match.class.deduct/p2.cpp
===================================================================
--- clang/test/CXX/over/over.match/over.match.funcs/over.match.class.deduct/p2.cpp
+++ clang/test/CXX/over/over.match/over.match.funcs/over.match.class.deduct/p2.cpp
@@ -36,7 +36,7 @@
 
 namespace p0702r1 {
   template<typename T> struct X { // expected-note {{candidate}}
-    X(std::initializer_list<T>); // expected-note {{candidate}}
+    X(std::initializer_list<T>); // expected-note {{candidate template ignored: could not match 'initializer_list<type-parameter-0-0>' against 'p0702r1::Z'}}
   };
 
   X xi = {0};
@@ -84,4 +84,4 @@
 }
 
 
-}
\ No newline at end of file
+}
Index: clang/test/CXX/expr/expr.prim/expr.prim.lambda/p4-cxx14.cpp
===================================================================
--- clang/test/CXX/expr/expr.prim/expr.prim.lambda/p4-cxx14.cpp
+++ clang/test/CXX/expr/expr.prim/expr.prim.lambda/p4-cxx14.cpp
@@ -7,7 +7,7 @@
 int &c = [] (int &r) -> decltype(auto) { return (r); } (a);
 int &d = [] (int &r) -> auto & { return r; } (a);
 int &e = [] (int &r) -> auto { return r; } (a); // expected-error {{cannot bind to a temporary}}
-int &f = [] (int r) -> decltype(auto) { return r; } (a); // expected-error {{cannot bind to a temporary}}
+int &f = [] (int r) -> decltype(auto) { return r; } (a); // expected-error {{non-const lvalue reference to type 'int' cannot bind to a temporary of type 'int'}}
 int &g = [] (int r) -> decltype(auto) { return (r); } (a); // expected-warning {{reference to stack}}
 // cxx2b-error@-1 {{non-const lvalue reference to type 'int' cannot bind to a temporary of type 'int'}}
 
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D110210: [clang] N... Matheus Izvekov via Phabricator via cfe-commits

Reply via email to