Skip to content

Commit 36d446f

Browse files
committed
[RFC][libc++][test] Improves C++ Standard filtering.
This is a proof-of-concept how we could improve the C++ language filtering in lit. There will be a Discourse post for adding feedback on the approach.
1 parent a4422a5 commit 36d446f

File tree

7 files changed

+10
-7
lines changed

7 files changed

+10
-7
lines changed

libcxx/test/std/input.output/iostream.format/print.fun/includes.compile.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//
66
//===----------------------------------------------------------------------===//
77

8-
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
8+
// REQUIRES: standard-ge-c++23
99
// UNSUPPORTED: no-filesystem
1010
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
1111

libcxx/test/std/input.output/iostream.format/print.fun/no_file_description.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//
66
//===----------------------------------------------------------------------===//
77

8-
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
8+
// UNSUPPORTED: standard-le-c++20
99
// UNSUPPORTED: no-filesystem
1010
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
1111

libcxx/test/std/localization/locale.stdcvt/depr.verify.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
// UNSUPPORTED: c++03, c++11, c++14, c++26
9+
// UNSUPPORTED: standard-le-c++14, standard-ge-c++26
1010
// UNSUPPORTED: no-wide-characters
1111

1212
// <codecvt>

libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/depr.verify.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
// UNSUPPORTED: c++03, c++11, c++14, c++26
9+
// REQUIRES: standard-ge-c++17
10+
// UNSUPPORTED: standard-ge-c++26
1011

1112
// XFAIL: no-wide-characters
1213

libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/depr.verify.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX26_REMOVED_WSTRING_CONVERT
1010

11-
// UNSUPPORTED: c++03, c++11, c++14, c++26
11+
// UNSUPPORTED: standard-le-c++14, standard-ge-c++26
1212
// UNSUPPORTED: no-wide-characters
1313

1414
// <codecvt>

libcxx/test/std/strings/basic.string/string.capacity/reserve.deprecated_in_cxx20.verify.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// void reserve(); // Deprecated in C++20
1212

13-
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++26
13+
// UNSUPPORTED: standard-le-c++17, standard-ge-c++26
1414

1515
#include <string>
1616

libcxx/utils/libcxx/test/params.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,9 @@ def getSuitableClangTidy(cfg):
169169
AddFeature(std),
170170
AddSubstitution("%{cxx_std}", re.sub(r"\+", "x", std)),
171171
AddCompileFlag(lambda cfg: getStdFlag(cfg, std)),
172-
],
172+
]
173+
+ [AddFeature(f"standard-ge-{s}") for s in _allStandards if s <= std]
174+
+ [AddFeature(f"standard-le-{s}") for s in _allStandards if s >= std],
173175
),
174176
Parameter(
175177
name="optimization",

0 commit comments

Comments
 (0)