[clang] fa20184 - [C++20] [Modules] [Serialization] Don't reuse type ID and identifier ID from imported modules

2024-06-25 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-06-25T15:04:32+08:00 New Revision: fa20184a8f336e4154f2ffeeeb8a538dc9462d9a URL: https://github.com/llvm/llvm-project/commit/fa20184a8f336e4154f2ffeeeb8a538dc9462d9a DIFF: https://github.com/llvm/llvm-project/commit/fa20184a8f336e4154f2ffeeeb8a538dc9462d9a.diff LO

[clang] 8153773 - [clang][Interp] Fix returning primitive non-blockpointers

2024-06-25 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-06-25T09:09:49+02:00 New Revision: 8153773b23032177546944ec2524dce131b8a46e URL: https://github.com/llvm/llvm-project/commit/8153773b23032177546944ec2524dce131b8a46e DIFF: https://github.com/llvm/llvm-project/commit/8153773b23032177546944ec2524dce131b8a46e.diff LO

[clang] [clang] Allow class with anonymous union member to be const-default-constructible even if a union member has a default member initializer (#95854) (PR #96301)

2024-06-25 Thread Rajveer Singh Bharadwaj via cfe-commits
@@ -1392,7 +1392,8 @@ class CXXRecordDecl : public RecordDecl { bool allowConstDefaultInit() const { return !data().HasUninitializedFields || !(data().HasDefaultedDefaultConstructor || - needsImplicitDefaultConstructor()); + needsImplici

[clang] [compiler-rt] [llvm] [CMake] Use Clang to infer the target triple (PR #89425)

2024-06-25 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek updated https://github.com/llvm/llvm-project/pull/89425 >From eb2459876526b78c97b04801dd07bd53540b2892 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Tue, 15 Feb 2022 22:59:58 -0800 Subject: [PATCH 1/2] [CMake] Use Clang to infer the target triple When using Clang

[clang] [compiler-rt] [llvm] [CMake] Use Clang to infer the target triple (PR #89425)

2024-06-25 Thread Petr Hosek via cfe-commits
@@ -181,6 +181,20 @@ message(STATUS "LLVM default target triple: ${LLVM_DEFAULT_TARGET_TRIPLE}") set(LLVM_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}") +if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) + set(print_target_triple ${CMAKE_CXX_COMPILER} --target=${LLVM_RU

[clang] [compiler-rt] [llvm] [CMake] Use Clang to infer the target triple (PR #89425)

2024-06-25 Thread Petr Hosek via cfe-commits
@@ -28,6 +28,19 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) if (NOT LLVM_RUNTIMES_BUILD) load_llvm_config() endif() + if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) petrhosek wrote: I have updated the block in `compiler-rt/cmake/M

[clang] [compiler-rt] [llvm] [CMake] Use Clang to infer the target triple (PR #89425)

2024-06-25 Thread Petr Hosek via cfe-commits
petrhosek wrote: > Does it really needed? It is, #89234 only covers compiler-rt but not other runtime libraries such as libc or libc++ so you might end up with the following: ``` lib/19/clang/lib/x86_64-unknown-linux-gnu/libclang_rt.builtins.a lib/x86_64-linux-gnu/libc++.a ``` The driver will

[clang] [clang] Allow class with anonymous union member to be const-default-constructible even if a union member has a default member initializer (#95854) (PR #96301)

2024-06-25 Thread Rajveer Singh Bharadwaj via cfe-commits
https://github.com/Rajveer100 edited https://github.com/llvm/llvm-project/pull/96301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CGRecordLayout] Remove dependency on isZeroSize (PR #96422)

2024-06-25 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/96422 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CGRecordLayout] Remove dependency on isZeroSize (PR #96422)

2024-06-25 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/96422 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CGRecordLayout] Remove dependency on isZeroSize (PR #96422)

2024-06-25 Thread Michael Buch via cfe-commits
Michael137 wrote: > (Please move out of "draft" when you think this is ready.) Updated the PR with some more context. There's still a few instances of `FieldDecl::isZeroSize`/`CXXRecordDecl::isEmpty` around `CodeGen` (see `CGClass`, `CGExprConstant`), but it wasn't obvious to me whether those

[clang] [clang][CGRecordLayout] Remove dependency on isZeroSize (PR #96422)

2024-06-25 Thread Michael Buch via cfe-commits
https://github.com/Michael137 ready_for_review https://github.com/llvm/llvm-project/pull/96422 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CGRecordLayout] Remove dependency on isZeroSize (PR #96422)

2024-06-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Michael Buch (Michael137) Changes This is a follow-up from the conversation starting at https://github.com/llvm/llvm-project/pull/93809#issuecomment-2173729801 The root problem that motivated the change are external AST sources th

[clang] [llvm] [Clang][ARM][AArch64] Alway emit protection attributes for functions. (PR #82819)

2024-06-25 Thread Daniel Kiss via cfe-commits
DanielKristofKiss wrote: > For return-address signing, each function can make its own choice about > whether to sign; the function that's doing the signing is the same function > that does the auth, so it doesn't directly impact any other function. For > branch target enforcement, though, ever

[clang] [Clang] Remove preprocessor guards and global feature checks for NEON (PR #95224)

2024-06-25 Thread via cfe-commits
https://github.com/Lukacma updated https://github.com/llvm/llvm-project/pull/95224 >From d5caa1a22c90c7d3b1fd995c3ae980f02e4c14c9 Mon Sep 17 00:00:00 2001 From: Marian Lukac Date: Wed, 12 Jun 2024 11:13:48 + Subject: [PATCH 1/6] fix for mve --- clang/lib/Sema/SemaType.cpp|

[clang] [llvm] [AMDGPU] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-06-25 Thread Vikram Hegde via cfe-commits
https://github.com/vikramRH closed https://github.com/llvm/llvm-project/pull/89217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f09b024 - [clang] Remove a stale FIXME

2024-06-25 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2024-06-25T11:45:25+02:00 New Revision: f09b02484b865e4e6e2243ee2ff59d70b60d28e4 URL: https://github.com/llvm/llvm-project/commit/f09b02484b865e4e6e2243ee2ff59d70b60d28e4 DIFF: https://github.com/llvm/llvm-project/commit/f09b02484b865e4e6e2243ee2ff59d70b60d28e4.diff LO

[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

2024-06-25 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: +1, I like Ilya's suggestion. https://github.com/llvm/llvm-project/pull/96475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][nullability] Improve modeling of `++`/`--` operators. (PR #96601)

2024-06-25 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/96601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-06-25 Thread Budimir Aranđelović via cfe-commits
https://github.com/budimirarandjelovicsyrmia updated https://github.com/llvm/llvm-project/pull/70307 From 975000d3a8bfff223111bc5c119294d6fea929ae Mon Sep 17 00:00:00 2001 From: budimirarandjelovicsyrmia Date: Thu, 26 Oct 2023 10:39:52 +0200 Subject: [PATCH] [clang] Emit bad shift warnings ---

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-06-25 Thread Budimir Aranđelović via cfe-commits
https://github.com/budimirarandjelovicsyrmia updated https://github.com/llvm/llvm-project/pull/70307 From f19ddd1d381d7e1c79b1d841070deb461f442eb7 Mon Sep 17 00:00:00 2001 From: budimirarandjelovicsyrmia Date: Thu, 26 Oct 2023 10:39:52 +0200 Subject: [PATCH] [clang] Emit bad shift warnings ---

[clang] [compiler-rt] [llvm] [CMake] Use Clang to infer the target triple (PR #89425)

2024-06-25 Thread YunQiang Su via cfe-commits
@@ -183,6 +183,24 @@ message(STATUS "LLVM default target triple: ${LLVM_DEFAULT_TARGET_TRIPLE}") set(LLVM_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}") +if(CMAKE_C_COMPILER_ID MATCHES "Clang") + set(option_prefix "") + if (CMAKE_C_SIMULATE_ID MATCHES "MSVC") +set(opti

[clang] [compiler-rt] [llvm] [CMake] Use Clang to infer the target triple (PR #89425)

2024-06-25 Thread YunQiang Su via cfe-commits
@@ -368,14 +368,22 @@ macro(construct_compiler_rt_default_triple) "Default triple for which compiler-rt runtimes will be built.") endif() - if ("${CMAKE_C_COMPILER_ID}" MATCHES "Clang") + if(CMAKE_C_COMPILER_ID MATCHES "Clang") set(option_prefix "") if

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-06-25 Thread via cfe-commits
vabridgers wrote: Hi @steakhal , this change seems to have exposed by div/0 error in a very particular corner we came across after integrating this change. Could you try this case to see if can repro? The div/0 is occurring at line 1093: bool IncompleteLastElement = (NumBytesRead % Ele

[clang-tools-extra] [clang-tidy]: Use correct term for user-provided constructor (PR #96617)

2024-06-25 Thread Anders Schau Knatten via cfe-commits
https://github.com/knatten created https://github.com/llvm/llvm-project/pull/96617 First of all, fix a confusion in the documentation for pro-type-member-init which used the wrong term for a user-provided constructor. (In the corresponding comment in ProTypeMemberInitCheck.h, which was added i

[clang-tools-extra] [clang-tidy]: Use correct term for user-provided constructor (PR #96617)

2024-06-25 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] [clang-tidy]: Use correct term for user-provided constructor (PR #96617)

2024-06-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clang-tidy Author: Anders Schau Knatten (knatten) Changes First of all, fix a confusion in the documentation for pro-type-member-init which used the wrong term for a user-provided constructor. (In the correspondin

[clang] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.ptr.buffer.store` (PR #94576)

2024-06-25 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/94576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Extend permlane16, permlanex16 and permlane64 intrinsic lowering for generic types (PR #92725)

2024-06-25 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/92725 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][clang] Replace unreachable code in literal processing with assert (PR #96579)

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

[clang] [llvm] [AMDGPU] Enable atomic optimizer for 64 bit divergent values (PR #96473)

2024-06-25 Thread Matt Arsenault via cfe-commits
@@ -311,10 +312,11 @@ void AMDGPUAtomicOptimizerImpl::visitIntrinsicInst(IntrinsicInst &I) { // If the value operand is divergent, each lane is contributing a different // value to the atomic calculation. We can only optimize divergent values if - // we have DPP availabl

[clang] [llvm] [AMDGPU] Enable atomic optimizer for 64 bit divergent values (PR #96473)

2024-06-25 Thread Matt Arsenault via cfe-commits
@@ -228,10 +228,11 @@ void AMDGPUAtomicOptimizerImpl::visitAtomicRMWInst(AtomicRMWInst &I) { // If the value operand is divergent, each lane is contributing a different // value to the atomic calculation. We can only optimize divergent values if - // we have DPP availabl

[clang] 9acb533 - [clang][Driver] Add HIPAMD Driver support for AMDGCN flavoured SPIR-V (#95061)

2024-06-25 Thread via cfe-commits
Author: Alex Voicu Date: 2024-06-25T12:19:28+01:00 New Revision: 9acb533c38be833ec1d8daa06e127a9de8f0a5ef URL: https://github.com/llvm/llvm-project/commit/9acb533c38be833ec1d8daa06e127a9de8f0a5ef DIFF: https://github.com/llvm/llvm-project/commit/9acb533c38be833ec1d8daa06e127a9de8f0a5ef.diff LO

[clang] [llvm] [clang][Driver] Add HIPAMD Driver support for AMDGCN flavoured SPIR-V (PR #95061)

2024-06-25 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx closed https://github.com/llvm/llvm-project/pull/95061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TBAA] Emit int TBAA metadata on FP math libcalls (PR #96025)

2024-06-25 Thread via cfe-commits
https://github.com/vfdff updated https://github.com/llvm/llvm-project/pull/96025 >From ed6292fd0e9119322c39e5f37e2225c76e324101 Mon Sep 17 00:00:00 2001 From: zhongyunde 00443407 Date: Tue, 18 Jun 2024 09:21:07 -0400 Subject: [PATCH 1/4] [TBAA] Emit int TBAA metadata on FP math libcalls Base on

[clang] [TBAA] Emit int TBAA metadata on FP math libcalls (PR #96025)

2024-06-25 Thread via cfe-commits
@@ -707,7 +707,34 @@ static RValue emitLibraryCall(CodeGenFunction &CGF, const FunctionDecl *FD, const CallExpr *E, llvm::Constant *calleeValue) { CodeGenFunction::CGFPOptionsRAII FPOptsRAII(CGF, E); CGCallee callee = CGCallee::forDirect(calle

[clang] [clang] Catch missing format attributes (PR #70024)

2024-06-25 Thread Budimir Aranđelović via cfe-commits
https://github.com/budimirarandjelovicsyrmia updated https://github.com/llvm/llvm-project/pull/70024 From 5bc76cd96f52cf8184712c8e1ffa521f05e3e29c Mon Sep 17 00:00:00 2001 From: budimirarandjelovicsyrmia Date: Fri, 5 Apr 2024 15:20:37 +0200 Subject: [PATCH] [clang] Catch missing format attribut

[clang] [llvm] [LLVM] Fix incorrect alignment on AMDGPU variadics (PR #96370)

2024-06-25 Thread Matt Arsenault via cfe-commits
arsenm wrote: > > Incrementing by align is just a bug, of course the size is the real value. > > Whether we want to continue wasting space is another not-correctness > > discussion > > Struct padding is pretty universal, AMDGPU seems the odd one out here. I > wouldn't mind it so much if it di

[clang-tools-extra] [IncludeCleaner] display overview (PR #93932)

2024-06-25 Thread via cfe-commits
https://github.com/TheHillBright updated https://github.com/llvm/llvm-project/pull/93932 >From e803c635a64ed3c2ad0381e82ca308f63dcf4604 Mon Sep 17 00:00:00 2001 From: TheHillBright <150074496+thehillbri...@users.noreply.github.com> Date: Fri, 31 May 2024 15:00:37 +0800 Subject: [PATCH] IncludeCl

[clang-tools-extra] [IncludeCleaner] display overview (PR #93932)

2024-06-25 Thread via cfe-commits
TheHillBright wrote: Ping @kadircet @sam-mccall for one month of inactivity for this simple PR. https://github.com/llvm/llvm-project/pull/93932 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [Clang] Clarify diagnostic notes for implicitly generated deduction guides (PR #96084)

2024-06-25 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/96084 >From 23844cd8b8fad07bce0c34f58430322090c5a793 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 19 Jun 2024 23:25:13 +0800 Subject: [PATCH 1/4] [Clang] Add diagnostic notes for implcitly generated deductio

[clang] [Clang] Clarify diagnostic notes for implicitly generated deduction guides (PR #96084)

2024-06-25 Thread Younan Zhang via cfe-commits
@@ -12114,6 +12115,35 @@ static void NoteFunctionCandidate(Sema &S, OverloadCandidate *Cand, return; } + // If this is an implicit deduction guide against an implicitly defined + // constructor, add a note for it. Neither these deduction guides nor their + // corresp

[clang] [llvm] [LLVM] Fix incorrect alignment on AMDGPU variadics (PR #96370)

2024-06-25 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > > > Incrementing by align is just a bug, of course the size is the real > > > value. Whether we want to continue wasting space is another > > > not-correctness discussion > > > > > > Struct padding is pretty universal, AMDGPU seems the odd one out here. I > > wouldn't mind i

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #96240)

2024-06-25 Thread via cfe-commits
https://github.com/earnol updated https://github.com/llvm/llvm-project/pull/96240 >From d01c49f85902d2ec660db2cb32dc2d1e0d04c393 Mon Sep 17 00:00:00 2001 From: Vladislav Aranov Date: Fri, 24 May 2024 11:39:35 -0400 Subject: [PATCH] [ubsan] Display correct runtime messages for negative _BitInt

[clang] [llvm] [LLVM] Fix incorrect alignment on AMDGPU variadics (PR #96370)

2024-06-25 Thread Matt Arsenault via cfe-commits
arsenm wrote: > > > > Incrementing by align is just a bug, of course the size is the real > > > > value. Whether we want to continue wasting space is another > > > > not-correctness discussion > > > > > > > > > Struct padding is pretty universal, AMDGPU seems the odd one out here. I > > > wo

[clang] [llvm] [LLVM] Fix incorrect alignment on AMDGPU variadics (PR #96370)

2024-06-25 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > > Hm, that's what I'm doing in the `printf` implementation and it doesn't > > work without that patch. When I look at the varargs struct it didn't have > > any padding, which explained why `alignTo(ptr + size, align)` was wrong. > > So, I was trying to do the following, `print

[clang] [Clang] Clarify diagnostic notes for implicitly generated deduction guides (PR #96084)

2024-06-25 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/96084 >From 23844cd8b8fad07bce0c34f58430322090c5a793 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 19 Jun 2024 23:25:13 +0800 Subject: [PATCH 1/5] [Clang] Add diagnostic notes for implcitly generated deductio

[clang] [Clang] Introduce 'clang-nvlink-wrappaer' to work around 'nvlink' (PR #96561)

2024-06-25 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/96561 >From 6c70e542bbb355160b833ede6f86be0366953b88 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Mon, 24 Jun 2024 15:14:52 -0500 Subject: [PATCH] [Clang] Introduce 'clang-nvlink-wrappaer' to work around 'nvlink'

[clang] [Clang] Clarify diagnostic notes for implicitly generated deduction guides (PR #96084)

2024-06-25 Thread Younan Zhang via cfe-commits
@@ -108,8 +108,11 @@ struct Foo { Foo(T const (&)[N]); }; +// FIXME: Prefer non-canonical template arguments in the deduction guide? template using Bar = Foo; // expected-note {{candidate template ignored: couldn't infer template argument 'X'}} \ +

[clang] [Clang] Introduce 'clang-nvlink-wrappaer' to work around 'nvlink' (PR #96561)

2024-06-25 Thread Joseph Huber via cfe-commits
jhuber6 wrote: @MaskRay So, I think my symbol resolution is (unsurprisingly) subtly broken. Is there a canonical way to handle this? I first thought that we could simply perform the symbol resolutions as normal for every file, but keep track of which symbols were "lazy". However, I couldn't fi

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-06-25 Thread Budimir Aranđelović via cfe-commits
https://github.com/budimirarandjelovicsyrmia updated https://github.com/llvm/llvm-project/pull/70307 From 39c314b060959578ccfe70c5ef2aa5aba5688c11 Mon Sep 17 00:00:00 2001 From: budimirarandjelovicsyrmia Date: Thu, 26 Oct 2023 10:39:52 +0200 Subject: [PATCH] [clang] Emit bad shift warnings ---

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #96240)

2024-06-25 Thread via cfe-commits
https://github.com/earnol updated https://github.com/llvm/llvm-project/pull/96240 >From 6e0294e5debf0fe694fcf56c8cd2d35e7225d639 Mon Sep 17 00:00:00 2001 From: Vladislav Aranov Date: Fri, 24 May 2024 11:39:35 -0400 Subject: [PATCH] [ubsan] Display correct runtime messages for negative _BitInt

[clang] [clang][FMV] Do not omit explicit default target_version attribute. (PR #96628)

2024-06-25 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea created https://github.com/llvm/llvm-project/pull/96628 Fixes a crash and cleans up some dead code. namespace Foo { int bar(); __attribute((target_version("default"))) int bar() { return 0; } __attribute((target_version("mops"))) int bar() { return 1; } } $ clang++

[clang] [clang][FMV] Do not omit explicit default target_version attribute. (PR #96628)

2024-06-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alexandros Lamprineas (labrinea) Changes Fixes a crash and cleans up some dead code. namespace Foo { int bar(); __attribute((target_version("default"))) int bar() { return 0; } __attribute((target_version("mops"))) int bar() { return 1; }

[clang] [clang][FMV] Do not omit explicit default target_version attribute. (PR #96628)

2024-06-25 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: Alternative one liner: ``` diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index dd4a665ebc78..0c96a6de091a 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -3763,7 +3763,7 @@ void CodeGenModule::

[clang] Add documentation for `__builtin_object_size`. (PR #96573)

2024-06-25 Thread Allan Jude via cfe-commits
@@ -5368,16 +5368,85 @@ The ``#pragma comment(lib, ...)`` directive is supported on all ELF targets. The second parameter is the library name (without the traditional Unix prefix of ``lib``). This allows you to provide an implicit link of dependent libraries. -Evaluating Ob

[clang] Add documentation for `__builtin_object_size`. (PR #96573)

2024-06-25 Thread Allan Jude via cfe-commits
https://github.com/allanjude edited https://github.com/llvm/llvm-project/pull/96573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][FMV] Do not omit explicit default target_version attribute. (PR #96628)

2024-06-25 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: @ilinpv, @DanielKristofKiss, the patch https://github.com/llvm/llvm-project/pull/65671/files doesn't seem right. I have basically reverted it with my change, ensuring the original crash you were trying to fix doesn't occur. FYI `MVKind == MultiVersionKind::None` is equivallent

[clang] [Clang] Access tls_guard via llvm.threadlocal.address (PR #96633)

2024-06-25 Thread via cfe-commits
https://github.com/nikola-tesic-ns created https://github.com/llvm/llvm-project/pull/96633 This patch fixes compiler generated code in `tls_init` function to access TLS variable (`tls_guard`) via llvm.threadlocal.address intrinsic. Related discussion: https://discourse.llvm.org/t/address-threa

[clang] [Clang] Access tls_guard via llvm.threadlocal.address (PR #96633)

2024-06-25 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][FMV] Do not omit explicit default target_version attribute. (PR #96628)

2024-06-25 Thread Alexandros Lamprineas via cfe-commits
@@ -11543,8 +11551,7 @@ static bool CheckTargetCausesMultiVersioning(Sema &S, FunctionDecl *OldFD, } // If this is 'default', permit the forward declaration. - if ((NewTA && NewTA->isDefaultVersion() && !OldTA) || - (NewTVA && NewTVA->isDefaultVersion() && !OldTVA))

[clang] [Clang] Access tls_guard via llvm.threadlocal.address (PR #96633)

2024-06-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: None (nikola-tesic-ns) Changes This patch fixes compiler generated code in `tls_init` function to access TLS variable (`tls_guard`) via llvm.threadlocal.address intrinsic. Related discussion: https://dis

[clang] 70cfece - Revert "[clang-format] Add option to remove leading blank lines (#91221)"

2024-06-25 Thread via cfe-commits
Author: sstwcw Date: 2024-06-25T13:12:32Z New Revision: 70cfece24d6cbb57e35dd961cc97eb2a6bf1e387 URL: https://github.com/llvm/llvm-project/commit/70cfece24d6cbb57e35dd961cc97eb2a6bf1e387 DIFF: https://github.com/llvm/llvm-project/commit/70cfece24d6cbb57e35dd961cc97eb2a6bf1e387.diff LOG: Revert

[clang-tools-extra] c69ea04 - Revert "[clangd] Fix the build broken (NFC)"

2024-06-25 Thread Jie Fu via cfe-commits
Author: Jie Fu Date: 2024-06-25T21:30:02+08:00 New Revision: c69ea04fb9738db283263eb350669e00b77ee4fd URL: https://github.com/llvm/llvm-project/commit/c69ea04fb9738db283263eb350669e00b77ee4fd DIFF: https://github.com/llvm/llvm-project/commit/c69ea04fb9738db283263eb350669e00b77ee4fd.diff LOG: R

[clang] [clang][FMV] Do not omit explicit default target_version attribute. (PR #96628)

2024-06-25 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/96628 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Catch missing format attributes (PR #70024)

2024-06-25 Thread Budimir Aranđelović via cfe-commits
@@ -0,0 +1,277 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-format-attribute %s + +typedef unsigned short char16_t; +typedef unsigned int char32_t; +typedef __WCHAR_TYPE__ wchar_t; +typedef __SIZE_TYPE__ size_t; +typedef __builtin_va_list va_list; + +__attribute__((__for

[clang] [clang][FMV] Do not omit explicit default target_version attribute. (PR #96628)

2024-06-25 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: `Sema.h` changes look good to me. https://github.com/llvm/llvm-project/pull/96628 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.ptr.buffer.store` (PR #94576)

2024-06-25 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/94576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c9f083a - [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.ptr.buffer.store` (#94576)

2024-06-25 Thread via cfe-commits
Author: Shilei Tian Date: 2024-06-25T09:55:37-04:00 New Revision: c9f083a9940d1d62f77c39f05bb0fc186cc4832c URL: https://github.com/llvm/llvm-project/commit/c9f083a9940d1d62f77c39f05bb0fc186cc4832c DIFF: https://github.com/llvm/llvm-project/commit/c9f083a9940d1d62f77c39f05bb0fc186cc4832c.diff L

[clang] [Clang] Introduce 'clang-nvlink-wrappaer' to work around 'nvlink' (PR #96561)

2024-06-25 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/96561 >From 859f6a7fce9503275ad7eb39512dc5833a11bb07 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Mon, 24 Jun 2024 15:14:52 -0500 Subject: [PATCH] [Clang] Introduce 'clang-nvlink-wrappaer' to work around 'nvlink'

[clang] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.ptr.buffer.store` (PR #94576)

2024-06-25 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-hip-vega20` running on `hip-vega20-0` while building `clang` at step 3 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/123/builds/594 Here is the relevant piece of the build log for t

[clang] [llvm] [mlir] [OpenMP] Migrate GPU Reductions CodeGen from Clang to OMPIRBuilder (PR #80343)

2024-06-25 Thread Jan Leyonberg via cfe-commits
https://github.com/jsjodin approved this pull request. This looks good to me now. You can wait a few days before merging to let @jdoerfert look it over again. https://github.com/llvm/llvm-project/pull/80343 ___ cfe-commits mailing list cfe-commits@li

[clang] Reject half vector types without cl_khr_fp16 (PR #96640)

2024-06-25 Thread Sven van Haastregt via cfe-commits
https://github.com/svenvh created https://github.com/llvm/llvm-project/pull/96640 Reject `half` vector types (`halfn`) if the `cl_khr_fp16` extension is disabled, in line with the already existing rejection of `half` scalar types and `half` array types. >From e26114f1aa6809e7b5f93f4e866e7ff25

[clang] Reject half vector types without cl_khr_fp16 (PR #96640)

2024-06-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sven van Haastregt (svenvh) Changes Reject `half` vector types (`halfn`) if the `cl_khr_fp16` extension is disabled, in line with the already existing rejection of `half` scalar types and `half` array types. --- Full diff: https://github

[clang] 54b61ad - [NFC][clang] Replace unreachable code in literal processing with assert (#96579)

2024-06-25 Thread via cfe-commits
Author: Mike Rice Date: 2024-06-25T07:14:40-07:00 New Revision: 54b61adc0cbefb7f923ef43c407704ba9f9d8b69 URL: https://github.com/llvm/llvm-project/commit/54b61adc0cbefb7f923ef43c407704ba9f9d8b69 DIFF: https://github.com/llvm/llvm-project/commit/54b61adc0cbefb7f923ef43c407704ba9f9d8b69.diff LOG

[clang] [NFC][clang] Replace unreachable code in literal processing with assert (PR #96579)

2024-06-25 Thread Mike Rice via cfe-commits
https://github.com/mikerice1969 closed https://github.com/llvm/llvm-project/pull/96579 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #93612)

2024-06-25 Thread via cfe-commits
earnol wrote: @mstorsjo It seems your compiler build does not have int128_t enabled. Could you please test https://github.com/llvm/llvm-project/pull/96240 in your environment to verify it has no such problem? https://github.com/llvm/llvm-project/pull/93612 _

[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-06-25 Thread Paschalis Mpeis via cfe-commits
https://github.com/paschalis-mpeis converted_to_draft https://github.com/llvm/llvm-project/pull/78432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Add *_NORM_MAX macros to (PR #96643)

2024-06-25 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/96643 This adds the *_NORM_MAX macros to for freestanding mode in Clang; the values were chosen based on the behavior seen coming from GCC and the values already produced for the *_MAX macros by Clang. >From 40

[clang] [C23] Add *_NORM_MAX macros to (PR #96643)

2024-06-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Aaron Ballman (AaronBallman) Changes This adds the *_NORM_MAX macros to for freestanding mode in Clang; the values were chosen based on the behavior seen coming from GCC and the values already produced for the *_MAX macros

[clang] fb463e1 - [C23] Remove WG14 N2379 from the C status page

2024-06-25 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2024-06-25T10:34:39-04:00 New Revision: fb463e154e7fe1200b9d91f82fafa532331ce764 URL: https://github.com/llvm/llvm-project/commit/fb463e154e7fe1200b9d91f82fafa532331ce764 DIFF: https://github.com/llvm/llvm-project/commit/fb463e154e7fe1200b9d91f82fafa532331ce764.diff

[clang] [compiler-rt] [libcxx] [libunwind] [llvm] [openmp] [cmake] switch to CMake's native `check_{compiler,linker}_flag` (PR #96171)

2024-06-25 Thread Louis Dionne via cfe-commits
ldionne wrote: @h-vetinari This one still looks like a real issue: https://buildkite.com/llvm-project/github-pull-requests/builds/74912#01903ca1-8089-4388-afdb-b65d400e6315 The rest looks good indeed. https://github.com/llvm/llvm-project/pull/96171 _

[clang] [clang][test] Avoid writing to a potentially write-protected dir (PR #96457)

2024-06-25 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. Whoops, sorry about that mistake in the test. The patch is LGTM. Thanks! https://github.com/llvm/llvm-project/pull/96457 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [LinkerWrapper][NFC] Simplify StringErrors (PR #96650)

2024-06-25 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/96650 Summary: The StringError class has a specialized method that creates the inconvertible error code for you. It's much easier to read this way. >From 6860d0101f8babac086156087854e8f94e4f233e Mon Sep 17 00:00:00 20

[clang] [LinkerWrapper][NFC] Simplify StringErrors (PR #96650)

2024-06-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joseph Huber (jhuber6) Changes Summary: The StringError class has a specialized method that creates the inconvertible error code for you. It's much easier to read this way. --- Full diff: https://github.com/llvm/llvm-project/pull/96650.di

[clang] [llvm] [clang][OpenMP] Shorten directive classification in ParseOpenMP (PR #94691)

2024-06-25 Thread Krzysztof Parzyszek via cfe-commits
@@ -2374,86 +2374,209 @@ Parser::DeclGroupPtrTy Parser::ParseOpenMPDeclarativeDirectiveWithExtDecl( case OMPD_unknown: Diag(Tok, diag::err_omp_unknown_directive); break; - case OMPD_parallel: - case OMPD_simd: - case OMPD_tile: - case OMPD_unroll: - case OMPD_ta

[clang] [llvm] [clang][OpenMP] Shorten directive classification in ParseOpenMP (PR #94691)

2024-06-25 Thread Krzysztof Parzyszek via cfe-commits
@@ -2374,86 +2374,209 @@ Parser::DeclGroupPtrTy Parser::ParseOpenMPDeclarativeDirectiveWithExtDecl( case OMPD_unknown: Diag(Tok, diag::err_omp_unknown_directive); break; - case OMPD_parallel: - case OMPD_simd: - case OMPD_tile: - case OMPD_unroll: - case OMPD_ta

[clang] [C23] Add *_NORM_MAX macros to (PR #96643)

2024-06-25 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/96643 >From 408c34b84966a256bb6e7fdf45758f5c77380bbe Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Tue, 25 Jun 2024 10:27:10 -0400 Subject: [PATCH 1/2] [C23] Add *_NORM_MAX macros to This adds the *_NORM_MA

[clang] [C23] Add *_NORM_MAX macros to (PR #96643)

2024-06-25 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman unassigned https://github.com/llvm/llvm-project/pull/96643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Add *_NORM_MAX macros to (PR #96643)

2024-06-25 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman unassigned https://github.com/llvm/llvm-project/pull/96643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Add *_NORM_MAX macros to (PR #96643)

2024-06-25 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman unassigned https://github.com/llvm/llvm-project/pull/96643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Add *_NORM_MAX macros to (PR #96643)

2024-06-25 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman unassigned https://github.com/llvm/llvm-project/pull/96643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Add *_NORM_MAX macros to (PR #96643)

2024-06-25 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman unassigned https://github.com/llvm/llvm-project/pull/96643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Improve error message for invalid lambda captures (PR #94865)

2024-06-25 Thread via cfe-commits
https://github.com/CedricSwa updated https://github.com/llvm/llvm-project/pull/94865 >From 012849c5410960001ca5bbcb90ea2cf4a661b840 Mon Sep 17 00:00:00 2001 From: Cedric Schwarzer Date: Sat, 8 Jun 2024 17:52:02 +0200 Subject: [PATCH 1/3] Improve error message for invalid lambda captures --- c

[clang] [C23] Add *_NORM_MAX macros to (PR #96643)

2024-06-25 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 2ae09052477e1a966afbc5482d88585f95694c53 486d9fb3f9f992831569e4b9e1eda0a54c777b3b --e

[clang] Improve error message for invalid lambda captures (PR #94865)

2024-06-25 Thread via cfe-commits
CedricSwa wrote: not sure if lambda expression is the best file but for lambda-invalid-capture i would need to add -Wno-unused-value to both run statements. https://github.com/llvm/llvm-project/pull/94865 ___ cfe-commits mailing list cfe-commits@lists

[clang] [Doc] Update documentation for no-transitive-change (PR #96453)

2024-06-25 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: > > I really like the idea of documenting this, hopefully this create some > > fruitful discussions with the build system developers and other compiler > > users. > > After trying to put myself into the shoes of the compiler users reading > > this, I can't help but think t

[clang] 8a46bbb - [Clang] Remove preprocessor guards and global feature checks for NEON (#95224)

2024-06-25 Thread via cfe-commits
Author: Lukacma Date: 2024-06-25T17:19:42+02:00 New Revision: 8a46bbbc22a51db57f05beb0026772b899a785b9 URL: https://github.com/llvm/llvm-project/commit/8a46bbbc22a51db57f05beb0026772b899a785b9 DIFF: https://github.com/llvm/llvm-project/commit/8a46bbbc22a51db57f05beb0026772b899a785b9.diff LOG:

[clang] [Clang] Remove preprocessor guards and global feature checks for NEON (PR #95224)

2024-06-25 Thread via cfe-commits
https://github.com/Lukacma closed https://github.com/llvm/llvm-project/pull/95224 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Access tls_guard via llvm.threadlocal.address (PR #96633)

2024-06-25 Thread via cfe-commits
nikola-tesic-ns wrote: @nikic @ChuanqiXu9 I couldn't add you to the reviewers list. Please, take a look at this fix. Thanks! https://github.com/llvm/llvm-project/pull/96633 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

  1   2   3   4   >