[clang] [Clang] Functions called in discarded statements should not be instantiated (PR #140576)

2025-05-19 Thread via cfe-commits
cor3ntin wrote: > Does it fix #115289? No. https://github.com/llvm/llvm-project/pull/140576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add MC layer support for XSfmm*. (PR #133031)

2025-05-19 Thread Craig Topper via cfe-commits
topperc wrote: Ping. Any further comments? https://github.com/llvm/llvm-project/pull/133031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][OpenACC] Refactor clause emission- (PR #140586)

2025-05-19 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/140586 Having the whole clause emission be in a header file ended up being pragmatic, but ended up being a sizable negative for a variety of reasons. This patch moves it to its own .cpp file and makes CIRGenFuncti

[clang] [NFC][OpenACC] Refactor clause emission- (PR #140586)

2025-05-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Erich Keane (erichkeane) Changes Having the whole clause emission be in a header file ended up being pragmatic, but ended up being a sizable negative for a variety of reasons. This patch moves it to its own .cpp file and makes CIRGenFu

[clang] [flang] [Clang][Flang][Driver] Fix target parsing for -fveclib=AMDLIBM option (PR #140544)

2025-05-19 Thread Rohit Aggarwal via cfe-commits
https://github.com/rohitaggarwal007 updated https://github.com/llvm/llvm-project/pull/140544 >From 4769d05876f3d7f4a335c10e51fb20e3c923e270 Mon Sep 17 00:00:00 2001 From: Rohit Aggarwal Date: Mon, 19 May 2025 19:25:52 +0530 Subject: [PATCH 1/2] [Clang][Flang][Driver] Fix target parsing for -fv

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-19 Thread CHANDRA GHALE via cfe-commits
chandraghale wrote: ping @alexey-bataev https://github.com/llvm/llvm-project/pull/134709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Coverage] Fix mapping for do-while loops with terminating statements (PR #139777)

2025-05-19 Thread Justin Cady via cfe-commits
https://github.com/justincady updated https://github.com/llvm/llvm-project/pull/139777 >From be83c3207bf195aa7c6df1ce155402fde5911821 Mon Sep 17 00:00:00 2001 From: Justin Cady Date: Tue, 13 May 2025 15:08:45 -0400 Subject: [PATCH] [Coverage] Fix mapping for do-while loops with terminating sta

[clang] [AMDGPU][clang] provide device implementation for __builtin_logb and … (PR #129347)

2025-05-19 Thread via cfe-commits
https://github.com/choikwa closed https://github.com/llvm/llvm-project/pull/129347 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 77de8a0 - [AMDGPU][clang] provide device implementation for __builtin_logb and … (#129347)

2025-05-19 Thread via cfe-commits
Author: choikwa Date: 2025-05-19T14:11:31-04:00 New Revision: 77de8a0c0abc9d245a7c6278670554b47ae183ea URL: https://github.com/llvm/llvm-project/commit/77de8a0c0abc9d245a7c6278670554b47ae183ea DIFF: https://github.com/llvm/llvm-project/commit/77de8a0c0abc9d245a7c6278670554b47ae183ea.diff LOG:

[clang-tools-extra] [clang-doc] Add HTMLMustacheGenerator methods (PR #138061)

2025-05-19 Thread Daniel Thornburgh via cfe-commits
@@ -70,18 +70,116 @@ class MustacheTemplateFile : public Template { MustacheTemplateFile(StringRef TemplateStr) : Template(TemplateStr) {} }; +static std::unique_ptr NamespaceTemplate = nullptr; + +static std::unique_ptr RecordTemplate = nullptr; + +static Error setupTemplat

[clang-tools-extra] [include-cleaner] Add --fail-on-changes option (PR #140123)

2025-05-19 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer closed https://github.com/llvm/llvm-project/pull/140123 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [include-cleaner] Add --fail-on-changes option (PR #140123)

2025-05-19 Thread Daan De Meyer via cfe-commits
DaanDeMeyer wrote: I just found misc-include-cleaner in clang-tidy which is a way better fit for this so let me close this https://github.com/llvm/llvm-project/pull/140123 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [clang-tools-extra] [clang-include-cleaner] Make cleanup attr report expr location (PR #140233)

2025-05-19 Thread Aaron Ballman via cfe-commits
@@ -1351,7 +1352,8 @@ def OSConsumesThis : InheritableAttr { def Cleanup : InheritableAttr { let Spellings = [GCC<"cleanup">]; - let Args = [DeclArgument]; + let Args = [DeclArgument, + ExprArgument<"Expr", /*opt=*/0, /*fake=*/1>]; AaronBallma

[clang] 021443c - [clang] fix constexpr-unknown handling of self-references. (#132990)

2025-05-19 Thread via cfe-commits
Author: Eli Friedman Date: 2025-05-19T11:27:51-07:00 New Revision: 021443cd2a8127ab0432c5e48f9dbba30d9bc6ce URL: https://github.com/llvm/llvm-project/commit/021443cd2a8127ab0432c5e48f9dbba30d9bc6ce DIFF: https://github.com/llvm/llvm-project/commit/021443cd2a8127ab0432c5e48f9dbba30d9bc6ce.diff

[clang] [clang] fix constexpr-unknown handling of self-references. (PR #132990)

2025-05-19 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic closed https://github.com/llvm/llvm-project/pull/132990 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Diagnose exceptions only in non-dependent context in discarded `try/catch/throw` blocks (PR #139859)

2025-05-19 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I feel like this issue is a little too niche to be adding such complexity, > maybe just covering those specific uses cases before codegen might be the way > to go? I think disabling the keywords entirely is a large ask (requires an RFC at a minimum) and so we don't need

[clang] [UBSan] Implement src:*=sanitize for UBSan (PR #140529)

2025-05-19 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao edited https://github.com/llvm/llvm-project/pull/140529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-include-cleaner] Make cleanup attr report expr location (PR #140233)

2025-05-19 Thread Erich Keane via cfe-commits
@@ -1351,7 +1352,8 @@ def OSConsumesThis : InheritableAttr { def Cleanup : InheritableAttr { let Spellings = [GCC<"cleanup">]; - let Args = [DeclArgument]; + let Args = [DeclArgument, + ExprArgument<"Expr", /*opt=*/0, /*fake=*/1>]; erichkeane

[clang] [Clang][AArch64]Add FP8 ACLE macros implementation (PR #140591)

2025-05-19 Thread via cfe-commits
https://github.com/CarolineConcatto created https://github.com/llvm/llvm-project/pull/140591 This patch implements the macros described in the ACLE[1] [1] https://github.com/ARM-software/acle/blob/main/main/acle.md#modal-8-bit-floating-point-extensions >From 22e44648ce4ec1c747406f7d98ae7c736d

[clang] [Clang][AArch64]Add FP8 ACLE macros implementation (PR #140591)

2025-05-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: None (CarolineConcatto) Changes This patch implements the macros described in the ACLE[1] [1] https://github.com/ARM-software/acle/blob/main/main/acle.md#modal-8-bit-floating-point-extensions --- Full diff: https://github.com/l

[clang] [clang][Sema] Don't warn for implicit uses of builtins in system headers (PR #138205)

2025-05-19 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/138205 >From c66ec11d8170a0e4c0b2fc50bdae039fd9c208fb Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Thu, 1 May 2025 14:47:45 -0700 Subject: [PATCH 1/3] [clang][Sema] Don't warn for implicit uses of builtins in sy

[clang] [UBSan] Implement src:*=sanitize for UBSan (PR #140529)

2025-05-19 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao edited https://github.com/llvm/llvm-project/pull/140529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Diagnose exceptions only in non-dependent context in discarded `try/catch/throw` blocks (PR #139859)

2025-05-19 Thread Erich Keane via cfe-commits
erichkeane wrote: > > I feel like this issue is a little too niche to be adding such complexity, > > maybe just covering those specific uses cases before codegen might be the > > way to go? > > I think disabling the keywords entirely is a large ask (requires an RFC at a > minimum) and so we d

[clang] [UBSan] Implement src:*=sanitize for UBSan (PR #140529)

2025-05-19 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao edited https://github.com/llvm/llvm-project/pull/140529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Don't warn for implicit uses of builtins in system headers (PR #138205)

2025-05-19 Thread Nick Sarnie via cfe-commits
@@ -1825,6 +1825,11 @@ class Sema final : public SemaBase { /// Set of no-builtin functions listed by \#pragma function. llvm::SmallSetVector MSFunctionNoBuiltins; + /// Map of BuiltinIDs to source locations that have #pragma intrinsic calls + /// that refer to them. +

[clang] [UBSan] Implement src:*=sanitize for UBSan (PR #140529)

2025-05-19 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao edited https://github.com/llvm/llvm-project/pull/140529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Don't warn for implicit uses of builtins in system headers (PR #138205)

2025-05-19 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/138205 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [UBSan] Implement src:*=sanitize for UBSan (PR #140529)

2025-05-19 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao edited https://github.com/llvm/llvm-project/pull/140529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-include-cleaner] Make cleanup attr report expr location (PR #140233)

2025-05-19 Thread Aaron Ballman via cfe-commits
@@ -1351,7 +1352,8 @@ def OSConsumesThis : InheritableAttr { def Cleanup : InheritableAttr { let Spellings = [GCC<"cleanup">]; - let Args = [DeclArgument]; + let Args = [DeclArgument, + ExprArgument<"Expr", /*opt=*/0, /*fake=*/1>]; AaronBallma

[clang] [clang-tools-extra] [clang-include-cleaner] Make cleanup attr report expr location (PR #140233)

2025-05-19 Thread Erich Keane via cfe-commits
@@ -1351,7 +1352,8 @@ def OSConsumesThis : InheritableAttr { def Cleanup : InheritableAttr { let Spellings = [GCC<"cleanup">]; - let Args = [DeclArgument]; + let Args = [DeclArgument, + ExprArgument<"Expr", /*opt=*/0, /*fake=*/1>]; erichkeane

[clang-tools-extra] Follow style configuration in clangd when inserting missing includes (PR #140594)

2025-05-19 Thread via cfe-commits
https://github.com/Harald-R created https://github.com/llvm/llvm-project/pull/140594 The missing include diagnostic has the capability to introduce the necessary headers into the source file. However, it does not currently follow the inclusion style found in the `.clangd` file. For example, if

[clang-tools-extra] Follow style configuration in clangd when inserting missing includes (PR #140594)

2025-05-19 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] Follow style configuration in clangd when inserting missing includes (PR #140594)

2025-05-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: None (Harald-R) Changes The missing include diagnostic has the capability to introduce the necessary headers into the source file. However, it does not currently follow the inclusion style found in the `.clangd` file. For example, if the

[clang-tools-extra] Follow style configuration in clangd when inserting missing includes (PR #140594)

2025-05-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: None (Harald-R) Changes The missing include diagnostic has the capability to introduce the necessary headers into the source file. However, it does not currently follow the inclusion style found in the `.clangd` file. For exam

[clang] [llvm] [mlir] [LLVM][TableGen] Rename `ListInit::getValues()` to `getElements()` (PR #140289)

2025-05-19 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/140289 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [LLVM][TableGen] Rename `ListInit::getValues()` to `getElements()` (PR #140289)

2025-05-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Rahul Joshi (jurahul) Changes Rename `ListInit::getValues()` to `getElements()` to better match with other `ListInit` members like `getElement`. Keep `getValues()` for existing downstream code but mark it deprecated. --- Patch is 22.45

[clang] [clang][Sema] Diagnose exceptions only in non-dependent context in discarded `try/catch/throw` blocks (PR #139859)

2025-05-19 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I would be against said RFC. If you asked me in 1996/whatever, I could be > talked into it. But we're 30+ years of this behavior. Doesn't stop WG21 from changing the behavior 30 years later. ;-) My biggest concern is actually that C++ is changing exception handling such t

[clang] [NFC][OpenACC] Refactor clause emission- (PR #140586)

2025-05-19 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. This seems reasonable to me. https://github.com/llvm/llvm-project/pull/140586 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-include-cleaner] Make cleanup attr report expr location (PR #140233)

2025-05-19 Thread Aaron Ballman via cfe-commits
@@ -1351,7 +1352,8 @@ def OSConsumesThis : InheritableAttr { def Cleanup : InheritableAttr { let Spellings = [GCC<"cleanup">]; - let Args = [DeclArgument]; + let Args = [DeclArgument, + ExprArgument<"Expr", /*opt=*/0, /*fake=*/1>]; AaronBallma

[clang] [llvm] [mlir] [LLVM][TableGen] Rename `ListInit::getValues()` to `getElements()` (PR #140289)

2025-05-19 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/140289 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-include-cleaner] Make cleanup attr report expr location (PR #140233)

2025-05-19 Thread Daan De Meyer via cfe-commits
@@ -1351,7 +1352,8 @@ def OSConsumesThis : InheritableAttr { def Cleanup : InheritableAttr { let Spellings = [GCC<"cleanup">]; - let Args = [DeclArgument]; + let Args = [DeclArgument, + ExprArgument<"Expr", /*opt=*/0, /*fake=*/1>]; DaanDeMeyer

[clang-tools-extra] Follow style configuration in clangd when inserting missing includes (PR #140594)

2025-05-19 Thread via cfe-commits
Harald-R wrote: @kleinesfilmroellchen @HighCommander4 would it be possible to take a look when you have some time? Many thanks! https://github.com/llvm/llvm-project/pull/140594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang-tools-extra] [clang-tidy] Do not flag strerror in concurrency-mt-unsafe (PR #140520)

2025-05-19 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/140520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Diagnose exceptions only in non-dependent context in discarded `try/catch/throw` blocks (PR #139859)

2025-05-19 Thread Erich Keane via cfe-commits
erichkeane wrote: > > I would be against said RFC. If you asked me in 1996/whatever, I could be > > talked into it. But we're 30+ years of this behavior. > > Doesn't stop WG21 from changing the behavior 30 years later. ;-) My biggest > concern is actually that C++ is changing exception handlin

[clang] [llvm] [SPIRV] Add PreLegalizer pattern matching for `faceforward` (PR #139959)

2025-05-19 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,63 @@ +# RUN: llc -verify-machineinstrs -O0 -mtriple spirv-unknown-unknown -run-pass=spirv-prelegalizer-combiner %s -o - | FileCheck %s +# REQUIRES: asserts +--- +name:faceforward_instcombine_float +tracksRegLiveness: true +legalized: true +body:

[clang] [llvm] [SPIRV] Add PreLegalizer pattern matching for `faceforward` (PR #139959)

2025-05-19 Thread Kaitlin Peng via cfe-commits
@@ -98,21 +110,98 @@ void applySPIRVDistance(MachineInstr &MI, MachineRegisterInfo &MRI, SPIRVGlobalRegistry *GR = MI.getMF()->getSubtarget().getSPIRVGlobalRegistry(); - auto RemoveAllUses = [&](Register Reg) { -SmallVector UsesToErase( -llvm::make_pointe

[clang] [clang-tools-extra] [clang-include-cleaner] Make cleanup attr report expr location (PR #140233)

2025-05-19 Thread Erich Keane via cfe-commits
@@ -1351,7 +1352,8 @@ def OSConsumesThis : InheritableAttr { def Cleanup : InheritableAttr { let Spellings = [GCC<"cleanup">]; - let Args = [DeclArgument]; + let Args = [DeclArgument, + ExprArgument<"Expr", /*opt=*/0, /*fake=*/1>]; erichkeane

[clang] [UBSan] Implement src:*=sanitize for UBSan (PR #140529)

2025-05-19 Thread Thurston Dang via cfe-commits
@@ -44,6 +44,13 @@ bool NoSanitizeList::containsFunction(SanitizerMask Mask, bool NoSanitizeList::containsFile(SanitizerMask Mask, StringRef FileName, StringRef Category) const { + unsigned NoSanLine = SSCL->inSectionBlame(Mask, "src", FileNa

[clang] [UBSan] Implement src:*=sanitize for UBSan (PR #140529)

2025-05-19 Thread Thurston Dang via cfe-commits
@@ -0,0 +1,37 @@ +// RUN: rm -rf %t thurstond wrote: Consider pre-committing this test (with the "bad" output) as a separate patch, so that the current patch will show how the test output is fixed. https://github.com/llvm/llvm-project/pull/140529 __

[clang] [llvm] [SPIRV] Add PreLegalizer pattern matching for `faceforward` (PR #139959)

2025-05-19 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng edited https://github.com/llvm/llvm-project/pull/139959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-include-cleaner] Make cleanup attr report expr location (PR #140233)

2025-05-19 Thread Aaron Ballman via cfe-commits
@@ -1351,7 +1352,8 @@ def OSConsumesThis : InheritableAttr { def Cleanup : InheritableAttr { let Spellings = [GCC<"cleanup">]; - let Args = [DeclArgument]; + let Args = [DeclArgument, + ExprArgument<"Expr", /*opt=*/0, /*fake=*/1>]; AaronBallma

[clang] 175f8a4 - [clang] Attempt to fix "test/Modules/fmodules-validate-once-per-build-session.c"

2025-05-19 Thread Jan Svoboda via cfe-commits
Author: Jan Svoboda Date: 2025-05-19T12:11:11-07:00 New Revision: 175f8a444b296ba956505a5760805f05a175111b URL: https://github.com/llvm/llvm-project/commit/175f8a444b296ba956505a5760805f05a175111b DIFF: https://github.com/llvm/llvm-project/commit/175f8a444b296ba956505a5760805f05a175111b.diff L

[clang] [C] Update -Wimplicit-void-ptr-cast for null pointer constants (PR #138271)

2025-05-19 Thread Alexander Kornienko via cfe-commits
alexfh wrote: Just to confirm: is it intended that `char *s = NULL;` now generates this warning? I mean, the C library may define `NULL` as `((void*)0)`, and `char *s = ((void*)0);` is clearly not C++-compatible. However, when compiling this code in C++, `NULL` may expand to something that IS

[clang] [llvm] [mlir] [LLVM][TableGen] Rename `ListInit::getValues()` to `getElements()` (PR #140289)

2025-05-19 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/140289 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3932360 - [LLVM][TableGen] Rename `ListInit::getValues()` to `getElements()` (#140289)

2025-05-19 Thread via cfe-commits
Author: Rahul Joshi Date: 2025-05-19T12:16:33-07:00 New Revision: 3932360b14c390188977a53ecba6c13fff685aae URL: https://github.com/llvm/llvm-project/commit/3932360b14c390188977a53ecba6c13fff685aae DIFF: https://github.com/llvm/llvm-project/commit/3932360b14c390188977a53ecba6c13fff685aae.diff L

[clang] [CIR] Upstream splat op for VectorType (PR #139827)

2025-05-19 Thread Amr Hesham via cfe-commits
@@ -135,4 +135,38 @@ cir.func @vector_insert_element_test() { // CHECK:cir.return // CHECK: } +cir.func @vector_splat_test() { +%0 = cir.alloca !cir.vector<4 x !s32i>, !cir.ptr>, ["a", init] +%1 = cir.alloca !cir.vector<4 x !s32i>, !cir.ptr>, ["shl", init] +

[clang] [flang] [Clang][Flang][Driver] Fix target parsing for -fveclib=AMDLIBM option (PR #140544)

2025-05-19 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: Is this doing a lot that is similar to #140533? https://github.com/llvm/llvm-project/pull/140544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add IndentPPDirectives Leave option (PR #139750)

2025-05-19 Thread Gedare Bloom via cfe-commits
https://github.com/gedare updated https://github.com/llvm/llvm-project/pull/139750 >From 5974807cae2cf08b26cadb2fce3bd0236519f3c0 Mon Sep 17 00:00:00 2001 From: Gedare Bloom Date: Tue, 13 May 2025 08:42:41 -0600 Subject: [PATCH 1/5] [clang-format] Add IndentPPDirectives Leave option Allow an o

[clang] [clang][Sema] Diagnose exceptions only in non-dependent context in discarded `try/catch/throw` blocks (PR #139859)

2025-05-19 Thread Erich Keane via cfe-commits
erichkeane wrote: So @Rajveer100 : I think I bottomed out with Aaron. I think the solution of 'create a function to diagnose these, but only if not in a dependent `DeclContext`', then call this both from where we do the current checking, plus during `TreeTransform` of these things is the 'rig

[clang] [CIR] Upstream comparion ops for VectorType (PR #140597)

2025-05-19 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/140597 This change adds support for Cmp ops for VectorType Issue https://github.com/llvm/llvm-project/issues/136487 >From e43d04b1eb1660dcf1a99d405858efd3a9647657 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date

[clang] [clang][Sema] Diagnose exceptions only in non-dependent context in discarded `try/catch/throw` blocks (PR #139859)

2025-05-19 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > So @Rajveer100 : I think I bottomed out with Aaron. I think the solution of > 'create a function to diagnose these, but only if not in a dependent > `DeclContext`', then call this both from where we do the current checking, > plus during `TreeTransform` of these things is

[clang] [CIR] Upstream comparion ops for VectorType (PR #140597)

2025-05-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Amr Hesham (AmrDeveloper) Changes This change adds support for Cmp ops for VectorType Issue https://github.com/llvm/llvm-project/issues/136487 --- Patch is 25.04 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm

[clang] [CIR] Upstream comparion ops for VectorType (PR #140597)

2025-05-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Amr Hesham (AmrDeveloper) Changes This change adds support for Cmp ops for VectorType Issue https://github.com/llvm/llvm-project/issues/136487 --- Patch is 25.04 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/l

[clang] [C] Update -Wimplicit-void-ptr-cast for null pointer constants (PR #138271)

2025-05-19 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Just to confirm: is it intended that `char *s = NULL;` now generates this > warning? I mean, the C library may define `NULL` as `((void*)0)`, and `char > *s = ((void*)0);` is clearly not C++-compatible. However, when compiling this > code in C++, `NULL` may expand to some

[clang] [clang-tools-extra] [clang-include-cleaner] Make cleanup attr report expr location (PR #140233)

2025-05-19 Thread Daan De Meyer via cfe-commits
@@ -1351,7 +1352,8 @@ def OSConsumesThis : InheritableAttr { def Cleanup : InheritableAttr { let Spellings = [GCC<"cleanup">]; - let Args = [DeclArgument]; + let Args = [DeclArgument, + ExprArgument<"Expr", /*opt=*/0, /*fake=*/1>]; DaanDeMeyer

[clang-tools-extra] [clang-tidy] Do not flag strerror in concurrency-mt-unsafe (PR #140520)

2025-05-19 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp closed https://github.com/llvm/llvm-project/pull/140520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 322d019 - [clang-tidy] Do not flag strerror in concurrency-mt-unsafe (#140520)

2025-05-19 Thread via cfe-commits
Author: Carlos Galvez Date: 2025-05-19T21:27:37+02:00 New Revision: 322d0197f5c5d4cf3a6bb2d86a0112788fd6c529 URL: https://github.com/llvm/llvm-project/commit/322d0197f5c5d4cf3a6bb2d86a0112788fd6c529 DIFF: https://github.com/llvm/llvm-project/commit/322d0197f5c5d4cf3a6bb2d86a0112788fd6c529.diff

[clang] [compiler-rt] [Coverage] Fix mapping for do-while loops with terminating statements (PR #139777)

2025-05-19 Thread via cfe-commits
hiraditya wrote: LGTM! https://github.com/llvm/llvm-project/pull/139777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Update Sema Checking Diagnostics for builtins (PR #138429)

2025-05-19 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/138429 >From 1139101e277f8f4d327fd7b422959dc4a3a43dbe Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Tue, 18 Mar 2025 11:04:11 -0700 Subject: [PATCH 1/3] update error messaging --- .../clang/Basic/DiagnosticSemaKinds

[clang] [clang-tools-extra] [clang-include-cleaner] Make cleanup attr report expr location (PR #140233)

2025-05-19 Thread Aaron Ballman via cfe-commits
@@ -1351,7 +1352,8 @@ def OSConsumesThis : InheritableAttr { def Cleanup : InheritableAttr { let Spellings = [GCC<"cleanup">]; - let Args = [DeclArgument]; + let Args = [DeclArgument, + ExprArgument<"Expr", /*opt=*/0, /*fake=*/1>]; AaronBallma

[clang] [llvm] [mlir] [LLVM][TableGen] Rename `ListInit::getValues()` to `getElements()` (PR #140289)

2025-05-19 Thread Kazu Hirata via cfe-commits
kazutakahirata wrote: I've landed 195e640846765402d1a622006e6a9f9fa3192955 to fix the build failure from this PR. Thanks! https://github.com/llvm/llvm-project/pull/140289 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang-tools-extra] [clang-tidy] Add UnusedIncludes/MissingIncludes options to misc-include-cleaner (PR #140600)

2025-05-19 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer created https://github.com/llvm/llvm-project/pull/140600 These mimick the same options from clangd and allow using the check to only check for unused includes or missing includes. >From 16d452394b0b7f92321b224de3daca99e929afad Mon Sep 17 00:00:00 2001 From: Daan

[clang-tools-extra] [clang-tidy] Add UnusedIncludes/MissingIncludes options to misc-include-cleaner (PR #140600)

2025-05-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Daan De Meyer (DaanDeMeyer) Changes These mimick the same options from clangd and allow using the check to only check for unused includes or missing includes. --- Full diff: https://github.com/llvm/llvm-project/pull/140600.dif

[clang-tools-extra] [clang-tidy] Add UnusedIncludes/MissingIncludes options to misc-include-cleaner (PR #140600)

2025-05-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Daan De Meyer (DaanDeMeyer) Changes These mimick the same options from clangd and allow using the check to only check for unused includes or missing includes. --- Full diff: https://github.com/llvm/llvm-project/pull/140600.diff 4 F

[clang] [UBSan] Implement src:*=sanitize for UBSan (PR #140529)

2025-05-19 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao updated https://github.com/llvm/llvm-project/pull/140529 >From b83755d2aa0c5417ab8f359aa842449213437a7a Mon Sep 17 00:00:00 2001 From: Qinkun Bao Date: Mon, 19 May 2025 11:14:01 + Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UT

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-19 Thread Alexey Bataev via cfe-commits
@@ -5200,6 +5428,26 @@ void CGOpenMPRuntime::emitReduction(CodeGenFunction &CGF, SourceLocation Loc, CGF.EmitBranch(DefaultBB); CGF.EmitBlock(DefaultBB, /*IsFinished=*/true); + if (Options.IsPrivateVarReduction) { +if (LHSExprs.empty() || Privates.empty() || Reductio

[clang] 025639b - [Coverage] Fix mapping for do-while loops with terminating statements (#139777)

2025-05-19 Thread via cfe-commits
Author: Justin Cady Date: 2025-05-19T15:49:26-04:00 New Revision: 025639bc396f1e0d2ead279c5f345cb381733f16 URL: https://github.com/llvm/llvm-project/commit/025639bc396f1e0d2ead279c5f345cb381733f16 DIFF: https://github.com/llvm/llvm-project/commit/025639bc396f1e0d2ead279c5f345cb381733f16.diff L

[clang] [compiler-rt] [Coverage] Fix mapping for do-while loops with terminating statements (PR #139777)

2025-05-19 Thread Justin Cady via cfe-commits
https://github.com/justincady closed https://github.com/llvm/llvm-project/pull/139777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] demo test for https://github.com/llvm/llvm-project/pull/140529 (PR #140602)

2025-05-19 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao created https://github.com/llvm/llvm-project/pull/140602 None >From 210f005ecccbbd4fed439d3e156d5e0146807bed Mon Sep 17 00:00:00 2001 From: Qinkun Bao Date: Mon, 19 May 2025 19:49:33 + Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[clang] [llvm] [mlir] [LLVM][TableGen] Rename `ListInit::getValues()` to `getElements()` (PR #140289)

2025-05-19 Thread Rahul Joshi via cfe-commits
jurahul wrote: > I've landed > [195e640](https://github.com/llvm/llvm-project/commit/195e640846765402d1a622006e6a9f9fa3192955) > to fix the build failure from this PR. Thanks! Thanks so much! https://github.com/llvm/llvm-project/pull/140289 ___ cfe

[clang] [DO not merge] demo test for https://github.com/llvm/llvm-project/pull/140529 (PR #140602)

2025-05-19 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao edited https://github.com/llvm/llvm-project/pull/140602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [DO not merge] demo test for https://github.com/llvm/llvm-project/pull/140529 (PR #140602)

2025-05-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Qinkun Bao (qinkunbao) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/140602.diff 1 Files Affected: - (added) clang/test/CodeGen/ubsan-src-ignorelist-category.test (+37) ``diff diff --git a/clang/test/CodeG

[clang] [UBSan] Implement src:*=sanitize for UBSan (PR #140529)

2025-05-19 Thread Qinkun Bao via cfe-commits
@@ -0,0 +1,37 @@ +// RUN: rm -rf %t qinkunbao wrote: Sounds Good. https://github.com/llvm/llvm-project/pull/140602 https://github.com/llvm/llvm-project/pull/140529 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [UBSan] Implement src:*=sanitize for UBSan (PR #140529)

2025-05-19 Thread Qinkun Bao via cfe-commits
@@ -44,6 +44,13 @@ bool NoSanitizeList::containsFunction(SanitizerMask Mask, bool NoSanitizeList::containsFile(SanitizerMask Mask, StringRef FileName, StringRef Category) const { + unsigned NoSanLine = SSCL->inSectionBlame(Mask, "src", FileNa

[clang] [Clang][CodeGen] Do not emit lifetime intrinsics for coro promise alloca (PR #140548)

2025-05-19 Thread Eli Friedman via cfe-commits
@@ -1343,6 +1343,11 @@ llvm::Value *CodeGenFunction::EmitLifetimeStart(llvm::TypeSize Size, if (!ShouldEmitLifetimeMarkers) return nullptr; + // No lifetimes on promise alloca, or middle end passes will assume promise + // dead after lifetime.end, leading to mis-optim

[clang] [DO not merge] demo test for https://github.com/llvm/llvm-project/pull/140529 (PR #140602)

2025-05-19 Thread Thurston Dang via cfe-commits
thurstond wrote: This patch should be "[NFC] Precommit test for src:*=sanitize for UBSan" (or similar), have the test output "passing" for the current build of clang (i.e., probably "incorrect" output), reviewed and then merged. https://github.com/llvm/llvm-project/pull/140602

[clang] [C] Do not diagnose flexible array members with -Wdefault-const-init-field-unsafe (PR #140578)

2025-05-19 Thread Bill Wendling via cfe-commits
@@ -6513,6 +6513,14 @@ static bool canPerformArrayCopy(const InitializedEntity &Entity) { static const FieldDecl *getConstField(const RecordDecl *RD) { assert(!isa(RD) && "Only expect to call this in C mode"); for (const FieldDecl *FD : RD->fields()) { +// If the field

[clang-tools-extra] 72b2219 - Revert "[clang][modules] Timestamp-less validation API (#139987)"

2025-05-19 Thread Jan Svoboda via cfe-commits
Author: Jan Svoboda Date: 2025-05-19T12:57:54-07:00 New Revision: 72b2219b3e2319e29831e4e9b07c440444f3add6 URL: https://github.com/llvm/llvm-project/commit/72b2219b3e2319e29831e4e9b07c440444f3add6 DIFF: https://github.com/llvm/llvm-project/commit/72b2219b3e2319e29831e4e9b07c440444f3add6.diff L

[clang] [C] Do not diagnose flexible array members with -Wdefault-const-init-field-unsafe (PR #140578)

2025-05-19 Thread Bill Wendling via cfe-commits
https://github.com/bwendling edited https://github.com/llvm/llvm-project/pull/140578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExprConst] allow single element access of vector object to be constant expression (PR #101126)

2025-05-19 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: > Can you file an issue so we don't lose track of the bug? Looks like we have an issue already #140348 @AaronBallman do you think my original example is well-defined according to the standard? I saw there is a warning `constexpr constructor that does not initialize all memb

[clang] [clang][Sema] Don't warn for implicit uses of builtins in system headers (PR #138205)

2025-05-19 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. Nice, looks good, thanks for implementing this! https://github.com/llvm/llvm-project/pull/138205 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [clang-tools-extra] [clang-include-cleaner] Make cleanup attr report expr location (PR #140233)

2025-05-19 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer updated https://github.com/llvm/llvm-project/pull/140233 >From 57687d8eebc1f8e2b59ed131791895d76f88e30a Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Fri, 16 May 2025 12:08:47 +0200 Subject: [PATCH] [clang-include-cleaner] Make cleanup attr report expr locat

[clang] [DO not merge] demo test for https://github.com/llvm/llvm-project/pull/140529 (PR #140602)

2025-05-19 Thread Thurston Dang via cfe-commits
https://github.com/thurstond requested changes to this pull request. Per comment above https://github.com/llvm/llvm-project/pull/140602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Don't warn for implicit uses of builtins in system headers (PR #138205)

2025-05-19 Thread Nick Sarnie via cfe-commits
sarnex wrote: Thanks for the guidance and reviews! https://github.com/llvm/llvm-project/pull/138205 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [UBSan] Implement src:*=sanitize for UBSan (PR #140529)

2025-05-19 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao edited https://github.com/llvm/llvm-project/pull/140529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][RISCV] Emit RISCV function-signature-based CFI label in llvm::Function metadata (PR #111661)

2025-05-19 Thread Eli Friedman via cfe-commits
@@ -7074,6 +7117,86 @@ bool CXXNameMangler::shouldHaveAbiTags(ItaniumMangleContextImpl &C, return TrackAbiTags.AbiTagsRoot.getUsedAbiTags().size(); } +namespace { + +class RISCVZicfilpFuncSigLabelMangler : public CXXNameMangler { + bool IsTopLevelAndCXXVirtualMethod; + +pu

[clang] [llvm] [clang][RISCV] Emit RISCV function-signature-based CFI label in llvm::Function metadata (PR #111661)

2025-05-19 Thread Eli Friedman via cfe-commits
@@ -7074,6 +7117,86 @@ bool CXXNameMangler::shouldHaveAbiTags(ItaniumMangleContextImpl &C, return TrackAbiTags.AbiTagsRoot.getUsedAbiTags().size(); } +namespace { + +class RISCVZicfilpFuncSigLabelMangler : public CXXNameMangler { + bool IsTopLevelAndCXXVirtualMethod; + +pu

[clang] [llvm] Add support for Windows Secure Hot-Patching (PR #138972)

2025-05-19 Thread via cfe-commits
https://github.com/sivadeilra updated https://github.com/llvm/llvm-project/pull/138972 >From 3899bc104788c2c4e01afce2f61b89a0dba5cdff Mon Sep 17 00:00:00 2001 From: Arlie Davis Date: Thu, 3 Apr 2025 16:10:50 -0700 Subject: [PATCH] Windows hotpatching support --- clang/include/clang/Basic/Code

[clang] [CIR][NFC] Eliminate ArgInfo structure (PR #140612)

2025-05-19 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/140612 A previous refactoring had reduced the ArgInfo structure to contain a single member, the argument type. This change eliminates the ArgInfo structure entirely, instead just storing the argument type directly

[clang] [CIR][NFC] Eliminate ArgInfo structure (PR #140612)

2025-05-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes A previous refactoring had reduced the ArgInfo structure to contain a single member, the argument type. This change eliminates the ArgInfo structure entirely, instead just storing the argument type directl

<    1   2   3   4   5   6   >