From nobody Sat Apr 20 10:32:37 2024 X-Original-To: dev-commits-src-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 4VM7BG1d3Yz5HW17; Sat, 20 Apr 2024 10:32:38 +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 4VM7BF72V4z4Q42; Sat, 20 Apr 2024 10:32:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713609158; 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=PtyVA7GdOcmy0X+wXZoyOaFZsH4bhEmjAPYnDHMip4g=; b=F5tWrjWK7avOIVPFopKGaoYFDMDjHv7js2Y4mSFjRfOEHVxoZGcVOmO8fZZzBzifSvCwsn E3hUND0inLOucINsM/2UQZYTuNcJM5ID155eReepIh03qqA7dL5+JMlNZOjwYgVWQlNoSS 7k+LmUjKGZe23YUmWGGynUH9pGgyUwcjH0Yxxfx2GeJsuwLrhpr0v2XtCb6ILGcAoGW8ZN BVIIet8zjnYOi46ysIJKE9A0IvDb6dKAhwh8yXI3Ef156XTHJ+2m2Bc2DMGP9I3OmQaJqb lfNyN3N75X38hwQIMgyMd7cVKlYNVUOT0JkH1od1UXTvoqUAOqV2aqs2QP1raQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713609158; a=rsa-sha256; cv=none; b=UxWqkd7Ygz70453kw4OEUYmm7e76n6+UScDbId/Jx4E3eAY96yF3WFIvyZkEiesu4lg20v 2NF3AbX9mlU7yRJKCDCaBUCGuYBepdm4TUPSU2wON9X9U+UTMzme67BG9FwipI1MAEeSCM FT5K8CWewmWfXJarTLzuLagBkO3kPkO7mtptPSMIo1UbL5tGUS5neHjzZygO5uOJkgWeuC E8u5w+hRKCVnQNUF2X24L7FBDRDi4J1SVctVrjKg0l4fvFF77VYsEsnuNFp+2xdVaBp/3p 6sEQ8dFzML1FuCZ5qNGmEqXgDoGBywODr9SfEVXK992qxnKXMn4K02pA/ZXFvQ== 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=1713609158; 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=PtyVA7GdOcmy0X+wXZoyOaFZsH4bhEmjAPYnDHMip4g=; b=TBYdU3BkTsd4wh/Y5xayHm7mvJn6Yn0wKSM+5PlSvsRHWN8F3qeNkjA0kNTDilMW6Cn84t cqkLUeWnH3thDZ53HGMzRQc6zVHQ939wMZziQpl7WpUY0mVNHqmMXPwHOJkyS+4E/Xakrn Xi5mgztmwY5T2kK3dxyyoD9DbBDt20TwOzuvjrRZXuXYOLkvcJhAJsy1VurFegumoOllTx 0k3g832jflxlujZdP8yj8UYwjaRUDWUeNemrqahV0tFnUG6hQLT8Yo5FHY+gZ1AeCechfX d9ejJyXyBcdXzasPYTuOGxBm0JdBd4eOTo/Ti6F4QgEP/FHhV6CAU4cCVN5KMw== 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 4VM7BF5cpvzZ9m; Sat, 20 Apr 2024 10:32:37 +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 43KAWbMc011489; Sat, 20 Apr 2024 10:32:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43KAWbCs011486; Sat, 20 Apr 2024 10:32:37 GMT (envelope-from git) Date: Sat, 20 Apr 2024 10:32:37 GMT Message-Id: <202404201032.43KAWbCs011486@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: 16bdd01787d1 - stable/14 - Merge commit f5f3d5d6534f from llvm-project (by Qizhi Hu): List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: 16bdd01787d1fad424b774b6d36ce17817143ff4 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=16bdd01787d1fad424b774b6d36ce17817143ff4 commit 16bdd01787d1fad424b774b6d36ce17817143ff4 Author: Dimitry Andric AuthorDate: 2024-03-21 20:50:26 +0000 Commit: Dimitry Andric CommitDate: 2024-04-19 21:14:17 +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);