From nobody Sat Apr 06 20:19:21 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 4VBmsk1T74z5HH6R; Sat, 6 Apr 2024 20:19:22 +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 4VBmsj1wBwz4Mtv; Sat, 6 Apr 2024 20:19:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712434761; 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=XySVvtFKv3DPXQLl4bQWXz47ab0wF1kZyHrdq2ODX9w=; b=sj6pefbglHVFTZmsGEOy9qhsKzWLyZCmBeS0kbAPdCHyp4qYNu/K2IL1Nro1Ns0cdeROMn g6hJ+lHjtgCV3qsGQ2ES3SOfltRTPAky2FDDZfSkQg3a7dHTT66EUT9HoYs4qRpEwxWIMp 8WV+lnsMFaM7ynMZDkMATFRGYep88M2gOWwL/y/LCoO9V7c/t0EYxptDthRjNxrM+SaD6K kwQtmAdqL26rIyEQ9/SmWZFR03yrmM0w8DTJkojwTywDVlBTQvckO/0VM5OUpSA3de+VNA mncXTA4k73gApf0/BT4BZNSjzpQHiZjVnFCfwejK3JuIILJyzU2kwqcWYRo2VA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712434761; a=rsa-sha256; cv=none; b=Vxh6n5zwXZq/6vweoGTPzsrVO92KbfdNxN3oykwutQbSjtJXaGaOH6oEfKS0kZiuhlsw46 EJXOKo+8mgbGneCzMtFdv7cLH2Z0ty3ywkoCKxVPwYM4g78Bhq+LZz1b8c6BQ2RZNx8CMJ yT23iSn8WrvpAIKkrQOj6hPgDZ4tOO1H7+4RuD1nBM1XA7hLCf8fnu/0RrTK0nNSmGVuWf Y1QvMthq7cAtiwFDgWuVlsfu5DhQRwU5LcUxCMz/gpdkTIAMSOaGUCMr1pLFDk3Q8F6WPz 6C4+uuMo1JOrx1fq0Yylk8W3owIwFA02Afumyc49oRoqlHjB74nQk8JcuRzY3Q== 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=1712434761; 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=XySVvtFKv3DPXQLl4bQWXz47ab0wF1kZyHrdq2ODX9w=; b=OG63g/uEUSsMDh/6+qNP+R+KQZmc+OEZSA3krZSw/wLrmQOBwSoWynd4Sxz+q/etHStBNx 9dzJDX7B0TD2vbyYyRkOlCfBACuDRuk9/sOVeGIFzguYYS9St4cPbVYACl1kjEAJjzZ6c6 Dk3HdL/WQl/jE32LFGTR12OPPGEPYvu6dGrMEkorRYQQJ1hI5Ih67c6W42374GVh9AG7kG 1hwrZU1YeYNxdMKWWFpn6/JoWvrD0BPVgGdM/zjdB8SVNnK0YDscsT0h/CS4BTFaY4Yh9L D4wjnSw3jtkEiS3gmIhW21JAUZMDnIjWvYoZ5Sl188MsvX/aWO6tECOtXackpA== 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 4VBmsj1XdDzxtZ; Sat, 6 Apr 2024 20:19:21 +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 436KJLqg030405; Sat, 6 Apr 2024 20:19:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 436KJLtt030402; Sat, 6 Apr 2024 20:19:21 GMT (envelope-from git) Date: Sat, 6 Apr 2024 20:19:21 GMT Message-Id: <202404062019.436KJLtt030402@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 49a6e426df84 - main - 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/main X-Git-Reftype: branch X-Git-Commit: 49a6e426df84eff1ae54905a02f66910a6a177d3 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=49a6e426df84eff1ae54905a02f66910a6a177d3 commit 49a6e426df84eff1ae54905a02f66910a6a177d3 Author: Dimitry Andric AuthorDate: 2024-03-21 20:50:26 +0000 Commit: Dimitry Andric CommitDate: 2024-04-06 20:14:31 +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 --- 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);