[libcxx-commits] [libcxx] a5cc1dc - [NFC][libc++] Removes obsolete compiler support. (#80481)
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Feb 9 08:29:06 PST 2024
Author: Mark de Wever
Date: 2024-02-09T17:29:02+01:00
New Revision: a5cc1dc82d61c156f75edc72eccacdb6776bf3f1
URL: https://github.com/llvm/llvm-project/commit/a5cc1dc82d61c156f75edc72eccacdb6776bf3f1
DIFF: https://github.com/llvm/llvm-project/commit/a5cc1dc82d61c156f75edc72eccacdb6776bf3f1.diff
LOG: [NFC][libc++] Removes obsolete compiler support. (#80481)
These work-arounds were slated for removal in LLVM-18, but missed the
deadline.
Added:
Modified:
libcxx/test/tools/clang_tidy_checks/header_exportable_declarations.cpp
Removed:
################################################################################
diff --git a/libcxx/test/tools/clang_tidy_checks/header_exportable_declarations.cpp b/libcxx/test/tools/clang_tidy_checks/header_exportable_declarations.cpp
index 5157a45452face..0a48f855fba069 100644
--- a/libcxx/test/tools/clang_tidy_checks/header_exportable_declarations.cpp
+++ b/libcxx/test/tools/clang_tidy_checks/header_exportable_declarations.cpp
@@ -69,50 +69,18 @@ header_exportable_declarations::header_exportable_declarations(
}
std::optional<llvm::StringRef> list = Options.get("SkipDeclarations");
- // TODO(LLVM-17) Remove clang 15 work-around.
-#if defined(__clang_major__) && __clang_major__ < 16
- if (list) {
- std::string_view s = *list;
- auto b = s.begin();
- auto e = std::find(b, s.end(), ' ');
- while (b != e) {
- skip_decls_.emplace(b, e);
- if (e == s.end())
- break;
- b = e + 1;
- e = std::find(b, s.end(), ' ');
- }
- }
-#else // defined(__clang_major__) && __clang_major__ < 16
if (list)
for (auto decl : std::views::split(*list, ' ')) {
std::string s;
std::ranges::copy(decl, std::back_inserter(s)); // use range based constructor
skip_decls_.emplace(std::move(s));
}
-#endif // defined(__clang_major__) && __clang_major__ < 16
decls_ = skip_decls_;
list = Options.get("ExtraDeclarations");
- // TODO(LLVM-17) Remove clang 15 work-around.
-#if defined(__clang_major__) && __clang_major__ < 16
- if (list) {
- std::string_view s = *list;
- auto b = s.begin();
- auto e = std::find(b, s.end(), ' ');
- while (b != e) {
- std::cout << "using ::" << std::string_view{b, e} << ";\n";
- if (e == s.end())
- break;
- b = e + 1;
- e = std::find(b, s.end(), ' ');
- }
- }
-#else // defined(__clang_major__) && __clang_major__ < 16
if (list)
for (auto decl : std::views::split(*list, ' '))
std::cout << "using ::" << std::string_view{decl.data(), decl.size()} << ";\n";
-#endif // defined(__clang_major__) && __clang_major__ < 16
}
header_exportable_declarations::~header_exportable_declarations() {
More information about the libcxx-commits
mailing list