Skip to content

Commit 19f0524

Browse files
authored
[Clang] fix test on 32 bits target after 561132e (#124593)
1 parent 1e89355 commit 19f0524

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

clang/test/SemaCXX/cxx2b-consteval-propagate.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -534,15 +534,15 @@ namespace GH123405 {
534534
consteval void fn() {}
535535

536536
template <typename>
537-
constexpr int tfn(int) {
537+
constexpr auto tfn(int) {
538538
auto p = &fn; // expected-note {{'tfn<int>' is an immediate function because its body evaluates the address of a consteval function 'fn'}}
539-
return int(p); // expected-error {{cast from pointer to smaller type 'int' loses information}}
539+
return p;
540540
}
541541

542-
int g() {
542+
void g() {
543543
int a; // expected-note {{declared here}}
544-
return tfn<int>(a); // expected-error {{call to immediate function 'GH123405::tfn<int>' is not a constant expression}}\
545-
// expected-note {{read of non-const variable 'a' is not allowed in a constant expression}}
544+
tfn<int>(a); // expected-error {{call to immediate function 'GH123405::tfn<int>' is not a constant expression}}\
545+
// expected-note {{read of non-const variable 'a' is not allowed in a constant expression}}
546546
}
547547

548548
}

0 commit comments

Comments
 (0)