[clang] [clang-tools-extra] [Clang] Add __type_list_dedup builtin to deduplicate types in template arguments (PR #106730)

2024-09-09 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 commented: We also need documentation explaining the new builtin. Can you also add ReleaseNotes. https://github.com/llvm/llvm-project/pull/106730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [clang-tools-extra] [Clang] Add __type_list_dedup builtin to deduplicate types in template arguments (PR #106730)

2024-09-09 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/106730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] Add __type_list_dedup builtin to deduplicate types in template arguments (PR #106730)

2024-09-09 Thread Utkarsh Saxena via cfe-commits
@@ -38,9 +40,11 @@ #include "clang/Sema/Template.h" #include "clang/Sema/TemplateDeduction.h" #include "llvm/ADT/BitVector.h" +#include "llvm/ADT/DenseSet.h" #include "llvm/ADT/SmallBitVector.h" #include "llvm/ADT/SmallString.h" #include "llvm/ADT/StringExtras.h" +#include "

[clang] [clang-tools-extra] [Clang] Add __type_list_dedup builtin to deduplicate types in template arguments (PR #106730)

2024-09-09 Thread Utkarsh Saxena via cfe-commits
@@ -309,7 +309,10 @@ enum BuiltinTemplateKind : int { BTK__make_integer_seq, /// This names the __type_pack_element BuiltinTemplateDecl. - BTK__type_pack_element + BTK__type_pack_element, + + /// This names the __type_list_dedup BuiltinTemplateDecl. + BTK__type_list_de

[clang] Mark tests as unsupported when targeting z/OS (PR #107916)

2024-09-09 Thread Sean Perry via cfe-commits
https://github.com/perry-ca created https://github.com/llvm/llvm-project/pull/107916 Set up these tests so these are marked as unsupported when targeting z/OS. Most would already be unsupported if you ran lit on z/OS. However, they also need to be unsupported if the default triple is z/OS.

[clang] Mark tests as unsupported when targeting z/OS (PR #107916)

2024-09-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Sean Perry (perry-ca) Changes Set up these tests so these are marked as unsupported when targeting z/OS. Most would already be unsupported if you ran lit on z/OS. However, they also need to be unsupport

[clang] [clang] Diagnose dangling issues for the "Container" case. (PR #107213)

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

[clang] [clang][HLSL] Add sign intrinsic part 3 (PR #101989)

2024-09-09 Thread Farzon Lotfi via cfe-commits
farzonl wrote: @tgymnich with part 1 and 2 merged I think we are ready for this. If you fix the conflicts in the PR i'll merge it for you. https://github.com/llvm/llvm-project/pull/101989 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-09-09 Thread via cfe-commits
https://github.com/higher-performance updated https://github.com/llvm/llvm-project/pull/102040 >From 4319585b55330ad76bd9b3b2ded0c40a5daf89fb Mon Sep 17 00:00:00 2001 From: higher-performance Date: Mon, 5 Aug 2024 15:04:19 -0400 Subject: [PATCH] Add Clang attribute to ensure that fields are ini

[clang] [HLSL] Allow truncation to scalar (PR #104844)

2024-09-09 Thread Chris B via cfe-commits
https://github.com/llvm-beanz updated https://github.com/llvm/llvm-project/pull/104844 >From 1a1a92aff834aa2f6f12d3de001714d8338dd274 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Tue, 13 Aug 2024 15:51:34 -0500 Subject: [PATCH 1/3] [HLSL] Allow truncation to scalar HLSL allows implicit

[clang] [HLSL] Allow truncation to scalar (PR #104844)

2024-09-09 Thread Chris B via cfe-commits
@@ -4828,18 +4830,23 @@ Sema::PerformImplicitConversion(Expr *From, QualType ToType, } case ICK_HLSL_Vector_Truncation: { // Note: HLSL built-in vectors are ExtVectors. Since this truncates a - // vector to a smaller vector, this can only operate on argument

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-09-09 Thread via cfe-commits
https://github.com/higher-performance updated https://github.com/llvm/llvm-project/pull/102040 >From 9335d802927dc6747ca12462744e1a9ca0b43949 Mon Sep 17 00:00:00 2001 From: higher-performance Date: Mon, 5 Aug 2024 15:04:19 -0400 Subject: [PATCH] Add Clang attribute to ensure that fields are ini

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-09-09 Thread via cfe-commits
@@ -1472,3 +1472,25 @@ template struct Outer { }; }; Outer::Inner outerinner; + +void aggregate() { higher-performance wrote: > Could we add examples from @AaronBallman's [RFC > comment](https://discourse.llvm.org/t/rfc-add-clang-attribute-to-ensure-that-fi

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-09-09 Thread via cfe-commits
@@ -2133,6 +2142,18 @@ void CXXRecordDecl::completeDefinition(CXXFinalOverriderMap *FinalOverriders) { for (conversion_iterator I = conversion_begin(), E = conversion_end(); I != E; ++I) I.setAccess((*I)->getAccess()); + + ASTContext &Context = getASTContext(); +

[clang] [llvm] [clang][hlsl] Add atan2 intrinsic part 1 (PR #107923)

2024-09-09 Thread Tex Riddell via cfe-commits
https://github.com/tex3d created https://github.com/llvm/llvm-project/pull/107923 Issue: #70096 Changes: - Doc updates: - `clang/docs/LanguageExtensions.rst` - Document the new elementwise atan2 builtin. - `llvm/docs/LangRef.rst` - Document the atan2 intrinsic - TableGen: - `clang/includ

[clang] [llvm] [clang][hlsl] Add atan2 intrinsic part 1 (PR #107923)

2024-09-09 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] [llvm] [clang][hlsl] Add atan2 intrinsic part 1 (PR #107923)

2024-09-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang @llvm/pr-subscribers-backend-risc-v Author: Tex Riddell (tex3d) Changes Issue: #70096 Changes: - Doc updates: - `clang/docs/LanguageExtensions.rst` - Document the new elementwise atan2 builtin. - `llvm/docs/

[clang] [clang][HLSL] Add sign intrinsic part 3 (PR #101989)

2024-09-09 Thread Tim Gymnich via cfe-commits
https://github.com/tgymnich updated https://github.com/llvm/llvm-project/pull/101989 >From 6f9a5267593a3d8263aef13899b84bb3c2e7749d Mon Sep 17 00:00:00 2001 From: Tim Gymnich Date: Fri, 2 Aug 2024 21:40:24 +0200 Subject: [PATCH] [clang][HLSL] Add sign intrinsic part 3 --- clang/include/clang/

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

2024-09-09 Thread Greg Roth via cfe-commits
https://github.com/pow2clk updated https://github.com/llvm/llvm-project/pull/106588 >From 12253818bd47aa8c324f6222586965f356b11c90 Mon Sep 17 00:00:00 2001 From: Greg Roth Date: Wed, 24 Jul 2024 16:49:19 -0600 Subject: [PATCH 1/7] [HLSL] set alwaysinline on HLSL functions HLSL inlines all its

[clang] [llvm] [clang][hlsl] Add atan2 intrinsic part 1 (PR #107923)

2024-09-09 Thread Tex Riddell via cfe-commits
https://github.com/tex3d updated https://github.com/llvm/llvm-project/pull/107923 >From af680b05eb1c83810d6eb044144283ac66d232ec Mon Sep 17 00:00:00 2001 From: Tex Riddell Date: Mon, 9 Sep 2024 14:39:18 -0700 Subject: [PATCH 1/2] [clang][hlsl] Add atan2 intrinsic part 1 Issue: #70096 Changes:

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-09 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/107292 >From a88a4eda4ce2ad32ee2ec02549b25c9f08aa14e9 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Tue, 3 Sep 2024 19:06:22 + Subject: [PATCH 1/4] Adding `asuint` implementation to hlsl --- clang/includ

[clang] [clang][HLSL] Add sign intrinsic part 3 (PR #101989)

2024-09-09 Thread Tim Gymnich via cfe-commits
https://github.com/tgymnich updated https://github.com/llvm/llvm-project/pull/101989 >From fb977f072b27cc385051e23365c1391a9064d47e Mon Sep 17 00:00:00 2001 From: Tim Gymnich Date: Fri, 2 Aug 2024 21:40:24 +0200 Subject: [PATCH] [clang][HLSL] Add sign intrinsic part 3 --- clang/include/clang/

[clang] [clang-format] Fix regressions in BAS_AlwaysBreak (PR #107506)

2024-09-09 Thread Gedare Bloom via cfe-commits
gedare wrote: LGTM, I like the renaming of the lambda. I think this better captures the original author's intent about "simple functions." https://github.com/llvm/llvm-project/pull/107506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [clang-format] Fix regressions in BAS_AlwaysBreak (PR #107506)

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

[clang-tools-extra] [NFC][clang-tidy] fix tests of deleted functions for missing-std-forward (PR #106861)

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

[clang-tools-extra] [clang-tidy][NFC] fix add_new_check python3.8 incompatibility (PR #107871)

2024-09-09 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: actually both are fine. since 3.8 will stop maintain soon. It just a temp solution and may be alive only in half year. https://github.com/llvm/llvm-project/pull/107871 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang-tools-extra] [clang-tidy] add default error message for performance-avoid-endl (PR #107867)

2024-09-09 Thread Congcong Cai via cfe-commits
@@ -225,3 +225,14 @@ void bad_custom_stream() { // CHECK-MESSAGES: :[[@LINE-1]]:13: warning: do not use 'std::endl' with streams; use '\n' instead [performance-avoid-endl] // CHECK-FIXES: logger << '\n'; } + +namespace gh107859 { + +#define ENDL std::endl; + +void bad_macr

[clang-tools-extra] [clang-tidy] add default error message for performance-avoid-endl (PR #107867)

2024-09-09 Thread Congcong Cai via cfe-commits
@@ -225,3 +225,14 @@ void bad_custom_stream() { // CHECK-MESSAGES: :[[@LINE-1]]:13: warning: do not use 'std::endl' with streams; use '\n' instead [performance-avoid-endl] // CHECK-FIXES: logger << '\n'; } + +namespace gh107859 { + +#define ENDL std::endl; + +void bad_macr

[clang-tools-extra] [clang-tidy] add default error message for performance-avoid-endl (PR #107867)

2024-09-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/107867 >From 31b01c0cd3fc809e5451853b820d021dd43d16c7 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 9 Sep 2024 22:32:48 +0800 Subject: [PATCH 1/2] [clang-tidy] add default error message for performance-av

[clang-tools-extra] [clang-tidy] add default error message for performance-avoid-endl (PR #107867)

2024-09-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/107867 >From 31b01c0cd3fc809e5451853b820d021dd43d16c7 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 9 Sep 2024 22:32:48 +0800 Subject: [PATCH 1/3] [clang-tidy] add default error message for performance-av

[clang-tools-extra] [clang-tidy] add default error message for performance-avoid-endl (PR #107867)

2024-09-09 Thread Congcong Cai via cfe-commits
@@ -46,14 +46,13 @@ void AvoidEndlCheck::check(const MatchFinder::MatchResult &Result) { // Handle the more common streaming '... << std::endl' case const CharSourceRange TokenRange = CharSourceRange::getTokenRange(Expression->getSourceRange()); -const Stri

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-09 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/107292 >From a88a4eda4ce2ad32ee2ec02549b25c9f08aa14e9 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Tue, 3 Sep 2024 19:06:22 + Subject: [PATCH 1/4] Adding `asuint` implementation to hlsl --- clang/includ

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-09 Thread via cfe-commits
joaosaffran wrote: @farzonl I discussed the `half` type support with @llvm-beanz, he suggested using static asserts, which I've added and now checks whether the type being passed has 32bits. This prevents the `half` support. Any concerns regarding this approach? https://github.com/llvm/llvm-p

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-09 Thread via cfe-commits
@@ -387,6 +387,65 @@ float3 asin(float3); _HLSL_BUILTIN_ALIAS(__builtin_elementwise_asin) float4 asin(float4); +//===--===// +// asuint builtins +//===--

[clang] [llvm] [NVPTX] Remove nvvm.bitcast.* intrinsics (PR #107936)

2024-09-09 Thread Alex MacLean via cfe-commits
https://github.com/AlexMaclean created https://github.com/llvm/llvm-project/pull/107936 Remove the following intrinsics which correspond directly to a bitcast: - llvm.nvvm.bitcast.f2i - llvm.nvvm.bitcast.i2f - llvm.nvvm.bitcast.d2ll - llvm.nvvm.bitcast.ll2d >From ff978f81e0eedbc5e7547acabe414f2

[clang] [llvm] [NVPTX] Remove nvvm.bitcast.* intrinsics (PR #107936)

2024-09-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir @llvm/pr-subscribers-backend-nvptx Author: Alex MacLean (AlexMaclean) Changes Remove the following intrinsics which correspond directly to a bitcast: - llvm.nvvm.bitcast.f2i - llvm.nvvm.bitcast.i2f - llvm.nvvm.bitcast.d2ll - llvm.nvvm.bitcast.ll2

[clang] [llvm] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-09-09 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/106036 >From 8314ba1abc040c5403ec16cc531c822799689598 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Tue, 10 Sep 2024 02:35:43 +0300 Subject: [PATCH] [Clang] restrict use of attribute names reserved by the C++ st

[clang-tools-extra] [clang-tidy][NFC] fix add_new_check python3.8 incompatibility (PR #107871)

2024-09-09 Thread Nicolas van Kempen via cfe-commits
nicovank wrote: Exactly, IMO the move to 3.9 minimum should be in 6-12 months to leave a bit of time after EOL. 3.9 also has subscriptable `tuple`, `list` and `dict` which is nice. https://github.com/llvm/llvm-project/pull/107871 ___ cfe-commits mai

[clang] [HLSL] Allow truncation to scalar (PR #104844)

2024-09-09 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: ExprConstant.cpp currently assumes that an CK_HLSLVectorTruncation can't return a scalar type. https://github.com/llvm/llvm-project/pull/104844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [clang][HLSL] Add sign intrinsic part 3 (PR #101989)

2024-09-09 Thread Tim Gymnich via cfe-commits
tgymnich wrote: Rebased. All ready to go. https://github.com/llvm/llvm-project/pull/101989 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

2024-09-09 Thread Chris B via cfe-commits
@@ -2471,11 +2471,14 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D, B.addAttribute(llvm::Attribute::StackProtectReq); if (!D) { +// HLSL functions must always be inlined +if (getLangOpts().HLSL && !F->hasFnAttribute("hlsl.shader"))

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

2024-09-09 Thread Chris B via cfe-commits
@@ -2471,11 +2471,14 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D, B.addAttribute(llvm::Attribute::StackProtectReq); if (!D) { +// HLSL functions must always be inlined llvm-beanz wrote: nit: we do try have comments b

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

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

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

2024-09-09 Thread Chris B via cfe-commits
@@ -2502,9 +2505,12 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D, ShouldAddOptNone &= !D->hasAttr(); ShouldAddOptNone &= !D->hasAttr(); - // Add optnone, but do so only if the function isn't always_inline. - if ((ShouldAddOptNone || D->has

[clang] [llvm] [NVPTX] Remove nvvm.bitcast.* intrinsics (PR #107936)

2024-09-09 Thread Artem Belevich via cfe-commits
Artem-B wrote: It may be worth adding a note about this in the release notes. https://github.com/llvm/llvm-project/pull/107936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang-format: Add "AllowShortNamespacesOnASingleLine" option (PR #105597)

2024-09-09 Thread Galen Elias via cfe-commits
@@ -27981,6 +27981,118 @@ TEST_F(FormatTest, BreakBinaryOperations) { Style); } +TEST_F(FormatTest, ShortNamespacesOption) { + FormatStyle Style = getLLVMStyle(); + Style.AllowShortNamespacesOnASingleLine = true; + Style.FixNamespaceComments = false; + + //

[clang] clang-format: Add "AllowShortNamespacesOnASingleLine" option (PR #105597)

2024-09-09 Thread Galen Elias via cfe-commits
https://github.com/galenelias deleted https://github.com/llvm/llvm-project/pull/105597 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [clang][MIPS] Add support for mipsel-windows-* targets (PR #107744)

2024-09-09 Thread via cfe-commits
=?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Po

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

2024-09-09 Thread Greg Roth via cfe-commits
@@ -2471,11 +2471,14 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D, B.addAttribute(llvm::Attribute::StackProtectReq); if (!D) { +// HLSL functions must always be inlined +if (getLangOpts().HLSL && !F->hasFnAttribute("hlsl.shader"))

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

2024-09-09 Thread Greg Roth via cfe-commits
https://github.com/pow2clk updated https://github.com/llvm/llvm-project/pull/106588 >From 12253818bd47aa8c324f6222586965f356b11c90 Mon Sep 17 00:00:00 2001 From: Greg Roth Date: Wed, 24 Jul 2024 16:49:19 -0600 Subject: [PATCH 1/8] [HLSL] set alwaysinline on HLSL functions HLSL inlines all its

[clang] [llvm] [clang][hlsl] Add atan2 intrinsic part 1 (PR #107923)

2024-09-09 Thread Farzon Lotfi via cfe-commits
farzonl wrote: since this is a new builtin it would make sense to add it to `clang/docs/ReleaseNotes.rst`. There should be some examples from Josh's PRs. https://github.com/llvm/llvm-project/pull/107923 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [Parser][BoundsSafety] Print attribute as macro if it's system defined (PR #107619)

2024-09-09 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna updated https://github.com/llvm/llvm-project/pull/107619 >From 1d00f0fca700c058320a39cd3f40cdd58c37cf8f Mon Sep 17 00:00:00 2001 From: Yeoul Na Date: Thu, 5 Sep 2024 09:52:41 -0700 Subject: [PATCH 1/2] [Parser][BoundsSafety] Print attribute as macro if it's system d

[clang] [Parser][BoundsSafety] Print attribute as macro if it's system defined (PR #107619)

2024-09-09 Thread Yeoul Na via cfe-commits
@@ -14,12 +16,26 @@ void Func() { auto NODEREF auto_i2 = i; // expected-warning{{'noderef' can only be used on an array or pointer type}} } +// The diagnostic message is hard-coded as 'noderef' so using a system macro doesn't change the behavior +void Func_system_macro() {

[clang] [llvm] [clang][hlsl] Add atan2 intrinsic part 1 (PR #107923)

2024-09-09 Thread Farzon Lotfi via cfe-commits
@@ -1244,6 +1244,12 @@ def ElementwiseATan : Builtin { let Prototype = "void(...)"; } +def ElementwiseATan2 : Builtin { + let Spellings = ["__builtin_elementwise_atan2"]; + let Attributes = [NoThrow, Const, CustomTypeChecking]; farzonl wrote: This is more

[clang] [llvm] [clang][hlsl] Add atan2 intrinsic part 1 (PR #107923)

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

[clang] [lld] [llvm] [clang][MIPS] Add support for mipsel-windows-* targets (PR #107744)

2024-09-09 Thread Eli Friedman via cfe-commits
=?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Po

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

2024-09-09 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp approved this pull request. LGTM, but would be good to get a review from someone more knowledgeable in the area than I am. https://github.com/llvm/llvm-project/pull/106588 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-09-09 Thread Alexander Kornienko via cfe-commits
alexfh wrote: What about this case: https://godbolt.org/z/1TsK96ao8 ? It's a reduction of one of a large number of broken builds we see after this patch. https://github.com/llvm/llvm-project/pull/100692 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [llvm] [clang][hlsl] Add atan2 intrinsic part 1 (PR #107923)

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

[clang-tools-extra] [clangd] Use `SymbolName` to represent Objective-C selectors (PR #82061)

2024-09-09 Thread Alex Hoppen via cfe-commits
ahoppen wrote: @DavidGoldman Would you mind reviewing my changes? https://github.com/llvm/llvm-project/pull/82061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NVPTX] Remove nvvm.bitcast.* intrinsics (PR #107936)

2024-09-09 Thread Alex MacLean via cfe-commits
AlexMaclean wrote: > It may be worth adding a note about this in the release notes. I'm not familiar with these, can you point me to an analogous change I could use as an example? https://github.com/llvm/llvm-project/pull/107936 ___ cfe-commits maili

[clang] [llvm] [ARM] Save floating point registers and status registers with save_fp function attribute (PR #89654)

2024-09-09 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,34 @@ +// REQUIRES: arm-registered-target +// RUN: %clang -target arm-none-none-eabihf -mcpu=cortex-r5 -mfpu=vfpv3-d16 -marm -S -o - %s \ +// RUN: | FileCheck %s --check-prefix=CHECK-R +// RUN: %clang -target arm-none-none-eabihf -mcpu=cortex-r5 -mfpu=vfpv3-d16 -mthum

[clang] [llvm] [clang][hlsl] Add atan2 intrinsic part 1 (PR #107923)

2024-09-09 Thread Tex Riddell via cfe-commits
https://github.com/tex3d updated https://github.com/llvm/llvm-project/pull/107923 >From 44b355687a3e148bfe3d5e4f95efd39363b58b07 Mon Sep 17 00:00:00 2001 From: Tex Riddell Date: Mon, 9 Sep 2024 14:39:18 -0700 Subject: [PATCH 1/2] [clang][hlsl] Add atan2 intrinsic part 1 Issue: #70096 Changes:

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

2024-09-09 Thread Eli Friedman via cfe-commits
@@ -6784,6 +6784,10 @@ def warn_arc_lifetime_result_type : Warning< "ARC %select{unused|__unsafe_unretained|__strong|__weak|__autoreleasing}0 " "lifetime qualifier on return type is ignored">, InGroup; +def warn_next_larger_fp_type_same_size_than_fp : Warning< + "higher

[clang] [llvm] [clang][hlsl] Add atan2 intrinsic part 1 (PR #107923)

2024-09-09 Thread Tex Riddell via cfe-commits
tex3d wrote: @farzonl > since this is a new builtin it would make sense to add it to > `clang/docs/ReleaseNotes.rst`. There should be some examples from Josh's PRs. I can't find the examples you're referring to. Do you think you could point one out? Also, what about the other builtins that

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

2024-09-09 Thread via cfe-commits
@@ -1444,8 +1454,15 @@ void BTFDebug::processGlobals(bool ProcessingMapDef) { DIGlobal = GVE->getVariable(); if (SecName.starts_with(".maps")) visitMapDefType(DIGlobal->getType(), GVTypeId); - else -visitTypeEntry(DIGlobal->getType(), GVTypeId,

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

2024-09-09 Thread via cfe-commits
@@ -91,6 +91,12 @@ void BTFTypeDerived::completeType(BTFDebug &BDebug) { // The base type for PTR/CONST/VOLATILE could be void. const DIType *ResolvedType = DTy->getBaseType(); + if (ResolvedType) { +const auto *DerivedTy = dyn_cast(ResolvedType); +if (DerivedTy &

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

2024-09-09 Thread via cfe-commits
@@ -864,26 +864,119 @@ class XFALU32; -def XFANDW32 : XFALU32; -def XFORW32 : XFALU32; -def XFXORW32 : XFALU32; +def XFADDW32 : XFALU32; +def XFANDW32 : XFALU32; +def XFORW32 : XFALU32; +def XFXORW32 : XFALU32; } let Predicates = [BPFHasALU32]

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

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

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

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

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

2024-09-09 Thread via cfe-commits
@@ -864,26 +864,119 @@ class XFALU32; -def XFANDW32 : XFALU32; -def XFORW32 : XFALU32; -def XFXORW32 : XFALU32; +def XFADDW32 : XFALU32; +def XFANDW32 : XFALU32; +def XFORW32 : XFALU32; +def XFXORW32 : XFALU32; } let Predicates = [BPFHasALU32]

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

2024-09-09 Thread via cfe-commits
https://github.com/eddyz87 commented: I agree with these changes, could you please also add tests? https://github.com/llvm/llvm-project/pull/107343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [Clang] [Driver] Ensure `-fms-volatile` is set for x86 for `*-windows-msvc` triple on non cl driver modes (PR #107509)

2024-09-09 Thread Nico Weber via cfe-commits
nico wrote: (To be clear, I'm fine with landing this.) > non conforming two phase lookup by default would also be a concern. It is! There were quite a few discussions around this. Aha, see #42377. We usually say the goal is to have a very standards compliant impl, while also being able to par

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

2024-09-09 Thread Chuanqi Xu via cfe-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw==?=,Kyungwoo Lee ,Dmitry Polukhin ,Dmitry Polukhin Message-ID: In-Reply-To: https://github.com/ChuanqiXu9 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/104512 ___ cfe-commits

[clang] [clang-repl] Simplify the value printing logic to enable out-of-process. (PR #107737)

2024-09-09 Thread Jun Zhang via cfe-commits
@@ -0,0 +1,400 @@ +//===--- InterpreterValuePrinter.cpp - Value printing utils -*- 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: Ap

[clang] [llvm] [llvm][Triple] Add `Environment` members and parsing for glibc/musl parity. (PR #107664)

2024-09-09 Thread Lu Weining via cfe-commits
https://github.com/SixWeining approved this pull request. The LoongArch bits LGTM. Thanks. https://github.com/llvm/llvm-project/pull/107664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [clang][bytecode] Fix local destructor order (PR #107951)

2024-09-09 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/107951 Add appropriate scopes and use reverse-order iteration in LocalScope::emitDestructors(). >From 71688d27b5fc5a9af0218e42ed38847a2d07a7ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue,

[clang] [clang][bytecode] Fix local destructor order (PR #107951)

2024-09-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Add appropriate scopes and use reverse-order iteration in LocalScope::emitDestructors(). --- Full diff: https://github.com/llvm/llvm-project/pull/107951.diff 3 Files Affected: - (modified) clang/lib/AST/B

[clang] [clang-tools-extra] [clangd] show lambda name instead of operator() in signature help (PR #101857)

2024-09-09 Thread Timothy Akintilo via cfe-commits
@@ -876,6 +876,11 @@ class Sema; /// function pointer or reference (C++ [over.call.object]). FunctionDecl *Function; +/// LambdaName - When the OverloadCandidate is for a +/// lambda's operator(), points to the declaration of +/// the lambda variable. +

[clang] [HLSL] Add `[[hlsl::row_access]]` attribute (PR #107954)

2024-09-09 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/107954 This PR introduces new HLSL resource type attribute `[[hlsl::row_access]]`. Presence of this attribute on a resource handle means that the resource must be accessed in 16-byte blocks at-a-time, or four 32-bit co

[clang-tools-extra] Add clang-tidy external examples (PR #106675)

2024-09-09 Thread via cfe-commits
https://github.com/MichelleCDjunaidi updated https://github.com/llvm/llvm-project/pull/106675 >From 08324e3586acb16cbf010fd6013c21f2b5faa64e Mon Sep 17 00:00:00 2001 From: MichelleCDjunaidi <87893361+michellecdjuna...@users.noreply.github.com> Date: Fri, 30 Aug 2024 14:55:16 +0800 Subject: [PATC

[clang] 56905da - [clang] fix half && bfloat16 convert node expr codegen (#89051)

2024-09-09 Thread via cfe-commits
Author: JinjinLi868 Date: 2024-09-10T10:47:33+08:00 New Revision: 56905dab7da50bccfcceaeb496b206ff476127e1 URL: https://github.com/llvm/llvm-project/commit/56905dab7da50bccfcceaeb496b206ff476127e1 DIFF: https://github.com/llvm/llvm-project/commit/56905dab7da50bccfcceaeb496b206ff476127e1.diff L

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-09-09 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp closed https://github.com/llvm/llvm-project/pull/89051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-09-09 Thread via cfe-commits
github-actions[bot] wrote: @JinjinLi868 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 bu

[clang] [clang-tools-extra] [clangd] show lambda name instead of operator() in signature help (PR #101857)

2024-09-09 Thread Timothy Akintilo via cfe-commits
tilobyte wrote: > I also wonder if we would better off having `CXXRecordDecl` save its > 'variable' for lambdas (and look it up from there) rather than this. saving the `VarDecl` in the lambda's `CXXRecordDecl` indeed sounds like a cleaner solution--i will try implementing that before making a

[clang-tools-extra] Add clang-tidy external examples (PR #106675)

2024-09-09 Thread via cfe-commits
MichelleCDjunaidi wrote: @EugeneZelenko @5chmidti Thoughts on the fixed formatting? I followed index.rst convention. https://github.com/llvm/llvm-project/pull/106675 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

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

[clang-tools-extra] Add clang-tidy external examples (PR #106675)

2024-09-09 Thread via cfe-commits
https://github.com/MichelleCDjunaidi updated https://github.com/llvm/llvm-project/pull/106675 >From 08324e3586acb16cbf010fd6013c21f2b5faa64e Mon Sep 17 00:00:00 2001 From: MichelleCDjunaidi <87893361+michellecdjuna...@users.noreply.github.com> Date: Fri, 30 Aug 2024 14:55:16 +0800 Subject: [PATC

[clang-tools-extra] disclose Windows linetab bug on clang-query tab auto-complete (PR #107956)

2024-09-09 Thread via cfe-commits
https://github.com/MichelleCDjunaidi created https://github.com/llvm/llvm-project/pull/107956 As per https://github.com/llvm/llvm-project/pull/106672/#issuecomment-2325577815 and https://github.com/llvm/llvm-project/issues/107377, the documentation should be updated to note that the current b

[clang-tools-extra] disclose Windows linetab bug on clang-query tab auto-complete (PR #107956)

2024-09-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: None (MichelleCDjunaidi) Changes As per https://github.com/llvm/llvm-project/pull/106672/#issuecomment-2325577815 and https://github.com/llvm/llvm-project/issues/107377, the documentation should be updated to note that the cu

[clang-tools-extra] [Docs][clang-tidy] disclose Windows linetab bug on clang-query tab auto-complete (PR #107956)

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

[clang-tools-extra] [Docs][clang-tidy] disclose Windows linetab bug on clang-query tab auto-complete (PR #107956)

2024-09-09 Thread via cfe-commits
github-actions[bot] wrote: ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account. See [LLVM Discourse](https://discourse.llvm.org/t/hidden-email

[clang-tools-extra] [clang-tidy] Create bugprone-incorrect-enable-shared-from-this check (PR #102299)

2024-09-09 Thread via cfe-commits
MichelleCDjunaidi wrote: @5chmidti @njames93 @PiotrZSL Any updated feedback on this? https://github.com/llvm/llvm-project/pull/102299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] dce5039 - [clang][HLSL] Add sign intrinsic part 3 (#101989)

2024-09-09 Thread via cfe-commits
Author: Tim Gymnich Date: 2024-09-09T23:35:45-04:00 New Revision: dce50397b52e33e927ffb1d1c40765109abf40f0 URL: https://github.com/llvm/llvm-project/commit/dce50397b52e33e927ffb1d1c40765109abf40f0 DIFF: https://github.com/llvm/llvm-project/commit/dce50397b52e33e927ffb1d1c40765109abf40f0.diff L

[clang] [clang][HLSL] Add sign intrinsic part 3 (PR #101989)

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

[clang] [APINotes] Avoid repeated hash lookups (NFC) (PR #107959)

2024-09-09 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/107959 None >From 5e0e37ae0db76a18a235d2368a65a806f70320ea Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Mon, 9 Sep 2024 07:31:42 -0700 Subject: [PATCH] [APINotes] Avoid repeated hash lookups (NFC) --- cla

[clang] [APINotes] Avoid repeated hash lookups (NFC) (PR #107959)

2024-09-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/107959.diff 1 Files Affected: - (modified) clang/lib/APINotes/APINotesWriter.cpp (+3-7) ``diff diff --git a/clang/lib/APINotes/API

[clang] [Tablegen] Avoid repeated hash lookps (NFC) (PR #107961)

2024-09-09 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/107961 None >From c995b27c81f0342ebbb44ce3dbf98d8415e507e4 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Mon, 9 Sep 2024 07:34:57 -0700 Subject: [PATCH] [Tablegen] Avoid repeated hash lookps (NFC) --- .../

[clang] [Tablegen] Avoid repeated hash lookps (NFC) (PR #107961)

2024-09-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/107961.diff 1 Files Affected: - (modified) clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp (+3-15) ``diff diff --git a/clang/ut

[clang] [Format] Avoid repeated hash lookups (NFC) (PR #107962)

2024-09-09 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/107962 None >From cc3832ba4c7c00de00346bde146420afeefc0b33 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Mon, 9 Sep 2024 07:33:21 -0700 Subject: [PATCH] [Format] Avoid repeated hash lookups (NFC) --- clang

<    1   2   3   4   5   >