Backport -Wno-c++-compat to release branches so they build with clang 22

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Evergreen, Tools
    • Storage Engines - Foundations
    • 23.766
    • SE Foundations - 2026-09-15
    • None

      Part of the Evergreen ubuntu2004 host pool now carries mongodbtoolchain v5 with clang 22.1.0. mongodb-8.2, 8.0 and 7.0 build with -Weverything -Werror and lack -Wno-c++-compat in cmake/strict/clang_strict.cmake, so clang 22's new -Wc++-compat warnings (-Wimplicit-void-ptr-cast, -Wc++-hidden-decl) fail every clang task that lands on such a host. develop, 9.0 and 8.3 already have the flag from WT-14684 (commit 1b837ac578).

      Example failing patch: https://spruce.corp.mongodb.com/version/6a97dfa3e2d7a40007312906

      Scope:

      • Backport -Wno-c++-compat to mongodb-8.2, 8.0, 7.0.
      • Fix the remaining clang 22 -Wimplicit-int-conversion hits not covered by the flag (40 on 8.2, e.g. src/include/bitstring_inline.h:391).
      • dist/s_clang_scan pins clang 19.1.7 on 8.2 and develop, 12.0.1 on 8.0 and 8.1; update or relax the pin so clang-analyzer runs on the current toolchain. develop is affected by the pin too.
      • mongodb-8.1 has no Evergreen project; include only if cheap.

      Verify with an Evergreen patch per branch on ubuntu2004, ubuntu2004-asan, ubuntu2004-minimal.

      Branch Has -Wno-c++-compat Evergreen clang Status
      develop, 9.0, 8.3 yes toolchain v5 ok
      8.2 no v5 confirmed failing on clang 22 hosts
      8.0 no v5 exposed, will fail on clang 22 hosts
      7.0 no v5 exposed, will fail on clang 22 hosts
      8.1 no no Evergreen project potentially exposed

            Assignee:
            Yury Ershov
            Reporter:
            Yury Ershov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: