[clang-tools-extra] [llvm] Add bazel support for clangd as a library. (PR #81556)

2024-03-14 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,45 @@ +# This file is licensed under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +package(default_visibility = ["//visibility:public"]) + +license

[clang] [clang] Fix Clang language extension documentation markup for __builtin_arm_trap. (PR #85310)

2024-03-14 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann created https://github.com/llvm/llvm-project/pull/85310 None >From 06f9e13e622f75a6a192c5bbe06e2facd3c0124d Mon Sep 17 00:00:00 2001 From: Tom Honermann Date: Thu, 14 Mar 2024 13:55:32 -0700 Subject: [PATCH] [clang] Fix Clang language extension documentation mark

[clang] [llvm] [InstCombine] Canonicalize `(sitofp x)` -> `(uitofp x)` if `x >= 0` (PR #82404)

2024-03-14 Thread via cfe-commits
goldsteinn wrote: > We happen have a back-end where we do not have conversion instructions > between unsigned int and FP, so this patch complicates things. Would it make > sense to enable this canonicalization only if the target wants it? We try to keep InstCombine as target agnostic as possib

[clang] [clang] Fix Clang language extension documentation markup for __builtin_arm_trap. (PR #85310)

2024-03-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Tom Honermann (tahonermann) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/85310.diff 1 Files Affected: - (modified) clang/docs/LanguageExtensions.rst (+1-1) ``diff diff --git a/clang/docs/LanguageExtension

[clang] [clang] Fix Clang language extension documentation markup for __builtin_arm_trap. (PR #85310)

2024-03-14 Thread Tom Honermann via cfe-commits
tahonermann wrote: @TNorthover, doc builds are failing because of this. ``` Warning, treated as error: /home/runner/work/llvm-project/llvm-project/clang-build/tools/clang/docs/LanguageExtensions.rst:3447:Title underline too short. ``__builtin_arm_trap`` -- ``` https://github.co

[clang] [llvm] [InstCombine] Canonicalize `(sitofp x)` -> `(uitofp x)` if `x >= 0` (PR #82404)

2024-03-14 Thread Nikita Popov via cfe-commits
nikic wrote: I don't think we really have a strong motivation for this change beyond "having a canonical form is usually good", so if it's causing issues for some targets, then probably just not doing it is fine. But if we do want to keep it, then yeah, this would be a reasonable motivation fo

[clang-tools-extra] [llvm] Add bazel support for clangd as a library. (PR #81556)

2024-03-14 Thread via cfe-commits
https://github.com/josh11b updated https://github.com/llvm/llvm-project/pull/81556 >From e2b83f086e51d7144d8e6ac1d1850300de55f01f Mon Sep 17 00:00:00 2001 From: Josh L Date: Mon, 12 Feb 2024 22:59:21 + Subject: [PATCH 1/2] Add bazel support for clangd as a library. --- clang-tools-extra/c

[clang-tools-extra] [llvm] Add bazel support for clangd as a library. (PR #81556)

2024-03-14 Thread via cfe-commits
@@ -0,0 +1,45 @@ +# This file is licensed under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +package(default_visibility = ["//visibility:public"]) + +license

[clang-tools-extra] [llvm] Add bazel support for clangd as a library. (PR #81556)

2024-03-14 Thread via cfe-commits
@@ -0,0 +1,45 @@ +# This file is licensed under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +package(default_visibility = ["//visibility:public"]) --

[clang-tools-extra] [llvm] Add bazel support for clangd as a library. (PR #81556)

2024-03-14 Thread via cfe-commits
https://github.com/josh11b updated https://github.com/llvm/llvm-project/pull/81556 >From e2b83f086e51d7144d8e6ac1d1850300de55f01f Mon Sep 17 00:00:00 2001 From: Josh L Date: Mon, 12 Feb 2024 22:59:21 + Subject: [PATCH 1/2] Add bazel support for clangd as a library. --- clang-tools-extra/c

[clang-tools-extra] [llvm] Add bazel support for clangd as a library. (PR #81556)

2024-03-14 Thread Fangrui Song via cfe-commits
MaskRay wrote: > Ping! llvm-project email notifications are extremely high-volume and nobody can notice every change even if they are subscribed to the relevant labels... If you don't have write/triage role (https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-r

[clang] [clang][AArch64] Enable fp128 for aarch64 linux target (PR #85070)

2024-03-14 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: See also #80195 (CC @nickdesaulniers). gcc on aarch64 Linux only supports _Float128, not __float128; this seems like a bit of a compatibility hazard. https://github.com/llvm/llvm-project/pull/85070 ___ cfe-commits mailing list cf

[clang-tools-extra] [llvm] Add bazel support for clangd as a library. (PR #81556)

2024-03-14 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/81556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] Add bazel support for clangd as a library. (PR #81556)

2024-03-14 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. bazel-specific changes often have a title `[bazel] Add clangd support`. Please consider following suit. It would be nice to have a fuller support, but I understand having this cc_library first can make your downstream changes easier, so LG

[clang-tools-extra] [llvm] Add bazel support for clangd as a library. (PR #81556)

2024-03-14 Thread Fangrui Song via cfe-commits
@@ -18,7 +18,6 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_TRANSPORT_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_TRANSPORT_H -#include "Feature.h" MaskRay wrote: This change should be removed. https://github.com/llvm/llvm-project/pull/81556

[clang-tools-extra] [llvm] Add bazel support for clangd as a library. (PR #81556)

2024-03-14 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,46 @@ +# This file is licensed under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +package(features = ["layering_check"], MaskRay

[clang] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

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

[clang] [llvm] [RISC-V] Add CSR read/write builtins (PR #85091)

2024-03-14 Thread Nemanja Ivanovic via cfe-commits
nemanjai wrote: > You can just use `({ ... })` to achieve that same goal with inline assembly > (and write doesn't even need that, you can do it with a single statement). > I'm not convinced the intrinsics gain you anything. Hmm... I think there's a bit of a disconnect here between the point I

[clang-tools-extra] [llvm] Add bazel support for clangd as a library. (PR #81556)

2024-03-14 Thread Jordan Rupprecht via cfe-commits
@@ -0,0 +1,45 @@ +# This file is licensed under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +package(default_visibility = ["//visibility:public"]) + +license

[clang-tools-extra] [llvm] Add bazel support for clangd as a library. (PR #81556)

2024-03-14 Thread Jordan Rupprecht via cfe-commits
@@ -0,0 +1,45 @@ +# This file is licensed under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +package(default_visibility = ["//visibility:public"]) + +license

[clang-tools-extra] [llvm] [bazel] Add clangd as a library support (PR #81556)

2024-03-14 Thread via cfe-commits
https://github.com/josh11b edited https://github.com/llvm/llvm-project/pull/81556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [bazel] Add clangd as a library support (PR #81556)

2024-03-14 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/81556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AArch64] Enable fp128 for aarch64 linux target (PR #85070)

2024-03-14 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: Right, I'm more interested in being able to use on aarch64 the `_Float128` type as standardized by C23, than the clang specific `__float128` extension. Does this PR help get us there? https://github.com/llvm/llvm-project/pull/85070 __

[clang-tools-extra] [llvm] [bazel] Add clangd as a library support (PR #81556)

2024-03-14 Thread via cfe-commits
https://github.com/josh11b updated https://github.com/llvm/llvm-project/pull/81556 >From e2b83f086e51d7144d8e6ac1d1850300de55f01f Mon Sep 17 00:00:00 2001 From: Josh L Date: Mon, 12 Feb 2024 22:59:21 + Subject: [PATCH 1/3] Add bazel support for clangd as a library. --- clang-tools-extra/c

[clang-tools-extra] [llvm] [bazel] Add clangd as a library support (PR #81556)

2024-03-14 Thread via cfe-commits
@@ -0,0 +1,46 @@ +# This file is licensed under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +package(features = ["layering_check"], josh11b

[clang-tools-extra] [llvm] [bazel] Add clangd as a library support (PR #81556)

2024-03-14 Thread via cfe-commits
@@ -18,7 +18,6 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_TRANSPORT_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_TRANSPORT_H -#include "Feature.h" josh11b wrote: Done. https://github.com/llvm/llvm-project/pull/81556 ___ c

[clang-tools-extra] [llvm] [bazel] Add clangd as a library support (PR #81556)

2024-03-14 Thread via cfe-commits
https://github.com/josh11b edited https://github.com/llvm/llvm-project/pull/81556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-14 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. https://github.com/llvm/llvm-project/pull/84526 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][nullability] allow _Nonnull etc on nullable class types (PR #82705)

2024-03-14 Thread Tom Honermann via cfe-commits
@@ -201,6 +201,21 @@ Attribute Changes in Clang and each must be a positive integer when provided. The parameter ``x`` is required, while ``y`` and ``z`` are optional with default value of 1. +- The ``_Nullable`` and ``_Nonnull`` family of type attributes can now apply +

[clang] [clang] Fix Clang language extension documentation markup for __builtin_arm_trap. (PR #85310)

2024-03-14 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann updated https://github.com/llvm/llvm-project/pull/85310 >From 06f9e13e622f75a6a192c5bbe06e2facd3c0124d Mon Sep 17 00:00:00 2001 From: Tom Honermann Date: Thu, 14 Mar 2024 13:55:32 -0700 Subject: [PATCH 1/2] [clang] Fix Clang language extension documentation markup

[clang-tools-extra] [llvm] [bazel] Add clangd as a library support (PR #81556)

2024-03-14 Thread via cfe-commits
https://github.com/josh11b updated https://github.com/llvm/llvm-project/pull/81556 >From e2b83f086e51d7144d8e6ac1d1850300de55f01f Mon Sep 17 00:00:00 2001 From: Josh L Date: Mon, 12 Feb 2024 22:59:21 + Subject: [PATCH 1/4] Add bazel support for clangd as a library. --- clang-tools-extra/c

[clang-tools-extra] [llvm] [bazel] Add clangd as a library support (PR #81556)

2024-03-14 Thread via cfe-commits
https://github.com/josh11b commented: Thank you for the feedback! https://github.com/llvm/llvm-project/pull/81556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [bazel] Add clangd as a library support (PR #81556)

2024-03-14 Thread via cfe-commits
https://github.com/josh11b edited https://github.com/llvm/llvm-project/pull/81556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [bazel] Add clangd as a library support (PR #81556)

2024-03-14 Thread via cfe-commits
@@ -0,0 +1,45 @@ +# This file is licensed under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +package(default_visibility = ["//visibility:public"]) + +license

[clang-tools-extra] [llvm] [bazel] Add clangd as a library support (PR #81556)

2024-03-14 Thread via cfe-commits
@@ -0,0 +1,45 @@ +# This file is licensed under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +package(default_visibility = ["//visibility:public"]) + +license

[clang-tools-extra] [llvm] [bazel] Add clangd as a library support (PR #81556)

2024-03-14 Thread via cfe-commits
https://github.com/josh11b updated https://github.com/llvm/llvm-project/pull/81556 >From e2b83f086e51d7144d8e6ac1d1850300de55f01f Mon Sep 17 00:00:00 2001 From: Josh L Date: Mon, 12 Feb 2024 22:59:21 + Subject: [PATCH 1/4] Add bazel support for clangd as a library. --- clang-tools-extra/c

[clang] [llvm] [HLSL] implement the `isinf` intrinsic (PR #84927)

2024-03-14 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/84927 >From c240a73ea6edc4e7697ca3c7e4012849ec9a3583 Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Thu, 14 Mar 2024 16:54:12 -0400 Subject: [PATCH 1/3] address merge conflict --- clang/include/clang/Basic/Builtin

[clang] [clang] Fix Clang language extension documentation markup for __builtin_arm_trap. (PR #85310)

2024-03-14 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann updated https://github.com/llvm/llvm-project/pull/85310 >From 06f9e13e622f75a6a192c5bbe06e2facd3c0124d Mon Sep 17 00:00:00 2001 From: Tom Honermann Date: Thu, 14 Mar 2024 13:55:32 -0700 Subject: [PATCH 1/2] [clang] Fix Clang language extension documentation markup

[clang] [llvm] [RISC-V] Add CSR read/write builtins (PR #85091)

2024-03-14 Thread Jessica Clarke via cfe-commits
jrtc27 wrote: I guess my underlying point is that Arm's ACLE provides functions like __arm_rsr, but I'm not aware of them really being used, with inline assembly being the far more common alternative, so what's the real point of providing an interface that developers have already demonstrated

[clang] [Clang] Resolve FIXME: Use class method when receiver is reference to class (PR #85316)

2024-03-14 Thread via cfe-commits
https://github.com/AtariDreams created https://github.com/llvm/llvm-project/pull/85316 None >From d57b7d50722fbf6f304da8c8d4d902cbb3c3b14f Mon Sep 17 00:00:00 2001 From: Rose Date: Thu, 14 Mar 2024 17:34:16 -0400 Subject: [PATCH] Resolve FIXME: Use class method when receiver is reference to c

[clang] [clang][nullability] allow _Nonnull etc on nullable class types (PR #82705)

2024-03-14 Thread Tom Honermann via cfe-commits
@@ -201,6 +201,21 @@ Attribute Changes in Clang and each must be a positive integer when provided. The parameter ``x`` is required, while ``y`` and ``z`` are optional with default value of 1. +- The ``_Nullable`` and ``_Nonnull`` family of type attributes can now apply +

[clang] [Clang] Resolve FIXME: Use class method when receiver is reference to class (PR #85316)

2024-03-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: AtariDreams (AtariDreams) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/85316.diff 1 Files Affected: - (modified) clang/lib/Analysis/RetainSummaryManager.cpp (+16-2) ``diff diff --git a/clang/lib/Analysis/

[clang] [llvm] [CodeGen][AArch64][FMV] PAC the stub_helper's frame on arm64e (PR #84704)

2024-03-14 Thread Jon Roelofs via cfe-commits
jroelofs wrote: > > Can the triple checks be generalized to checking about pauth-enabled > > subtarget feature? This way everything would work for ELF platforms > > eventually. These are admittedly a bit of a hack, since we don't have a Function to look at the attributes on when we're in that

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-14 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: The primary problem with allowing flexible arrays alone in structs/unions is that you end up with a zero-size type. This leads to weird semantic issues because standard C/C++ doesn't have any provision for zero-size types: pointer arithmetic, struct layout, and initializa

[clang] [llvm] [InstCombine] Canonicalize `(sitofp x)` -> `(uitofp x)` if `x >= 0` (PR #82404)

2024-03-14 Thread via cfe-commits
goldsteinn wrote: > I don't think we really have a strong motivation for this change beyond > "having a canonical form is usually good", so if it's causing issues for some > targets, then probably just not doing it is fine. But if we do want to keep > it, then yeah, this would be a reasonable

[clang] [llvm] [SpecialCaseList] Use glob by default (PR #74809)

2024-03-14 Thread Paul T Robinson via cfe-commits
pogo59 wrote: > CC @llvm/clang-vendors Thank you for that! I don't know whether our sanitizer guys were aware of this, I've filed an internal ticket to find out. +1 to the complaint about no Release Note. https://github.com/llvm/llvm-project/pull/74809 ___

[clang] [llvm] [CodeGen][AArch64][FMV] PAC the stub_helper's frame on arm64e (PR #84704)

2024-03-14 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,58 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals --include-generated-funcs +// RUN: %clang_cc1 -triple arm64e-apple-ios -target-feature +ls64 -target-feature +fullfp

[clang] [llvm] [CodeGen][AArch64][FMV] PAC the stub_helper's frame on arm64e (PR #84704)

2024-03-14 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,58 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals --include-generated-funcs +// RUN: %clang_cc1 -triple arm64e-apple-ios -target-feature +ls64 -target-feature +fullfp

[clang] [clang][AArch64] Enable fp128 for aarch64 linux target (PR #85070)

2024-03-14 Thread via cfe-commits
lntue wrote: > Right, I'm more interested in being able to use on aarch64 the `_Float128` > type as standardized by C23, than the clang specific `__float128` extension. > Does this PR help get us there? > > EDIT: in fact, if we could skip propagating the clang-specific extension > further, an

[clang-tools-extra] [clang-tidy]bugprone-unused-return-value ignore `++` and `--` operator overloading (PR #84922)

2024-03-14 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: It should be another check in maybe performance, since this check wants to detect unused return instead of iterator. https://github.com/llvm/llvm-project/pull/84922 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] d192b64 - [HLSL] implement the `isinf` intrinsic (#84927)

2024-03-14 Thread via cfe-commits
Author: Farzon Lotfi Date: 2024-03-14T18:07:48-04:00 New Revision: d192b643701062064408dd7be0301f7a5d070c03 URL: https://github.com/llvm/llvm-project/commit/d192b643701062064408dd7be0301f7a5d070c03 DIFF: https://github.com/llvm/llvm-project/commit/d192b643701062064408dd7be0301f7a5d070c03.diff

[clang] [llvm] [HLSL] implement the `isinf` intrinsic (PR #84927)

2024-03-14 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl closed https://github.com/llvm/llvm-project/pull/84927 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix Clang language extension documentation markup for __builtin_arm_trap. (PR #85310)

2024-03-14 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/85310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV] Emit the resolver along with the default version definition. (PR #84405)

2024-03-14 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/84405 >From bde335c2b4a85ee5e7f57ff9081c38b4dd9839ca Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Thu, 7 Mar 2024 22:25:13 + Subject: [PATCH] [FMV] Emit the resolver along with the default version d

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread via cfe-commits
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/85325 ## Summary This pr fixes a crash when we attempt to instantiate a lambda with an `AnnotatedType`, refactors the code that handles transforming the function type of a lambda, and improves source fidelity for lam

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread via cfe-commits
Sirraide wrote: I’ll add a release note once I’ve figured out how long this bug has been in Clang. https://github.com/llvm/llvm-project/pull/85325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Sirraide) Changes ## Summary This pr fixes a crash when we attempt to instantiate a lambda with an `AnnotatedType`, refactors the code that handles transforming the function type of a lambda, and improves source fidelity for lambda

[clang] [FMV] Emit the resolver along with the default version definition. (PR #84405)

2024-03-14 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: The key takeaway from my conversation with @DanielKristofKiss was that it is important for Function Multi Versioning to work even when the default target attribute is omitted. It was quite a headache to get this working in clang, but the latest revision supports the desired beh

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

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

[clang] [FMV] Emit the resolver along with the default version definition. (PR #84405)

2024-03-14 Thread Jon Roelofs via cfe-commits
jroelofs wrote: Can you elaborate on that conversation a bit more? I want to make sure we cover all the corner cases. https://github.com/llvm/llvm-project/pull/84405 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] Turn 'counted_by' into a type attribute and parse it into 'CountAttributedType' (PR #78000)

2024-03-14 Thread Yeoul Na via cfe-commits
rapidsna wrote: @AaronBallman Thank you! The -fbounds-safety documentation is currently shown https://clang.llvm.org/docs/BoundsSafety.html, but yes, we're planning to add the feature in the release note once we have more functionalities in place. https://github.com/llvm/llvm-project/pull/7800

[clang] [FMV] Emit the resolver along with the default version definition. (PR #84405)

2024-03-14 Thread Daniel Kiss via cfe-commits
DanielKristofKiss wrote: I'd like to support FMV in existing codebases as lean as possible, so the default version attribute would be optional to write as not all version/toolchain will support it. smallest possible codebase change to introduce multi versioning: ```c int foo(void); + #ifdef

[clang] [FMV] Emit the resolver along with the default version definition. (PR #84405)

2024-03-14 Thread Jon Roelofs via cfe-commits
@@ -4120,6 +4127,9 @@ void CodeGenModule::emitMultiVersionFunctions() { TA->getArchitecture(), Feats); } else { const auto *TVA = CurFD->getAttr(); + if (TVA->isDefaultVersion() && + CurF

[clang] [FMV] Emit the resolver along with the default version definition. (PR #84405)

2024-03-14 Thread Jon Roelofs via cfe-commits
@@ -4347,6 +4362,19 @@ void CodeGenModule::emitCPUDispatchDefinition(GlobalDecl GD) { } } +/// Adds a declaration to the list of multi version functions if not present. +void CodeGenModule::AddDeferredMultiVersionResolverToEmit(GlobalDecl GD) { + const auto *FD = cast(GD.g

[clang-tools-extra] [clang-tidy]bugprone-unused-return-value ignore `++` and `--` operator overloading (PR #84922)

2024-03-14 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. LGTM from my side, please wait for @PiotrZSL to reconfirm approval/finish review https://github.com/llvm/llvm-project/pull/84922 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [FMV] Emit the resolver along with the default version definition. (PR #84405)

2024-03-14 Thread Jon Roelofs via cfe-commits
@@ -84,9 +84,33 @@ int hoo(void) { return fp1() + fp2(); } +// This should generate one target version but no resolver. +__attribute__((target_version("default"))) int unused_with_forward_default_decl(void); +__attribute__((target_version("mops"))) int unused_with_forward_

[clang] [FMV] Emit the resolver along with the default version definition. (PR #84405)

2024-03-14 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs edited https://github.com/llvm/llvm-project/pull/84405 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread Yuxuan Chen via cfe-commits
yuxuanchen1997 wrote: Great. Thanks! https://github.com/llvm/llvm-project/pull/85325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Better bitfield access units (PR #65742)

2024-03-14 Thread YunQiang Su via cfe-commits
wzssyqa wrote: > For MIPSr6, it is just like AARCH64, since some microarchitecture doesn't > support mis-unaligned well in hardware level, so we need an options to > disable it: kernel may need it. > > For GCC, we have `-mno-unalgined-access`. We need also add this option to > clang. https:/

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread Yuxuan Chen via cfe-commits
@@ -13830,62 +13820,40 @@ TreeTransform::TransformLambdaExpr(LambdaExpr *E) { getSema().AddTemplateParametersToLambdaCallOperator(NewCallOperator, Class, TPL); - // Transform the type of the original lambda's call o

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread Yuxuan Chen via cfe-commits
@@ -13830,62 +13820,40 @@ TreeTransform::TransformLambdaExpr(LambdaExpr *E) { getSema().AddTemplateParametersToLambdaCallOperator(NewCallOperator, Class, TPL); - // Transform the type of the original lambda's call o

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread Yuxuan Chen via cfe-commits
@@ -3140,13 +3140,35 @@ const FunctionType *ASTContext::adjustFunctionType(const FunctionType *T, return cast(Result.getTypePtr()); } +QualType ASTContext::adjustFunctionResultType(QualType FunctionType, + QualType ResultType) {

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread via cfe-commits
@@ -13830,62 +13820,40 @@ TreeTransform::TransformLambdaExpr(LambdaExpr *E) { getSema().AddTemplateParametersToLambdaCallOperator(NewCallOperator, Class, TPL); - // Transform the type of the original lambda's call o

[clang] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-14 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/84526 >From 3f515637fc87a41db1df4ea7627679c7dd75503a Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Thu, 14 Mar 2024 18:53:33 -0400 Subject: [PATCH 1/2] [DXIL] exp, any, lerp, & rcp Intrinsic Lowering This change i

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread via cfe-commits
@@ -3140,13 +3140,35 @@ const FunctionType *ASTContext::adjustFunctionType(const FunctionType *T, return cast(Result.getTypePtr()); } +QualType ASTContext::adjustFunctionResultType(QualType FunctionType, + QualType ResultType) {

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/85325 >From 907210a3ad3d829a8e49a5c976d129f8653801bf Mon Sep 17 00:00:00 2001 From: Sirraide Date: Thu, 14 Mar 2024 18:24:37 +0100 Subject: [PATCH 1/8] [Clang] Add `dump()` method for `Attr` --- clang/include/clang/

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread Yuxuan Chen via cfe-commits
@@ -3140,13 +3140,35 @@ const FunctionType *ASTContext::adjustFunctionType(const FunctionType *T, return cast(Result.getTypePtr()); } +QualType ASTContext::adjustFunctionResultType(QualType FunctionType, + QualType ResultType) {

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread via cfe-commits
@@ -3140,13 +3140,35 @@ const FunctionType *ASTContext::adjustFunctionType(const FunctionType *T, return cast(Result.getTypePtr()); } +QualType ASTContext::adjustFunctionResultType(QualType FunctionType, + QualType ResultType) {

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread via cfe-commits
@@ -3140,13 +3140,35 @@ const FunctionType *ASTContext::adjustFunctionType(const FunctionType *T, return cast(Result.getTypePtr()); } +QualType ASTContext::adjustFunctionResultType(QualType FunctionType, + QualType ResultType) {

[clang] [OpenMP][CodeGen] Improved codegen for combined loop directives (PR #72417)

2024-03-14 Thread David Pagan via cfe-commits
@@ -11311,6 +11311,10 @@ class Sema final { OpenMPDirectiveKind &Kind, OpenMPDirectiveKind &PrevMappedDirective); + /// [target] teams loop is equivalent to parallel for if associated loop + /// nest meets certain critera. + b

[clang] [OpenMP][CodeGen] Improved codegen for combined loop directives (PR #72417)

2024-03-14 Thread David Pagan via cfe-commits
@@ -1537,6 +1537,12 @@ class CodeGenModule : public CodeGenTypeCache { void printPostfixForExternalizedDecl(llvm::raw_ostream &OS, const Decl *D) const; + /// Under debug mode, print status of target teams loop transformation, + /// w

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/85325 >From 907210a3ad3d829a8e49a5c976d129f8653801bf Mon Sep 17 00:00:00 2001 From: Sirraide Date: Thu, 14 Mar 2024 18:24:37 +0100 Subject: [PATCH 1/9] [Clang] Add `dump()` method for `Attr` --- clang/include/clang/

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread via cfe-commits
@@ -3140,13 +3140,35 @@ const FunctionType *ASTContext::adjustFunctionType(const FunctionType *T, return cast(Result.getTypePtr()); } +QualType ASTContext::adjustFunctionResultType(QualType FunctionType, + QualType ResultType) {

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 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 bde7a6b791872b63456cb4e50e63046728a65196 d6a57b5a5aa123cf38ce3657b764c74c4c5a86f7 --

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/85325 >From 907210a3ad3d829a8e49a5c976d129f8653801bf Mon Sep 17 00:00:00 2001 From: Sirraide Date: Thu, 14 Mar 2024 18:24:37 +0100 Subject: [PATCH 01/10] [Clang] Add `dump()` method for `Attr` --- clang/include/clan

[clang] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-14 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/84526 >From 3f515637fc87a41db1df4ea7627679c7dd75503a Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Thu, 14 Mar 2024 18:53:33 -0400 Subject: [PATCH 1/3] [DXIL] exp, any, lerp, & rcp Intrinsic Lowering This change i

[clang] [Clang] Resolve FIXME: Use class method when receiver is reference to class (PR #85316)

2024-03-14 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/85316 >From 7a88cbf69e455434d4433e52eff9230780ede065 Mon Sep 17 00:00:00 2001 From: Rose Date: Thu, 14 Mar 2024 17:34:16 -0400 Subject: [PATCH] Resolve FIXME: Use class method when receiver is reference to class

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread via cfe-commits
@@ -3140,13 +3140,35 @@ const FunctionType *ASTContext::adjustFunctionType(const FunctionType *T, return cast(Result.getTypePtr()); } +QualType ASTContext::adjustFunctionResultType(QualType FunctionType, + QualType ResultType) {

[clang] [Clang] Resolve FIXME: Use class method when receiver is reference to class (PR #85316)

2024-03-14 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/85316 >From 10d544d35261a6ee6719ea38c22f3117ca8bf422 Mon Sep 17 00:00:00 2001 From: Rose Date: Thu, 14 Mar 2024 17:34:16 -0400 Subject: [PATCH] Resolve FIXME: Use class method when receiver is reference to class

[clang] [Clang] Resolve FIXME: Use class method when receiver is reference to class (PR #85316)

2024-03-14 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/85316 >From ea3a9ee76249bd1216bc6aa16dcec6008f12a19b Mon Sep 17 00:00:00 2001 From: Rose Date: Thu, 14 Mar 2024 17:34:16 -0400 Subject: [PATCH] Resolve FIXME: Use class method when receiver is reference to class

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread via cfe-commits
@@ -3140,13 +3140,35 @@ const FunctionType *ASTContext::adjustFunctionType(const FunctionType *T, return cast(Result.getTypePtr()); } +QualType ASTContext::adjustFunctionResultType(QualType FunctionType, + QualType ResultType) {

[clang] [Clang] Resolve FIXME: Use class method when receiver is reference to class (PR #85316)

2024-03-14 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/85316 >From 474d15b0454ecfef5ce4802b2df071daa136122c Mon Sep 17 00:00:00 2001 From: Rose Date: Thu, 14 Mar 2024 17:34:16 -0400 Subject: [PATCH] Resolve FIXME: Use class method when receiver is reference to class

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread via cfe-commits
@@ -3140,13 +3140,35 @@ const FunctionType *ASTContext::adjustFunctionType(const FunctionType *T, return cast(Result.getTypePtr()); } +QualType ASTContext::adjustFunctionResultType(QualType FunctionType, + QualType ResultType) {

[clang] [HLSL] Add diagnostic for enabling 16 bit types (PR #84537)

2024-03-14 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 closed https://github.com/llvm/llvm-project/pull/84537 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-14 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 created https://github.com/llvm/llvm-project/pull/85340 Previously, the clang compiler with the dxc driver would accept the -enable-16bit-types flag without checking to see if the required conditions are met for proper processing of the flag. Specifically, -enable-

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Joshua Batista (bob80905) Changes Previously, the clang compiler with the dxc driver would accept the -enable-16bit-types flag without checking to see if the required conditions are met for proper process

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread Doug Wyatt via cfe-commits
@@ -3140,13 +3140,35 @@ const FunctionType *ASTContext::adjustFunctionType(const FunctionType *T, return cast(Result.getTypePtr()); } +QualType ASTContext::adjustFunctionResultType(QualType FunctionType, + QualType ResultType) {

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos edited https://github.com/llvm/llvm-project/pull/85325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-14 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/85340 >From 3cdcfa4e63550b9677c8ffe2f33eab85899b2c45 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Thu, 14 Mar 2024 17:04:12 -0700 Subject: [PATCH 1/2] add test --- .../clang/Basic/DiagnosticDriverKinds.td

[clang] de1a97d - [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (#84526)

2024-03-14 Thread via cfe-commits
Author: Farzon Lotfi Date: 2024-03-14T20:25:57-04:00 New Revision: de1a97db3948608822a6d099cc3460690132e1cb URL: https://github.com/llvm/llvm-project/commit/de1a97db3948608822a6d099cc3460690132e1cb DIFF: https://github.com/llvm/llvm-project/commit/de1a97db3948608822a6d099cc3460690132e1cb.diff

<    1   2   3   4   5   >