[clang] [CIR] Upstream new SetBitfieldOp for handling C and C++ struct bitfields (PR #147609)

2025-07-10 Thread via cfe-commits
@@ -1669,6 +1669,94 @@ def GetGlobalOp : CIR_Op<"get_global", }]; } +//===--===// +// SetBitfieldOp +//===--===// + +def SetBitfieldOp : CI

[clang] [Clang] fixed false positive redeclaration error for using enum in nested scopes (PR #147711)

2025-07-10 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @AaronBallman could you review these changes? thanks https://github.com/llvm/llvm-project/pull/147711 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Add C standard streams to the internal memory space (PR #147766)

2025-07-10 Thread Donát Nagy via cfe-commits
@@ -1054,10 +1054,26 @@ const VarRegion *MemRegionManager::getVarRegion(const VarDecl *D, assert(!Ty.isNull()); if (Ty.isConstQualified()) { sReg = getGlobalsRegion(MemRegion::GlobalImmutableSpaceRegionKind); -} else if (Ctx.getSourceManager().isInSystemHeade

[clang] [LifetimeSafety] Introduce intra-procedural analysis in Clang (PR #142313)

2025-07-10 Thread Utkarsh Saxena via cfe-commits
@@ -0,0 +1,504 @@ +//===- LifetimeSafety.cpp - C++ Lifetime Safety Analysis -*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang] fix `--unwindlib` option doc (PR #143497)

2025-07-10 Thread via cfe-commits
github-actions[bot] wrote: @fee1-dead Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a buil

[clang] 9bd4ab7 - [clang] fix `--unwindlib` option doc (#143497)

2025-07-10 Thread via cfe-commits
Author: beef Date: 2025-07-10T08:28:06-07:00 New Revision: 9bd4ab7f517a6c1feb57209b9df8d66e3c3ddf32 URL: https://github.com/llvm/llvm-project/commit/9bd4ab7f517a6c1feb57209b9df8d66e3c3ddf32 DIFF: https://github.com/llvm/llvm-project/commit/9bd4ab7f517a6c1feb57209b9df8d66e3c3ddf32.diff LOG: [cl

[clang] [clang] fix `--unwindlib` option doc (PR #143497)

2025-07-10 Thread Nathan Chancellor via cfe-commits
https://github.com/nathanchance closed https://github.com/llvm/llvm-project/pull/143497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][scan-deps] Report a scanned TU's visible modules (PR #147969)

2025-07-10 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 commented: It seems like this is not actually returning the set of (what Clang calls) visible modules. Can you clarify what the desired semantics actually is? https://github.com/llvm/llvm-project/pull/147969 ___ cfe-com

[clang] [clang][scan-deps] Report a scanned TU's visible modules (PR #147969)

2025-07-10 Thread Jan Svoboda via cfe-commits
@@ -519,6 +528,8 @@ class FullDeps { }); JOS.attributeArray("clang-module-deps", toJSONSorted(JOS, I.ClangModuleDeps)); +JOS.attributeArray("visible-clang-modules",

[clang] [clang][scan-deps] Report a scanned TU's visible modules (PR #147969)

2025-07-10 Thread Jan Svoboda via cfe-commits
@@ -993,6 +1000,28 @@ bool ModuleDepCollector::isPrebuiltModule(const Module *M) { return true; } +void ModuleDepCollector::addVisibleModules() { + llvm::DenseSet ImportedModules; + auto InsertVisibleModules = [&](const Module *M) { +if (ImportedModules.contains(M)) +

[clang] [clang][scan-deps] Report a scanned TU's visible modules (PR #147969)

2025-07-10 Thread Jan Svoboda via cfe-commits
@@ -0,0 +1,72 @@ +// This test verifies that the modules visible to the translation unit are computed in dependency scanning. +// "client" represents the translation unit that imports an explicit submodule, that only exports one other module. +// Thus, the dependencies of the t

[clang] [clang][scan-deps] Report a scanned TU's visible modules (PR #147969)

2025-07-10 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/147969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Emit “trap reasons” on UBSan traps (PR #145967)

2025-07-10 Thread Paul Kirth via cfe-commits
ilovepi wrote: > @ilovepi > > > There's a large number of tests. Many of these look like they're close to > > an existing test ... in these cases is it possible to just use the existing > > test file and add checks under a prefix? > > I originally recommended that @anthonyhatran write new tes

[clang] [clang][analyzer] Add C standard streams to the internal memory space (PR #147766)

2025-07-10 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat approved this pull request. https://github.com/llvm/llvm-project/pull/147766 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Relax SVE bf16 requirement for opaque builtins. (PR #147795)

2025-07-10 Thread Kerry McLaughlin via cfe-commits
@@ -1,87 +0,0 @@ -// REQUIRES: aarch64-registered-target - -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -verify -verify-ignore-unexpected=error,note -emit-llvm -o - %s - -#include - -void test_bfloat(svbool_t pg, uint64_t u64, int64_t i64, const bfloat

[clang] [Clang][AArch64] Relax SVE bf16 requirement for opaque builtins. (PR #147795)

2025-07-10 Thread Kerry McLaughlin via cfe-commits
@@ -1,12 +1,12 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py // REQUIRES: aarch64-registered-target -// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emi

[clang] [libcxx] [Clang] Diagnose forming references to nullptr (PR #143667)

2025-07-10 Thread Corentin Jabot via cfe-commits
@@ -59,7 +59,7 @@ constexpr bool test() { { // bidi -int buffer[2] = {1, 2}; +int buffer[3] = {1, 2, 3}; cor3ntin wrote: Well, the test is called `increment.pass.cpp`, and used to be valid, so I assume it should remain valid! https://github.c

[clang] [Clang] fix crash in codegen caused by deferred asm diagnostics under -fopenmp (PR #147163)

2025-07-10 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > If a function has a deferred diagnostic, it should prevent codegen of that > function, yes. Deferred errors only, though, right? Do we know if there are any cases where we defer the diagnostic because we may later decide it's *not* an error and thus codegen would be fine

[clang] [Clang] Mark a concept as being invalid if the constraint is invalid (PR #147938)

2025-07-10 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/147938 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][C++][Modules] Refine basic.link.p3 and add test for P2788R0 (PR #147945)

2025-07-10 Thread via cfe-commits
https://github.com/yronglin created https://github.com/llvm/llvm-project/pull/147945 Refine basic.link.p3 tests with split-file and added more test for P2788R0 which was marked as implemented. >From f65b4423eda72ec8533359ba5fdc8f587eba0867 Mon Sep 17 00:00:00 2001 From: "Wang, Yihan" Date: Th

[clang] [NFC][C++][Modules] Refine basic.link.p3 and add test for P2788R0 (PR #147945)

2025-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (yronglin) Changes Refine basic.link.p3 tests with split-file and added more test for P2788R0 which was marked as implemented. --- Full diff: https://github.com/llvm/llvm-project/pull/147945.diff 1 Files Affected: - (modified) cla

[clang] [libcxx] [Clang] Diagnose forming references to nullptr (PR #143667)

2025-07-10 Thread Aaron Ballman via cfe-commits
@@ -59,7 +59,7 @@ constexpr bool test() { { // bidi -int buffer[2] = {1, 2}; +int buffer[3] = {1, 2, 3}; AaronBallman wrote: Thanks! I kind of figured that was the case, but it wasn't clear whether the test should change like this or not. @ld

[clang] [llvm] [OptBisect][IR] Adding a new OptPassGate for disabling passes via name (PR #145059)

2025-07-10 Thread Nikita Popov via cfe-commits
https://github.com/nikic commented: Looks reasonable https://github.com/llvm/llvm-project/pull/145059 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OptBisect][IR] Adding a new OptPassGate for disabling passes via name (PR #145059)

2025-07-10 Thread Nikita Popov via cfe-commits
@@ -114,6 +114,10 @@ class LLVM_ABI Pass { /// Registration templates, but can be overloaded directly. virtual StringRef getPassName() const; + /// getPassArgument - Return a nice clean name for a pass nikic wrote: ```suggestion /// Return a nice clean

[clang] [llvm] [OptBisect][IR] Adding a new OptPassGate for disabling passes via name (PR #145059)

2025-07-10 Thread Nikita Popov via cfe-commits
@@ -62,8 +62,13 @@ static std::string getDescription(const Module &M) { bool ModulePass::skipModule(const Module &M) const { const OptPassGate &Gate = M.getContext().getOptPassGate(); + + StringRef PassName = this->getPassArgument(); nikic wrote: ```sugges

[clang] [llvm] [OptBisect][IR] Adding a new OptPassGate for disabling passes via name (PR #145059)

2025-07-10 Thread Nikita Popov via cfe-commits
@@ -86,6 +91,16 @@ StringRef Pass::getPassName() const { return "Unnamed pass: implement Pass::getPassName()"; } +/// getPassArgument - Return a nice clean name for a pass +/// corresponding to that used to enable the pass in opt +StringRef Pass::getPassArgument() const { +

[clang] [llvm] [OptBisect][IR] Adding a new OptPassGate for disabling passes via name (PR #145059)

2025-07-10 Thread Nikita Popov via cfe-commits
@@ -55,4 +72,29 @@ bool OptBisect::shouldRunPass(StringRef PassName, return ShouldRun; } -OptPassGate &llvm::getGlobalPassGate() { return getOptBisector(); } +static void printDisablePassMessage(const StringRef &Name, StringRef TargetDesc, +

[clang] [llvm] [OptBisect][IR] Adding a new OptPassGate for disabling passes via name (PR #145059)

2025-07-10 Thread Nikita Popov via cfe-commits
@@ -114,6 +114,10 @@ class LLVM_ABI Pass { /// Registration templates, but can be overloaded directly. virtual StringRef getPassName() const; + /// getPassArgument - Return a nice clean name for a pass + /// corresponding to that used to enable the pass in opt + virtual

[clang] [llvm] [OptBisect][IR] Adding a new OptPassGate for disabling passes via name (PR #145059)

2025-07-10 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/145059 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fix: replace report_fatal_error with Diags and exit (PR #147959)

2025-07-10 Thread via cfe-commits
https://github.com/woruyu created https://github.com/llvm/llvm-project/pull/147959 Summary This PR resolves https://github.com/llvm/llvm-project/issues/147187 >From e18ed1ac787a0571318b8cfe1d4eee023ba11fc2 Mon Sep 17 00:00:00 2001 From: woruyu <1214539...@qq.com> Date: Thu, 10 Jul 2025 21:08:24

[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)

2025-07-10 Thread via cfe-commits
yronglin wrote: In this PR, I use split-file to refine some tests related to modules. These refinements will increase the difficulty of review. I plan to complete these refinements in a separate PR. https://github.com/llvm/llvm-project/pull/107168 __

[clang] fix: replace report_fatal_error with Diags and exit (PR #147959)

2025-07-10 Thread via cfe-commits
woruyu wrote: @hstk30-hw This patch is now ready for review. https://github.com/llvm/llvm-project/pull/147959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fix: replace report_fatal_error with Diags and exit (PR #147959)

2025-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: woruyu (woruyu) Changes Summary This PR resolves https://github.com/llvm/llvm-project/issues/147187 --- Full diff: https://github.com/llvm/llvm-project/pull/147959.diff 3 Files Affected: - (modified) clang/include/clang/Basic/SanitizerS

[clang] [clang-tools-extra] [clang] Improve nested name specifier AST representation (PR #147835)

2025-07-10 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Is there ANYTHING we can do to split this up? This is so huge that github is refusing to lead half the changes. https://github.com/llvm/llvm-project/pull/147835 ___ cfe-commits mailing list cfe-commits@lists.l

[clang-tools-extra] [clang-tidy][NFC] add '.clang-tidy' config for clang-tidy project (PR #147793)

2025-07-10 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/147793 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][readability-named-parameter] Add an option to print names without comment (PR #147953)

2025-07-10 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/147953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream new SetBitfieldOp for handling C and C++ struct bitfields (PR #147609)

2025-07-10 Thread via cfe-commits
https://github.com/Andres-Salamanca updated https://github.com/llvm/llvm-project/pull/147609 >From 38b98a54b718973ec2ce1375e31996ee190e0d75 Mon Sep 17 00:00:00 2001 From: Andres Salamanca Date: Tue, 8 Jul 2025 17:33:52 -0500 Subject: [PATCH 1/3] [CIR] Upstream new SetBitfieldOp for handling C a

[clang] [CIR] Implement AddOp for ComplexType (PR #147578)

2025-07-10 Thread Amr Hesham via cfe-commits
@@ -2521,6 +2521,32 @@ def ComplexImagOp : CIR_Op<"complex.imag", [Pure]> { let hasFolder = 1; } +//===--===// +// ComplexAddOp +//===--===

[clang-tools-extra] [clang-tidy][readability-named-parameter] Add an option to print names without comment (PR #147953)

2025-07-10 Thread Baranov Victor via cfe-commits
@@ -84,7 +95,8 @@ void NamedParameterCheck::check(const MatchFinder::MatchResult &Result) { for (auto P : UnnamedParams) { // Fallback to an unused marker. - StringRef NewName = "unused"; + constexpr StringRef FallbackName = "unused"; vbvi

[clang] [C23] Accept an _Atomic underlying type (PR #147802)

2025-07-10 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > > avior due to the silent stripping. Given that an atomic type is not the > > > > same as its underlying type (in terms of ABI or semantics) I think we > > > > should diagnose the behavior with at least a warning. I could even be > > > > convinced it should be a warni

[clang-tools-extra] [clang-tidy][readability-named-parameter] Add an option to print names without comment (PR #147953)

2025-07-10 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. LGTM with nit https://github.com/llvm/llvm-project/pull/147953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Relax SVE bf16 requirement for opaque builtins. (PR #147795)

2025-07-10 Thread Paul Walker via cfe-commits
@@ -1,87 +0,0 @@ -// REQUIRES: aarch64-registered-target - -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -verify -verify-ignore-unexpected=error,note -emit-llvm -o - %s - -#include - -void test_bfloat(svbool_t pg, uint64_t u64, int64_t i64, const bfloat

[clang] [clang][analyzer] Add C standard streams to the internal memory space (PR #147766)

2025-07-10 Thread Balazs Benics via cfe-commits
=?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: @@ -1054,10 +1054,26 @@ const VarRegion *MemRegionManager::getVarRegion(const VarDecl *D, assert(!Ty.isNull()); if (Ty.isConstQualified()) { sReg = getGlobalsRegion(MemRegion::GlobalImmutableSpaceRegionKind); -

[clang] [C23] Accept an _Atomic underlying type (PR #147802)

2025-07-10 Thread Erich Keane via cfe-commits
@@ -9364,6 +9364,14 @@ def warn_atomic_implicit_seq_cst : Warning< InGroup>, DefaultIgnore; def err_atomic_unsupported : Error< "atomic types are not supported in '%0'">; +def warn_cv_stripped_in_enum : Warning< + "%select{'const' and 'volatile' qualifiers|'const' qualifie

[clang] [C23] Accept an _Atomic underlying type (PR #147802)

2025-07-10 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/147802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][readability-named-parameter] Add an option to print names without comment (PR #147953)

2025-07-10 Thread Baranov Victor via cfe-commits
@@ -105,12 +117,26 @@ void NamedParameterCheck::check(const MatchFinder::MatchResult &Result) { NewName = Name; } - // Now insert the comment. Note that getLocation() points to the place + // Now insert the fix. Note that getLocation() points to the

[clang] [LifetimeSafety] Introduce intra-procedural analysis in Clang (PR #142313)

2025-07-10 Thread Utkarsh Saxena via cfe-commits
@@ -0,0 +1,504 @@ +//===- LifetimeSafety.cpp - C++ Lifetime Safety Analysis -*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clang-tidy][readability-named-parameter] Add an option to print names without comment (PR #147953)

2025-07-10 Thread Baranov Victor via cfe-commits
@@ -1,29 +1,46 @@ // RUN: %check_clang_tidy %s readability-named-parameter %t +// RUN: %check_clang_tidy -check-suffix=PLAIN-NAMES %s readability-named-parameter %t -- -config="{CheckOptions: [{key: readability-named-parameter.InsertPlainNamesInForwardDecls, value: true}]}" ---

[clang] [Multilib] Extend the Multilib system to support an IncludepPath field. (PR #146651)

2025-07-10 Thread Simon Tatham via cfe-commits
@@ -0,0 +1,28 @@ + +# REQUIRES: shell +# UNSUPPORTED: system-windows + +# This test demonstrates the new "IncludePath" field. +# This field allows specifying include paths through +# multilib.yaml configuration using relative paths. +# Absolute paths should be rejected by the driv

[clang] [llvm] [HLSL][DXIL] Implement `refract` intrinsic (PR #147342)

2025-07-10 Thread Sarah Spall via cfe-commits
@@ -235,6 +288,30 @@ bool SemaSPIRV::CheckSPIRVBuiltinFunctionCall(const TargetInfo &TI, TheCall->setType(RetTy); break; } + case SPIRV::BI__builtin_spirv_refract: { +if (SemaRef.checkArgCount(TheCall, 3)) + return true; + +llvm::function_ref +C

[clang] [LifetimeSafety] Introduce intra-procedural analysis in Clang (PR #142313)

2025-07-10 Thread Utkarsh Saxena via cfe-commits
@@ -0,0 +1,504 @@ +//===- LifetimeSafety.cpp - C++ Lifetime Safety Analysis -*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [C23] Accept an _Atomic underlying type (PR #147802)

2025-07-10 Thread Aaron Ballman via cfe-commits
@@ -9364,6 +9364,14 @@ def warn_atomic_implicit_seq_cst : Warning< InGroup>, DefaultIgnore; def err_atomic_unsupported : Error< "atomic types are not supported in '%0'">; +def warn_cv_stripped_in_enum : Warning< + "%select{'const' and 'volatile' qualifiers|'const' qualifie

[clang] [clang] Fixes #138823 (PR #147938)

2025-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oliver Hunt (ojhunt) Changes Make sure to mark a concept decl as being invalid if the constraint is invalid. --- Full diff: https://github.com/llvm/llvm-project/pull/147938.diff 2 Files Affected: - (modified) clang/lib/Sema/SemaTemplate

[clang] [clang] Fixes #138823 (PR #147938)

2025-07-10 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/147938 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Delete .gitignore (PR #147939)

2025-07-10 Thread Mészáros Gergely via cfe-commits
https://github.com/Maetveis created https://github.com/llvm/llvm-project/pull/147939 The file is listing build artifacts to ignore, but LLVM has long had the policy that in-tree builds are not supported, so the ignore rules shouldn't serve their original purpose anymore. The rules however are

[clang] [Clang] Correctly handle taking the address of an explicit object member function template (PR #147046)

2025-07-10 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/147046 >From a54b4f8120460c4374422c9847c22aed0ef8665f Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Fri, 4 Jul 2025 12:16:02 +0200 Subject: [PATCH 1/2] [Clang] Correctly handle taking the address of an explicit

[clang] [libcxx] [Clang] Diagnose forming references to nullptr (PR #143667)

2025-07-10 Thread Aaron Ballman via cfe-commits
@@ -59,7 +59,7 @@ constexpr bool test() { { // bidi -int buffer[2] = {1, 2}; +int buffer[3] = {1, 2, 3}; AaronBallman wrote: I'd think that as well, but the fact that it passed when it should fail means we should double-check. :-D I don't have

[clang] 39ea9b7 - [Clang] Correctly handle taking the address of an explicit object member function template (#147046)

2025-07-10 Thread via cfe-commits
Author: Corentin Jabot Date: 2025-07-10T14:05:23+02:00 New Revision: 39ea9b71d90f95a5d91d72004b37779d1ed6d72e URL: https://github.com/llvm/llvm-project/commit/39ea9b71d90f95a5d91d72004b37779d1ed6d72e DIFF: https://github.com/llvm/llvm-project/commit/39ea9b71d90f95a5d91d72004b37779d1ed6d72e.diff

[clang] 78e84e5 - [Clang] A lone `[` does not an attribute make (#147306)

2025-07-10 Thread via cfe-commits
Author: Corentin Jabot Date: 2025-07-10T14:06:02+02:00 New Revision: 78e84e5779f4ed1de9bc29b6aae8609de2b9f8c4 URL: https://github.com/llvm/llvm-project/commit/78e84e5779f4ed1de9bc29b6aae8609de2b9f8c4 DIFF: https://github.com/llvm/llvm-project/commit/78e84e5779f4ed1de9bc29b6aae8609de2b9f8c4.diff

[clang] [Clang] Correctly handle taking the address of an explicit object member function template (PR #147046)

2025-07-10 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/147046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] A lone `[` does not an attribute make (PR #147306)

2025-07-10 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/147306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm-objcopy][libObject] Add RISC-V big-endian support (PR #146913)

2025-07-10 Thread Djordje Todorovic via cfe-commits
@@ -48,62 +48,64 @@ class Triple { enum ArchType { UnknownArch, -arm,// ARM (little endian): arm, armv.*, xscale -armeb, // ARM (big endian): armeb -aarch64,// AArch64 (little endian): aarch64 -aarch64_be, // AArch64 (big

[libclc] 7a089bc - [libclc] Delete .gitignore (#147939)

2025-07-10 Thread via cfe-commits
Author: Mészáros Gergely Date: 2025-07-10T14:07:59+02:00 New Revision: 7a089bc4c00fe35c8f07b7c420be6535ad331161 URL: https://github.com/llvm/llvm-project/commit/7a089bc4c00fe35c8f07b7c420be6535ad331161 DIFF: https://github.com/llvm/llvm-project/commit/7a089bc4c00fe35c8f07b7c420be6535ad331161.di

[clang-tools-extra] Add clang tidy check performance constexpr non static in scope (PR #147809)

2025-07-10 Thread Victor Chernyakin via cfe-commits
@@ -0,0 +1,37 @@ +//===--- ConstexprNonStaticInScopeCheck.h - clang-tidy --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [Clang][Doc] Add Changelog line for (#144886) (PR #147978)

2025-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Juan Manuel Martinez Caamaño (jmmartinez) Changes The patch [CUDA][HIP] Add a __device__ version of std::__glibcxx_assert_fail() (#144886) missed a changelog line. --- Full diff: https://github.com/llvm/llvm-project/pull/147978.diff 1 F

[clang] [Clang][Doc] Add Changelog line for (#144886) (PR #147978)

2025-07-10 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez created https://github.com/llvm/llvm-project/pull/147978 The patch [CUDA][HIP] Add a __device__ version of std::__glibcxx_assert_fail() (#144886) missed a changelog line. From 9793fe7b0b97dfba031ed2a0967eb5698cb4d36a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=2

[clang] [clang][analyzer] Add C standard streams to the internal memory space (PR #147766)

2025-07-10 Thread Donát Nagy via cfe-commits
NagyDonat wrote: > BTW wouldn't this patch break the semantics of `freopen`? That one should > invalidate the file ptr, right? Could you demonstrate this? No, `freopen` should _not_ invalidate the file _ptr_, because it modifies the stream object (associating it with a different file) _without

[clang] [clang][analyzer] Add C standard streams to the internal memory space (PR #147766)

2025-07-10 Thread Balazs Benics via cfe-commits
=?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: steakhal wrote: > > BTW wouldn't this patch break the semantics of `freopen`? That one should > > invalidate the file ptr, right? Could you demonstrate this? > > No, `freopen` should _not_ invalidate the file _ptr_, because it modifies the >

[clang-tools-extra] [clang-tidy] Add new check `llvm-prefer-static-over-anonymous-namespace` (PR #142839)

2025-07-10 Thread Baranov Victor via cfe-commits
vbvictor wrote: > I suppose this patch does not impede further refactoring if we want to go in > that direction in the future. Yes, also with these tests we will be sure that future `llvm-` alias works properly. https://github.com/llvm/llvm-project/pull/142839

[clang] [llvm] [HLSL][DXIL] Implement `refract` intrinsic (PR #147342)

2025-07-10 Thread Farzon Lotfi via cfe-commits
@@ -71,6 +71,17 @@ constexpr vector reflect_vec_impl(vector I, vector N) { #endif } +template constexpr T refract_impl(T I, T N, U Eta) { +#if (__has_builtin(__builtin_spirv_refract)) + if (is_vector::value) farzonl wrote: It looks like SPIRV refract does

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2025-07-10 Thread Haojian Wu via cfe-commits
hokein wrote: We seem to have lost track of this. This patch has been around for a while, and it needs a rebase before it can be merged. >From what I can tell, part 1 splitting out deduction guide source tracking has >already landed, and the missing piece for alias templates (#103016) is done

[clang] [clang] Don't pass sanitizers' rtlibs to linker with `-r` (PR #147905)

2025-07-10 Thread Dmitry Chestnykh via cfe-commits
https://github.com/chestnykh updated https://github.com/llvm/llvm-project/pull/147905 >From 86dc26e3947d2d53e9b86d700946e7f381f71a7a Mon Sep 17 00:00:00 2001 From: Dmitry Chestnykh Date: Thu, 10 Jul 2025 10:19:31 +0300 Subject: [PATCH] [clang] Don't pass sanitizers' rtlibs to linker with `-r`

[clang] [clang] Don't pass sanitizers' rtlibs to linker with `-r` (PR #147905)

2025-07-10 Thread Dmitry Chestnykh via cfe-commits
https://github.com/chestnykh updated https://github.com/llvm/llvm-project/pull/147905 >From 83069f67af285bf5df6b2181e1c1763f5d2169ff Mon Sep 17 00:00:00 2001 From: Dmitry Chestnykh Date: Thu, 10 Jul 2025 10:19:31 +0300 Subject: [PATCH] [clang] Don't pass sanitizers' rtlibs to linker with `-r`

[clang] [clang] Don't pass sanitizers' rtlibs to linker with `-r` (PR #147905)

2025-07-10 Thread Dmitry Chestnykh via cfe-commits
https://github.com/chestnykh edited https://github.com/llvm/llvm-project/pull/147905 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Multilib] Extend the Multilib system to support an IncludepPath field. (PR #146651)

2025-07-10 Thread Simi Pallipurath via cfe-commits
https://github.com/simpal01 updated https://github.com/llvm/llvm-project/pull/146651 >From 30c353052c35f0117818aca3241e3dea6be2 Mon Sep 17 00:00:00 2001 From: Simi Pallipurath Date: Tue, 1 Jul 2025 21:25:00 +0100 Subject: [PATCH 1/3] [Multilib] Extend the Multilib system to support an Incl

[clang] [llvm] [win][aarch64] Always reserve frame pointers for Arm64 Windows, take 2 (PR #147354)

2025-07-10 Thread Leandro Lupori via cfe-commits
luporl wrote: Thanks for the fix. But Clang::frame-pointer-elim.c test also started failing on Windows on ARM with this PR: - https://lab.llvm.org/buildbot/#/builders/161/builds/6951 Can you please take a look? https://github.com/llvm/llvm-project/pull/147354 __

[clang] [llvm] [OpenMP][clang] 6.0: parsing/sema for message/severity for parallel (PR #146093)

2025-07-10 Thread Alexey Bataev via cfe-commits
@@ -960,6 +960,8 @@ def OMP_Parallel : Directive<[Spelling<"parallel">]> { VersionedClause, VersionedClause, VersionedClause, +VersionedClause, +VersionedClause, alexey-bataev wrote: Version not provided https://github.com/llvm/llvm-projec

[clang] [llvm] [mlir] [debuginfo][coro] Emit debug info labels for coroutine resume points (PR #141937)

2025-07-10 Thread Alexander Kornienko via cfe-commits
alexfh wrote: > @alexfh what makes you think this was introduced by this commit? I found this commit using a mechanical bisection over a range of LLVM revisions building Clang without assertions. So the assertion may actually be caused by a different commit. @bgra8 posted a more focused test c

[clang] 130e612 - [clang][bytecode][NFC] Move Pointer::StorageKind above the union (#147942)

2025-07-10 Thread via cfe-commits
Author: Timm Baeder Date: 2025-07-10T15:05:28+02:00 New Revision: 130e6121f5bb1a54c591133d050aa1311ce16d7f URL: https://github.com/llvm/llvm-project/commit/130e6121f5bb1a54c591133d050aa1311ce16d7f DIFF: https://github.com/llvm/llvm-project/commit/130e6121f5bb1a54c591133d050aa1311ce16d7f.diff L

[clang] [clang][bytecode][NFC] Move Pointer::StorageKind above the union (PR #147942)

2025-07-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/147942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] fixed false positive redeclaration error for using enum in nested scopes (PR #147711)

2025-07-10 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/147711 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Diagnose forming references to nullptr (PR #143667)

2025-07-10 Thread Aaron Ballman via cfe-commits
@@ -174,10 +174,11 @@ def note_constexpr_heap_alloc_limit_exceeded : Note< def note_constexpr_this : Note< "%select{|implicit }0use of 'this' pointer is only allowed within the " "evaluation of a call to a 'constexpr' member function">; -def access_kind : TextSubstitution<

[clang] [Clang][AArch64] Relax SVE bf16 requirement for opaque builtins. (PR #147795)

2025-07-10 Thread Paul Walker via cfe-commits
@@ -1,87 +0,0 @@ -// REQUIRES: aarch64-registered-target - -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -verify -verify-ignore-unexpected=error,note -emit-llvm -o - %s - -#include - -void test_bfloat(svbool_t pg, uint64_t u64, int64_t i64, const bfloat

[clang] [NFC][C++][Modules] Refine basic.link.p3 and add test for P2788R0 (PR #147945)

2025-07-10 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/147945 >From f65b4423eda72ec8533359ba5fdc8f587eba0867 Mon Sep 17 00:00:00 2001 From: "Wang, Yihan" Date: Thu, 10 Jul 2025 19:54:01 +0800 Subject: [PATCH 1/2] [NFC][C++][Modules] Refine basic.link.p3 and add test for

[clang] [NFC][C++][Modules] Refine test/CXX/basic.link/p3.cpp with split-file (PR #147945)

2025-07-10 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/147945 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][C++][Modules] Refine test/CXX/basic.link/p3.cpp with split-file (PR #147945)

2025-07-10 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/147945 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][C++][Modules] Refine test/CXX/basic.link/p3.cpp with split-file (PR #147945)

2025-07-10 Thread via cfe-commits
@@ -51,4 +39,71 @@ template module module_var_template; // This is a variable named 'import' that shadows the type 'import' above. struct X {} import; -#endif + +//--- ImportError1.cppm +module; + +struct import { struct inner {}; }; +struct module { struct inner {}; }; + +con

[clang] [NFC][C++][Modules] Refine test/CXX/basic.link/p3.cpp with split-file (PR #147945)

2025-07-10 Thread via cfe-commits
@@ -51,4 +39,71 @@ template module module_var_template; // This is a variable named 'import' that shadows the type 'import' above. struct X {} import; -#endif + +//--- ImportError1.cppm +module; + +struct import { struct inner {}; }; +struct module { struct inner {}; }; + +con

[clang] [NFC][C++][Modules] Refine test/CXX/basic.link/p3.cpp with split-file (PR #147945)

2025-07-10 Thread via cfe-commits
@@ -51,4 +39,71 @@ template module module_var_template; // This is a variable named 'import' that shadows the type 'import' above. struct X {} import; -#endif + +//--- ImportError1.cppm +module; + +struct import { struct inner {}; }; +struct module { struct inner {}; }; + +con

[clang] [NFC][C++][Modules] Refine test/CXX/basic.link/p3.cpp with split-file (PR #147945)

2025-07-10 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/147945 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 896575e - [clang] Prefer clang_setup over use_clang

2025-07-10 Thread via cfe-commits
Author: Aiden Grossman Date: 2025-07-10T06:14:06-07:00 New Revision: 896575eb74bb59466b50fb51934596d72947ebd5 URL: https://github.com/llvm/llvm-project/commit/896575eb74bb59466b50fb51934596d72947ebd5 DIFF: https://github.com/llvm/llvm-project/commit/896575eb74bb59466b50fb51934596d72947ebd5.diff

[clang] [clang][scan-deps] Report a scanned TU's visible modules (PR #147969)

2025-07-10 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/147969 Clients of the dependency scanning service may need to add dependencies based on the visibility of top-level modules, for example, when determining whether a Swift overlay dependency should be brought in ba

[clang] [clang][scan-deps] Report a scanned TU's visible modules (PR #147969)

2025-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Cyndy Ishida (cyndyishida) Changes Clients of the dependency scanning service may need to add dependencies based on the visibility of top-level modules, for example, when determining whether a Swift overlay dependency should be brought in

[clang] [CIR] Add bit reverse and byte reverse operations (PR #147200)

2025-07-10 Thread Sirui Mu via cfe-commits
@@ -2661,6 +2661,45 @@ def BitPopcountOp : CIR_BitOpBase<"bit.popcnt", }]; } +def BitReverseOp : CIR_BitOpBase<"bit.reverse", + CIR_UIntOfWidths<[8, 16, 32, 64]>> { + let summary = "Reverse the bit pattern of the operand integer"; + let desc

[clang] [CIR] Add bit reverse and byte reverse operations (PR #147200)

2025-07-10 Thread Sirui Mu via cfe-commits
https://github.com/Lancern updated https://github.com/llvm/llvm-project/pull/147200 >From cf2bf0bf66f22e8fdc35baf8d4176aa5af6588d2 Mon Sep 17 00:00:00 2001 From: Sirui Mu Date: Mon, 7 Jul 2025 00:45:48 +0800 Subject: [PATCH 1/2] [CIR] Add bit reverse and byte reverse operations --- clang/incl

[clang] [clang][scan-deps] Report a scanned TU's visible modules (PR #147969)

2025-07-10 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: > In my local performance testing, there was no observable performance impact. To expand on what I tested, `clang-scan-dep` wall time for: * scanning a TU that includes every clang module under `/S/L/F` in the macOS 26 sdk. * scanning a real Objective-C-based project, that

[clang] [llvm] [SYCL] Add offload wrapping for SYCL kind. (PR #147508)

2025-07-10 Thread Maksim Sabianin via cfe-commits
maksimsab wrote: Hi @jdoerfert @jhuber6 ! We are adding offload wrapping for SYCL in this PR. Do you have any suggestions for whom I should request for a code review? https://github.com/llvm/llvm-project/pull/147508 ___ cfe-commits mailing list cfe-c

[libcxx] [libcxxabi] [libunwind] [llvm] [libcxxabi][libunwind] Support for using LLVM libc (PR #134893)

2025-07-10 Thread Joseph Huber via cfe-commits
jhuber6 wrote: This broke the NVPTX build which makes the `Offload.cmake` cache file that we recommend people use no longer work. I'm not sure why but we're no longer passing `-nostdlibinc` and other flags. https://github.com/llvm/llvm-project/pull/134893 __

[clang] [CIR] Add handlers for 'using enum' and namespace alias (PR #148011)

2025-07-10 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/148011 These decl types don't require any code generation, though when debug info is implemented, we will need to add handling for that. Until then, we just need to have a handler so they don't generate an NYI err

[clang] [clang][scan-deps] Report a scanned TU's visible modules (PR #147969)

2025-07-10 Thread Artem Chikin via cfe-commits
@@ -57,6 +57,10 @@ struct TranslationUnitDeps { /// determined that the differences are benign for this compilation. std::vector ClangModuleDeps; + /// A list of module names that are visible to this translation unit. This + /// includes both direct and transitive module

<    1   2   3   4   5   >