Skip to content

Add Clang 22 CI build#326

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

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

Conversation

@offa
Copy link
Copy Markdown
Collaborator

@offa offa commented Feb 26, 2026

No description provided.

@offa
Copy link
Copy Markdown
Collaborator Author

offa commented Feb 26, 2026

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

@Dobiasd
Copy link
Copy Markdown
Owner

Dobiasd commented Feb 27, 2026

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
Copy link
Copy Markdown
Collaborator Author

offa commented Feb 28, 2026

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

@Dobiasd
Copy link
Copy Markdown
Owner

Dobiasd commented Feb 28, 2026

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
Copy link
Copy Markdown
Collaborator Author

offa commented Feb 28, 2026

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
Copy link
Copy Markdown
Owner

Dobiasd commented Feb 28, 2026

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

@offa
Copy link
Copy Markdown
Collaborator Author

offa commented Feb 28, 2026

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

@Dobiasd
Copy link
Copy Markdown
Owner

Dobiasd commented Feb 28, 2026

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

@offa
Copy link
Copy Markdown
Collaborator Author

offa commented Mar 23, 2026

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

@offa
Copy link
Copy Markdown
Collaborator Author

offa commented Mar 30, 2026

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
Copy link
Copy Markdown
Collaborator Author

offa commented Mar 30, 2026

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

@Dobiasd
Copy link
Copy Markdown
Owner

Dobiasd commented Mar 30, 2026

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
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