From nobody Sat Apr 20 10:34:43 2024 X-Original-To: dev-commits-src-branches@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 4VM7Dh24ZVz5HW10; Sat, 20 Apr 2024 10:34:44 +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 4VM7Dh049Tz4T9C; Sat, 20 Apr 2024 10:34:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713609284; 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=UtOIF4gs1uDyhQ3UKOKltez/3Ve+QjJ0tuqNtRe7VxA=; b=iMUeGsvsx2SXU4huAKSW9hxj+/if0BUREh9gIpAuqEfCG97tukhoD/vmAUFeDvneRBTIcs mf00nMaFce9lqcexb8Eu/qV/SdHGD+y4scitLMTSttp/i7Hc+fFy0JxuQhpOWVqwFnij8G fChtZj9NNv/k4Zw/YmxngpShmv/Ic4GiUe0KWjYyLztJvszcsK2a/07+VitbR2rkigurd2 ZbKa362qclFMFcEM43YVws1iZSeNxfZixVKUplxX+RaQAu0J9pLBk60QtIjqhaD4YEzrWW csB5aUJ8G3KDC7txolKyI4AjvIBImBZi0aA4E4Oh4r/zTfJ2P8dGRFTz6YeGdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713609284; a=rsa-sha256; cv=none; b=mkW4rxWgYKHYB8q1qd8BqPkqj7yXJ7VhU06S0D2SqENBkuIBV9bA193vzQKgpuhMj/bxsr /eTAaeptP4VL7GZ7Pevz4Yzt7DekYLUb0SDfJY7va/hLIJnVExohYRyrca9bBX7BF9eYmq MF/9dAyjE2fVoyhDcoZ6g2lScDzvoX3tbhX8awLsdtiDS2qocMZmb7aak2UWWBjGDO0ptG I4hf38bJBZtXC/hxyR4UnKMgOhPilS+rgNkUsrJulFI5CgkopAR4Bh0ezlmsBn44nc+3bk 1T1Fv66Fx6VGyx23d8VDEonB/BqW51FzwmApDpffldfiALVntz4yl22HWqL1vQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713609284; 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=UtOIF4gs1uDyhQ3UKOKltez/3Ve+QjJ0tuqNtRe7VxA=; b=aO4Zk3IXlPKzC1ACH5ApID8RlduGv2RfPtnrpcX2NQnp0f2vTz+NMhauZFQ3ZBEDjJBUBJ XDWxKqzogWdhFYEKrC9HBJqGvaBwq3F5bU1UhT51Cs0aHWSSLSxG5Iz75Qe9iMRqQXgR3I NJFxJGSV0cU8ipOmAvAiW+p8kIQ4MwZNXQ7GwcA9zvxDb+nOeEo2iMExuzUjPC9Y+NZ3wT URL5MLStgUEx6f32rurx/HPvqGUKGwjJDR0zj3mPSaHcJkosd/NxSnP/wlYyDJs0xlCCHE NHGpa+pAQ7yVHy4U+0lF8O6/tFpz+Uhownvot1/lnI2SgkwUu9ANMM/hBF0csQ== 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 4VM7Dg6p7mzYkl; Sat, 20 Apr 2024 10:34:43 +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 43KAYhsZ014144; Sat, 20 Apr 2024 10:34:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43KAYho4014141; Sat, 20 Apr 2024 10:34:43 GMT (envelope-from git) Date: Sat, 20 Apr 2024 10:34:43 GMT Message-Id: <202404201034.43KAYho4014141@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 8e0b0a282739 - stable/13 - Merge commit f5f3d5d6534f from llvm-project (by Qizhi Hu): List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8e0b0a282739fadcc6cdec8bf1d8080c50f22bd0 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=8e0b0a282739fadcc6cdec8bf1d8080c50f22bd0 commit 8e0b0a282739fadcc6cdec8bf1d8080c50f22bd0 Author: Dimitry Andric AuthorDate: 2024-03-21 20:50:26 +0000 Commit: Dimitry Andric CommitDate: 2024-04-19 21:24:48 +0000 Merge commit f5f3d5d6534f from llvm-project (by Qizhi Hu): [Clang][Sema] Fix a crash in lambda instantiation (#85565) Fix https://github.com/llvm/llvm-project/issues/85343 When build lambda expression in lambda instantiation, `ThisType` is required in `Sema::CheckCXXThisCapture` to build `this` capture. Set `this` type by import `Sema::CXXThisScopeRAII` and it will be used later in lambda expression transformation. Co-authored-by: huqizhi <836744285@qq.com> This fixes 'Assertion failed: (!isNull() && "Cannot retrieve a NULL type pointer"), function getCommonPtr" when building the x11-wm/wayfire port. PR: 276104 MFC after: 1 month (cherry picked from commit 49a6e426df84eff1ae54905a02f66910a6a177d3) --- contrib/llvm-project/clang/lib/Sema/TreeTransform.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/contrib/llvm-project/clang/lib/Sema/TreeTransform.h b/contrib/llvm-project/clang/lib/Sema/TreeTransform.h index e55e752b9cc3..2f012cade6b9 100644 --- a/contrib/llvm-project/clang/lib/Sema/TreeTransform.h +++ b/contrib/llvm-project/clang/lib/Sema/TreeTransform.h @@ -13516,6 +13516,16 @@ TreeTransform::TransformLambdaExpr(LambdaExpr *E) { // Capturing 'this' is trivial. if (C->capturesThis()) { + // If this is a lambda that is part of a default member initialiser + // and which we're instantiating outside the class that 'this' is + // supposed to refer to, adjust the type of 'this' accordingly. + // + // Otherwise, leave the type of 'this' as-is. + Sema::CXXThisScopeRAII ThisScope( + getSema(), + dyn_cast_if_present( + getSema().getFunctionLevelDeclContext()), + Qualifiers()); getSema().CheckCXXThisCapture(C->getLocation(), C->isExplicit(), /*BuildAndDiagnose*/ true, nullptr, C->getCaptureKind() == LCK_StarThis);