[clang] [HLSL] Make memory representation of boolean vectors in HLSL, vectors of i32. Add support for boolean swizzling. (PR #123977)

2025-02-13 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/123977 >From 50f8b16bf83d70cc37f2ac7e70c9195a4c4cda02 Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Thu, 16 Jan 2025 01:32:25 + Subject: [PATCH 01/13] wip --- clang/lib/CodeGen/CGExpr.cpp | 19

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-13 Thread Tarun Prabhu via cfe-commits
@@ -0,0 +1,155 @@ + + +# `DO CONCURRENT` mapping to OpenMP + +```{contents} +--- +local: +--- +``` + +This document seeks to describe the effort to parallelize `do concurrent` loops +by mapping them to OpenMP worksharing constructs. The goals of this document +are: +* Describing h

[clang] Remove xbegin and _xend (PR #126952)

2025-02-13 Thread Devon Loehr via cfe-commits
DKLoehr wrote: Added a test based on the linked bug. I couldn't get it to reproduce in anything that seemed to fit in the existing file, so I made a new one. https://github.com/llvm/llvm-project/pull/126952 ___ cfe-commits mailing list cfe-commits@lis

[clang] Remove xbegin and _xend (PR #126952)

2025-02-13 Thread Devon Loehr via cfe-commits
https://github.com/DKLoehr updated https://github.com/llvm/llvm-project/pull/126952 >From 01e40e4d8b3cc2068aa5a022c3acae246b6ac771 Mon Sep 17 00:00:00 2001 From: Devon Loehr Date: Wed, 12 Feb 2025 18:17:05 + Subject: [PATCH 1/2] Remove xbegin and _xend --- clang/lib/Headers/intrin.h | 2 -

[clang] [Clang] Disable RTTI for offloading at the frontend level (PR #127082)

2025-02-13 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/127082 Summary: Currently we force this to be off in `-cc1`, but I feel like this should be something the driver informs the compiler of. It's not *inconcievable* that RTTI might 'work' on the GPU some day, but mostly I

[clang] [Clang] Disable RTTI for offloading at the frontend level (PR #127082)

2025-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Joseph Huber (jhuber6) Changes Summary: Currently we force this to be off in `-cc1`, but I feel like this should be something the driver informs the compiler of. It's not *inconcievable* that RTTI might 'wo

[clang] [Clang] Disable RTTI for offloading at the frontend level (PR #127082)

2025-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Joseph Huber (jhuber6) Changes Summary: Currently we force this to be off in `-cc1`, but I feel like this should be something the driver informs the compiler of. It's not *inconcievable* that RTTI might 'work' on the GPU some day, b

[clang] [flang] [flang][RISCV] Add target-abi ModuleFlag. (PR #126188)

2025-02-13 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu approved this pull request. Looks reasonable. Thanks. https://github.com/llvm/llvm-project/pull/126188 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Disable RTTI for offloading at the frontend level (PR #127082)

2025-02-13 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/127082 >From 508e938558ac3fb73f0e5389da362b18bef56ce0 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Thu, 13 Feb 2025 09:27:24 -0600 Subject: [PATCH] [Clang] Disable RTTI for offloading at the frontend level Summar

[clang] [Clang] Disable RTTI for offloading at the frontend level (PR #127082)

2025-02-13 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/127082 >From 337ac857a8139eb0ee24effba0fa1d8fa8eaca28 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Thu, 13 Feb 2025 09:27:24 -0600 Subject: [PATCH] [Clang] Disable RTTI for offloading at the frontend level Summar

[clang] [experimental] DanglingCFG analysis prototype (PR #124133)

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

[clang] [Clang] Disable RTTI for offloading at the frontend level (PR #127082)

2025-02-13 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex approved this pull request. thanks, nice cleanup https://github.com/llvm/llvm-project/pull/127082 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [experimental] DanglingCFG analysis prototype (PR #124133)

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

[clang] [Clang] Disable RTTI for offloading at the frontend level (PR #127082)

2025-02-13 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/127082 >From 1484f19a1b959981b89187cc0edc7bc370427fe3 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Thu, 13 Feb 2025 09:27:24 -0600 Subject: [PATCH] [Clang] Disable RTTI for offloading at the frontend level Summar

[clang] [Clang] Disable RTTI for offloading at the frontend level (PR #127082)

2025-02-13 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/127082 >From b17f35541bb5de23389afe0af61cda2cac749e81 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Thu, 13 Feb 2025 09:27:24 -0600 Subject: [PATCH] [Clang] Disable RTTI for offloading at the frontend level Summar

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #127049)

2025-02-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: Looks pretty good. Thank you all for working on this. It's heading in the right direction, although, I originally envisioned a different path getting this done - by using Bug report visitors. https://github.com/llvm/llvm-project/pull/127049 ___

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #127049)

2025-02-13 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,50 @@ +// RUN: %clang_analyze_cc1 \ +// RUN: -analyzer-checker=unix.BlockInCriticalSection \ +// RUN: -std=c++11 \ +// RUN: -analyzer-output text \ +// RUN: -verify %s + +// expected-no-diagnostics + +namespace std { + struct mutex { +void lock() {} +vo

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #127049)

2025-02-13 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,50 @@ +// RUN: %clang_analyze_cc1 \ +// RUN: -analyzer-checker=unix.BlockInCriticalSection \ +// RUN: -std=c++11 \ +// RUN: -analyzer-output text \ +// RUN: -verify %s + +// expected-no-diagnostics + +namespace std { + struct mutex { +void lock() {} +vo

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #127049)

2025-02-13 Thread Balazs Benics via cfe-commits
@@ -315,16 +342,54 @@ bool BlockInCriticalSectionChecker::isBlockingInCritSection( void BlockInCriticalSectionChecker::checkPostCall(const CallEvent &Call, CheckerContext &C) const { if (isBlockingInCritSection(Call, C)) { +

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #127049)

2025-02-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/127049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #127049)

2025-02-13 Thread Balazs Benics via cfe-commits
@@ -315,16 +342,54 @@ bool BlockInCriticalSectionChecker::isBlockingInCritSection( void BlockInCriticalSectionChecker::checkPostCall(const CallEvent &Call, CheckerContext &C) const { if (isBlockingInCritSection(Call, C)) { +

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #127049)

2025-02-13 Thread Balazs Benics via cfe-commits
@@ -315,16 +342,54 @@ bool BlockInCriticalSectionChecker::isBlockingInCritSection( void BlockInCriticalSectionChecker::checkPostCall(const CallEvent &Call, CheckerContext &C) const { if (isBlockingInCritSection(Call, C)) { +

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #127049)

2025-02-13 Thread Balazs Benics via cfe-commits
@@ -306,6 +314,25 @@ void BlockInCriticalSectionChecker::handleUnlock( C.addTransition(State); } +void BlockInCriticalSectionChecker::handleOpen(const CallEvent &Call, + CheckerContext &C) const { + const auto *Flag = Call.getAr

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #127049)

2025-02-13 Thread Balazs Benics via cfe-commits
@@ -315,16 +342,54 @@ bool BlockInCriticalSectionChecker::isBlockingInCritSection( void BlockInCriticalSectionChecker::checkPostCall(const CallEvent &Call, CheckerContext &C) const { if (isBlockingInCritSection(Call, C)) { +

[clang] [clang][analyzer] Fix false positive of BlockInCriticalSectionChecker (PR #127049)

2025-02-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/127049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][RISCV] Add target-abi ModuleFlag. (PR #126188)

2025-02-13 Thread Craig Topper via cfe-commits
https://github.com/topperc closed https://github.com/llvm/llvm-project/pull/126188 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement HLSL splatting (PR #118992)

2025-02-13 Thread Sarah Spall via cfe-commits
@@ -370,6 +370,9 @@ CAST_OPERATION(HLSLArrayRValue) // Aggregate by Value cast (HLSL only). CAST_OPERATION(HLSLElementwiseCast) +// Splat cast for Aggregates (HLSL only). +CAST_OPERATION(HLSLSplatCast) spall wrote: This cast technically also splats vectors in

[clang] 8da8ff8 - [flang][RISCV] Add target-abi ModuleFlag. (#126188)

2025-02-13 Thread via cfe-commits
Author: Craig Topper Date: 2025-02-13T08:08:09-08:00 New Revision: 8da8ff8768bc0115f21d7d8fe8d47872190f8de1 URL: https://github.com/llvm/llvm-project/commit/8da8ff8768bc0115f21d7d8fe8d47872190f8de1 DIFF: https://github.com/llvm/llvm-project/commit/8da8ff8768bc0115f21d7d8fe8d47872190f8de1.diff

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-02-13 Thread Michael Buch via cfe-commits
Michael137 wrote: Fixed in `0feb00f17cbaac7428dcb7aed13d903b65974978` https://github.com/llvm/llvm-project/pull/115005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-02-13 Thread Ilia Kuklin via cfe-commits
kuilpd wrote: > But only for dSYMs. Looking at the `dSYM`, none of the enums are actually > preserved in the debug-info. You have to actually use the enum types in > source to get dsymutil to preserve them. I'll fix it Ah, I see. Thank you for handling this! https://github.com/llvm/llvm-proje

[clang] [clang][NFC] Avoid potential null dereferences (PR #127017)

2025-02-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. Im good with the analyzer part, but im not familiar with the other. That part is not obvious to me, so id suggest an additional reviewer https://github.com/llvm/llvm-project/pull/127017 ___ cfe-c

[clang] [HLSL] Implement the 'and' HLSL function (PR #127098)

2025-02-13 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron updated https://github.com/llvm/llvm-project/pull/127098 >From 5b093ca42fdc24f89bfccac25e6f2e17155432f6 Mon Sep 17 00:00:00 2001 From: Icohedron Date: Wed, 12 Feb 2025 21:24:00 + Subject: [PATCH 1/3] Implement the 'and' HLSL function --- clang/include/clang/Ba

[clang-tools-extra] [clangd] Update XRefs to support overriden ObjC methods (PR #127109)

2025-02-13 Thread David Goldman via cfe-commits
https://github.com/DavidGoldman updated https://github.com/llvm/llvm-project/pull/127109 >From d335931b8923005d2ffc580c5195b7fa997f3649 Mon Sep 17 00:00:00 2001 From: David Goldman Date: Thu, 13 Feb 2025 13:51:05 -0500 Subject: [PATCH 1/2] [clangd] Update XRefs to support overriden ObjC methods

[clang] [clang][deps] Ensure DiagnosticConsumer::finish is always called (PR #127110)

2025-02-13 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir created https://github.com/llvm/llvm-project/pull/127110 When using the clang dependency scanner with an arbitrary DiagnosticConsumer, it is important that we always call finish(). Previously, if there was an error preventing us from reaching the scanning action,

[clang] [clang-format] Support BraceWrapping.AfterNamespace with AllowShortNamespacesOnASingleLine (PR #123010)

2025-02-13 Thread Galen Elias via cfe-commits
https://github.com/galenelias updated https://github.com/llvm/llvm-project/pull/123010 >From 9d60d4980f1edbdd4cd4a9499f69e9d225717238 Mon Sep 17 00:00:00 2001 From: Galen Elias Date: Tue, 14 Jan 2025 20:44:10 -0800 Subject: [PATCH 1/5] Support BraceWrapping.AfterNamespace with AllowShortNamesp

[clang] [HLSL] Implement HLSL splatting (PR #118992)

2025-02-13 Thread Sarah Spall via cfe-commits
@@ -2804,6 +2804,42 @@ bool SemaHLSL::ContainsBitField(QualType BaseTy) { return false; } +// Can perform an HLSL splat cast if the Dest is an aggregate and the +// Src is a scalar or a vector of length 1 +// Or if Dest is a vector and Src is a vector of length 1 +bool SemaH

[clang] Reland "[HIP] Use original file path for CUID" (#108771) (PR #111885)

2025-02-13 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/111885 >From 2b90f311fef72514783d2d0840f76493c36a5d39 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Wed, 25 Sep 2024 14:31:54 -0400 Subject: [PATCH] Reland "[HIP] Use original file path for CUID" (#108771) T

[clang-tools-extra] [clangd] Update XRefs to support overriden ObjC methods (PR #127109)

2025-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: David Goldman (DavidGoldman) Changes - Support finding implementors of a protocol and discovering subclasses for ObjC interfaces via the implementations call - Add tests --- Full diff: https://github.com/llvm/llvm-project/pul

[clang-tools-extra] [clangd] Update XRefs to support overriden ObjC methods (PR #127109)

2025-02-13 Thread David Goldman via cfe-commits
https://github.com/DavidGoldman created https://github.com/llvm/llvm-project/pull/127109 - Support finding implementors of a protocol and discovering subclasses for ObjC interfaces via the implementations call - Add tests >From d335931b8923005d2ffc580c5195b7fa997f3649 Mon Sep 17 00:00:00 2001

[clang-tools-extra] [clangd] Update XRefs to support overriden ObjC methods (PR #127109)

2025-02-13 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 859c871184bdfdebb47b5c7ec5e59348e0534e0b d335931b8923005d2ffc580c5195b7fa997f3649 --e

[clang] [clang][deps] Ensure DiagnosticConsumer::finish is always called (PR #127110)

2025-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ben Langmuir (benlangmuir) Changes When using the clang dependency scanner with an arbitrary DiagnosticConsumer, it is important that we always call finish(). Previously, if there was an error preventing us from reaching the scanning acti

[clang] [Clang] Add __has_target_builtin macro (PR #126324)

2025-02-13 Thread Andrew Pinski via cfe-commits
pinskia wrote: Maybe the problem with the name I am having is the word `has`. Maybe `__can_use_builtin` seems like a better name. And that seems like would be a good context sensative clue. https://github.com/llvm/llvm-project/pull/126324 ___ cfe-com

[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

2025-02-13 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/121789 >From b7b0a7a8a04e579c512c13bf114613ced56b8fe5 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Mon, 6 Jan 2025 13:39:55 + Subject: [PATCH 1/5] [Clang] Add __builtin_assume_dereferenceable to encode deref as

[clang] [Clang][counted_by] Add support for 'counted_by' on struct pointers (PR #127116)

2025-02-13 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/127116 >From b5b9b158e7e379f2d430584e3ccf519677bf27a3 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 10 Jan 2025 17:13:30 -0800 Subject: [PATCH 1/2] [Clang][counted_by] Add support for 'counted_by' on struc

[clang] [NFC] Avoid potential null dereference. (PR #126872)

2025-02-13 Thread Björn Schäpers via cfe-commits
@@ -1596,7 +1596,7 @@ static auto computeNewlines(const AnnotatedLine &Line, if (Line.startsWith(TT_NamespaceRBrace)) { if (Style.WrapNamespaceBodyWithEmptyLines == FormatStyle::WNBWELS_Never) Newlines = 1; - else if (!PreviousLine->startsWith(TT_Namespac

[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

2025-02-13 Thread Florian Hahn via cfe-commits
fhahn wrote: https://github.com/llvm/llvm-project/pull/126117 has landed now which adjusted the semantics of dereferenceable assume bundles and I think it should be safe to go ahead with exposing this in Clang. Unless there are any further concerns I am planning on submitting this soon :) htt

[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

2025-02-13 Thread Florian Hahn via cfe-commits
@@ -2761,6 +2761,47 @@ etc.). Query for this feature with ``__has_builtin(__builtin_assume_separate_storage)``. +``__builtin_assume_dereferenceable`` +- + +``__builtin_assume_dereferenceable`` is used to provide the optimizer with the +kno

[clang] [clang-repl] fix error recovery while parsing completely fails (PR #127087)

2025-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vipul Cariappa (Vipul-Cariappa) Changes Fixes the following crash in clang-repl ```c++ clang-repl> try { throw 1; } catch { 0; } In file included from <<< inputs >>>:1: input_line_1:1:23: error: expected '(' 1 | try { throw 1; } catch

[clang] [clang-repl] fix error recovery while parsing completely fails (PR #127087)

2025-02-13 Thread Vipul Cariappa via cfe-commits
https://github.com/Vipul-Cariappa created https://github.com/llvm/llvm-project/pull/127087 Fixes the following crash in clang-repl ```c++ clang-repl> try { throw 1; } catch { 0; } In file included from <<< inputs >>>:1: input_line_1:1:23: error: expected '(' 1 | try { throw 1; } catch { 0;

[clang] [Clang] Add __has_target_builtin macro (PR #126324)

2025-02-13 Thread Nick Sarnie via cfe-commits
sarnex wrote: > GCC has __has_builtin, so how do they handle offloading targets? Do they have > the same odd behavior where __has_builtin returns true for builtins it cannot > actually emit code for? Setting up offloading for GCC was a nightmare, but it looks like the behavior is the same as

[clang] [llvm] [llvm][fatlto] Add FatLTOCleanup pass (PR #125911)

2025-02-13 Thread Paul Kirth via cfe-commits
ilovepi wrote: ### Merge activity * **Feb 13, 2:38 PM EST**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/125911). https://github.com/llvm/llvm-project/pull/125911

[clang] [clang] Make serialized diagnostics more reliable (PR #100681)

2025-02-13 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir commented: There's another call to finish() in DependencyScanningWorker that should be removed if we do this. https://github.com/llvm/llvm-project/pull/100681 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] 63c1be7 - [llvm][fatlto] Add FatLTOCleanup pass (#125911)

2025-02-13 Thread via cfe-commits
Author: Paul Kirth Date: 2025-02-13T11:39:02-08:00 New Revision: 63c1be7249241205734b9d03e5a1df4602e3648d URL: https://github.com/llvm/llvm-project/commit/63c1be7249241205734b9d03e5a1df4602e3648d DIFF: https://github.com/llvm/llvm-project/commit/63c1be7249241205734b9d03e5a1df4602e3648d.diff LO

[clang] [llvm] [llvm][fatlto] Add FatLTOCleanup pass (PR #125911)

2025-02-13 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed https://github.com/llvm/llvm-project/pull/125911 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP] Missing implicit otherwise clause in metadirective. (PR #127113)

2025-02-13 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/127113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Avoid potential null dereferences (PR #127017)

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

[clang] [llvm] [llvm][fatlto] Add FatLTOCleanup pass (PR #125911)

2025-02-13 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,123 @@ +//===- FatLtoCleanup.cpp - clean up IR for the FatLTO pipeline --*- 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] [llvm] [llvm][fatlto] Add FatLTOCleanup pass (PR #125911)

2025-02-13 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/125911 >From 2f9ca16068f2c9a14d73aa0a3302da070ccebe6a Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Thu, 30 Jan 2025 16:44:15 + Subject: [PATCH] [llvm][fatlto] Add FatLTOCleanup pass When using FatLTO, it is com

[clang] [Clang][counted_by] Add support for 'counted_by' on struct pointers (PR #127116)

2025-02-13 Thread Bill Wendling via cfe-commits
https://github.com/bwendling created https://github.com/llvm/llvm-project/pull/127116 The 'counted_by' attribute is now available for structs. It generates code for sanity checks as well as __builtin_dynamic_object_size() calculations. For example: struct annotated_ptr { int count;

[clang] [clang-tools-extra] Revert "[clang] Compute accurate begin location for CallExpr with exp… (PR #126789)

2025-02-13 Thread via cfe-commits
R-Goc wrote: Completed by #126868 https://github.com/llvm/llvm-project/pull/126789 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [aarch64][x86][win] Add compiler support for MSVC's /funcoverride flag (Windows kernel loader replaceable functions) (PR #125320)

2025-02-13 Thread Daniel Paoliello via cfe-commits
https://github.com/dpaoliello updated https://github.com/llvm/llvm-project/pull/125320 >From 7e68b84f5d2ebdc8d4ac35af97b163f10bcaf455 Mon Sep 17 00:00:00 2001 From: "Daniel Paoliello (HE/HIM)" Date: Fri, 31 Jan 2025 16:47:23 -0800 Subject: [PATCH] [aarch64][x86][win] Add support for MSVC's /fun

[clang] 32c8754 - [clang][AST] Handle dependent representation of call to function with explicit object parameter in CallExpr::getBeginLoc() (#126868)

2025-02-13 Thread via cfe-commits
Author: Nathan Ridge Date: 2025-02-13T18:32:12-05:00 New Revision: 32c8754fbcb936ba6b5bc6cb6817cf3b6a4602f4 URL: https://github.com/llvm/llvm-project/commit/32c8754fbcb936ba6b5bc6cb6817cf3b6a4602f4 DIFF: https://github.com/llvm/llvm-project/commit/32c8754fbcb936ba6b5bc6cb6817cf3b6a4602f4.diff

[clang] [clang-tools-extra] Revert "[clang] Compute accurate begin location for CallExpr with exp… (PR #126789)

2025-02-13 Thread via cfe-commits
https://github.com/R-Goc closed https://github.com/llvm/llvm-project/pull/126789 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement HLSL splatting (PR #118992)

2025-02-13 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. https://github.com/llvm/llvm-project/pull/118992 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AST] Handle dependent representation of call to function with explicit object parameter in CallExpr::getBeginLoc() (PR #126868)

2025-02-13 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/126868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AST] Handle dependent representation of call to function with explicit object parameter in CallExpr::getBeginLoc() (PR #126868)

2025-02-13 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-s390x-linux` running on `systemz-1` while building `clang` at step 6 "test-openmp". Full details are available at: https://lab.llvm.org/buildbot/#/builders/88/builds/8011 Here is the relevant piece of the build log fo

[clang] [clang-repl] fix error recovery while parsing completely fails (PR #127087)

2025-02-13 Thread Vipul Cariappa via cfe-commits
Vipul-Cariappa wrote: cc @vgvassilev https://github.com/llvm/llvm-project/pull/127087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ThinLTO] Support dead RTTI data elimination under -fno-split-lto-unit (PR #126336)

2025-02-13 Thread via cfe-commits
luxufan wrote: > Taking a further look shows these preserved RTTIs come from vtables whose > superclass has its type-id accessed. Thank you for helping evaluate this patch. I am curious about what this type ID is used for—is it for dynamic_cast, exception handling, or the typeid operator? htt

[clang] [clang][analyzer] Fix false positive of BlockInCriticalSectionChecker (PR #127049)

2025-02-13 Thread via cfe-commits
@@ -306,6 +314,25 @@ void BlockInCriticalSectionChecker::handleUnlock( C.addTransition(State); } +void BlockInCriticalSectionChecker::handleOpen(const CallEvent &Call, + CheckerContext &C) const { + const auto *Flag = Call.getAr

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clang-tidy Author: None (Andrewyuan34) Changes This PR fixes issue #124815 by correcting the handling of `nullptr` with `std::unique_ptr` in the `modernize-use-ranges` check. ### Changes: 1. **Modified `clang-tool

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-13 Thread via cfe-commits
https://github.com/Andrewyuan34 created https://github.com/llvm/llvm-project/pull/127162 This PR fixes issue #124815 by correcting the handling of `nullptr` with `std::unique_ptr` in the `modernize-use-ranges` check. ### Changes: 1. **Modified `clang-tools-extra/clang-tidy/modernize/UseRangesC

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-13 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][analyzer] Fix false positive of BlockInCriticalSectionChecker (PR #127049)

2025-02-13 Thread via cfe-commits
https://github.com/flovent deleted https://github.com/llvm/llvm-project/pull/127049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Force expressions with UO_Not to not be non-negative (PR #126846)

2025-02-13 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu updated https://github.com/llvm/llvm-project/pull/126846 >From 44673ebf7c3fa773ffc7c52141b889c9ea352a93 Mon Sep 17 00:00:00 2001 From: Yutong Zhu Date: Tue, 11 Feb 2025 22:49:40 -0500 Subject: [PATCH] Force expressions with UO_Not to not be non-negative --- clang

[clang] [llvm] [RISCV] Support Zb*/P Shared Instructions (PR #127160)

2025-02-13 Thread via cfe-commits
https://github.com/realqhc created https://github.com/llvm/llvm-project/pull/127160 This enables shared instructions between Zb* and Base-P extension. Documentation: https://jhauser.us/RISCV/ext-P/RVP-baseInstrs-014.pdf https://jhauser.us/RISCV/ext-P/RVP-instrEncodings-014.pdf >From f4881709a

[clang] [llvm] [RISCV][MC] Implement MC for Base P extension (PR #123271)

2025-02-13 Thread via cfe-commits
realqhc wrote: > Can we break this up into smaller patches? The P spec is rather large. > Reviewing 1000 lines of RISCVInstrInfoP.td in a single PR is very time > consuming and exhausting as a reviewer. > > The changes to RISCVFeatures.td and RISCVInstrInfoZb.td and other things that > go wit

[clang] [llvm] [RISCV] Support Zb*/P Shared Instructions (PR #127160)

2025-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: None (realqhc) Changes This enables shared instructions between Zb* and Base-P extension. Documentation: https://jhauser.us/RISCV/ext-P/RVP-baseInstrs-014.pdf https://jhauser.us/RISCV/ext-P/RVP-instrEncod

[clang] [llvm] [RISCV] Support Zb*/P Shared Instructions (PR #127160)

2025-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mc Author: None (realqhc) Changes This enables shared instructions between Zb* and Base-P extension. Documentation: https://jhauser.us/RISCV/ext-P/RVP-baseInstrs-014.pdf https://jhauser.us/RISCV/ext-P/RVP-instrEncodings-014.pdf --- Full diff: https://

[clang] [Fix] Speedup -Wunsafe-buffer-usage when using clang modules. (PR #127161)

2025-02-13 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] [Fix] Speedup -Wunsafe-buffer-usage when using clang modules. (PR #127161)

2025-02-13 Thread via cfe-commits
https://github.com/matts1 created https://github.com/llvm/llvm-project/pull/127161 See https://issues.chromium.org/issues/351909443 for details and benchmarks. This improves the performance of a file containing a single line, `#include `, from ~1 second to ~100ms on my machine. >From 14560a13

[clang] [clang][analyzer] Fix false positive of BlockInCriticalSectionChecker (PR #127049)

2025-02-13 Thread via cfe-commits
@@ -0,0 +1,50 @@ +// RUN: %clang_analyze_cc1 \ +// RUN: -analyzer-checker=unix.BlockInCriticalSection \ +// RUN: -std=c++11 \ +// RUN: -analyzer-output text \ +// RUN: -verify %s + +// expected-no-diagnostics + +namespace std { + struct mutex { +void lock() {} +vo

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/127162 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-13 Thread Piotr Zegar via cfe-commits
@@ -215,6 +215,16 @@ void UseRangesCheck::check(const MatchFinder::MatchResult &Result) { const auto *Call = Result.Nodes.getNodeAs(Buffer); if (!Call) continue; +if (Function->getName() == "find") { + unsigned ValueArgIndex = 2; + if (Call->getNumA

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-13 Thread Piotr Zegar via cfe-commits
@@ -215,6 +215,16 @@ void UseRangesCheck::check(const MatchFinder::MatchResult &Result) { const auto *Call = Result.Nodes.getNodeAs(Buffer); if (!Call) continue; +if (Function->getName() == "find") { + unsigned ValueArgIndex = 2; PiotrZS

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-13 Thread Piotr Zegar via cfe-commits
@@ -1,14 +1,24 @@ -// RUN: %check_clang_tidy -std=c++20 %s modernize-use-ranges %t -- -- -I %S/Inputs/use-ranges/ -// RUN: %check_clang_tidy -std=c++23 %s modernize-use-ranges %t -check-suffixes=,CPP23 -- -I %S/Inputs/use-ranges/ +// RUN: %check_clang_tidy -std=c++20 %s moderniz

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. Short release notes entry about fix would be nice. https://github.com/llvm/llvm-project/pull/127162 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/127162 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps] Ensure DiagnosticConsumer::finish is always called (PR #127110)

2025-02-13 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `premerge-monolithic-linux` running on `premerge-linux-1` while building `clang` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/22836 Here is

[clang] [llvm] [AArch64] Add aliases for processors apple-a18/s6..10. (PR #127152)

2025-02-13 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/127152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Fix false positive of BlockInCriticalSectionChecker (PR #127049)

2025-02-13 Thread via cfe-commits
@@ -0,0 +1,50 @@ +// RUN: %clang_analyze_cc1 \ +// RUN: -analyzer-checker=unix.BlockInCriticalSection \ +// RUN: -std=c++11 \ +// RUN: -analyzer-output text \ +// RUN: -verify %s + +// expected-no-diagnostics + +namespace std { + struct mutex { +void lock() {} +vo

[clang] [analyzer] Update the undefined assignment checker diagnostics to not use the term 'garbage' (PR #126596)

2025-02-13 Thread David Tarditi via cfe-commits
dtarditi wrote: @haoNoQ I believe the static analyzer can produce undefined values from out-of-bounds memory accesses also. There are some test cases in this change that show that. Some possible error message that I think cover both cases are: - `use of uninitialized memory or out-of-bounds

[clang] [Clang][ASTMatcher] Improve matching isDerivedFrom base in case of multi aliases exists (PR #126793)

2025-02-13 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: This is a bit more in the weeds of AST matchers internals than what I'm familiar with, so I've added some other reviewers who have reviewed more extensive changes to this code based on code history. https://github.com/llvm/llvm-project/pull/126793

[clang] [clang][perf-training] Support excluding LLVM build from PGO training (PR #126876)

2025-02-13 Thread Tom Stellard via cfe-commits
https://github.com/tstellar approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/126876 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ThinLTO] Support dead RTTI data elimination under -fno-split-lto-unit (PR #126336)

2025-02-13 Thread Mingming Liu via cfe-commits
https://github.com/mingmingl-llvm edited https://github.com/llvm/llvm-project/pull/126336 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ThinLTO] Support dead RTTI data elimination under -fno-split-lto-unit (PR #126336)

2025-02-13 Thread Mingming Liu via cfe-commits
https://github.com/mingmingl-llvm commented: I tried this patch on an internal data center application and it reduced the `.data.rel.ro` section size by 3.69% and the number of `_ZTS` or `_ZTI` prefixed entries by ~27% ~ 28%. Despite the good size savings, the numbers make me curious about wha

[clang] [llvm] [ThinLTO] Support dead RTTI data elimination under -fno-split-lto-unit (PR #126336)

2025-02-13 Thread Mingming Liu via cfe-commits
@@ -911,6 +916,63 @@ static void setLiveRoot(ModuleSummaryIndex &Index, StringRef Name) { Summary->setLive(true); } +// Return true if the User U is reachable from a non-vtable user +// through the use-def chain. +static bool hasNonVTableUsers(const User *U, CXXABI *ABI

[clang] [llvm] [ThinLTO] Support dead RTTI data elimination under -fno-split-lto-unit (PR #126336)

2025-02-13 Thread Mingming Liu via cfe-commits
@@ -0,0 +1,49 @@ +#include "llvm/Transforms/IPO/DeadRTTIElimination.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/IR/ModuleSummaryIndex.h" +#include "llvm/Support/Debug.h" +#include "llvm/Support/LibCXXABI.h" + +using namespace llvm; + +#define DEBUG_TYPE "dre" + +STATISTIC(

[clang] [clang] Add 'instantiated_from' for enums to the output of TextNodeDumper (PR #124409)

2025-02-13 Thread via cfe-commits
=?utf-8?q?André?= Brand , =?utf-8?q?André?= Brand , =?utf-8?q?André?= Brand , =?utf-8?q?André?= Brand Message-ID: In-Reply-To: https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/124409 ___ cfe-commits mailing list cfe-commit

[clang] bd860f9 - [NVPTX] Add intrinsics for redux.sync f32 instructions (#126664)

2025-02-13 Thread via cfe-commits
Author: Srinivasa Ravi Date: 2025-02-14T11:11:44+05:30 New Revision: bd860f986406b6630e49b1836b3c208acd721d3e URL: https://github.com/llvm/llvm-project/commit/bd860f986406b6630e49b1836b3c208acd721d3e DIFF: https://github.com/llvm/llvm-project/commit/bd860f986406b6630e49b1836b3c208acd721d3e.diff

[clang] [llvm] [NVPTX] Add intrinsics for redux.sync f32 instructions (PR #126664)

2025-02-13 Thread Durgadoss R via cfe-commits
durga4github wrote: Merging as per offline request https://github.com/llvm/llvm-project/pull/126664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   >