From nobody Mon Jul 10 15:48:04 2023 X-Original-To: dev-commits-ports-all@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 4R07gm2b8QzZVtg; Mon, 10 Jul 2023 15:48:04 +0000 (UTC) (envelope-from git@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 4R07gm27Xnz4bBM; Mon, 10 Jul 2023 15:48:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689004084; 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; bh=9f7jZSJRsXVuL8vVSDqVdY5Uuf3tLdagyP/zfO1WDBE=; b=fjs/AH928Ffa108ZwcmOUIlEr7ffSutZbHivqZTkGFZULFsTtyuHBqYNnpv6RpJ+hags5M 9iq/GWAoo7VfGhcaoWeKY1I7yUt4QFN8hnwDOx3NuhBU+G2VHvO27jjihuywjpv0UzCWnT nYRxcJH1npQD2Qg34mF5kD4/74xWfYEcRgZDDr88RVv8Kk5mG+NLUbn0TigSiS7761NDY7 O92eaJ/vE2RDyZ/qojPbZhbmD0oPHe+q4yT4vsIU3fufA2VdNb3dXSY0sXNGjF/CuvUDZn +9uwNZTLk5NoMRnb3f58AhO0GNRfU40K53/dZMAEiJxN5KhBNvQfgsY6hR1pnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689004084; 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; bh=9f7jZSJRsXVuL8vVSDqVdY5Uuf3tLdagyP/zfO1WDBE=; b=dvWVVY/Y/OjAb82jhjJVJrlJ/+VIdi/R5gJS1Scv0kcbRp82rQI8XPozz6o9zRKBPuKINe 66yuPvn4/s3M2xWrbeO3QfoxIvoZcNNNSoNUrGgmdHjzixSx1z00FRUTbnR2z7k8ePI8Xf 5lUBk5xX2CURoDATh52an/+rs3iGFmOaa5noho1TXrDpuA/46fJ42KLPSYk36afzUEWZIb +UWLS9jlC/TRn/ocWRp92PfGn038AOs7zUQ+2+/y/KDy9bGfO3xvXrvEuxE20Fs0brBFhw Wd/REdzFdRIEA3OFjCh5pwQddp9sf7sb68J6KPCHPJcL3XLOg19Jm0TnBumOXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689004084; a=rsa-sha256; cv=none; b=Og7aC6q5jDmRlpFK2aG4YnROEQjfaq3kqbeOzF5GmVCrmKfF/i0lwWSojTQ6FACw+pUAa1 Hm3wKO8MpWTmSWMbktYeScwzNpqV/Ru0XHupDcbWn/DsCGb59llU5ouXdMblSwVuRbqF8s /5MnLSdwmlAGehC2mthoXgO/VbHVeYyNpIIe90Zn9aCmYOXGETyQCO53K6PaHkwIXD/QCn ipaG/2elCgfJtPTEViHVEWcyG99++ij72JAuIjxRGpkvwWgrA71qzJDBj5cYVPcayyi40W Xe6Ur8obotsiJ1q4IBXE6sUI6TBf6pJvFM7g8wAtd/MpQCq2V77ID3vzqjmJAg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4R07gm16VWzqrD; Mon, 10 Jul 2023 15:48:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36AFm4St087454; Mon, 10 Jul 2023 15:48:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36AFm49K087453; Mon, 10 Jul 2023 15:48:04 GMT (envelope-from git) Date: Mon, 10 Jul 2023 15:48:04 GMT Message-Id: <202307101548.36AFm49K087453@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Raphael Kubo da Costa Subject: git: 1bc415d2156e - main - devel/kdevelop: Import upstream fix for C++17-related build issue List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rakuco X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1bc415d2156e06493d91caf26cfa0cf66b2764cc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rakuco: URL: https://cgit.FreeBSD.org/ports/commit/?id=1bc415d2156e06493d91caf26cfa0cf66b2764cc commit 1bc415d2156e06493d91caf26cfa0cf66b2764cc Author: Raphael Kubo da Costa AuthorDate: 2023-07-10 15:46:38 +0000 Commit: Raphael Kubo da Costa CommitDate: 2023-07-10 15:47:57 +0000 devel/kdevelop: Import upstream fix for C++17-related build issue Replace the current -Wno-error=enum-constexpr-conversion workaround by a proper fix that was implemented upstream. Approved by: kde (arrowd) Differential Revision: https://reviews.freebsd.org/D40957 --- devel/kdevelop/Makefile | 9 +-- ...ch-git_ede1cf4ad6f945349060db9446c489e3fd34dec4 | 66 ++++++++++++++++++++++ 2 files changed, 67 insertions(+), 8 deletions(-) diff --git a/devel/kdevelop/Makefile b/devel/kdevelop/Makefile index 3f168b889d72..4512811fa2b2 100644 --- a/devel/kdevelop/Makefile +++ b/devel/kdevelop/Makefile @@ -62,11 +62,4 @@ SHEBANG_LANG= zsh zsh_OLD_CMD= /bin/zsh zsh_CMD= ${LOCALBASE}/bin/zsh -.include - -.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 160 -# Reported upstream: https://bugs.kde.org/show_bug.cgi?id=471995 -CXXFLAGS+= -Wno-error=enum-constexpr-conversion -.endif - -.include +.include diff --git a/devel/kdevelop/files/patch-git_ede1cf4ad6f945349060db9446c489e3fd34dec4 b/devel/kdevelop/files/patch-git_ede1cf4ad6f945349060db9446c489e3fd34dec4 new file mode 100644 index 000000000000..895038ad0952 --- /dev/null +++ b/devel/kdevelop/files/patch-git_ede1cf4ad6f945349060db9446c489e3fd34dec4 @@ -0,0 +1,66 @@ +From ede1cf4ad6f945349060db9446c489e3fd34dec4 Mon Sep 17 00:00:00 2001 +From: Igor Kushnir +Date: Fri, 7 Jul 2023 09:50:30 +0300 +Subject: [PATCH] Don't cast out-of-enum-range -1 to CommonIntegralTypes + +This fixes the following Clang 16 compilation error: +kdevelop/plugins/clang/duchain/cursorkindtraits.h:217:7: error: integer value -1 is outside the valid range of values [0, 255] for the enumeration type 'CommonIntegralTypes' [-Wenum-constexpr-conversion] + : static_cast(-1); + +Quote from https://github.com/llvm/llvm-project/issues/59036 : + The -Wenum-constexpr-conversion warning was created to account for + the fact that casting integers to enums outside of the valid range + of the enum is UB in C++17. Constant expressions invoking UB lead to + an ill-formed program. + +BUG: 471995 +FIXED-IN: 5.12.230800 +--- + kdevplatform/language/duchain/types/integraltype.h | 3 ++- + plugins/clang/duchain/builder.cpp | 2 +- + plugins/clang/duchain/cursorkindtraits.h | 2 +- + 3 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/kdevplatform/language/duchain/types/integraltype.h b/kdevplatform/language/duchain/types/integraltype.h +index 32b9b0084c..75516111c7 100644 +--- kdevplatform/language/duchain/types/integraltype.h ++++ kdevplatform/language/duchain/types/integraltype.h +@@ -50,7 +50,8 @@ public: + TypeChar16_t, + TypeChar32_t, + TypeHalf, +- TypeLanguageSpecific = 200 ++ TypeLanguageSpecific = 200, ++ TypeNotIntegralType = 255 + }; + + /// Default constructor +diff --git a/plugins/clang/duchain/builder.cpp b/plugins/clang/duchain/builder.cpp +index a75020d02d..76b301468e 100644 +--- plugins/clang/duchain/builder.cpp ++++ plugins/clang/duchain/builder.cpp +@@ -508,7 +508,7 @@ struct Visitor + return context; + } + +- template = dummy> ++ template = dummy> + AbstractType *createType(CXType, CXCursor) + { + // TODO: would be nice to instantiate a ConstantIntegralType here and set a value if possible +diff --git a/plugins/clang/duchain/cursorkindtraits.h b/plugins/clang/duchain/cursorkindtraits.h +index 2bd4c83c4f..0e0c6bcdc0 100644 +--- plugins/clang/duchain/cursorkindtraits.h ++++ plugins/clang/duchain/cursorkindtraits.h +@@ -214,7 +214,7 @@ constexpr IntegralType::CommonIntegralTypes integralType(CXTypeKind TK) + ||TK == CXType_Char_S + ||TK == CXType_UChar + ||TK == CXType_SChar) ? IntegralType::TypeChar +- : static_cast(-1); ++ : IntegralType::TypeNotIntegralType; + } + + constexpr bool isArrayType(CXTypeKind TK) +-- +GitLab +