[clang] [clang][bytecode] Allow placement-new in std function pre-C++26 (PR #109753)

2024-09-23 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/109753 >From 99a3e850f943393f18405d98601a08a91065d710 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 23 Sep 2024 16:37:36 +0200 Subject: [PATCH] [clang][bytecode] Allow placement-new in std fu

[clang] [llvm] [KCFI][NFC] Rename the !kcfi_type Function metadata to !cfi_type (PR #109080)

2024-09-23 Thread Ming-Yi Lai via cfe-commits
mylai-mtk wrote: @MaskRay Sure, I also agree that `!cfi_type` is a too general name and covers too little possibility for its name. I picked this approach instead of adding RISC-V-specific metadata nodes just to avoid adding RISC-V specifics to the conceptually backend-neutral LLVM IR. However

[clang] [llvm] [KCFI][NFC] Rename the !kcfi_type Function metadata to !cfi_type (PR #109080)

2024-09-23 Thread Ming-Yi Lai via cfe-commits
https://github.com/mylai-mtk closed https://github.com/llvm/llvm-project/pull/109080 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Ignore inline namespace for `hasName` (PR #109147)

2024-09-23 Thread Alejandro Álvarez Ayllón via cfe-commits
alejandro-alvarez-sonarsource wrote: > Also, it needs a release note I think for the matcher change. Added. > I have no problem with the code here, but don't know enough about ASTMatchers > to be able to review this for 'well justified'. Do we have someone besides > Aaron who does? FWIW this

[clang] [clang] Ignore inline namespace for `hasName` (PR #109147)

2024-09-23 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated https://github.com/llvm/llvm-project/pull/109147 From d369d26aad940299eb98ff0c322614043144c558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?= Date: Mon, 24 Jul 2023 13:56:29 +0200 Subject: [PATCH 1/2] [

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-23 Thread Tristan Ross via cfe-commits
@@ -1,3 +1,7 @@ +if(EXISTS ${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen AND CLANG_BUILT_STANDALONE) + add_subdirectory(${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen llvm/lib/CodeGen) +endif() RossComputerGuy wrote: Looks like CMake accepted that change, let's see if it

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-23 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd edited https://github.com/llvm/llvm-project/pull/109601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-23 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd edited https://github.com/llvm/llvm-project/pull/109601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-23 Thread Saleem Abdulrasool via cfe-commits
@@ -1,3 +1,7 @@ +if(EXISTS ${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen AND CLANG_BUILT_STANDALONE) + add_subdirectory(${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen llvm/lib/CodeGen) +endif() compnerd wrote: https://github.com/llvm/llvm-project/blob/main/llvm/cmake/mod

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-23 Thread Tristan Ross via cfe-commits
@@ -1,3 +1,7 @@ +if(EXISTS ${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen AND CLANG_BUILT_STANDALONE) + add_subdirectory(${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen llvm/lib/CodeGen) +endif() RossComputerGuy wrote: Ok, so the solution is to set `-DLLVM_DIR` which is do

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-23 Thread Saleem Abdulrasool via cfe-commits
@@ -1,3 +1,7 @@ +if(EXISTS ${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen AND CLANG_BUILT_STANDALONE) + add_subdirectory(${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen llvm/lib/CodeGen) +endif() compnerd wrote: The issue is that the `vt_gen` target is undefined. This is _

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-23 Thread Tristan Ross via cfe-commits
RossComputerGuy wrote: > The `add_subdirectory` is definitely odd and I'm not sure if that is a proper > solution. I'm not familiar with how LLVM CodeGen works and I am a bit new to LLVM but I looked at [`clang/CMakeLists.txt`](https://github.com/llvm/llvm-project/blob/d61b2590f8e360695a52983

[clang] [OpenMP][Docs] Update OpenMP release notes with 'omp scope' (PR #109752)

2024-09-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: David Pagan (ddpagan) Changes Release notes: added 'omp scope' directive to "OpenMP Support" section of "What's New in Clang" --- Full diff: https://github.com/llvm/llvm-project/pull/109752.diff 1 Files Affected: - (modified) clang/doc

[clang] [OpenMP][Docs] Update OpenMP release notes with 'omp scope' (PR #109752)

2024-09-23 Thread David Pagan via cfe-commits
https://github.com/ddpagan created https://github.com/llvm/llvm-project/pull/109752 Release notes: added 'omp scope' directive to "OpenMP Support" section of "What's New in Clang" >From 6ded6531f20d4f2a8eee5e0263d2ff87da17e8d8 Mon Sep 17 00:00:00 2001 From: Dave Pagan Date: Mon, 23 Sep 2024 2

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-23 Thread Saleem Abdulrasool via cfe-commits
compnerd wrote: > @compnerd @etcwilde WDYT about conditionalizing the new dependency with an > `if (TARGET vt_gen)` instead of doing the `add_subdirectory()` dance? Ugh, I misread the change as `include_directories`. The `add_subdirectory` is definitely odd and I'm not sure if that is a proper

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-23 Thread Tristan Ross via cfe-commits
@@ -1,3 +1,7 @@ +if(EXISTS ${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen AND CLANG_BUILT_STANDALONE) + add_subdirectory(${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen llvm/lib/CodeGen) +endif() RossComputerGuy wrote: I'm not exactly sure what you're meaning. https://git

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-23 Thread Saleem Abdulrasool via cfe-commits
@@ -1,3 +1,7 @@ +if(EXISTS ${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen AND CLANG_BUILT_STANDALONE) + add_subdirectory(${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen llvm/lib/CodeGen) +endif() compnerd wrote: No, `LLVM_DIR` is passed to the CMake configure step to locat

[clang] [clang][CodeGen] Zero init unspecified fields in initializers in C (PR #97121)

2024-09-23 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM I think we'll need to watch out for performance regressions... in most cases, we can probably zero-pad cheaply, but there might be cases where it isn't cheap, or cases where it should be cheap but the LLVM backend can't figure i

[clang] [clang][bytecode] Implement arithmetic, bitwise and compound assignment operator (PR #108949)

2024-09-23 Thread Timm Baeder via cfe-commits
tbaederr wrote: Endianness is very well possible indeed, but it's a little weird this starts failing now, since the shifts done aren't vector specific. Are you testing this on a solaris host? When you say stage2-build, you mean you're building clang main with your system compiler (this is stag

[clang] [llvm] [BPF] Do atomic_fetch_*() pattern matching with memory ordering (PR #107343)

2024-09-23 Thread via cfe-commits
yonghong-song wrote: > @yonghong-song, note: if all three commits remain a part of a single pull > request, the are required to be squashed > ([link](https://llvm.org/docs/GitHub.html)). If you want all three to be > separate, each has to have it's separate pull request (one branch forked from

[clang] [llvm] [BPF] Do atomic_fetch_*() pattern matching with memory ordering (PR #107343)

2024-09-23 Thread via cfe-commits
@@ -0,0 +1,186 @@ +; RUN: llc -march=bpfel -mcpu=v3 -filetype=asm -o - %s | FileCheck -check-prefixes=CHECK %s +; RUN: llc -march=bpfeb -mcpu=v3 -filetype=asm -o - %s | FileCheck -check-prefixes=CHECK %s +; +; Source: +; #include +; struct gstruct_t { +; _Atomic int a;

[clang] [llvm] [BPF] Do atomic_fetch_*() pattern matching with memory ordering (PR #107343)

2024-09-23 Thread via cfe-commits
@@ -35,6 +35,15 @@ static const char *BTFKindStr[] = { #include "llvm/DebugInfo/BTF/BTF.def" }; +static const DIType *tryRemoveAtomicType(const DIType *Ty) { yonghong-song wrote: Yes. It is necessary. completeType intends to find the *next* type id. For exa

[clang] [llvm] [BPF] Do atomic_fetch_*() pattern matching with memory ordering (PR #107343)

2024-09-23 Thread via cfe-commits
@@ -152,22 +152,93 @@ static bool hasLiveDefs(const MachineInstr &MI, const TargetRegisterInfo *TRI) { return false; } -void BPFMIPreEmitChecking::processAtomicInsts() { +bool BPFMIPreEmitChecking::processAtomicInsts() { + if (!MF->getSubtarget().getHasJmp32()) { +// O

[clang] [llvm] [BPF] Do atomic_fetch_*() pattern matching with memory ordering (PR #107343)

2024-09-23 Thread via cfe-commits
@@ -152,22 +152,93 @@ static bool hasLiveDefs(const MachineInstr &MI, const TargetRegisterInfo *TRI) { return false; } -void BPFMIPreEmitChecking::processAtomicInsts() { +bool BPFMIPreEmitChecking::processAtomicInsts() { + if (!MF->getSubtarget().getHasJmp32()) { +// O

[clang-tools-extra] [clangd] Add inlay hints for default function arguments (PR #95712)

2024-09-23 Thread Tor Shepherd via cfe-commits
https://github.com/torshepherd updated https://github.com/llvm/llvm-project/pull/95712 >From 2c9e7c16524b7ce3bf818e451279722dc45d3efc Mon Sep 17 00:00:00 2001 From: Tor Shepherd Date: Mon, 23 Sep 2024 23:12:23 -0400 Subject: [PATCH] just defaults --- clang-tools-extra/clangd/Config.h

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-09-23 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,57 @@ +; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s --check-prefix=CHECK farzonl wrote: My point still stands why do you need two runs? https://github.com/llvm/llvm-project/pull/109180 ___

[clang] [llvm] [SPIRV][RFC] Rework / extend support for memory scopes (PR #106429)

2024-09-23 Thread Alex Voicu via cfe-commits
@@ -766,8 +766,19 @@ static void EmitAtomicOp(CodeGenFunction &CGF, AtomicExpr *Expr, Address Dest, // LLVM atomic instructions always have synch scope. If clang atomic // expression has no scope operand, use default LLVM synch scope. if (!ScopeModel) { +llvm::SyncSc

[clang] [OpenMP][Docs] Update OpenMP supported features table (PR #109726)

2024-09-23 Thread David Pagan via cfe-commits
https://github.com/ddpagan closed https://github.com/llvm/llvm-project/pull/109726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9b5a303 - [OpenMP][Docs] Update OpenMP supported features table (#109726)

2024-09-23 Thread via cfe-commits
Author: David Pagan Date: 2024-09-23T19:59:28-07:00 New Revision: 9b5a3036adbd9eed0f377cdf06aa622b917a1699 URL: https://github.com/llvm/llvm-project/commit/9b5a3036adbd9eed0f377cdf06aa622b917a1699 DIFF: https://github.com/llvm/llvm-project/commit/9b5a3036adbd9eed0f377cdf06aa622b917a1699.diff L

[clang] [OpenMP][Docs] Update OpenMP supported features table (PR #109726)

2024-09-23 Thread David Pagan via cfe-commits
ddpagan wrote: Thanks, Alexey. I'll do that. https://github.com/llvm/llvm-project/pull/109726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 64e7cb2 - [Rewrite] Use auto (NFC)

2024-09-23 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2024-09-23T19:47:41-07:00 New Revision: 64e7cb266e54e689791ad499965ddb0f8a1a2262 URL: https://github.com/llvm/llvm-project/commit/64e7cb266e54e689791ad499965ddb0f8a1a2262 DIFF: https://github.com/llvm/llvm-project/commit/64e7cb266e54e689791ad499965ddb0f8a1a2262.diff L

[clang] [C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #109167)

2024-09-23 Thread Chuanqi Xu via cfe-commits
@@ -4351,6 +4351,15 @@ void ASTReader::loadDeclUpdateRecords(PendingUpdateRecord &Record) { reader::ASTDeclContextNameLookupTrait(*this, *Update.Mod)); DC->setHasExternalVisibleStorage(true); } + + // Load any pending lambdas for the function. + if (auto *FD

[clang-tools-extra] [clangd] Add inlay hints for default function arguments (PR #95712)

2024-09-23 Thread Tor Shepherd via cfe-commits
https://github.com/torshepherd edited https://github.com/llvm/llvm-project/pull/95712 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #109167)

2024-09-23 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/109167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #109167)

2024-09-23 Thread Chuanqi Xu via cfe-commits
@@ -532,6 +532,10 @@ class ASTReader /// namespace as if it is not delayed. DelayedNamespaceOffsetMapTy DelayedNamespaceOffsetMap; + /// Mapping from FunctionDecl IDs to the corresponding lambda IDs. ChuanqiXu9 wrote: Same here. Let's explain our intenti

[clang] [C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #109167)

2024-09-23 Thread Chuanqi Xu via cfe-commits
@@ -233,6 +233,10 @@ class ASTWriter : public ASTDeserializationListener, /// instead of comparing the result of `getDeclID()` or `GetDeclRef()`. llvm::SmallPtrSet PredefinedDecls; + /// Map that provides the ID of function to the vector of lambdas inside it.

[clang] [C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #109167)

2024-09-23 Thread Chuanqi Xu via cfe-commits
@@ -724,6 +724,9 @@ enum ASTRecordTypes { /// Record code for vtables to emit. VTABLES_TO_EMIT = 70, + + /// Record code for the FunctionDecl to lambdas mapping. ChuanqiXu9 wrote: Let's add some simple comments here to explain why we want to do this. ht

[clang] [C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #109167)

2024-09-23 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM with nits https://github.com/llvm/llvm-project/pull/109167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Frontend] Teach LoadFromASTFile to take FileName by StringRef (NFC) (PR #109583)

2024-09-23 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. https://github.com/llvm/llvm-project/pull/109583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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-09-23 Thread Shafik Yaghmour via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -std=c++23 -fsyntax-only -verify %s + +struct A { shafik wrote: We should also test this case: ```cpp struct A { union { int n; int m=0; }; }; const A a; ``` https://github.com/llvm/llvm-project/pull/96301 _

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-09-23 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/99656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-09-23 Thread via cfe-commits
@@ -0,0 +1,1572 @@ +//=== SemaFunctionEffects.cpp - Sema handling of function effects -===// +// +// 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: A

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-09-23 Thread via cfe-commits
@@ -0,0 +1,1572 @@ +//=== SemaFunctionEffects.cpp - Sema handling of function effects -===// +// +// 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: A

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-09-23 Thread via cfe-commits
@@ -4940,6 +4955,78 @@ class FunctionEffectsRef { void dump(llvm::raw_ostream &OS) const; }; +/// A mutable set of FunctionEffect::Kind. +class FunctionEffectKindSet { + // For now this only needs to be a bitmap. + constexpr static size_t EndBitPos = 8; + using KindBitsT

[clang] [Clang][Sema] Fix templated array size calculation. (PR #96464)

2024-09-23 Thread via cfe-commits
https://github.com/awson updated https://github.com/llvm/llvm-project/pull/96464 >From 096b999120cc28844d780acbc16f8308b3a54160 Mon Sep 17 00:00:00 2001 From: awson Date: Mon, 24 Jun 2024 10:34:51 +0300 Subject: [PATCH 1/3] [Clang][Sema] don't handle ArraySize/AllocType early. --- clang/lib/Se

[clang] [llvm] adding clang codegen (PR #109331)

2024-09-23 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/109331 >From 13a095ca2671cd69b120d9c394831b9ba8e20a50 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Thu, 19 Sep 2024 00:13:51 + Subject: [PATCH 1/3] Codegen builtin --- clang/include/clang/Basic/Builtins.

[clang] [llvm] adding clang codegen (PR #109331)

2024-09-23 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/109331 >From 13a095ca2671cd69b120d9c394831b9ba8e20a50 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Thu, 19 Sep 2024 00:13:51 + Subject: [PATCH 1/3] Codegen builtin --- clang/include/clang/Basic/Builtins.

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v5 (PR #108636)

2024-09-23 Thread via cfe-commits
eddyz87 wrote: @peilin-ye , Sorry for the delayed reply. > > But there should be a way to tweak existing `fail` function to stop after > > errors are reported. > > Can we `exit(1)` ? :-) Let's not hard-code the `exit(1)` in the backend. In case if LLVM is used as a library, such exit might

[clang] Clang tooling generated visibility macros for Clang (PR #109702)

2024-09-23 Thread Thomas Fransham via cfe-commits
https://github.com/fsfod converted_to_draft https://github.com/llvm/llvm-project/pull/109702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [clangd] Add CodeAction to swap operands to binary operators (PR #78999)

2024-09-23 Thread Tor Shepherd via cfe-commits
https://github.com/torshepherd updated https://github.com/llvm/llvm-project/pull/78999 >From 718e26db063980e2296f3817381befc119294b64 Mon Sep 17 00:00:00 2001 From: Tor Shepherd Date: Sun, 21 Jan 2024 17:53:31 -0500 Subject: [PATCH 1/3] [clangd] Swap binary operands --- .../clangd/refactor/tw

[clang] Clang tooling generated visibility macros for Clang (PR #109702)

2024-09-23 Thread Thomas Fransham via cfe-commits
https://github.com/fsfod edited https://github.com/llvm/llvm-project/pull/109702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Clang tooling generated visibility macros for Clang (PR #109702)

2024-09-23 Thread Thomas Fransham via cfe-commits
https://github.com/fsfod edited https://github.com/llvm/llvm-project/pull/109702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Clang tooling generated visibility macros for Clang (PR #109702)

2024-09-23 Thread Thomas Fransham via cfe-commits
https://github.com/fsfod edited https://github.com/llvm/llvm-project/pull/109702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [clangd] Add CodeAction to swap operands to binary operators (PR #78999)

2024-09-23 Thread Tor Shepherd via cfe-commits
torshepherd wrote: > Could you add a release note for this as well? > > * please bring the branch up to date with main Where do I add clangd release notes? https://github.com/llvm/llvm-project/pull/78999 ___ cfe-commits mailing list cfe-commits@l

[clang-tools-extra] [clang-tidy] support static analyzer checker configuration in `--verify-config` (PR #109523)

2024-09-23 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/109523 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [clangd] Add CodeAction to swap operands to binary operators (PR #78999)

2024-09-23 Thread Tor Shepherd via cfe-commits
https://github.com/torshepherd updated https://github.com/llvm/llvm-project/pull/78999 >From 718e26db063980e2296f3817381befc119294b64 Mon Sep 17 00:00:00 2001 From: Tor Shepherd Date: Sun, 21 Jan 2024 17:53:31 -0500 Subject: [PATCH] [clangd] Swap binary operands --- .../clangd/refactor/tweaks

[clang] [codegen][NFC] add static mark for internal usage variable and function (PR #109431)

2024-09-23 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/109431 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] eca5949 - [codegen][NFC] add static mark for internal usage variable and function (#109431)

2024-09-23 Thread via cfe-commits
Author: Congcong Cai Date: 2024-09-24T07:25:07+08:00 New Revision: eca5949031c31fe5ff5ad7a5df07bbce13379108 URL: https://github.com/llvm/llvm-project/commit/eca5949031c31fe5ff5ad7a5df07bbce13379108 DIFF: https://github.com/llvm/llvm-project/commit/eca5949031c31fe5ff5ad7a5df07bbce13379108.diff

[clang] [codegen][NFC] add static mark for internal usage variable and function (PR #109431)

2024-09-23 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/109431 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] add static for internal linkage function (PR #109436)

2024-09-23 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/109436 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] eddbd4e - [clang][NFC] add static for internal linkage function (#109436)

2024-09-23 Thread via cfe-commits
Author: Congcong Cai Date: 2024-09-24T07:24:33+08:00 New Revision: eddbd4eb081fe4028244418f89e4bf5ffb09 URL: https://github.com/llvm/llvm-project/commit/eddbd4eb081fe4028244418f89e4bf5ffb09 DIFF: https://github.com/llvm/llvm-project/commit/eddbd4eb081fe4028244418f89e4bf5ffb09.diff

[clang] [clang][NFC] add static for internal linkage function (PR #109436)

2024-09-23 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/109436 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

2024-09-23 Thread Michael Toguchi via cfe-commits
https://github.com/mdtoguchi updated https://github.com/llvm/llvm-project/pull/107493 >From 411203429a789330f044d6d7b2c0216cf21d816b Mon Sep 17 00:00:00 2001 From: Michael D Toguchi Date: Thu, 29 Aug 2024 16:39:42 -0700 Subject: [PATCH 1/4] [Driver][SYCL] Add initial SYCL offload compilation s

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

2024-09-23 Thread Michael Toguchi via cfe-commits
@@ -5116,15 +5123,39 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, if (const Arg *PF = Args.getLastArg(options::OPT_mprintf_kind_EQ)) PF->claim(); - if (Args.hasFlag(options::OPT_fsycl, options::OPT_fno_sycl, false)) { + Arg *SYCLStdArg = Args.getLa

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-09-23 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/109180 >From 3c58861f3e8c2f1333d0b36c6f5b7ba7f3d9e187 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Wed, 18 Sep 2024 12:20:19 -0700 Subject: [PATCH 1/5] add cross hlsl function --- clang/include/clang/Basic/Bu

[clang] [clang][NFC] add static for internal linkage function (PR #109436)

2024-09-23 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. I assume you noticed this through some clang-tidy or other type of tooling? It would be good to mention that in the PR/commit description. In any case, the changes LGTM. https://github.com/llvm/llvm-project/pull/109436 _

[clang] [OpenMP][Docs] Update OpenMP supported features table (PR #109726)

2024-09-23 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG Also, add to Release notes https://github.com/llvm/llvm-project/pull/109726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

2024-09-23 Thread Michael Toguchi via cfe-commits
https://github.com/mdtoguchi updated https://github.com/llvm/llvm-project/pull/107493 >From 411203429a789330f044d6d7b2c0216cf21d816b Mon Sep 17 00:00:00 2001 From: Michael D Toguchi Date: Thu, 29 Aug 2024 16:39:42 -0700 Subject: [PATCH 1/3] [Driver][SYCL] Add initial SYCL offload compilation s

[clang] [HLSL] Array by-value assignment (PR #109323)

2024-09-23 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,50 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s --enable-var-scope + +// CHECK-LABEL: define void {{.*}}arr_assign1 +// CHECK: [[Arr:%.*]] = alloca [2 x i32], align 4 +// CHECK: [[Arr2:%.*]] = allo

[clang] [OpenMP][Docs] Update OpenMP supported features table (PR #109726)

2024-09-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: David Pagan (ddpagan) Changes OpenMP features table: updated scope directive status from 'worked on' to 'done' in section OpenMP 5.1 Implementation Details. --- Full diff: https://github.com/llvm/llvm-project/pull/109726.diff 1 Files Af

[clang] [OpenMP][Docs] Update OpenMP supported features table (PR #109726)

2024-09-23 Thread David Pagan via cfe-commits
https://github.com/ddpagan created https://github.com/llvm/llvm-project/pull/109726 OpenMP features table: updated scope directive status from 'worked on' to 'done' in section OpenMP 5.1 Implementation Details. >From 1827e1189aaaf2dc3945a744e249ea77b4acc6c0 Mon Sep 17 00:00:00 2001 From: Dave

[clang] [Clang][Driver][AArch64] Add support for aarch64-amazon-linux triple (PR #109263)

2024-09-23 Thread Rama Malladi via cfe-commits
https://github.com/RamaMalladiAWS approved this pull request. Looks good @peterwaller-arm . https://github.com/llvm/llvm-project/pull/109263 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] Clang tooling generated visibility macros for Clang (PR #109702)

2024-09-23 Thread Richard Smith via cfe-commits
zygoloid wrote: @fsfod Can you update the first comment to describe the overall purpose of this change? That seems pretty central to understanding whether we want this, and if so, whether this looks like the right set of annotations. https://github.com/llvm/llvm-project/pull/109702 ___

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-23 Thread Oleksandr T. via cfe-commits
@@ -0,0 +1,32 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++20 %s + +namespace GH49093 { + class B { + public: +static int a() { return 0; } // expected-note {{member is declared here}} +decltype(a< 0 >(0)) test;// expected-error {{member 'a' used before its

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-09-23 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. https://github.com/llvm/llvm-project/pull/109180 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-09-23 Thread Doug Wyatt via cfe-commits
@@ -0,0 +1,1572 @@ +//=== SemaFunctionEffects.cpp - Sema handling of function effects -===// +// +// 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: A

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-09-23 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,57 @@ +; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s --check-prefix=CHECK farzonl wrote: typicall we do `--check-prefix` if one run is different than the other. in this case they are the same. My recommendation is to drop one of thes

[clang] [clang][bytecode] Implement arithmetic, bitwise and compound assignment operator (PR #108949)

2024-09-23 Thread Rainer Orth via cfe-commits
rorth wrote: Just for the record: in a 2-stage `sparc64-unknown-linux-gnu` build, the failures occur, too. So nothing Solaris-specific in here. Maybe endianess? https://github.com/llvm/llvm-project/pull/108949 ___ cfe-commits mailing list cfe-commit

[clang] [HLSL] Array by-value assignment (PR #109323)

2024-09-23 Thread Justin Bogner via cfe-commits
https://github.com/bogner dismissed https://github.com/llvm/llvm-project/pull/109323 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-09-23 Thread Doug Wyatt via cfe-commits
@@ -0,0 +1,1572 @@ +//=== SemaFunctionEffects.cpp - Sema handling of function effects -===// +// +// 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: A

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-09-23 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/109180 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-09-23 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/109180 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-09-23 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,31 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -disable-llvm-passes -verify -verify-ignore-unexpected + +void test_too_few_arg() +{ + return __builtin_hlsl_cross(); + // expected-error@-1 {{too few arg

[clang] [flang] [llvm] [mlir] Make MMIWP not have ownership over MMI + Make MMI Only Use an External MCContext (PR #105541)

2024-09-23 Thread Matin Raayai via cfe-commits
matinraayai wrote: @aeubanks sure I can split the PR into two parts: 1. Make MMIWP not have ownership over MMI. 2. Make MMI only use an external context. I will make a new PR for each of them and close this one once both are merged. https://github.com/llvm/llvm-project/pull/105541 _

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-09-23 Thread Doug Wyatt via cfe-commits
@@ -4940,6 +4955,78 @@ class FunctionEffectsRef { void dump(llvm::raw_ostream &OS) const; }; +/// A mutable set of FunctionEffect::Kind. +class FunctionEffectKindSet { + // For now this only needs to be a bitmap. + constexpr static size_t EndBitPos = 8; + using KindBitsT

[clang] [llvm] Delete the clang-format Visual Studio plugin code (PR #108342)

2024-09-23 Thread via cfe-commits
mydeveloperday wrote: >From what I can tell the vs support does not allow clang-format to format c# >code, whereas if I remember correctly our extension did. Would have been nice >to run the by the Clang-format team https://github.com/llvm/llvm-project/pull/108342 _

[clang] [HLSL] Array by-value assignment (PR #109323)

2024-09-23 Thread Chris B via cfe-commits
https://github.com/llvm-beanz commented: We either need to fix code generation so that we correctly handle modifications of the binary operator's lvalue, or we need to represent the binary operator in the AST as returning an rvalue. This code should either work following C++ rules, or fail to

[clang] [HLSL] Array by-value assignment (PR #109323)

2024-09-23 Thread Chris B via cfe-commits
https://github.com/llvm-beanz edited https://github.com/llvm/llvm-project/pull/109323 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Array by-value assignment (PR #109323)

2024-09-23 Thread Chris B via cfe-commits
@@ -0,0 +1,50 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s --enable-var-scope + +// CHECK-LABEL: define void {{.*}}arr_assign1 +// CHECK: [[Arr:%.*]] = alloca [2 x i32], align 4 +// CHECK: [[Arr2:%.*]] = allo

[clang] clang should have a warning to disallow re-externs (PR #109714)

2024-09-23 Thread via cfe-commits
Sirraide wrote: So yeah, in sum, I unfortunately don’t see this ever being a good idea https://github.com/llvm/llvm-project/pull/109714 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang should have a warning to disallow re-externs (PR #109714)

2024-09-23 Thread via cfe-commits
Sirraide wrote: Oh wait, I see this is a case of the declaration and definition not matching. That is indeed bad, but there is no good way of distinguishing this from a declaration that actually matches the definition. You could put that declaration in a header, include it in one file, and the

[clang] [HLSL] Array by-value assignment (PR #109323)

2024-09-23 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/109323 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang should have a warning to disallow re-externs (PR #109714)

2024-09-23 Thread via cfe-commits
Sirraide wrote: > for example, it would be helpful to warn programmers in this situation Er, why would that be helpful? This is a valid pattern imo that I have seen here and there from time to time. Is there a specific reason why this is a bad idea? https://github.com/llvm/llvm-project/pull/1

[clang] [llvm] [AMDGPU] Convert AMDGPUResourceUsageAnalysis pass from Module to MF pass (PR #102913)

2024-09-23 Thread Scott Linder via cfe-commits
@@ -1755,6 +1755,56 @@ As part of the AMDGPU MC layer, AMDGPU provides the following target specific === = +Function Resource Usage +--- + +The function resourc

[clang] [llvm] [AMDGPU] Convert AMDGPUResourceUsageAnalysis pass from Module to MF pass (PR #102913)

2024-09-23 Thread Scott Linder via cfe-commits
@@ -1755,6 +1755,56 @@ As part of the AMDGPU MC layer, AMDGPU provides the following target specific === = +Function Resource Usage +--- + +The function resourc

[clang] [llvm] [AMDGPU] Convert AMDGPUResourceUsageAnalysis pass from Module to MF pass (PR #102913)

2024-09-23 Thread Scott Linder via cfe-commits
@@ -1755,6 +1755,56 @@ As part of the AMDGPU MC layer, AMDGPU provides the following target specific === = +Function Resource Usage +--- + +The function resourc

[clang] [llvm] [AMDGPU] Convert AMDGPUResourceUsageAnalysis pass from Module to MF pass (PR #102913)

2024-09-23 Thread Scott Linder via cfe-commits
@@ -1755,6 +1755,56 @@ As part of the AMDGPU MC layer, AMDGPU provides the following target specific === = +Function Resource Usage +--- + +The function resourc

[clang] [llvm] [AMDGPU] Convert AMDGPUResourceUsageAnalysis pass from Module to MF pass (PR #102913)

2024-09-23 Thread Scott Linder via cfe-commits
@@ -1755,6 +1755,56 @@ As part of the AMDGPU MC layer, AMDGPU provides the following target specific === = +Function Resource Usage +--- + +The function resourc

[clang] [llvm] [AMDGPU] Convert AMDGPUResourceUsageAnalysis pass from Module to MF pass (PR #102913)

2024-09-23 Thread Scott Linder via cfe-commits
@@ -1755,6 +1755,56 @@ As part of the AMDGPU MC layer, AMDGPU provides the following target specific === = +Function Resource Usage +--- + +The function resourc

[clang] [llvm] [AMDGPU] Convert AMDGPUResourceUsageAnalysis pass from Module to MF pass (PR #102913)

2024-09-23 Thread Scott Linder via cfe-commits
https://github.com/slinder1 edited https://github.com/llvm/llvm-project/pull/102913 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   >