Skip to content

Fix build errors with LLVM 23 - #13673

Open
masaori335 wants to merge 2 commits into
apache:masterfrom
masaori335:llvm-23
Open

masaori335 wants to merge 2 commits into
apache:masterfrom
masaori335:llvm-23

Conversation

@masaori335

Copy link
Copy Markdown
Contributor

I faced some compile errors with LLVM-23.1 on macOS.

  1. libc++ 23 no longer provides transitively headers
  2. -Wunused-template and -Wunused-but-set-global are enabled by default

LLVM 23 flips libc++'s transitive-include compatibility block from
opt-out to opt-in (_LIBCPP_KEEP_TRANSITIVE_INCLUDES_LLVM23), so
<algorithm> and <string> no longer drag in <iterator> and <cstdlib>.
Include them where the symbols are actually used rather than relying
on the old default.
The const char (&)[N] overload of matches_bracketed_int_range can
never be selected: RecordElement::regex is a const char *, so the
string_view overload always wins. RecMessageRegisterRecvCb has had no
callers since traffic_manager was removed, leaving its cookie global
set but never read.
@masaori335 masaori335 added this to the 11.0.0 milestone Sep 14, 2026
@masaori335 masaori335 self-assigned this Sep 14, 2026
Copilot AI lite review requested due to automatic review settings September 14, 2026 01:59
@masaori335 masaori335 added the Build work related to build configuration or environment label Sep 14, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No unresolved review issues remain, and the changes address LLVM 23 compatibility warnings and errors.

Pull request overview

Fixes LLVM 23.1/macOS build errors by adding required standard-library headers and removing unused code.

Changes:

  • Adds direct <algorithm>, <iterator>, and <cstdlib> includes.
  • Removes unused record-message callbacks and template code.
File summaries
File Summary
src/traffic_cache_tool/CacheTool.cc Adds <algorithm>.
src/records/RecordsConfig.cc Removes unused template overload.
src/records/RecMessage.cc Removes unused callback state and function.
src/records/P_RecMessage.h Removes callback declaration.
src/records/P_RecDefs.h Removes callback type alias.
src/mgmt/config/ReloadCoordinator.cc Adds <iterator>.
plugins/multiplexer/ats-multiplexer.cc Adds <iterator>.
plugins/experimental/inliner/png.h Adds <iterator>.
plugins/experimental/inliner/cache-handler.h Adds <iterator>.
plugins/experimental/cookie_remap/cookiejar.cc Adds <cstdlib>.
lib/swoc/unit_tests/test_TextView.cc Adds <iterator>.
Review details
  • Files reviewed: 11/11 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Build work related to build configuration or environment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants