Skip to content

Commit b9ce9a4

Browse files
committed
Fix some tests
1 parent cdf8663 commit b9ce9a4

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

clang/test/CXX/expr/expr.prim/expr.prim.req/compound-requirement.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ template<typename T>
8989
concept Large = sizeof(typename remove_reference<T>::type) >= 4;
9090
// expected-note@-1{{because 'sizeof(typename remove_reference<short &>::type) >= 4' (2 >= 4) evaluated to false}}
9191

92-
template<typename T> requires requires (T t) { { t } -> Large; } // expected-note{{because 'short &' does not satisfy 'Large':}}
92+
template<typename T> requires requires (T t) { { t } -> Large; } // expected-note{{because 'short &' does not satisfy 'Large'}}
9393
struct r7 {};
9494

9595
using r7i1 = r7<int>;
@@ -160,7 +160,7 @@ namespace std_example {
160160
template<typename T> concept C2 =
161161
requires(T x) {
162162
{*x} -> same_as<typename T::inner>;
163-
// expected-note@-1{{because type constraint 'same_as<int, typename T2::inner>' was not satisfied:}}
163+
// expected-note@-1{{because 'same_as<int, typename T2::inner>' evaluated to false}}
164164
// expected-note@-2{{because '*x' would be invalid: indirection requires pointer operand ('int' invalid)}}
165165
};
166166

clang/test/SemaCXX/invalid-requirement-requires-expr.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %clang -fsyntax-only -std=c++2a -Xclang -verify -ftemplate-depth=5 -ftemplate-backtrace-limit=4 %s
22

3-
// RequiresExpr contains invalid requirement. (Eg. Highly recurisive template).
3+
// RequiresExpr contains invalid requirement. (Eg. Highly recursive template).
44
template<int x>
55
struct A { static constexpr bool far(); };
66
class B {
@@ -17,10 +17,9 @@ constexpr bool A<x>::far() {
1717
b.data_member;
1818
requires A<x-1>::far(); // #Invalid
1919
// expected-error@#Invalid {{recursive template instantiation exceeded maximum depth}}
20-
// expected-note@#Invalid {{in instantiation}}
21-
// expected-note@#Invalid 2 {{while}}
20+
// expected-note@#Invalid 2{{in instantiation}}
21+
// expected-note@#Invalid 1 {{while}}
2222
// expected-note@#Invalid {{contexts in backtrace}}
23-
// expected-note@#Invalid {{increase recursive template instantiation depth}}
2423
};
2524
}
2625
static_assert(A<1>::far());

clang/test/SemaTemplate/instantiate-expanded-type-constraint.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ template<typename T>
77
constexpr bool is_same_v<T, T> = true;
88

99
template<typename T, typename U>
10-
concept same_as = is_same_v<T, U>;
10+
concept same_as = is_same_v<T, U>; //#is_same_v
1111

1212
template<typename T, typename... Us>
1313
concept either = (is_same_v<T, Us> || ...);
@@ -16,6 +16,7 @@ template<typename... Ts>
1616
struct T {
1717
template<same_as<Ts>... Us>
1818
// expected-note@-1{{because 'same_as<int, bool>' evaluated to false}}
19+
// expected-note@#is_same_v{{because 'is_same_v<int, bool>' evaluated to false}}
1920
static void foo(Us... u, int x) { };
2021
// expected-note@-1{{candidate template ignored: deduced too few arguments}}
2122
// expected-note@-2{{candidate template ignored: constraints not satisfied}}

0 commit comments

Comments
 (0)