From owner-svn-src-projects@freebsd.org Thu Aug 6 16:42:49 2020 Return-Path: Delivered-To: svn-src-projects@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 728423A6AD6 for ; Thu, 6 Aug 2020 16:42:49 +0000 (UTC) (envelope-from dim@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BMvRs2Sb5z4L5g; Thu, 6 Aug 2020 16:42:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 38D01A019; Thu, 6 Aug 2020 16:42:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 076GgnIV065749; Thu, 6 Aug 2020 16:42:49 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 076Ggmvr065747; Thu, 6 Aug 2020 16:42:48 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202008061642.076Ggmvr065747@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 6 Aug 2020 16:42:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r363970 - projects/clang1100-import/contrib/llvm-project/clang/include/clang/AST X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: projects/clang1100-import/contrib/llvm-project/clang/include/clang/AST X-SVN-Commit-Revision: 363970 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Aug 2020 16:42:49 -0000 Author: dim Date: Thu Aug 6 16:42:48 2020 New Revision: 363970 URL: https://svnweb.freebsd.org/changeset/base/363970 Log: Reapply r349876: Apply a workaround to be able to build clang 8.0.0 headers with clang 3.4.1, which is still in the stable/10 branch. It looks like clang 3.4.1 implements static_asserts by instantiating a temporary static object, and if those are in an anonymous union, it results in "error: anonymous union can only contain non-static data members". To work around this implementation limitation, move the static_asserts in question out of the anonymous unions. This should make building the latest stable/11 from stable/10 possible again. Reported by: Mike Tancsa Modified: projects/clang1100-import/contrib/llvm-project/clang/include/clang/AST/DeclBase.h projects/clang1100-import/contrib/llvm-project/clang/include/clang/AST/Type.h Modified: projects/clang1100-import/contrib/llvm-project/clang/include/clang/AST/DeclBase.h ============================================================================== --- projects/clang1100-import/contrib/llvm-project/clang/include/clang/AST/DeclBase.h Thu Aug 6 16:27:24 2020 (r363969) +++ projects/clang1100-import/contrib/llvm-project/clang/include/clang/AST/DeclBase.h Thu Aug 6 16:42:48 2020 (r363970) @@ -1760,30 +1760,30 @@ class DeclContext { (protected) ObjCContainerDeclBitfields ObjCContainerDeclBits; LinkageSpecDeclBitfields LinkageSpecDeclBits; BlockDeclBitfields BlockDeclBits; - - static_assert(sizeof(DeclContextBitfields) <= 8, - "DeclContextBitfields is larger than 8 bytes!"); - static_assert(sizeof(TagDeclBitfields) <= 8, - "TagDeclBitfields is larger than 8 bytes!"); - static_assert(sizeof(EnumDeclBitfields) <= 8, - "EnumDeclBitfields is larger than 8 bytes!"); - static_assert(sizeof(RecordDeclBitfields) <= 8, - "RecordDeclBitfields is larger than 8 bytes!"); - static_assert(sizeof(OMPDeclareReductionDeclBitfields) <= 8, - "OMPDeclareReductionDeclBitfields is larger than 8 bytes!"); - static_assert(sizeof(FunctionDeclBitfields) <= 8, - "FunctionDeclBitfields is larger than 8 bytes!"); - static_assert(sizeof(CXXConstructorDeclBitfields) <= 8, - "CXXConstructorDeclBitfields is larger than 8 bytes!"); - static_assert(sizeof(ObjCMethodDeclBitfields) <= 8, - "ObjCMethodDeclBitfields is larger than 8 bytes!"); - static_assert(sizeof(ObjCContainerDeclBitfields) <= 8, - "ObjCContainerDeclBitfields is larger than 8 bytes!"); - static_assert(sizeof(LinkageSpecDeclBitfields) <= 8, - "LinkageSpecDeclBitfields is larger than 8 bytes!"); - static_assert(sizeof(BlockDeclBitfields) <= 8, - "BlockDeclBitfields is larger than 8 bytes!"); }; + + static_assert(sizeof(DeclContextBitfields) <= 8, + "DeclContextBitfields is larger than 8 bytes!"); + static_assert(sizeof(TagDeclBitfields) <= 8, + "TagDeclBitfields is larger than 8 bytes!"); + static_assert(sizeof(EnumDeclBitfields) <= 8, + "EnumDeclBitfields is larger than 8 bytes!"); + static_assert(sizeof(RecordDeclBitfields) <= 8, + "RecordDeclBitfields is larger than 8 bytes!"); + static_assert(sizeof(OMPDeclareReductionDeclBitfields) <= 8, + "OMPDeclareReductionDeclBitfields is larger than 8 bytes!"); + static_assert(sizeof(FunctionDeclBitfields) <= 8, + "FunctionDeclBitfields is larger than 8 bytes!"); + static_assert(sizeof(CXXConstructorDeclBitfields) <= 8, + "CXXConstructorDeclBitfields is larger than 8 bytes!"); + static_assert(sizeof(ObjCMethodDeclBitfields) <= 8, + "ObjCMethodDeclBitfields is larger than 8 bytes!"); + static_assert(sizeof(ObjCContainerDeclBitfields) <= 8, + "ObjCContainerDeclBitfields is larger than 8 bytes!"); + static_assert(sizeof(LinkageSpecDeclBitfields) <= 8, + "LinkageSpecDeclBitfields is larger than 8 bytes!"); + static_assert(sizeof(BlockDeclBitfields) <= 8, + "BlockDeclBitfields is larger than 8 bytes!"); /// FirstDecl - The first declaration stored within this declaration /// context. Modified: projects/clang1100-import/contrib/llvm-project/clang/include/clang/AST/Type.h ============================================================================== --- projects/clang1100-import/contrib/llvm-project/clang/include/clang/AST/Type.h Thu Aug 6 16:27:24 2020 (r363969) +++ projects/clang1100-import/contrib/llvm-project/clang/include/clang/AST/Type.h Thu Aug 6 16:42:48 2020 (r363970) @@ -1803,41 +1803,41 @@ class alignas(8) Type : public ExtQualsTypeCommonBase DependentTemplateSpecializationTypeBitfields DependentTemplateSpecializationTypeBits; PackExpansionTypeBitfields PackExpansionTypeBits; - - static_assert(sizeof(TypeBitfields) <= 8, - "TypeBitfields is larger than 8 bytes!"); - static_assert(sizeof(ArrayTypeBitfields) <= 8, - "ArrayTypeBitfields is larger than 8 bytes!"); - static_assert(sizeof(AttributedTypeBitfields) <= 8, - "AttributedTypeBitfields is larger than 8 bytes!"); - static_assert(sizeof(AutoTypeBitfields) <= 8, - "AutoTypeBitfields is larger than 8 bytes!"); - static_assert(sizeof(BuiltinTypeBitfields) <= 8, - "BuiltinTypeBitfields is larger than 8 bytes!"); - static_assert(sizeof(FunctionTypeBitfields) <= 8, - "FunctionTypeBitfields is larger than 8 bytes!"); - static_assert(sizeof(ObjCObjectTypeBitfields) <= 8, - "ObjCObjectTypeBitfields is larger than 8 bytes!"); - static_assert(sizeof(ReferenceTypeBitfields) <= 8, - "ReferenceTypeBitfields is larger than 8 bytes!"); - static_assert(sizeof(TypeWithKeywordBitfields) <= 8, - "TypeWithKeywordBitfields is larger than 8 bytes!"); - static_assert(sizeof(ElaboratedTypeBitfields) <= 8, - "ElaboratedTypeBitfields is larger than 8 bytes!"); - static_assert(sizeof(VectorTypeBitfields) <= 8, - "VectorTypeBitfields is larger than 8 bytes!"); - static_assert(sizeof(SubstTemplateTypeParmPackTypeBitfields) <= 8, - "SubstTemplateTypeParmPackTypeBitfields is larger" - " than 8 bytes!"); - static_assert(sizeof(TemplateSpecializationTypeBitfields) <= 8, - "TemplateSpecializationTypeBitfields is larger" - " than 8 bytes!"); - static_assert(sizeof(DependentTemplateSpecializationTypeBitfields) <= 8, - "DependentTemplateSpecializationTypeBitfields is larger" - " than 8 bytes!"); - static_assert(sizeof(PackExpansionTypeBitfields) <= 8, - "PackExpansionTypeBitfields is larger than 8 bytes"); }; + + static_assert(sizeof(TypeBitfields) <= 8, + "TypeBitfields is larger than 8 bytes!"); + static_assert(sizeof(ArrayTypeBitfields) <= 8, + "ArrayTypeBitfields is larger than 8 bytes!"); + static_assert(sizeof(AttributedTypeBitfields) <= 8, + "AttributedTypeBitfields is larger than 8 bytes!"); + static_assert(sizeof(AutoTypeBitfields) <= 8, + "AutoTypeBitfields is larger than 8 bytes!"); + static_assert(sizeof(BuiltinTypeBitfields) <= 8, + "BuiltinTypeBitfields is larger than 8 bytes!"); + static_assert(sizeof(FunctionTypeBitfields) <= 8, + "FunctionTypeBitfields is larger than 8 bytes!"); + static_assert(sizeof(ObjCObjectTypeBitfields) <= 8, + "ObjCObjectTypeBitfields is larger than 8 bytes!"); + static_assert(sizeof(ReferenceTypeBitfields) <= 8, + "ReferenceTypeBitfields is larger than 8 bytes!"); + static_assert(sizeof(TypeWithKeywordBitfields) <= 8, + "TypeWithKeywordBitfields is larger than 8 bytes!"); + static_assert(sizeof(ElaboratedTypeBitfields) <= 8, + "ElaboratedTypeBitfields is larger than 8 bytes!"); + static_assert(sizeof(VectorTypeBitfields) <= 8, + "VectorTypeBitfields is larger than 8 bytes!"); + static_assert(sizeof(SubstTemplateTypeParmPackTypeBitfields) <= 8, + "SubstTemplateTypeParmPackTypeBitfields is larger" + " than 8 bytes!"); + static_assert(sizeof(TemplateSpecializationTypeBitfields) <= 8, + "TemplateSpecializationTypeBitfields is larger" + " than 8 bytes!"); + static_assert(sizeof(DependentTemplateSpecializationTypeBitfields) <= 8, + "DependentTemplateSpecializationTypeBitfields is larger" + " than 8 bytes!"); + static_assert(sizeof(PackExpansionTypeBitfields) <= 8, + "PackExpansionTypeBitfields is larger than 8 bytes"); private: template friend class TypePropertyCache;