From owner-svn-src-stable-9@freebsd.org Mon Jan 29 18:11:28 2018 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDD07ED58CF; Mon, 29 Jan 2018 18:11:27 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9D42D7EB08; Mon, 29 Jan 2018 18:11:27 +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 9805E3C7C; Mon, 29 Jan 2018 18:11:27 +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 w0TIBRMP095941; Mon, 29 Jan 2018 18:11:27 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0TIBRdA095939; Mon, 29 Jan 2018 18:11:27 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801291811.w0TIBRdA095939@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 29 Jan 2018 18:11:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r328555 - in stable: 10/contrib/llvm/tools/clang/include/clang/Basic 10/contrib/llvm/tools/clang/lib/Sema 9/contrib/llvm/tools/clang/include/clang/Basic 9/contrib/llvm/tools/clang/lib/Sema X-SVN-Group: stable-9 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/contrib/llvm/tools/clang/include/clang/Basic 10/contrib/llvm/tools/clang/lib/Sema 9/contrib/llvm/tools/clang/include/clang/Basic 9/contrib/llvm/tools/clang/lib/Sema X-SVN-Commit-Revision: 328555 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jan 2018 18:11:28 -0000 Author: dim Date: Mon Jan 29 18:11:27 2018 New Revision: 328555 URL: https://svnweb.freebsd.org/changeset/base/328555 Log: Pull in r217197 from upstream clang trunk (by Richard Smith): PR20844: If we fail to list-initialize a reference, map to the referenced type before retrying the initialization to produce diagnostics. Otherwise, we may fail to produce any diagnostics, and silently produce invalid AST in a -Asserts build. Also add a note to this codepath to make it more clear why we were trying to create a temporary. This should fix assertions when parsing some forms of incomplete list intializers. Direct commit to stable/9 and stable/10, since stable/11 and head already have this upstream fix. Reported by: ajcbowhill@gmail.com PR: 202665 Modified: stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td stable/9/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp Changes in other areas also in this revision: Modified: stable/10/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td stable/10/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp Modified: stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td Mon Jan 29 18:07:14 2018 (r328554) +++ stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td Mon Jan 29 18:11:27 2018 (r328555) @@ -1419,6 +1419,9 @@ def warn_uninit_byref_blockvar_captured_by_block : War InGroup, DefaultIgnore; def note_block_var_fixit_add_initialization : Note< "maybe you meant to use __block %0">; +def note_in_reference_temporary_list_initializer : Note< + "in initialization of temporary of type %0 created to " + "list-initialize this reference">; def note_var_fixit_add_initialization : Note< "initialize the variable %0 to silence this warning">; def note_uninit_fixit_remove_cond : Note< Modified: stable/9/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp Mon Jan 29 18:07:14 2018 (r328554) +++ stable/9/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp Mon Jan 29 18:11:27 2018 (r328555) @@ -6309,6 +6309,19 @@ static void diagnoseListInit(Sema &S, const Initialize return diagnoseListInit(S, HiddenArray, InitList); } + if (DestType->isReferenceType()) { + // A list-initialization failure for a reference means that we tried to + // create a temporary of the inner type (per [dcl.init.list]p3.6) and the + // inner initialization failed. + QualType T = DestType->getAs()->getPointeeType(); + diagnoseListInit(S, InitializedEntity::InitializeTemporary(T), InitList); + SourceLocation Loc = InitList->getLocStart(); + if (auto *D = Entity.getDecl()) + Loc = D->getLocation(); + S.Diag(Loc, diag::note_in_reference_temporary_list_initializer) << T; + return; + } + InitListChecker DiagnoseInitList(S, Entity, InitList, DestType, /*VerifyOnly=*/false); assert(DiagnoseInitList.HadError() && From owner-svn-src-stable-9@freebsd.org Thu Feb 1 13:17:43 2018 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CBE9ECA917; Thu, 1 Feb 2018 13:17:43 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3257C69E05; Thu, 1 Feb 2018 13:17:43 +0000 (UTC) (envelope-from hselasky@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 2D46C56B2; Thu, 1 Feb 2018 13:17:43 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w11DHh4N015499; Thu, 1 Feb 2018 13:17:43 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w11DHh7R015498; Thu, 1 Feb 2018 13:17:43 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201802011317.w11DHh7R015498@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 1 Feb 2018 13:17:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r328657 - stable/9/sys/ofed/include/linux X-SVN-Group: stable-9 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/9/sys/ofed/include/linux X-SVN-Commit-Revision: 328657 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Feb 2018 13:17:43 -0000 Author: hselasky Date: Thu Feb 1 13:17:42 2018 New Revision: 328657 URL: https://svnweb.freebsd.org/changeset/base/328657 Log: MFC r328623: Properly implement the cond_resched() function macro in the LinuxKPI. Sponsored by: Mellanox Technologies Modified: stable/9/sys/ofed/include/linux/sched.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ofed/include/linux/sched.h ============================================================================== --- stable/9/sys/ofed/include/linux/sched.h Thu Feb 1 13:16:11 2018 (r328656) +++ stable/9/sys/ofed/include/linux/sched.h Thu Feb 1 13:17:42 2018 (r328657) @@ -103,7 +103,7 @@ do { \ kick_proc0(); \ } while (0) -#define cond_resched() if (!cold) sched_relinquish(curthread) +#define cond_resched() do { if (!cold) sched_relinquish(curthread); } while (0) #define sched_yield() sched_relinquish(curthread)