Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add clang 19 CI configuration #1283

Merged
merged 2 commits into from
Oct 31, 2024
Merged

Add clang 19 CI configuration #1283

merged 2 commits into from
Oct 31, 2024

Conversation

msimberg
Copy link
Contributor

@msimberg msimberg commented Oct 23, 2024

Also enables libc++'s hardening mode (https://libcxx.llvm.org/Hardening.html).

I've initially enabled the strongest mode (_LIBCPP_HARDENING_MODE_DEBUG) but what checks are actually enabled seems to depend on the actual ABI used to compile libc++, so I don't know if all checks are actually enabled.

clang 19 warns about aligned_storage_t being deprecated, so this requires #1280.

clang 19 also diagnoses member functions that can't be instantiated, even if they're unused. deque_anchor had a few unused functions that could not be instantiated, but according to the standard they're allowed to not be instantiated. clang 19 diagnoses these even when unused leading to compilaton failures. This PR removes the unused member functions. A similar issue is llvm/llvm-project#102177. llvm/llvm-project#102177 gives a bit more motivation for the change. Supposedly GCC 15 will make the same change, so sooner or later we would be bitten by this anyway, and it's nice to have this diagnosed.

Fixes #1300.

@msimberg msimberg self-assigned this Oct 23, 2024
Copy link

codacy-production bot commented Oct 23, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.02% (target: -1.00%) (target: 90.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (16ec3b5) 18282 13804 75.51%
Head commit (accda74) 18282 (+0) 13808 (+4) 75.53% (+0.02%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#1283) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

Starting with clang 19, the unused member functions cas that take a deque_anchor fail to compile
because they attempt to call load directly on the deque_anchor type, whereas they should be calling
load on the atomic stored in the deque_anchor. Neither GCC nor clang until version 18 failed to
compile the broken member functions (because they were unused they were never instantiatied). Since
the functions are unused, simply remove them.

Related llvm issue: llvm/llvm-project#102177.
@msimberg msimberg added this pull request to the merge queue Oct 31, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 31, 2024
@msimberg msimberg merged commit bfa0be5 into pika-org:main Oct 31, 2024
36 of 37 checks passed
@msimberg msimberg deleted the clang-19-ci branch October 31, 2024 18:23
@msimberg msimberg added this to the 0.30.0 milestone Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Archive
Development

Successfully merging this pull request may close these issues.

Build is broken due to this error: no member named 'load' in 'deque_anchor<T>'
1 participant