From 29f1eed9ab6d66e1eb0089f3b0569a53f3ff1560 Mon Sep 17 00:00:00 2001 From: Jorijn van der Graaf Date: Sun, 1 Nov 2026 03:06:25 +0100 Subject: [PATCH] fix(session): keep the request types out of an anonymous namespace Session::State has module linkage, and six of its members take Job or Waiter, which lived in an anonymous namespace: clang warned on each build that a TU-local entity was exposed (-WTU-local-entity-exposure). They move to a named namespace, SessionImpl, which this file alone uses and nothing exports. No behaviour changes. Co-Authored-By: Claude Opus 5.5 --- implementations/Crafter.Debug-Session.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/implementations/Crafter.Debug-Session.cpp b/implementations/Crafter.Debug-Session.cpp index 28d56e4..0176f47 100644 --- a/implementations/Crafter.Debug-Session.cpp +++ b/implementations/Crafter.Debug-Session.cpp @@ -16,7 +16,10 @@ import :Session; using namespace Crafter::Debug; using Crafter::Debug::Detail::Exchange; -namespace { +// Named, not anonymous: Session::State's members take these types, and a +// type with internal linkage in the signature of one with module linkage is +// an exposure clang warns about. Nothing here is exported. +namespace Crafter::Debug::SessionImpl { using Clock = std::chrono::steady_clock; // Request parameters, decoded through Codec so a mistyped request is @@ -245,6 +248,8 @@ namespace { }; } +using namespace Crafter::Debug::SessionImpl; + namespace Crafter::Debug { struct Session::State { SessionOptions options;