Skip to content

Commit 21b69d4

Browse files
committed
XFAIL test in clang-module-build, because the diagnostic in tuple std header cannot emitted
Signed-off-by: yronglin <[email protected]>
1 parent 01fe546 commit 21b69d4

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.verify.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
// REQUIRES: std-at-least-c++17
1010

11+
// No diagnostic gets emitted when we build with modules.
12+
// XFAIL: clang-modules-build
13+
1114
// <tuple>
1215

1316
// template <class T, class Tuple> constexpr T make_from_tuple(Tuple&&);
@@ -16,14 +19,16 @@
1619
#include <tuple>
1720
#include <utility>
1821

22+
#include "test_macros.h"
23+
1924
void test() {
2025
// expected-error@*:* {{static assertion failed}}
2126

2227
// Turns to an error since C++26 (Disallow Binding a Returned Glvalue to a Temporary https://wg21.link/P2748R5).
23-
#if _LIBCPP_STD_VER >= 26
24-
// expected-error@*:* {{returning reference to local temporary object}}
28+
#if TEST_STD_VER >= 26
29+
// expected-error@tuple:* {{returning reference to local temporary object}}
2530
#else
26-
// expected-warning@*:* {{returning reference to local temporary object}}
31+
// expected-warning@tuple:* {{returning reference to local temporary object}}
2732
#endif
2833
std::ignore = std::make_from_tuple<const int&>(std::tuple<char>{});
2934
}

0 commit comments

Comments
 (0)