Repository navigation
fix(app): capture the member, not the structured binding, for AppleClang 15 - #229
Merged
Merged
Conversation
…eTrace 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
…ang 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #228
Problem
v0.23.0 does not build with AppleClang 15 (Xcode 15.4), the default compiler of the
macos-14runner on which CoreTrace builds the analyzer. CoreTrace's CI fails there on its update to v0.23.0 (CoreTrace/coretrace#194).src/app/AnalyzerApp.cpp:1090captures the structured bindingwrapperin a lambda, which AppleClang only supports from version 16. This CI builds onmacos-latest, whose AppleClang is newer, so it could not see the problem.Change
8dc8830(ci): build onmacos-14too. That job builds with AppleClang 15, so the next capture of this kind fails here instead of in CoreTrace. The steps specific to Linux (self-analysis, Code Scanning) do not run on it.0b1cae7(fix(app)): capture the member. The lambda captureswrapper.pairsthrough an init-capture,[&pairs = wrapper.pairs]. The predicate is the same.Validation
-Wpre-c++20-compatreports one captured structured binding, atAnalyzerApp.cpp:1090. With the fix, it reports none.clang-format20 leaves it unchanged.macos-14job: I have no such compiler locally.CoreTrace needs a release with this fix (v0.23.1) for CoreTrace/coretrace#169.