From nobody Fri Jun 24 20:41:41 2022 X-Original-To: toolchain@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id ED43086FCDA for ; Fri, 24 Jun 2022 20:41:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LV8DP5XxJz4lfL for ; Fri, 24 Jun 2022 20:41:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9EA2B16FB6 for ; Fri, 24 Jun 2022 20:41:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 25OKffRR023853 for ; Fri, 24 Jun 2022 20:41:41 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 25OKffem023852 for toolchain@FreeBSD.org; Fri, 24 Jun 2022 20:41:41 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: toolchain@FreeBSD.org Subject: [Bug 264877] clang-14 fails with unreasonable cryptic message on a valid C++ code Date: Fri, 24 Jun 2022 20:41:41 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 13.1-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: dim@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: toolchain@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Maintenance of FreeBSD s integrated toolchain List-Archive: https://lists.freebsd.org/archives/freebsd-toolchain List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656103301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zaHdBqoNfRtnjCs+MjV8mj9vcvchAPGj9cMLSBORk4Y=; b=jtOWC2s2oLDRN3vcubeuG2oi5k2a4O2hcBf8GeoUxDGXzZwb0NKZnTLZGoVvCSWFFifD0n 0DPfZNsOQ8t4Vs1Ml9vzH9rRQmpjZShc4EqUBWD+hvLydiy1MbmNPnzHPL8inWEO44PExg 3GeWtce85jCECVB7R6i6GHeKJdKlpIkhwTqdZKOGpQhItd4V2lmAAb4O3fqJo1DDCGjJJG aalcO5u4qptV1Mdf3hOGQEgw87qAGcNYFgZbax7MV9IWqAJQshtj0y9+KWjHq6L7vBmilE yAmLn4riC+4o8SRURP6OEDkf0/dGFKSv+ATtlOQxhpmqnjnNHE5hOgwOfAhnkg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1656103301; a=rsa-sha256; cv=none; b=Ky40A0Uio2UPx/zEXnTSp0yZKcqBt9ZxE56yFpfSW++h0fKWGkwq3fsZqN4lL6/TAJT4jC AUzaULgI/0sLN9d9M8vKNfVfPVxDHFvR8BpApSta57uWoUyz55xl3C3YFrYpMegM+Qispx 6pKecFTqioNz+a/pZZWq/jJ93h3ukcwds1XPAae8FLvHbnrxV8fJvupUUWLZcR0kN8gB4p KxqhuhUtDMdLTO3k62J81MkHoxfbTPtoFCbO530lqVfQZWHzCT++ApIYyMb46hk2oQuFlr fswAuLu1foDl/wFGOI4Fx2bjs5elCZNBbOsJUZ7y2xavR9QYAk+V+IzqrSPW7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D264877 Dimitry Andric changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |emaste@freebsd.org --- Comment #2 from Dimitry Andric --- I'm inclined to say "you're holding it wrong" here, but this discussion sho= uld really be taken upstream. Previously, when only including , you were just lucky that the s= wap definition was pulled in transitively via (and that was also completely by accident), and it seemed to sort-of work. At some point upstream committed https://github.com/llvm/llvm-project/commit/6adbc83ee9e46b476e0f75d5671c3a2= 1f675a936: commit 6adbc83ee9e46b476e0f75d5671c3a21f675a936 Author: Christopher Di Bella Date: Sat Jun 5 02:47:47 2021 +0000 [libcxx][modularisation] moves content out of Moves: * `std::move`, `std::forward`, `std::declval`, and `std::swap` into `__utility/${FUNCTION_NAME}`. * `std::swap_ranges` and `std::iter_swap` into `__algorithm/${FUNCTION_NAME}` Differential Revision: https://reviews.llvm.org/D103734 This moved stuff that should really be in , such as swap() into mo= re modular headers, and it had the side effect of only leaving a partial swap declaration in that is explicitly *not* exposed (via the _LIBCPP_INLINE_VISIBILITY macro): template inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __swap_result_t<_Tp> swap(_Tp& __x, _Tp& __y) _NOEXCEPT_(is_nothrow_move_constructible<_Tp>::val= ue && is_nothrow_move_assignable<_Tp>::value); I am unsure why this declaration has been left in, though. If I simply comm= ent it out, the compile error for your test case at least becomes a lot clearer: bug264877/test.cpp:9:7: error: no member named 'swap' in namespace 'std' std::swap(X1, X2); ~~~~~^ However, the decltype of swap() is used in a few macros after that, so completely removing it might not be the best course of action. --=20 You are receiving this mail because: You are the assignee for the bug.=