From nobody Wed Jul 19 17:33:23 2023 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 4R5jb76HLlz4ntVT; Wed, 19 Jul 2023 17:33:23 +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 4R5jb759h3z3CdS; Wed, 19 Jul 2023 17:33:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689788003; 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=JT7xsILXoDLRWFH1v5WYQDIPGfC1OivFWDe00Yznu48=; b=aQ3pvXhS40q+HyFUpcdCdATlLOosRE6CwO0rWdRcXzKdSdxSxYCig/p83lSqRYoafdv5dV PJy1LnbGgHsAxcjDOnedTVHWoDduU+Gh48v5QvHcwFAjN9smRZO3+8G5jJtkfwByRr5+gE N5f4KoduOuzTFyX1nA1wt0Y7Qon0TN9c/XCPtXl0//+KFouUqZigNa1o7anMTo8LTrwq7y rqIXzNr2p9ZHIs6k9q4ydgpoJ1BcxuH4zpYFd6HXz7cELAFYVKlBpv4qNW7TgYjmNLat4z SjznXwGCFo7oCW1AsF9N0eeQ0v5bFWWPWHK8+Nu0OnqZs2jgxhujl0tsBYyCag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689788003; 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=JT7xsILXoDLRWFH1v5WYQDIPGfC1OivFWDe00Yznu48=; b=B0xGPic5M+a+Mm5O4H+lIOCnlynfQghOVRUWwyFpQTl1wRAkiOQS5a/Cv3VWlo5UJP3Ebn PcbzpQwj30YIFCf2t1hh3hQPDyhW/c6EgzjA736dGyHcBAku9/5JfCilRosOaO/2FVKfw9 q2dhpldvV69KPdYX2Y+66clwVO4PiIkrNdisMzJZj7QLe6zw0KWfFsXhI2chAoArjXraeL CouBkklcQ99Qa8xlq8sGTTmrOrM+1kGx1Unw4XoFzcgh41bWcmEB7sCDcxRgmNT1UOMpMk hzm1T2ayZXl/pnFXDfBj19S8BgQFAc3w1s2ufAD2ZF0B2j1OPMWs5dkZ3tY2Mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689788003; a=rsa-sha256; cv=none; b=ODPHHqBnBczgOjCrLRUPO2dyIOEslJ8nmimCponhIK5xf0ZmSE9+ChdHiICirsiBPROv6o MVdswqqwtihYWnhMZgzxG0CqMODKWKzYYD7zUtFPmWUfWiZxZpSZ2+kN5Vjdnpc+r32s/i XR6Eo4KygNTBdo831DKabV0qoTNrOUhJCaS1m2shwVZqXxeeEFUuD+NTNmzSHvBXEbWkO0 hHOwabvhGJCjYcRKbezvwhGmGwewnh+CmIk6E/vvpLeB/OsT9btXX84Xsy6U4Zd/zHMxE2 iYIkZap4Qx9RriVolXspCtLQjlp0Lz8HZhv0AQlHfTIs6qzSoqn2O3v56qye8A== 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 4R5jb74FbFzx7X; Wed, 19 Jul 2023 17:33:23 +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 36JHXNJG033084; Wed, 19 Jul 2023 17:33:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36JHXNXj033083; Wed, 19 Jul 2023 17:33:23 GMT (envelope-from git) Date: Wed, 19 Jul 2023 17:33:23 GMT Message-Id: <202307191733.36JHXNXj033083@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: 8d0cab8800e1 - main - Merge commit 9ca395b5ade1 from llvm-project (by Haojian Wu): 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: 8d0cab8800e19cddc56d4a532abdbe9f0ac6c620 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=8d0cab8800e19cddc56d4a532abdbe9f0ac6c620 commit 8d0cab8800e19cddc56d4a532abdbe9f0ac6c620 Author: Dimitry Andric AuthorDate: 2023-07-19 09:18:50 +0000 Commit: Dimitry Andric CommitDate: 2023-07-19 17:14:23 +0000 Merge commit 9ca395b5ade1 from llvm-project (by Haojian Wu): [clang][AST] Propagate the contains-errors bit to DeclRefExpr from VarDecl's initializer. Similar to the https://reviews.llvm.org/D86048 (it only sets the bit for C++ code), we propagate the contains-errors bit for C-code path. Fixes https://github.com/llvm/llvm-project/issues/50236 Fixes https://github.com/llvm/llvm-project/issues/50243 Fixes https://github.com/llvm/llvm-project/issues/48636 Fixes https://github.com/llvm/llvm-project/issues/50320 Differential Revision: https://reviews.llvm.org/D154861 This fixes an assertion ('Assertion failed: ((LHSExpr->containsErrors() || RHSExpr->containsErrors()) && "Should only occur in error-recovery path."), function BuildBinOp') when building parts of dtrace in certain scenarios. Reported by: dstolfa PR: 271047 MFC after: 1 month --- contrib/llvm-project/clang/lib/AST/ComputeDependence.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/contrib/llvm-project/clang/lib/AST/ComputeDependence.cpp b/contrib/llvm-project/clang/lib/AST/ComputeDependence.cpp index eb9afbdb1c87..b5c783b07d92 100644 --- a/contrib/llvm-project/clang/lib/AST/ComputeDependence.cpp +++ b/contrib/llvm-project/clang/lib/AST/ComputeDependence.cpp @@ -489,7 +489,7 @@ ExprDependence clang::computeDependence(DeclRefExpr *E, const ASTContext &Ctx) { // more bullets here that we handle by treating the declaration as having a // dependent type if they involve a placeholder type that can't be deduced.] if (Type->isDependentType()) - return Deps | ExprDependence::TypeValueInstantiation; + Deps |= ExprDependence::TypeValueInstantiation; else if (Type->isInstantiationDependentType()) Deps |= ExprDependence::Instantiation; @@ -525,13 +525,13 @@ ExprDependence clang::computeDependence(DeclRefExpr *E, const ASTContext &Ctx) { // - it names a potentially-constant variable that is initialized with an // expression that is value-dependent if (const auto *Var = dyn_cast(Decl)) { - if (Var->mightBeUsableInConstantExpressions(Ctx)) { - if (const Expr *Init = Var->getAnyInitializer()) { - if (Init->isValueDependent()) - Deps |= ExprDependence::ValueInstantiation; - if (Init->containsErrors()) - Deps |= ExprDependence::Error; - } + if (const Expr *Init = Var->getAnyInitializer()) { + if (Init->containsErrors()) + Deps |= ExprDependence::Error; + + if (Var->mightBeUsableInConstantExpressions(Ctx) && + Init->isValueDependent()) + Deps |= ExprDependence::ValueInstantiation; } // - it names a static data member that is a dependent member of the