Skip to content

Commit 0062163

Browse files
committed
[clang] -fimplicit-constexpr fix test (forgot to push fixed version before)
1 parent a486edc commit 0062163

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

clang/test/Sema/implicit-constexpr-members.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
// RUN: %clang_cc1 -verify=NORMAL23,BOTH23,ALLNORMAL,ALL -std=c++23 %s -fcolor-diagnostics
1111
// RUN: %clang_cc1 -verify=IMPLICIT23,BOTH23,ALLIMPLICIT,ALL -fimplicit-constexpr -std=c++23 %s -fcolor-diagnostics
1212

13+
// ALLIMPLICIT-no-diagnostics
1314

1415
// =============================================
1516
// 1) simple member function
@@ -66,7 +67,7 @@ constexpr bool result_template_template_type = template_template_type<int>{}.tem
6667
// 3) explicit "this" function
6768

6869
struct explicit_this {
69-
template <typename Self> bool test(this const Self & self) const {
70+
template <typename Self> bool test(this const Self & self) {
7071
// ALLNORMAL-note@-1 {{declared here}}
7172
return self.ok;
7273
}
@@ -78,6 +79,6 @@ struct child: explicit_this {
7879

7980
constexpr bool result_explicit_this = child{}.test();
8081
// ALLNORMAL-error@-1 {{constexpr variable 'result_explicit_this' must be initialized by a constant expression}}
81-
// ALLNORMAL-note@-2 {{non-constexpr function 'test' cannot be used in a constant expression}}
82+
// ALLNORMAL-note@-2 {{non-constexpr function 'test<child>' cannot be used in a constant expression}}
8283

8384
#endif

0 commit comments

Comments
 (0)