Skip to content

Add Clang 22 CI build - #326

Merged
Dobiasd merged 5 commits into
Dobiasd:masterfrom
offa:clang22
Mar 30, 2026
Merged

Add Clang 22 CI build#326
Dobiasd merged 5 commits into
Dobiasd:masterfrom
offa:clang22

Conversation

@offa

@offa offa commented Feb 26, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@offa

offa commented Feb 26, 2026

Copy link
Copy Markdown
Collaborator Author

doctest causes an error under clang‑22 (doctest/doctest#1042).

@Dobiasd

Dobiasd commented Feb 27, 2026

Copy link
Copy Markdown
Owner

Thanks a lot for reporting in the doctest repo! ❤️

Since we have no urgency here, let's see when they will fix it, so we don't need a workaround like this in our cmake/warnings.cmake:

    # See https://github.com/doctest/doctest/issues/1042
    if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
        CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 22)
        list(APPEND project_warnings -Wno-c2y-extensions)
    endif ()

🙈

@offa

offa commented Feb 28, 2026

Copy link
Copy Markdown
Collaborator Author

This is the only warning, so users can disable the warnings on their side without any other problems I guess.

@Dobiasd

Dobiasd commented Feb 28, 2026

Copy link
Copy Markdown
Owner

Users of FunctionalPlus probably won't even need to disable the warning, because doctest is only imported in the test files, not in the actual library headers.

@offa

offa commented Feb 28, 2026

Copy link
Copy Markdown
Collaborator Author

Users of FunctionalPlus probably won't even need to disable the warning, because doctest is only imported in the test files, not in the actual library headers.

Ah yes, that makes sense. So even less urgent.

@Dobiasd

Dobiasd commented Feb 28, 2026

Copy link
Copy Markdown
Owner

But I guess we need to disable it here to make the CI of this PR pass. Or what approach would you suggest?

@offa

offa commented Feb 28, 2026

Copy link
Copy Markdown
Collaborator Author

I’m not in a hurry with the PR, and it will still take some time before Clang 22 is widely adopted.

@Dobiasd

Dobiasd commented Feb 28, 2026

Copy link
Copy Markdown
Owner

Ah, right. Yeah, then let's just wait. ☺️

@offa

offa commented Mar 23, 2026

Copy link
Copy Markdown
Collaborator Author

Quick update: Doctest fixed the problem and we now just have to wait for a new release.

@offa

offa commented Mar 30, 2026

Copy link
Copy Markdown
Collaborator Author

New release is out – with Clang 22 support 🎉.

Conan package of doctest 2.5.0 is not yet available, but ticket open: conan-io/conan-center-index#29875

However, I still need to fix a macOS issue to get back to a green build:

test/udemy_course_test.cpp:315:23: error: reference to 'user' is ambiguous
  315 |     const std::vector<user> users = {
      |                       ^

Mac OS picks up a user type from some internal XCode SDK headers 🤷‍♂️.

@offa
offa marked this pull request as ready for review March 30, 2026 15:30
Comment thread test/udemy_course_test.cpp
@offa
offa requested a review from Dobiasd March 30, 2026 17:06
@offa

offa commented Mar 30, 2026

Copy link
Copy Markdown
Collaborator Author

Final review and we are good to go I hope :-)

@Dobiasd

Dobiasd commented Mar 30, 2026

Copy link
Copy Markdown
Owner

Perfect, thanks a lot! ❤️

@Dobiasd
Dobiasd merged commit 961d0e9 into Dobiasd:master Mar 30, 2026
25 checks passed
@offa
offa deleted the clang22 branch March 30, 2026 18:38
@Dobiasd Dobiasd mentioned this pull request Apr 27, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants