From 8dc8830920450c8c1f8c722fd12b7370a38ad5dc Mon Sep 17 00:00:00 2001 From: Hugo Date: Thu, 15 Oct 2026 09:06:20 +0200 Subject: [PATCH 1/2] ci: build on macos-14, whose AppleClang 15 is the oldest compiler CoreTrace uses CoreTrace builds the analyzer on macos-14 with AppleClang 15 (Xcode 15.4). macos-latest has a newer AppleClang, so C++20 features that AppleClang 15 lacks pass here and fail there, as the structured binding captured in AnalyzerApp.cpp did in v0.23.0. Refs #228 --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f3ea41c..8f0b999 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,9 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest] + # macos-14 builds with AppleClang 15 (Xcode 15.4), the oldest compiler CoreTrace builds + # the analyzer with; macos-latest has a newer one (#228). + os: [ubuntu-latest, macos-latest, macos-14] steps: - uses: actions/checkout@v4 From 0b1cae796f7fea818c7f9cc3636af06be2282412 Mon Sep 17 00:00:00 2001 From: Hugo Date: Thu, 15 Oct 2026 09:06:21 +0200 Subject: [PATCH 2/2] fix(app): capture the member, not the structured binding, for AppleClang 15 AppleClang 15 cannot capture a structured binding in a lambda, a C++20 feature it supports from version 16, so v0.23.0 does not build on macos-14. The predicate now captures wrapper.pairs through an init-capture; it is the same predicate. Closes #228 --- src/app/AnalyzerApp.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/AnalyzerApp.cpp b/src/app/AnalyzerApp.cpp index ed68226..5a1cde3 100644 --- a/src/app/AnalyzerApp.cpp +++ b/src/app/AnalyzerApp.cpp @@ -1086,8 +1086,10 @@ static AppStatus analyzeWithSharedModuleLoading(const std::vector& continue; if (common.params != wrapper.params) common.pairs.clear(); - std::erase_if(common.pairs, - [&](const auto& pair) { return wrapper.pairs.count(pair) == 0; }); + // Captures the member, not the structured binding: AppleClang 15 cannot + // capture a structured binding. + std::erase_if(common.pairs, [&pairs = wrapper.pairs](const auto& pair) + { return pairs.count(pair) == 0; }); } } grew = false;