[clang] [clang] Combine ConstRefUse with other warnings for uninitialized values (PR #147898)

2025-07-10 Thread Richard Smith via cfe-commits
https://github.com/zygoloid approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/147898 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LifetimeSafety] Implement dataflow analysis for loan propagation (PR #148065)

2025-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: Utkarsh Saxena (usx95) Changes This patch introduces the core dataflow analysis infrastructure for the C++ Lifetime Safety checker. This change implements the logic to propagate "loan" information across the control-flow graph. T

[clang] [LifetimeSafety] Implement dataflow analysis for loan propagation (PR #148065)

2025-07-10 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 ready_for_review https://github.com/llvm/llvm-project/pull/148065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Combine ConstRefUse with other warnings for uninitialized values (PR #147898)

2025-07-10 Thread Igor Kudrin via cfe-commits
@@ -27,7 +27,7 @@ int const_use(const int i); void f(int a) { int i; const_ref_use(i); // expected-warning {{variable 'i' is uninitialized when passed as a const reference argument here}} - int j = j + const_ref_use(j); // expected-warning {{variable 'j' is u

[clang] [clang] Combine ConstRefUse with other warnings for uninitialized values (PR #147898)

2025-07-10 Thread Igor Kudrin via cfe-commits
https://github.com/igorkudrin updated https://github.com/llvm/llvm-project/pull/147898 >From a813a4c665579b3654b287ff64c8180139879a38 Mon Sep 17 00:00:00 2001 From: Igor Kudrin Date: Wed, 9 Jul 2025 21:19:40 -0700 Subject: [PATCH 1/2] [clang] Combine ConstRefUse with other warnings for uniniti

[clang] [LifetimeSafety] Implement dataflow analysis for loan propagation (PR #148065)

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

[clang] [LifetimeSafety] Implement dataflow analysis for loan propagation (PR #148065)

2025-07-10 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: * **#148065** https://app.graphite.dev/github/pr/llvm/llvm-project/148065?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/148065

[clang] [LifetimeSafety] Implement dataflow analysis for loan propagation (PR #148065)

2025-07-10 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/148065 None >From f6ca9022b136007bfbd369e71b4361829aeb89e0 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Thu, 10 Jul 2025 22:00:01 + Subject: [PATCH] [LifetimeSafety] Implement dataflow analysis for loan prop

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

2025-07-10 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `fuchsia-x86_64-linux` running on `fuchsia-debian-64-us-central1-b-1` while building `clang` at step 4 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/11/builds/19276 Here is the relevant

[clang] [Driver][MinGW] Allow using clang driver to link ARM64X PEs. (PR #148064)

2025-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: WhatAmISupposedToPutHere (WhatAmISupposedToPutHere) Changes Similar to how clang-cl driver does it, make it possible to build arm64x binaries with a mingw-style invocation. --- Full diff: https://github.c

[clang] [Driver][MinGW] Allow using clang driver to link ARM64X PEs. (PR #148064)

2025-07-10 Thread via cfe-commits
https://github.com/WhatAmISupposedToPutHere created https://github.com/llvm/llvm-project/pull/148064 Similar to how clang-cl driver does it, make it possible to build arm64x binaries with a mingw-style invocation. >From ced43ee83d1c830293146363e60a57c3dfb8a93a Mon Sep 17 00:00:00 2001 From: Sa

[clang] [clang][CodeGen] Preserve addrspace of enqueue_kernel builtin. (PR #148062)

2025-07-10 Thread via cfe-commits
https://github.com/jofrn updated https://github.com/llvm/llvm-project/pull/148062 >From b8c027c278248eeb53d561c2acb2784ce3dcfc34 Mon Sep 17 00:00:00 2001 From: jofrn Date: Thu, 10 Jul 2025 17:34:38 -0400 Subject: [PATCH] [clang][CodeGen] Preserve addrspace of enqueue_kernel builtin. __enqueue

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

2025-07-10 Thread via cfe-commits
jeremyd2019 wrote: > > I was planning to refer to that, MinGW.cpp, and the GCC spec for Cygwin, > > and see if I could come up with a couple of places where virtual functions > > could be added to the MinGW::Linker class so that Cygwin::Linker could > > derive from it and override (I think the

[clang] [clang][RISCV] Fix crash on VLS calling convention (PR #145489)

2025-07-10 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: I'm not really happy with the way the code is organized for "coerced" load/store involving scalable types. At the point where we're analyzing the calling convention; we have a bunch of information: exactly what kind of coercion we're doing, whether t

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

2025-07-10 Thread Tomohiro Kashiwada via cfe-commits
@@ -107,3 +110,289 @@ void Cygwin::AddClangSystemIncludeArgs(const ArgList &DriverArgs, addExternCSystemInclude(DriverArgs, CC1Args, SysRoot + "/usr/include"); addExternCSystemInclude(DriverArgs, CC1Args, SysRoot + "/usr/include/w32api"); } + +static bool getStaticPIE(con

[clang] [clang][CodeGen] Preserve addrspace of enqueue_kernel builtin. (PR #148062)

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 cl,cpp -- clang/lib/CodeGen/CGBuiltin.cpp clang/test/CodeGe

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

2025-07-10 Thread Tomohiro Kashiwada via cfe-commits
kikairoya wrote: Could you let I know output of `echo | clang -xc - -v` (and some option variants) with patch? Does this patch consider to use of LLD? ( gcc can use with LLD: `-fuse-ld=lld -L/usr/lib/w32api -Wl,--enable-auto-import,--disable-high-entropy-va,--disable-nxcompat,--wrap,_Znwm,--w

[clang] [clang][OpenMP] In 6.0, can omit length in array section (PR #148048)

2025-07-10 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev commented: Need codegen tests https://github.com/llvm/llvm-project/pull/148048 ___ 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 updated https://github.com/llvm/llvm-project/pull/147997 >From eadf3e52072fbae01e8de8f7f59883aec1b2c9bc Mon Sep 17 00:00:00 2001 From: Anthony Tran Date: Thu, 10 Jul 2025 09:18:50 -0700 Subject: [PATCH 1/2] Added warning and warning group for sanitizer argument

[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
carlosgalvezp wrote: Thank you for driving this, LGTM! One last thing I'm missing: can you update the clang-tidy contributors guide, to explain that we expect people to run clang-tidy as well (and what command to run)? Since it's not currently enforced in CI. https://github.com/llvm/llvm-pro

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

2025-07-10 Thread via cfe-commits
jeremyd2019 wrote: Oh, another proposed implementation to look at: #74933 I was planning to refer to that, MinGW.cpp, and the GCC spec for Cygwin, and see if I could come up with a couple of places where virtual functions could be added to the MinGW::Linker class so that Cygwin::Linker could

[clang-tools-extra] [clang-doc] Serialize record files with mangled name (PR #148021)

2025-07-10 Thread Erick Velez via cfe-commits
https://github.com/evelez7 updated https://github.com/llvm/llvm-project/pull/148021 >From 4e87ab11a1c19a2f7f897521f0bfb60d68470e1a Mon Sep 17 00:00:00 2001 From: Erick Velez Date: Thu, 10 Jul 2025 11:16:20 -0700 Subject: [PATCH] explicitly use ItaniumMangleContext to avoid platform errors ---

[clang-tools-extra] [clang-doc] Serialize record files with mangled name (PR #148021)

2025-07-10 Thread Paul Kirth via cfe-commits
@@ -378,6 +378,7 @@ struct SymbolInfo : public Info { std::optional DefLoc; // Location where this decl is defined. llvm::SmallVector Loc; // Locations where this decl is declared. bool IsStatic = false; + SmallString<16> MangledName; ilovepi wrote:

[clang-tools-extra] [clang-doc] Serialize record files with mangled name (PR #148021)

2025-07-10 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. LGTM, with some minor comments. https://github.com/llvm/llvm-project/pull/148021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Serialize record files with mangled name (PR #148021)

2025-07-10 Thread Paul Kirth via cfe-commits
@@ -501,15 +502,26 @@ Error JSONGenerator::generateDocs( SmallString<128> Path; sys::path::native(RootDir, Path); -sys::path::append(Path, Info->getRelativeFilePath("")); if (!CreatedDirs.contains(Path)) { if (std::error_code Err = sys::fs::create_direc

[clang-tools-extra] [clang-doc] Serialize record files with mangled name (PR #148021)

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

[clang] [clang-format][NFC] Replace a function with StringRef::contains (PR #146245)

2025-07-10 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/146245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format][NFC] Replace a function with StringRef::contains (PR #146245)

2025-07-10 Thread Björn Schäpers via cfe-commits
HazardyKnusperkeks wrote: > Had we used `StringRef::contains` initially, would you still insist that it > be replaced with a "more performant" local function? Of course not, because no one would go look for it. https://github.com/llvm/llvm-project/pull/146245 _

[clang] [CIR] Use ZeroAttr as zeroinitializer for ComplexType (PR #148033)

2025-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clangir Author: Amr Hesham (AmrDeveloper) Changes Use ZeroAttr as a zeroinitializer for ComplexType, similar to what we did in CXXScalarValueInitExpr https://github.com/llvm/llvm-project/issues/141365 --- Full diff: https://

[clang] [clang-tools-extra] [Clang] [Diagnostics] Simplify filenames that contain '..' (PR #143520)

2025-07-10 Thread Justin Cady via cfe-commits
justincady wrote: @Sirraide I'm seeing failures in the newly added test cases with a repo on a network mount. I see the code changes handle that scenario, but if I understand correctly the tests currently do not. Could the tests be updated to either be skipped or validate that the canonicaliz

[clang] [CIR] Use ZeroAttr as zeroinitializer for ComplexType (PR #148033)

2025-07-10 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/148033 Use ZeroAttr as a zeroinitializer for ComplexType, similar to what we did in CXXScalarValueInitExpr https://github.com/llvm/llvm-project/issues/141365 >From 0f584ac188b3c6eb9cc61ffc44464741360ff9c0 Mon Se

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

2025-07-10 Thread John McCall via cfe-commits
rjmccall wrote: > > You should at minimum be able to layer the `NestedNameSpecifier` change on > > top of the `TagType` change. I can't see why that wouldn't work. > > > > 1. Add the structure for sugary `TagType`s. > > 2. Replace `ElaboratedType` with sugary `TagType`s. > > 3. Change the repre

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

2025-07-10 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > For obvious reasons, I wasn't able to make even a reasonably thorough review > here, but I came across a few things that seemed like good ideas. All 4 of > the patches are STILL huge. > > IMO, unless this can be more bite-sized changes, I don't know how to proceed > here. Y

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

2025-07-10 Thread Matheus Izvekov via cfe-commits
@@ -0,0 +1,585 @@ +//===- NestedNameSpecifier.h - C++ nested name specifiers ---*- 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-doc] Serialize record files with mangled name (PR #148021)

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

[clang] [clang] Fix isConstantInitializer handling of transparent init lists. (PR #148030)

2025-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Eli Friedman (efriedma-quic) Changes Transparent InitListExprs have different semantics, so special-case them in Expr::isConstantInitializer. We probably should move away from isConstantInitializer, in favor of relying more directly on c

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

2025-07-10 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > You should at minimum be able to layer the `NestedNameSpecifier` change on > top of the `TagType` change. I can't see why that wouldn't work. > > 1. Add the structure for sugary `TagType`s. > 2. Replace `ElaboratedType` with sugary `TagType`s. > 3. Change the representation of

[clang] [clang] Fix isConstantInitializer handling of transparent init lists. (PR #148030)

2025-07-10 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic created https://github.com/llvm/llvm-project/pull/148030 Transparent InitListExprs have different semantics, so special-case them in Expr::isConstantInitializer. We probably should move away from isConstantInitializer, in favor of relying more directly on cons

[clang] [APINotes] Add support for capturing all possible versioned APINotes without applying them (PR #147405)

2025-07-10 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan closed https://github.com/llvm/llvm-project/pull/147405 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a709195 - [APINotes] Add support for capturing all possible versioned APINotes without applying them

2025-07-10 Thread via cfe-commits
Author: Artem Chikin Date: 2025-07-10T19:19:18+01:00 New Revision: a7091951f0bbdeb78a76f933394a7754c5990371 URL: https://github.com/llvm/llvm-project/commit/a7091951f0bbdeb78a76f933394a7754c5990371 DIFF: https://github.com/llvm/llvm-project/commit/a7091951f0bbdeb78a76f933394a7754c5990371.diff

[clang] [llvm] [DirectX] Validate registers are bound to root signature (PR #146785)

2025-07-10 Thread Finn Plummer via cfe-commits
@@ -14,10 +14,129 @@ #ifndef LLVM_LIB_TARGET_DIRECTX_DXILPOSTOPTIMIZATIONVALIDATION_H #define LLVM_LIB_TARGET_DIRECTX_DXILPOSTOPTIMIZATIONVALIDATION_H +#include "DXILRootSignature.h" +#include "llvm/ADT/IntervalMap.h" +#include "llvm/Analysis/DXILResource.h" #include "llvm/IR

[clang-tools-extra] [clangd] fix asserts on incompatible paths in CDB (PR #148019)

2025-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Dmitrii Sharshakov (dsseng) Changes A compile_commands.json with Windows paths would make clangd assert on a POSIX system, and vice versa. Make path traversal functions skip paths of the incompatible format. Could not invent a

[clang-tools-extra] [clangd] fix asserts on incompatible paths in CDB (PR #148019)

2025-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Dmitrii Sharshakov (dsseng) Changes A compile_commands.json with Windows paths would make clangd assert on a POSIX system, and vice versa. Make path traversal functions skip paths of the incompatible format. Could not invent a test for t

[clang-tools-extra] [clangd] fix asserts on incompatible paths in CDB (PR #148019)

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-tools-extra] [clangd] fix asserts on incompatible paths in CDB (PR #148019)

2025-07-10 Thread Dmitrii Sharshakov via cfe-commits
https://github.com/dsseng created https://github.com/llvm/llvm-project/pull/148019 A compile_commands.json with Windows paths would make clangd assert on a POSIX system, and vice versa. Make path traversal functions skip paths of the incompatible format. Could not invent a test for this one, s

[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] [llvm] [HLSL][RootSignature] Retain `SourceLocation` of `RootElement` for `SemaHLSL` diagnostics (PR #147115)

2025-07-10 Thread Justin Bogner via cfe-commits
@@ -32,6 +32,9 @@ struct RangeInfo { llvm::dxil::ResourceClass Class; uint32_t Space; llvm::dxbc::ShaderVisibility Visibility; + + // The index retains its original position before being sorted by group. + size_t Index; bogner wrote: The simpler way to

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

2025-07-10 Thread Cyndy Ishida 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] [CIR] Add handlers for 'using enum' and namespace alias (PR #148011)

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

[clang] [clang-tools-extra] [clang-query] Allow for trailing comma in matchers (PR #148018)

2025-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Remy Farley (one-d-wide) Changes Allow AST matches in clang-query to have a trailing comma at the end of matcher arguments. Makes it nicer to work with queries that span multiple lines. So, for example, the following is possible: ```clan

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

2025-07-10 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Another concrete reason for why this should default to an error for `_Atomic` is https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p0943r6.html In the C++ version of `stdatomic.h`, there's a `#define _Atomic(x) std::atomic` which exists for shared header files betwee

[clang] [clang-tools-extra] [clang-query] Allow for trailing comma in matchers (PR #148018)

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] [clang-tools-extra] [clang-query] Allow for trailing comma in matchers (PR #148018)

2025-07-10 Thread Remy Farley via cfe-commits
https://github.com/one-d-wide created https://github.com/llvm/llvm-project/pull/148018 Allow AST matches in clang-query to have a trailing comma at the end of matcher arguments. Makes it nicer to work with queries that span multiple lines. So, for example, the following is possible: ```clang-

[clang] [llvm] [DirectX] Validate registers are bound to root signature (PR #146785)

2025-07-10 Thread via cfe-commits
@@ -14,10 +14,129 @@ #ifndef LLVM_LIB_TARGET_DIRECTX_DXILPOSTOPTIMIZATIONVALIDATION_H #define LLVM_LIB_TARGET_DIRECTX_DXILPOSTOPTIMIZATIONVALIDATION_H +#include "DXILRootSignature.h" +#include "llvm/ADT/IntervalMap.h" +#include "llvm/Analysis/DXILResource.h" #include "llvm/IR

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

2025-07-10 Thread Florian Mayer via cfe-commits
fmayer wrote: I would prefer this to be behind a flag (not necessarily in this PR), even if it's default turned on. People might not want synthetic frames added to their debug information and the top frame to point to the real code; also as this somewhat overlaps with the logic of `-fsanitize-

[clang] [clang] Combine ConstRefUse with other warnings for uninitialized values (PR #147898)

2025-07-10 Thread Richard Smith via cfe-commits
https://github.com/zygoloid approved this pull request. https://github.com/llvm/llvm-project/pull/147898 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Combine ConstRefUse with other warnings for uninitialized values (PR #147898)

2025-07-10 Thread Richard Smith via cfe-commits
@@ -1580,13 +1570,21 @@ class UninitValsDiagReporter : public UninitVariablesHandler { // guaranteed to produce them in line/column order, this will provide // a stable ordering. llvm::sort(*vec, [](const UninitUse &a, const UninitUse &b) { + /

[clang] [clang] Combine ConstRefUse with other warnings for uninitialized values (PR #147898)

2025-07-10 Thread Richard Smith via cfe-commits
@@ -27,7 +27,7 @@ int const_use(const int i); void f(int a) { int i; const_ref_use(i); // expected-warning {{variable 'i' is uninitialized when passed as a const reference argument here}} - int j = j + const_ref_use(j); // expected-warning {{variable 'j' is u

[clang] [clang] Combine ConstRefUse with other warnings for uninitialized values (PR #147898)

2025-07-10 Thread Richard Smith via cfe-commits
https://github.com/zygoloid commented: Thanks, LGTM https://github.com/llvm/llvm-project/pull/147898 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Combine ConstRefUse with other warnings for uninitialized values (PR #147898)

2025-07-10 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/147898 ___ 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
mizvekov wrote: > I'm definitely OK with accepting all of that, and would very much appreciate > it. Done. https://github.com/llvm/llvm-project/pull/147835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[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] [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

  1   2   3   4   5   6   7   8   9   10   >