[clang-tools-extra] [clang-tidy] Add `std::span` to default `bugprone-dangling-handle.HandleClasses` (PR #107711)

2024-09-20 Thread via cfe-commits
github-actions[bot] wrote: @oracle-9 Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a build

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

2024-09-20 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/3] add cross hlsl function --- clang/include/clang/Basic/Bu

[clang] [C++20][Modules] Restore inliness of constexpr/consteval functions defined in-class (PR #109470)

2024-09-20 Thread via cfe-commits
https://github.com/tomasz-kaminski-sonarsource created https://github.com/llvm/llvm-project/pull/109470 This correct issue, when the functions declared as `constexpr` are `consteval`, are not considered to be inline (`isInlined()` is false) when defined inside the class attached to the named m

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

2024-09-20 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/109331 >From 4b724e5ce43ba3a6711c97209eb1f07c18ea9a7a Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Thu, 19 Sep 2024 00:13:51 + Subject: [PATCH] adding clang codegen --- clang/include/clang/Basic/Builtins

[clang] [llvm] riscv: Support -mstack-protector-guard=tls (PR #108942)

2024-09-20 Thread Alexander Richardson via cfe-commits
@@ -3644,13 +3645,28 @@ static void RenderSSPOptions(const Driver &D, const ToolChain &TC, << A->getOption().getName() << Value << "sysreg global"; return; } +if (EffectiveTriple.isRISCV()) { + if (Value != "tls" && Value != "global") { ---

[clang] [llvm] [DirectX] Remove trivially dead functions at linkage finalize (PR #106146)

2024-09-20 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,80 @@ +; RUN: opt -S -dxil-finalize-linkage -mtriple=dxil-unknown-shadermodel6.5-compute %s | FileCheck %s +; RUN: llc %s --filetype=asm -o - | FileCheck %s + +target triple = "dxilv1.5-pc-shadermodel6.5-compute" + +; Confirm that DXILFinalizeLinkage will remove functi

[clang] [llvm] [DirectX] Remove trivially dead functions at linkage finalize (PR #106146)

2024-09-20 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,80 @@ +; RUN: opt -S -dxil-finalize-linkage -mtriple=dxil-unknown-shadermodel6.5-compute %s | FileCheck %s +; RUN: llc %s --filetype=asm -o - | FileCheck %s + +target triple = "dxilv1.5-pc-shadermodel6.5-compute" + +; Confirm that DXILFinalizeLinkage will remove functi

[clang] [llvm] [DirectX] Remove trivially dead functions at linkage finalize (PR #106146)

2024-09-20 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,80 @@ +; RUN: opt -S -dxil-finalize-linkage -mtriple=dxil-unknown-shadermodel6.5-compute %s | FileCheck %s +; RUN: llc %s --filetype=asm -o - | FileCheck %s + +target triple = "dxilv1.5-pc-shadermodel6.5-compute" + +; Confirm that DXILFinalizeLinkage will remove functi

[clang] [llvm] [DirectX] Remove trivially dead functions at linkage finalize (PR #106146)

2024-09-20 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,80 @@ +; RUN: opt -S -dxil-finalize-linkage -mtriple=dxil-unknown-shadermodel6.5-compute %s | FileCheck %s +; RUN: llc %s --filetype=asm -o - | FileCheck %s + +target triple = "dxilv1.5-pc-shadermodel6.5-compute" + +; Confirm that DXILFinalizeLinkage will remove functi

[clang] [llvm] [DirectX] Remove trivially dead functions at linkage finalize (PR #106146)

2024-09-20 Thread Helena Kotas via cfe-commits
@@ -19,20 +19,20 @@ using namespace llvm; static bool finalizeLinkage(Module &M) { - SmallPtrSet EntriesAndExports; + SmallPtrSet Funcs; // Find all entry points and export functions for (Function &EF : M.functions()) { -if (!EF.hasFnAttribute("hlsl.shader") && !

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

2024-09-20 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/2] add cross hlsl function --- clang/include/clang/Basic/Bu

[clang] [Driver][Sparc] Default to -mcpu=v9 for 32-bit Linux/sparc64 (PR #109278)

2024-09-20 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/109278 ___ 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-20 Thread Joshua Batista via cfe-commits
@@ -1704,6 +1704,20 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { return true; break; } + case Builtin::BI__builtin_hlsl_cross: { +if (SemaRef.checkArgCount(TheCall, 2)) + return true; +if (CheckVectorElementCallA

[clang] [llvm] [CGData][ThinLTO] Global Outlining with Two-CodeGen Rounds (PR #90933)

2024-09-20 Thread Kyungwoo Lee via cfe-commits
kyulee-com wrote: Could someone please take another look? Thanks! https://github.com/llvm/llvm-project/pull/90933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Vector Usual Arithmetic Conversions (PR #108659)

2024-09-20 Thread Chris B via cfe-commits
https://github.com/llvm-beanz updated https://github.com/llvm/llvm-project/pull/108659 >From 9a3660e32da5e3829d2167ae7d160e4f973a9e33 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Fri, 30 Aug 2024 18:40:43 -0500 Subject: [PATCH 1/2] [HLSL] Vector Usual Arithmetic Conversions HLSL has a d

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

2024-09-20 Thread Michael Toguchi via cfe-commits
@@ -0,0 +1,77 @@ +/// +/// Perform several driver tests for SYCL offloading for JIT +/// + +/// Check the phases graph with -fsycl. Use of -fsycl enables offload +// RUN: %clang -ccc-print-phases --target=x86_64-unknown-linux-gnu \ +// RUN: -fsycl %s 2>&1 \ +// RUN: | FileCheck

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

2024-09-20 Thread Michael Toguchi via cfe-commits
@@ -0,0 +1,82 @@ +//===--- SYCL.h - SYCL ToolChain Implementations *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

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

2024-09-20 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] [clang][NFC] add static for internal linkage function and extract common function to header file (PR #109436)

2024-09-20 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/109436 >From 011a64ce5d228bc8945f719f37350a9c6663e283 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 21 Sep 2024 07:06:06 +0800 Subject: [PATCH] add static --- clang/lib/Sema/SemaDecl.cpp | 2 +- clang/l

[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #109490)

2024-09-20 Thread Augusto Noronha via cfe-commits
https://github.com/augusto2112 created https://github.com/llvm/llvm-project/pull/109490 The `debug_transparent` attribute is intended as a hint for debuggers that this function itself is not interesting, but it calls a function that might be. So, when stepping in arrives at a function with th

[clang] [C++20][Modules] Restore inliness of constexpr/consteval functions defined in-class (PR #109470)

2024-09-20 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: The link you gave for the regression is not a llvm commit, is that the correct commit you meant to point to? https://github.com/llvm/llvm-project/pull/109470 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #109490)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Augusto Noronha (augusto2112) Changes The `debug_transparent` attribute is intended as a hint for debuggers that this function itself is not interesting, but it calls a function that might be. So, when stepping in arrives at a fu

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-09-20 Thread Pavel Yaskevich via cfe-commits
@@ -6037,13 +6038,24 @@ class AttributedType : public Type, public llvm::FoldingSetNode { private: friend class ASTContext; // ASTContext creates these + const Attr *Attribute; + QualType ModifiedType; QualType EquivalentType; AttributedType(QualType canon, attr

[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #109490)

2024-09-20 Thread Augusto Noronha via cfe-commits
augusto2112 wrote: @dwblaikie @AaronBallman this is the "debug_transparent" patch that I opened last year but didn't get around to finish implementing (https://reviews.llvm.org/D146595). The current version addresses the comments left in the phabricator review: - Changed the name from debug_tr

[clang-tools-extra] [clang-move] Avoid repeated hash lookups (NFC) (PR #109374)

2024-09-20 Thread Kazu Hirata via cfe-commits
@@ -76,9 +76,8 @@ HelperDeclRefGraph::getReachableNodes(const Decl *Root) const { llvm::DenseSet ConnectedNodes; std::function VisitNode = [&](const CallGraphNode *Node) { -if (ConnectedNodes.count(Node)) +if (!ConnectedNodes.insert(Node).second)

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

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

[clang-tools-extra] [clang-tidy][bugprone-posix-return] support integer literals as LHS (PR #109302)

2024-09-20 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/109302 >From cc2c798193722b3a537c76e74981ff767d064efa Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 19 Sep 2024 23:46:16 +0800 Subject: [PATCH 1/4] [clang-tidy][bugprone-posix-return] support integer lite

[clang] [Sema] Declare GlobalMethodPool with using (NFC) (PR #109437)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes GlobalMethodPool is a wrapper around DenseMap that does not add anything except: using Lists = std::pair; This patch removes the wrapper and switches to an alias with

[clang] [Sema] Declare GlobalMethodPool with using (NFC) (PR #109437)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Kazu Hirata (kazutakahirata) Changes GlobalMethodPool is a wrapper around DenseMap that does not add anything except: using Lists = std::pair; This patch removes the wrapper and switches to an ali

[clang] [Clang][NFC] Remove incorrect SYCL tests (PR #109182)

2024-09-20 Thread via cfe-commits
elizabethandrews wrote: > > > Ah, I remember now why the SYCL flag / mode was abused here (the default > > > AS Map for SPIR-V is problematic in this case); I believe that using the > > > `spirv64-amd-amdhsa` triple instead of `spirv64-unknown-unknown` will > > > work, and allow for the remova

[clang] [TableGen] Avoid repeated hash lookups (NFC) (PR #109372)

2024-09-20 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/109372 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TableGen] Avoid repeated hash lookups (NFC) (PR #109372)

2024-09-20 Thread Kazu Hirata via cfe-commits
@@ -896,9 +896,8 @@ static void OCL2Qual(Sema &S, const OpenCLTypeStruct &Ty, if (ImageTypesMap.contains(T->getValueAsString("Name"))) continue; // Check we have not seen this Type -if (TypesSeen.contains(T->getValueAsString("Name"))) +if (!TypesSeen.try_e

[clang] 5b7b52f - [TableGen] Avoid repeated hash lookups (NFC) (#109372)

2024-09-20 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-09-20T09:03:25-07:00 New Revision: 5b7b52f9e9ac783d645f6cfc53a6822be2c40067 URL: https://github.com/llvm/llvm-project/commit/5b7b52f9e9ac783d645f6cfc53a6822be2c40067 DIFF: https://github.com/llvm/llvm-project/commit/5b7b52f9e9ac783d645f6cfc53a6822be2c40067.diff L

[clang] Reapply "[Clang][Sema] Use the correct lookup context when building overloaded 'operator->' in the current instantiation (#104458)" (PR #109422)

2024-09-20 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: > Does this need a release note? I don't think so, since this fixes a bug introduced in the same release. > Also, can you point out the 'diff' from the previous commit? The condition of [the assert in `SemaExprCXX.cpp`](https://github.com/llvm/llvm-project/pull/109422/files

[clang] [clang][CodeGen] Check initializer of zero-size fields for nullptr (PR #109271)

2024-09-20 Thread Michael Buch via cfe-commits
@@ -738,7 +738,7 @@ bool ConstStructBuilder::Build(const InitListExpr *ILE, bool AllowOverwrite) { // Zero-sized fields are not emitted, but their initializers may still // prevent emission of this struct as a constant. if (isEmptyFieldForLayout(CGM.getContext(), F

[clang] [clang][CodeGen] Check initializer of zero-size fields for nullptr (PR #109271)

2024-09-20 Thread Aaron Ballman via cfe-commits
@@ -738,7 +738,7 @@ bool ConstStructBuilder::Build(const InitListExpr *ILE, bool AllowOverwrite) { // Zero-sized fields are not emitted, but their initializers may still // prevent emission of this struct as a constant. if (isEmptyFieldForLayout(CGM.getContext(), F

[clang] [llvm] Update llvm::Registry to work for LLVM shared library builds on windows (PR #109024)

2024-09-20 Thread Thomas Fransham via cfe-commits
https://github.com/fsfod updated https://github.com/llvm/llvm-project/pull/109024 >From fcb6837e5c6ff48bf261bae9d3cedda55da89a7e Mon Sep 17 00:00:00 2001 From: Thomas Fransham Date: Wed, 28 Aug 2024 16:08:52 +0100 Subject: [PATCH 1/5] Update llvm::Registry to work for LLVM shared library build

[clang] [Clang] Add explicit visibility symbol macros (PR #108276)

2024-09-20 Thread Thomas Fransham via cfe-commits
https://github.com/fsfod updated https://github.com/llvm/llvm-project/pull/108276 >From 35af05f255db5aef2841212ff35f04eb5e967d93 Mon Sep 17 00:00:00 2001 From: Thomas Fransham Date: Tue, 10 Sep 2024 02:22:18 +0100 Subject: [PATCH 1/4] [Clang] Add explicit visibility symbol macros and update CM

[clang] Reland "[Driver] Add toolchain for X86_64 UEFI target" (PR #109364)

2024-09-20 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-libc-amdgpu-runtime` running on `omp-vega20-1` while building `clang` at step 10 "Add check check-offload". Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/5871 Here is the r

[clang] [Driver][Sparc] Default to -mcpu=v9 for 32-bit Linux/sparc64 (PR #109278)

2024-09-20 Thread Rainer Orth via cfe-commits
rorth wrote: Just to be certain: the revised version of the patch is ok to commit? https://github.com/llvm/llvm-project/pull/109278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add `std::span` to default `bugprone-dangling-handle.HandleClasses` (PR #107711)

2024-09-20 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/107711 >From 8528404715b4ca6dec7e251548870aba0c64bb04 Mon Sep 17 00:00:00 2001 From: Afonso Faria Date: Sat, 7 Sep 2024 18:03:48 +0100 Subject: [PATCH 1/3] Add std::span to default bugprone-dangling-handle.HandleClas

[clang] [OpenACC] Add 'collapse' clause AST/basic Sema implementation (PR #109461)

2024-09-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/109461 The 'collapse' clause on a 'loop' construct is used to specify how many nested loops are associated with the 'loop' construct. It takes an optional 'force' tag, and an integer constant expression as argumen

[clang] [OpenACC] Add 'collapse' clause AST/basic Sema implementation (PR #109461)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Erich Keane (erichkeane) Changes The 'collapse' clause on a 'loop' construct is used to specify how many nested loops are associated with the 'loop' construct. It takes an optional 'force' tag, and an integer constant expression

[clang] [OpenACC] Add 'collapse' clause AST/basic Sema implementation (PR #109461)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Erich Keane (erichkeane) Changes The 'collapse' clause on a 'loop' construct is used to specify how many nested loops are associated with the 'loop' construct. It takes an optional 'force' tag, and an integer constant expression as argum

[clang] [OpenACC] Add 'collapse' clause AST/basic Sema implementation (PR #109461)

2024-09-20 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 2162a18fb206736c41c9182737b72ae15d5e6bf0 f25688a5f6242e4e16cad377fa281df665d0e38b --e

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-20 Thread Richard Smith via cfe-commits
@@ -108,22 +108,16 @@ constexpr auto p2 = "test2"; constexpr bool b1 = foo(p1) == foo(p1); static_assert(b1); -constexpr bool b2 = foo(p1) == foo(p2); // ref-error {{must be initialized by a constant expression}} \ -// ref-note {{compar

[clang] [OpenACC] Add 'collapse' clause AST/basic Sema implementation (PR #109461)

2024-09-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/109461 >From f25688a5f6242e4e16cad377fa281df665d0e38b Mon Sep 17 00:00:00 2001 From: erichkeane Date: Fri, 20 Sep 2024 09:38:32 -0700 Subject: [PATCH 1/2] [OpenACC] Add 'collapse' clause AST/basic Sema implementati

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-20 Thread Richard Smith via cfe-commits
@@ -2142,11 +2150,91 @@ static const ValueDecl *GetLValueBaseDecl(const LValue &LVal) { return LVal.Base.dyn_cast(); } -static bool IsLiteralLValue(const LValue &Value) { - if (Value.getLValueCallIndex()) +// Information about an LValueBase that is some kind of string. +st

[clang] [Driver][Sparc] Default to -mcpu=v9 for 32-bit Linux/sparc64 (PR #109278)

2024-09-20 Thread John Paul Adrian Glaubitz via cfe-commits
glaubitz wrote: > Just to be certain: the revised version of the patch is ok to commit? I think it would be good to get an ACK from at least one of the SPARC Leon maintainers. CC @andreas-gaisler https://github.com/llvm/llvm-project/pull/109278 ___

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-20 Thread Richard Smith via cfe-commits
zygoloid wrote: > I worry about string literals in vague-linkage entities, because the > "version" of the string literal which is referred to from an > inline-function/variable at runtime may not actually be the same version of > the string literal seen in the current compilation -- at runtime

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

2024-09-20 Thread Farzon Lotfi via cfe-commits
@@ -18639,6 +18639,21 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID, IsUnsigned ? Intrinsic::dx_uclamp : Intrinsic::dx_clamp, ArrayRef{OpX, OpMin, OpMax}, nullptr, "dx.clamp"); } + case Builtin::BI__builtin_hlsl_cross: { +Value *Op0 =

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-20 Thread Richard Smith via cfe-commits
https://github.com/zygoloid updated https://github.com/llvm/llvm-project/pull/109208 >From 81193568c17a89f6cf42f43a82fb1fbf0f90184d Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 18 Sep 2024 21:59:56 + Subject: [PATCH 01/15] Implement current CWG direction for string literal compa

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

2024-09-20 Thread Farzon Lotfi via cfe-commits
@@ -44,6 +44,7 @@ def int_dx_cast_handle : Intrinsic<[llvm_any_ty], [llvm_any_ty]>; def int_dx_all : DefaultAttrsIntrinsic<[llvm_i1_ty], [llvm_any_ty], [IntrNoMem]>; def int_dx_any : DefaultAttrsIntrinsic<[llvm_i1_ty], [llvm_any_ty], [IntrNoMem]>; def int_dx_clamp : DefaultA

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-09-20 Thread Pavel Yaskevich via cfe-commits
@@ -7147,6 +7147,60 @@ static bool HandleWebAssemblyFuncrefAttr(TypeProcessingState &State, return false; } +static void HandleSwiftAttr(TypeProcessingState &State, TypeAttrLocation TAL, +QualType &QT, ParsedAttr &PAttr) { + if (TAL == TAL_DeclN

[clang] [-Wunsafe-buffer-usage] Fix a bug and suppress libc warnings for C files (PR #109496)

2024-09-20 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 created https://github.com/llvm/llvm-project/pull/109496 - Fix a bug in UnsafeBufferUsage.cpp related to casting to PointerType (report by @hnrklssn [here](https://github.com/llvm/llvm-project/pull/101583#discussion_r1767705992)) - Suppress -Wunsafe-buffer-usage

[clang] [-Wunsafe-buffer-usage] Fix a bug and suppress libc warnings for C files (PR #109496)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ziqing Luo (ziqingluo-90) Changes - Fix a bug in UnsafeBufferUsage.cpp related to casting to PointerType (report by @hnrklssn [here](https://github.com/llvm/llvm-project/pull/101583#discussion_r1767705992)) - Suppress -Wunsafe-buffer-usag

[clang] [-Wunsafe-buffer-usage] Fix a bug and suppress libc warnings for C files (PR #109496)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: Ziqing Luo (ziqingluo-90) Changes - Fix a bug in UnsafeBufferUsage.cpp related to casting to PointerType (report by @hnrklssn [here](https://github.com/llvm/llvm-project/pull/101583#discussion_r1767705992)) - Suppress -Wunsafe-bu

[clang] Add support for aligning BlockComments in declarations (PR #109497)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: None (JessehMSFT) Changes There are two primary scenarios where our team uses block comments in function declarations. 1. To comment out unused parameters 2. To provide additional context when passing an unnamed parameter Clang-fo

[clang] Add support for aligning BlockComments in declarations (PR #109497)

2024-09-20 Thread via cfe-commits
https://github.com/JessehMSFT ready_for_review https://github.com/llvm/llvm-project/pull/109497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Loads] Check context instruction for context-sensitive derefability (PR #109277)

2024-09-20 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Yes, that makes sense, thanks. https://github.com/llvm/llvm-project/pull/109277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add support for aligning BlockComments in declarations (PR #109497)

2024-09-20 Thread via cfe-commits
https://github.com/JessehMSFT created https://github.com/llvm/llvm-project/pull/109497 There are two primary scenarios where our team uses block comments in function declarations. 1. To comment out unused parameters 2. To provide additional context when passing an unnamed parameter Clang-form

[clang] Add support for aligning BlockComments in declarations (PR #109497)

2024-09-20 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/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-09-20 Thread Pavel Yaskevich via cfe-commits
@@ -6037,13 +6038,24 @@ class AttributedType : public Type, public llvm::FoldingSetNode { private: friend class ASTContext; // ASTContext creates these + const Attr *Attribute; + QualType ModifiedType; QualType EquivalentType; AttributedType(QualType canon, attr

[clang] Add support for aligning BlockComments in declarations (PR #109497)

2024-09-20 Thread via cfe-commits
https://github.com/JessehMSFT updated https://github.com/llvm/llvm-project/pull/109497 >From 38333491868dfad9c84719d9dd8fd872a2aa7584 Mon Sep 17 00:00:00 2001 From: Jesse Harvey Date: Fri, 20 Sep 2024 16:40:35 -0700 Subject: [PATCH] Add support for aligning BlockComments in declarations --- c

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-09-20 Thread Pavel Yaskevich via cfe-commits
https://github.com/xedin updated https://github.com/llvm/llvm-project/pull/108631 >From bd447428181ec9ab38679625fd3b3b422eb18446 Mon Sep 17 00:00:00 2001 From: Pavel Yaskevich Date: Wed, 20 Dec 2023 14:04:22 -0800 Subject: [PATCH] [clang/AST] Make it possible to use SwiftAttr in type context S

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-09-20 Thread Pavel Yaskevich via cfe-commits
@@ -8732,6 +8786,11 @@ static void processTypeAttrs(TypeProcessingState &state, QualType &type, case ParsedAttr::AT_HLSLParamModifier: { HandleHLSLParamModifierAttr(state, type, attr, state.getSema()); attr.setUsedAsTypeAttr(); + break; +

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-09-20 Thread Pavel Yaskevich via cfe-commits
@@ -5125,24 +5127,54 @@ QualType ASTContext::getUnresolvedUsingType( QualType ASTContext::getAttributedType(attr::Kind attrKind, QualType modifiedType, - QualType equivalentType) const { +

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-09-20 Thread Pavel Yaskevich via cfe-commits
@@ -7163,7 +7217,8 @@ static QualType rebuildAttributedTypeWithoutNullability(ASTContext &Ctx, Ctx, Attributed->getModifiedType()); assert(Modified.getTypePtr() != Attributed->getModifiedType().getTypePtr()); return Ctx.getAttributedType(Attributed->getAttrKind(), Mo

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

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

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-09-20 Thread Pavel Yaskevich via cfe-commits
xedin wrote: I addressed most of the comments. A few points to add: - I'm not sure what to make of the comment regarding templates if somebody could point me to the right direction I can make appropriate changes - I'd need some guidance regarding release note - I'd prefer to keep AttributedType

[clang] [-Wunsafe-buffer-usage] Fix a bug and suppress libc warnings for C files (PR #109496)

2024-09-20 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 updated https://github.com/llvm/llvm-project/pull/109496 >From e7f7f82b25eaae86623ac8f47731892b3b629d7d Mon Sep 17 00:00:00 2001 From: Ziqing Luo Date: Fri, 20 Sep 2024 16:27:09 -0700 Subject: [PATCH] [-Wunsafe-buffer-usage] Fix a bug and suppress libc warnings

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

2024-09-20 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/109331 >From 75742cb797f5ba34c6746941c9197de55b685a36 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Thu, 19 Sep 2024 00:13:51 + Subject: [PATCH] adding clang codegen --- clang/include/clang/Basic/Builtins

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

2024-09-20 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/109331 >From 7493fc50beae8223e6ba83a1b2fcc8e14d31b352 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Thu, 19 Sep 2024 00:13:51 + Subject: [PATCH] adding clang codegen --- clang/include/clang/Basic/Builtins

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

2024-09-20 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/109331 >From 506204b2514af0a0cae8cc2a42d0c04b137c9105 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Thu, 19 Sep 2024 00:13:51 + Subject: [PATCH] adding clang codegen --- clang/include/clang/Basic/Builtins

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

2024-09-20 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/109331 >From 3331a54b0ff5f257494e501e5d0533f657987162 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Thu, 19 Sep 2024 00:13:51 + Subject: [PATCH] adding clang codegen --- clang/include/clang/Basic/Builtins

[clang] [-Wunsafe-buffer-usage] Fix a bug and suppress libc warnings for C files (PR #109496)

2024-09-20 Thread Henrik G. Olsson via cfe-commits
https://github.com/hnrklssn edited https://github.com/llvm/llvm-project/pull/109496 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Fix a bug and suppress libc warnings for C files (PR #109496)

2024-09-20 Thread Henrik G. Olsson via cfe-commits
@@ -789,7 +791,7 @@ AST_MATCHER_P(CallExpr, hasUnsafePrintfStringArg, if (!FristParmTy->isPointerType()) return false; // possibly some user-defined printf function - QualType FirstPteTy = (cast(FristParmTy))->getPointeeType(); + QualType FirstPteTy = FristParmTy->getA

[clang] [-Wunsafe-buffer-usage] Fix a bug and suppress libc warnings for C files (PR #109496)

2024-09-20 Thread Henrik G. Olsson via cfe-commits
https://github.com/hnrklssn commented: You may want to add some tests with annotated pointers to verify that you treat them correctly, e.g. `_Nullable` https://github.com/llvm/llvm-project/pull/109496 ___ cfe-commits mailing list cfe-commits@lists.ll

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

2024-09-20 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/109331 >From 6e2330d95c0833e36cbf0c8532e11873cadfe898 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Thu, 19 Sep 2024 00:13:51 + Subject: [PATCH] adding clang codegen --- clang/include/clang/Basic/Builtins

[clang] [clang] Use {} instead of std::nullopt to initialize empty ArrayRef (PR #109399)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-coroutines @llvm/pr-subscribers-clang-static-analyzer-1 @llvm/pr-subscribers-backend-webassembly Author: Jay Foad (jayfoad) Changes Follow up to #109133. --- Patch is 133.83 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llv

[clang] [clang] Use {} instead of std::nullopt to initialize empty ArrayRef (PR #109399)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jay Foad (jayfoad) Changes Follow up to #109133. --- Patch is 133.83 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/109399.diff 115 Files Affected: - (modified) clang/include/clang/AST/Comm

[clang] [clang] Use {} instead of std::nullopt to initialize empty ArrayRef (PR #109399)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-sparc Author: Jay Foad (jayfoad) Changes Follow up to #109133. --- Patch is 133.83 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/109399.diff 115 Files Affected: - (modified) clang/include/clang/

[clang-tools-extra] [clang-move] Avoid repeated hash lookups (NFC) (PR #109374)

2024-09-20 Thread Nikita Popov via cfe-commits
@@ -76,9 +76,8 @@ HelperDeclRefGraph::getReachableNodes(const Decl *Root) const { llvm::DenseSet ConnectedNodes; std::function VisitNode = [&](const CallGraphNode *Node) { -if (ConnectedNodes.count(Node)) +if (!ConnectedNodes.insert(Node).second)

[clang-tools-extra] [clang-tidy] Avoid repeated hash lookups (NFC) (PR #109373)

2024-09-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/109373 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-move] Avoid repeated hash lookups (NFC) (PR #109374)

2024-09-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/109374 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Fix incorrect check prefix in riscv32-toolchain.c and riscv64-toolchain.c. NFC. (PR #109390)

2024-09-20 Thread Jim Lin via cfe-commits
https://github.com/tclin914 created https://github.com/llvm/llvm-project/pull/109390 None >From 6de7650ee341546d5f67c4918bce4f6901452818 Mon Sep 17 00:00:00 2001 From: Jim Lin Date: Fri, 20 Sep 2024 16:39:05 +0800 Subject: [PATCH] [RISCV] Fix incorrect check prefix in riscv32-toolchain.c and

[clang] [RISCV] Fix incorrect check prefix in riscv32-toolchain.c and riscv64-toolchain.c. NFC. (PR #109390)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jim Lin (tclin914) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/109390.diff 2 Files Affected: - (modified) clang/test/Driver/riscv32-toolchain.c (+1-1) - (modified) clang/test/Driver/riscv64-toolchain.c (+1-1) `

[clang] [lldb] [llvm] [mlir] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Nikita Popov (nikic) Changes This fixes all the places that hit the new assertion added in https://github.com/llvm/llvm-project/pull/106524 in tests. That is, cases where the value passed to the APInt constructor is not an N-bit

[clang] [lldb] [llvm] [mlir] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mlir-llvm Author: Nikita Popov (nikic) Changes This fixes all the places that hit the new assertion added in https://github.com/llvm/llvm-project/pull/106524 in tests. That is, cases where the value passed to the APInt constructor is not an N-bit signe

[clang] [lldb] [llvm] [mlir] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Nikita Popov (nikic) Changes This fixes all the places that hit the new assertion added in https://github.com/llvm/llvm-project/pull/106524 in tests. That is, cases where the value passed to the APInt constructor is not an N-bit s

[clang] [lldb] [llvm] [mlir] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)

2024-09-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/80309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [mlir] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)

2024-09-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/80309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [mlir] [APInt] Fix APInt constructions where value does not fix bitwidth (NFCI) (PR #80309)

2024-09-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/80309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [mlir] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)

2024-09-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic ready_for_review https://github.com/llvm/llvm-project/pull/80309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [mlir] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mlir @llvm/pr-subscribers-llvm-selectiondag @llvm/pr-subscribers-backend-arm @llvm/pr-subscribers-backend-x86 Author: Nikita Popov (nikic) Changes This fixes all the places that hit the new assertion added in https://github.com/llvm/llvm-project/pull/10

[clang] [lldb] [llvm] [mlir] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nikita Popov (nikic) Changes This fixes all the places that hit the new assertion added in https://github.com/llvm/llvm-project/pull/106524 in tests. That is, cases where the value passed to the APInt constructor is not an N-bit signed/un

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

2024-09-20 Thread Thomas Köppe via cfe-commits
tkoeppe wrote: @EugeneZelenko Could you please have another look? https://github.com/llvm/llvm-project/pull/109169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-move] Avoid repeated hash lookups (NFC) (PR #109374)

2024-09-20 Thread Haojian Wu via cfe-commits
https://github.com/hokein approved this pull request. https://github.com/llvm/llvm-project/pull/109374 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Correctly annotate pointer/reference in `if` statement (PR #109370)

2024-09-20 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. https://github.com/llvm/llvm-project/pull/109370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CVP] Infer range return attribute (PR #99620)

2024-09-20 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw approved this pull request. LGTM. Thank you! https://github.com/llvm/llvm-project/pull/99620 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   >