[clang] [llvm] [HLSL][RootSignature] Retain `SourceLocation` of `RootElement` for `SemaHLSL` diagnostics (PR #147115)

2025-07-10 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/147115 >From 564f6995f40d80acddbda1fce58ddec38613d9fa Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Fri, 27 Jun 2025 18:36:38 + Subject: [PATCH 01/15] nfc: introduce wrapper `RootSignatureElement` around `Root

[clang] [llvm] [HLSL][RootSignature] Retain `SourceLocation` of `RootElement` for `SemaHLSL` diagnostics (PR #147115)

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

[clang] [PATCH 1/4] [clang] Improve nested name specifier AST representation (PR #147835)

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

[clang] [HLSL][RootSignature] Implement diagnostic for missed comma (PR #147350)

2025-07-10 Thread Finn Plummer via cfe-commits
https://github.com/inbelic closed https://github.com/llvm/llvm-project/pull/147350 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d60da27 - [HLSL][RootSignature] Implement diagnostic for missed comma (#147350)

2025-07-10 Thread via cfe-commits
Author: Finn Plummer Date: 2025-07-10T10:52:20-07:00 New Revision: d60da27400cd96855542cd992d326c10a34dd0f7 URL: https://github.com/llvm/llvm-project/commit/d60da27400cd96855542cd992d326c10a34dd0f7 DIFF: https://github.com/llvm/llvm-project/commit/d60da27400cd96855542cd992d326c10a34dd0f7.diff

[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] [llvm] [DirectX] Validate registers are bound to root signature (PR #146785)

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

[clang] [Clang][Driver] Revise Cygwin ToolChain to call linker directly (PR #147960)

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

[clang] [Clang][Driver] Emit warning when -fsanitize-trap=undefined is passed without -fsanitize=undefined (PR #147997)

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

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

2025-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes 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

[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

[clang] [Clang][Driver] Revise Cygwin ToolChain to call linker directly (PR #147960)

2025-07-10 Thread via cfe-commits
@@ -1504,6 +1506,7 @@ void ToolChain::AddCXXStdlibLibArgs(const ArgList &Args, switch (Type) { case ToolChain::CST_Libcxx: CmdArgs.push_back("-lc++"); +CmdArgs.push_back("-lc++abi"); jeremyd2019 wrote: I'm concerned about this change. Why is this

[clang] [clang] Use a specific target when testing that `-fomit-frame-pointer` and `-pg` are mutually exclusive (PR #148000)

2025-07-10 Thread Leandro Lupori via cfe-commits
https://github.com/luporl approved this pull request. LGTM, thanks. I tested it on a Windows on ARM machine and it worked fine. https://github.com/llvm/llvm-project/pull/148000 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [Clang] Fix a crash when diagnosing wrong conversion to explicit object parameter (PR #147996)

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

[clang] ab0d11c - [Clang] Fix a crash when diagnosing wrong conversion to explicit object parameter (#147996)

2025-07-10 Thread via cfe-commits
Author: Corentin Jabot Date: 2025-07-10T19:28:47+02:00 New Revision: ab0d11c8153740b308700dbb0ab9d63a0e85a3a2 URL: https://github.com/llvm/llvm-project/commit/ab0d11c8153740b308700dbb0ab9d63a0e85a3a2 DIFF: https://github.com/llvm/llvm-project/commit/ab0d11c8153740b308700dbb0ab9d63a0e85a3a2.diff

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

2025-07-10 Thread Erich Keane via cfe-commits
erichkeane wrote: > > Is there ANYTHING we can do to split this up? This is so huge that github > > is refusing to load half the changes. > > I broke the commit down into others, now the first commit only has the AST > and TreeTransform changes. Can we split them up in reviews/do reviews as a

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

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

[clang] [Clang][Driver] Revise Cygwin ToolChain to call linker directly (PR #147960)

2025-07-10 Thread via cfe-commits
jeremyd2019 wrote: Thanks! This was on my mental TODO list but I haven't gotten back to looking at it. When I was thinking about this, I was thinking about modifying the MinGW linker with a couple of virtual functions and deriving from it for a Cygwin linker, to avoid so much code duplicatio

[clang] [CIR] Emit init of local variables (PR #130164)

2025-07-10 Thread Andy Kaylor via cfe-commits
@@ -105,6 +106,27 @@ class CIRGenFunction : public CIRGenTypeCache { mlir::Value emitAlloca(llvm::StringRef name, mlir::Type ty, mlir::Location loc, clang::CharUnits alignment); +private: + // Track current variable initialization (if there's one) +

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

2025-07-10 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > Is there ANYTHING we can do to split this up? This is so huge that github is > refusing to load half the changes. I broke the commit down into others, now the first commit only has the AST and TreeTransform changes. https://github.com/llvm/llvm-project/pull/147835 __

[clang] [Clang][Driver] Revise Cygwin ToolChain to call linker directly (PR #147960)

2025-07-10 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions h,cpp -- clang/lib/Driver/ToolChain.cpp clang/lib/Driver/Too

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

2025-07-10 Thread Andy Kaylor 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] [llvm] [OptBisect][IR] Adding a new OptPassGate for disabling passes via name (PR #145059)

2025-07-10 Thread Cristian Assaiante via cfe-commits
https://github.com/cristianassaiante updated https://github.com/llvm/llvm-project/pull/145059 >From ab6063493744ef5a1ee92fd249bf8d86b7299fad Mon Sep 17 00:00:00 2001 From: Cristian Assaiante Date: Fri, 20 Jun 2025 16:56:23 +0200 Subject: [PATCH 01/14] Adding -opt-disable and a test for it ---

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

2025-07-10 Thread Cristian Assaiante via cfe-commits
https://github.com/cristianassaiante updated https://github.com/llvm/llvm-project/pull/145059 >From ab6063493744ef5a1ee92fd249bf8d86b7299fad Mon Sep 17 00:00:00 2001 From: Cristian Assaiante Date: Fri, 20 Jun 2025 16:56:23 +0200 Subject: [PATCH 01/13] Adding -opt-disable and a test for it ---

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

2025-07-10 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/147802 >From e65fa6bdd251ceef52e11ff8ee856058e8e3c47a Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Wed, 9 Jul 2025 14:40:00 -0400 Subject: [PATCH 1/9] [C23] Accept an _Atomic underlying type The underlying

[clang] [clang] Use a specific target when testing that `-fomit-frame-pointer` and `-pg` are mutually exclusive (PR #148000)

2025-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Daniel Paoliello (dpaoliello) Changes Some targets, such as `aarch64-pc-windows-msvc`, always require that Frame Pointer be reserved even when `-fomit-frame-pointer` is provided, thus it is always valid t

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

2025-07-10 Thread Daniel Paoliello via cfe-commits
dpaoliello 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? PR to fix: #148000 https://github.com/llvm/llvm-project/pull/1473

[clang] [clang] Use a specific target when testing that `-fomit-frame-pointer` and `-pg` are mutually exclusive (PR #148000)

2025-07-10 Thread Daniel Paoliello via cfe-commits
https://github.com/dpaoliello created https://github.com/llvm/llvm-project/pull/148000 Some targets, such as `aarch64-pc-windows-msvc`, always require that Frame Pointer be reserved even when `-fomit-frame-pointer` is provided, thus it is always valid to use `-pg` on those targets. This test

[clang] [llvm] [docs] Add clang/llvm release notes for mipsel-windows-* targets (PR #147133)

2025-07-10 Thread Hervé Poussineau via cfe-commits
hpoussin wrote: Any possibility to have it merged before branching? https://github.com/llvm/llvm-project/pull/147133 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Prettify checker registration and unittest code (PR #147797)

2025-07-10 Thread Donát Nagy via cfe-commits
@@ -112,26 +112,35 @@ class CheckerRegistry { return true; } -public: - /// Adds a checker to the registry. Use this non-templated overload when your - /// checker requires custom initialization. - void addChecker(RegisterCheckerFn Fn, ShouldRegisterFunction sfn, + /

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

2025-07-10 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. lgtm, apart from my request for an additional test case https://github.com/llvm/llvm-project/pull/147609 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

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

2025-07-10 Thread Cristian Assaiante via cfe-commits
https://github.com/cristianassaiante updated https://github.com/llvm/llvm-project/pull/145059 >From ab6063493744ef5a1ee92fd249bf8d86b7299fad Mon Sep 17 00:00:00 2001 From: Cristian Assaiante Date: Fri, 20 Jun 2025 16:56:23 +0200 Subject: [PATCH 01/12] Adding -opt-disable and a test for it ---

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

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

[clang] [Mips] Correctly define IntPtrType (PR #145158)

2025-07-10 Thread Hervé Poussineau via cfe-commits
hpoussin wrote: This fixes at least 2 compilation errors (for @alexrp and me). @yingopq, do I need an approval before it is merged? https://github.com/llvm/llvm-project/pull/145158 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [Clang] Do not skip over `RequiresExprBodyDecl` when creating lambdas (PR #147764)

2025-07-10 Thread Matheus Izvekov via cfe-commits
@@ -1088,6 +1088,9 @@ void CXXNameMangler::mangleNameWithAbiTags(GlobalDecl GD, return; } + while (DC->isRequiresExprBody()) +DC = DC->getParent(); mizvekov wrote: With a compound expression you can introduce lots of other kinds of DeclContexts he

[clang] [CIR] Fold ComplexRealOp from ComplexCreateOp (PR #147592)

2025-07-10 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/147592 >From 316b23e92cf55a407fdaa7d9aa5fd92a24754fee Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 8 Jul 2025 22:07:09 +0200 Subject: [PATCH 1/3] [CIR] Fold ComplexRealOp from ComplexCreateOp --- clang

[clang] [CIR] Upstream __builtin_cimag for ComplexType (PR #147808)

2025-07-10 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux` running on `sanitizer-buildbot8` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/51/builds/19573 Here is the relevant piece of the

[clang] [analyzer] Prettify checker registration and unittest code (PR #147797)

2025-07-10 Thread Donát Nagy via cfe-commits
NagyDonat wrote: I discussed with @Szelethus (in person) that I'll be waiting for his opinion before merging this. https://github.com/llvm/llvm-project/pull/147797 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [HLSL][RootSignature] Implement diagnostic for missed comma (PR #147350)

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

[clang] [HLSL][RootSignature] Implement diagnostic for missed comma (PR #147350)

2025-07-10 Thread Finn Plummer via cfe-commits
@@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -fsyntax-only %s -verify + +// expected-no-diagnostics + +// Test that we have consistent behaviour for comma parsing. Namely: +// - a single trailing comma is allowed after any parameter +// - a

[clang] [analyzer] Prettify checker registration and unittest code (PR #147797)

2025-07-10 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/147797 From fc638a1d7d56becbe7e8350b46b75ade51718f71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Tue, 20 May 2025 15:51:48 +0200 Subject: [PATCH 1/8] [analyzer] Prettify checker registration an

[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] [C23] Accept an _Atomic underlying type (PR #147802)

2025-07-10 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/147802 >From e65fa6bdd251ceef52e11ff8ee856058e8e3c47a Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Wed, 9 Jul 2025 14:40:00 -0400 Subject: [PATCH 1/8] [C23] Accept an _Atomic underlying type The underlying

[clang] [analyzer] Prettify checker registration and unittest code (PR #147797)

2025-07-10 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/147797 From fc638a1d7d56becbe7e8350b46b75ade51718f71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Tue, 20 May 2025 15:51:48 +0200 Subject: [PATCH 1/7] [analyzer] Prettify checker registration an

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

2025-07-10 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/147802 >From e65fa6bdd251ceef52e11ff8ee856058e8e3c47a Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Wed, 9 Jul 2025 14:40:00 -0400 Subject: [PATCH 1/7] [C23] Accept an _Atomic underlying type The underlying

[clang] [analyzer] Prettify checker registration and unittest code (PR #147797)

2025-07-10 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with

[clang] [Clang][Driver] Emit warning when -fsanitize-trap=undefined is passed without -fsanitize=undefined (PR #147997)

2025-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Anthony Tran (anthonyhatran) Changes Part of a GSoC 2025 Project --- Full diff: https://github.com/llvm/llvm-project/pull/147997.diff 2 Files Affected: - (modified) clang/include/clang/Basic/DiagnosticDriverKinds.td (+5) - (modified)

[clang] [Clang] Fix a crash when diagnosing wrong conversion to explicit object parameter (PR #147996)

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

[clang] [Clang][Driver] Emit warning when -fsanitize-trap=undefined is passed without -fsanitize=undefined (PR #147997)

2025-07-10 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [analyzer] Prettify checker registration and unittest code (PR #147797)

2025-07-10 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/147797 From fc638a1d7d56becbe7e8350b46b75ade51718f71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Tue, 20 May 2025 15:51:48 +0200 Subject: [PATCH 1/6] [analyzer] Prettify checker registration an

[clang] [CIR] Upstream ComplexRealPtrOp for ComplexType (PR #144235)

2025-07-10 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/144235 >From acab11ee6a8e8041dab689c5518229e358d4f5a1 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Mon, 7 Jul 2025 20:52:33 +0200 Subject: [PATCH 1/2] [CIR] Upstream ComplexRealPtrOp for ComplexType --- cla

[clang] [Clang][Driver] Emit warning when -fsanitize-trap=undefined is passed without -fsanitize=undefined (PR #147997)

2025-07-10 Thread Anthony Tran via cfe-commits
https://github.com/anthonyhatran created https://github.com/llvm/llvm-project/pull/147997 Part of a GSoC 2025 Project >From eadf3e52072fbae01e8de8f7f59883aec1b2c9bc Mon Sep 17 00:00:00 2001 From: Anthony Tran Date: Thu, 10 Jul 2025 09:18:50 -0700 Subject: [PATCH] Added warning and warning gro

[clang] [Clang] Fix a crash when diagnosing wrong conversion to explicit object parameter (PR #147996)

2025-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Corentin Jabot (cor3ntin) Changes When an overload is invalid, we try to initialize each conversion sequence for the purpose of diagmostics, but we failed to initialize explicit objects, leading to a crash Fixes #147121 --- Full diff: h

[clang] [Clang] Fix a crash when diagnosing wrong conversion to explicit object parameter (PR #147996)

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

[clang] [Clang] Fix a crash when diagnosing wrong conversion to explicit object parameter (PR #147996)

2025-07-10 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/147996 When an overload is invalid, we try to initialize each conversion sequence for the purpose of recovery, but we failed to initialize explicit objects, leading to a crash Fixes #147121 >From 6d3df177b7061cb71b

[clang] Add necessary linker flags when -static-pie is enabled in BareMetal Toolchain (PR #147589)

2025-07-10 Thread Sam Elliott via cfe-commits
@@ -599,11 +599,18 @@ void baremetal::Linker::ConstructJob(Compilation &C, const JobAction &JA, const Driver &D = getToolChain().getDriver(); const llvm::Triple::ArchType Arch = TC.getArch(); const llvm::Triple &Triple = getToolChain().getEffectiveTriple(); + const bool

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

2025-07-10 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/147578 >From d91ac481a20e71275b441a9b9a7712aa9dfd270b Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 8 Jul 2025 20:00:08 +0200 Subject: [PATCH 1/4] [CIR] Implement AddOp for ComplexType --- clang/include

[clang] [clang][deps] Stop lexing if hit a failure while loading a PCH/module in a submodule. (PR #146976)

2025-07-10 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: > Seems like this should have a release note? What is the bar for a change to be release noted? This change is pretty much "make clang-scan-deps less likely to crash" and personally I don't think it deserves a release note. https://github.com/llvm/llvm-project/pull/146976 _

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

2025-07-10 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin updated https://github.com/llvm/llvm-project/pull/147953 >From 0f6d49539df0269daed67af2c7c054f3501fcc0b Mon Sep 17 00:00:00 2001 From: Dmitry Polukhin Date: Thu, 10 Jul 2025 05:26:11 -0700 Subject: [PATCH 1/3] [clang-tidy][readability-named-parameter] Add an option

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

2025-07-10 Thread Baranov Victor via cfe-commits
vbvictor wrote: Based on [carlosgalvezp](https://github.com/carlosgalvezp)'s comment in https://github.com/llvm/llvm-project/pull/147902#pullrequestreview-3005674950 changed `Checks: []` to `Checks: >` to comply with older version of `clang-tidy`. https://github.com/llvm/llvm-project/pull/147

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

2025-07-10 Thread Gábor Horváth via cfe-commits
@@ -0,0 +1,510 @@ +//===- 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] 54ec521 - [CIR] Upstream __builtin_cimag for ComplexType (#147808)

2025-07-10 Thread via cfe-commits
Author: Amr Hesham Date: 2025-07-10T18:19:24+02:00 New Revision: 54ec5217a07ed7389c5ee3c744cc1aa2534c URL: https://github.com/llvm/llvm-project/commit/54ec5217a07ed7389c5ee3c744cc1aa2534c DIFF: https://github.com/llvm/llvm-project/commit/54ec5217a07ed7389c5ee3c744cc1aa2534c.diff LO

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

2025-07-10 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/147793 >From c4466d677619e6eb8ca65ed943bfb103207527c9 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Wed, 9 Jul 2025 21:00:30 +0300 Subject: [PATCH 1/4] [clang-tidy][NFC] add '.clang-tidy' config for clang-tidy

[clang] [CIR] Upstream __builtin_cimag for ComplexType (PR #147808)

2025-07-10 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/147808 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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] [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] [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-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] [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] [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] [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] [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] [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] [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-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-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-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-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] [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] [Clang][CodeGen] Emit “trap reasons” on UBSan traps (PR #145967)

2025-07-10 Thread Paul Kirth via cfe-commits
ilovepi wrote: > I wouldn't say it's orthogonal. It's a very interesting implementation idea > but there are several reasons why we don't want to pursue it right now. > > 1. What you are proposing is significantly more complicated than what is > implemented in this PR. This work being part of

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

2025-07-10 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/147802 >From e65fa6bdd251ceef52e11ff8ee856058e8e3c47a Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Wed, 9 Jul 2025 14:40:00 -0400 Subject: [PATCH 1/6] [C23] Accept an _Atomic underlying type The underlying

[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] [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] [APINotes] Add support for capturing all possible versioned APINotes without applying them (PR #147405)

2025-07-10 Thread Artem Chikin via cfe-commits
https://github.com/artemcm updated https://github.com/llvm/llvm-project/pull/147405 >From 1e1b8ed2a995f4969782c257dc03713b52839573 Mon Sep 17 00:00:00 2001 From: Artem Chikin Date: Mon, 7 Jul 2025 13:56:41 -0700 Subject: [PATCH] [APINotes] Add support for capturing all possible versioned APINo

[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] [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][scan-deps] Report a scanned TU's visible modules (PR #147969)

2025-07-10 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida 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][scan-deps] Report a scanned TU's visible modules (PR #147969)

2025-07-10 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida 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][scan-deps] Report a scanned TU's visible modules (PR #147969)

2025-07-10 Thread Cyndy Ishida 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] fix crash in codegen caused by deferred asm diagnostics under -fopenmp (PR #147163)

2025-07-10 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > Deferred errors only, though, right? Deferred unrecoverable errors, yes. > 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? As far as I can tell, targetDiag() works on a per-

[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] [llvm] [SYCL] Add offload wrapping for SYCL kind. (PR #147508)

2025-07-10 Thread Joseph Huber via cfe-commits
@@ -263,3 +264,37 @@ // HIP: while.end: // HIP-NEXT: ret void // HIP-NEXT: } + +// RUN: clang-offload-packager -o %t.out --image=file=%t.elf.o,kind=sycl,triple=spirv64-unknown-unknown,arch=generic +// RUN: %clang -cc1 %s -triple x86_64-unknown-linux-gnu -emit-obj -o %t.

[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][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][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
@@ -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
@@ -519,6 +528,8 @@ class FullDeps { }); JOS.attributeArray("clang-module-deps", toJSONSorted(JOS, I.ClangModuleDeps)); +JOS.attributeArray("visible-clang-modules",

  1   2   3   4   >