[clang] Reapply "[clang][bytecode] Implement __builtin_{wcscmp,wcsncmp} (#132… (PR #132963)

2025-03-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes …723)" This reverts commit 1e2ad6793ac205607e7c809283cf69e1cc36a69a. Fix the previous commit on big-endian hosts by _not_ falling through to the `uint8_t` code path. --- Full diff: https://github.com/llv

[libclc] [libclc] Update license headers (PR #132070)

2025-03-25 Thread Kristof Beyls via cfe-commits
kbeyls wrote: Thank you for this change, @frasercrmck ! This all looks good to me. https://github.com/llvm/llvm-project/pull/132070 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang]: fix overload resolution in case of converting const value reference to an rvalue reference. (PR #133035)

2025-03-25 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 80d5185bd4288c12e9d5aa0fe2e00f2f4e6397d7 693049e2bdfe31c1243c9d9a5a7bf59363a2b9b1 --e

[clang] [CIR] [Upstream local initialization for ArrayType (PR #132974)

2025-03-25 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/132974 >From 4dc1e77299c71b8f01fb73f7fba5f14e0fbe3edd Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 21 Mar 2025 21:07:11 +0100 Subject: [PATCH 1/2] [CIR] [Upstream local initialization for ArrayType ---

[clang] [HLSL] Finish exposing half types and intrinsics always (PR #132804)

2025-03-25 Thread Sarah Spall via cfe-commits
spall wrote: > > this is not NFC, so we should verify that we can call these intrinsics with > > `half` values even if 16-bit types aren't enabled, and that they properly > > codegen to 32-bit varia > > > > > > > For example, for `abs`, it still depends on the > > > > > > _HLSL_16BIT_AVAILABI

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-25 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. https://github.com/llvm/llvm-project/pull/132232 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen][NFC] Run SROA on complex range tests (PR #131925)

2025-03-25 Thread Mészáros Gergely via cfe-commits
https://github.com/Maetveis closed https://github.com/llvm/llvm-project/pull/131925 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang]: fix overload resolution in case of converting const value reference to an rvalue reference. (PR #133035)

2025-03-25 Thread Nhat Nguyen via cfe-commits
https://github.com/changkhothuychung edited https://github.com/llvm/llvm-project/pull/133035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Anutosh Bhat (anutosh491) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/133037.diff 1 Files Affected: - (modified) clang/lib/Interpreter/Interpreter.cpp (+10) ``diff diff --git a/clang/lib/Interpreter/Inte

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-25 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 created https://github.com/llvm/llvm-project/pull/133037 None >From dfe49e826705a5e9371e17e66e40c31602beea8e Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Wed, 26 Mar 2025 10:33:37 +0530 Subject: [PATCH] Implement LoadDynamicLibrary for clang-repl wasm use cases

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-25 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 80d5185bd4288c12e9d5aa0fe2e00f2f4e6397d7 dfe49e826705a5e9371e17e66e40c31602beea8e --e

[clang] [CIR] Emit allocas into the proper lexical scope (PR #132468)

2025-03-25 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,81 @@ +//===--===// +// +// 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: Apac

[clang] [CIR] Emit allocas into the proper lexical scope (PR #132468)

2025-03-25 Thread Morris Hafner via cfe-commits
@@ -0,0 +1,81 @@ +//===--===// +// +// 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: Apac

[clang] Reapply "[Clang] Improve diagnostics for expansion length mismatch" (PR #121044)

2025-03-25 Thread via cfe-commits
@@ -749,132 +759,124 @@ ExprResult Sema::CheckPackExpansion(Expr *Pattern, SourceLocation EllipsisLoc, PackExpansionExpr(Context.DependentTy, Pattern, EllipsisLoc, NumExpansions); } +static bool IsUnexpandedPackExpansion(const TemplateArgument &TA) { + if (!TA.isPackExp

[clang] [clang] Implement CWG2815 (PR #132778)

2025-03-25 Thread via cfe-commits
https://github.com/offsetof updated https://github.com/llvm/llvm-project/pull/132778 >From 0aa1e7b83888bde7112327fba7db9bdcb71c43d9 Mon Sep 17 00:00:00 2001 From: offsetof Date: Mon, 24 Mar 2025 16:28:28 + Subject: [PATCH 1/3] [clang] Implement CWG2815 CWG2815 "Overload resolution for refe

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-25 Thread James Y Knight via cfe-commits
@@ -1073,6 +1073,28 @@ inputs. Here is some example of ``$``-prefixed options: Language and Target-Independent Features +Freestanding Builds +--- +Passing the ``-ffreestanding`` flag causes Clang to build for a freestand

[clang] [llvm] [clang][DebugInfo] Add symbol for debugger with VTable information. (PR #130255)

2025-03-25 Thread David Blaikie via cfe-commits
dwblaikie wrote: > FYI: There is already VTable support in our lldb::SBValue class and it is > part of the public API in LLDB and doesn't require any of this: > ... > Doesn't require any debug info. Does this/can this be used to determine the type of an object that points to that vtable, thoug

[clang] [Driver] Enable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #132821)

2025-03-25 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/132821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Consider preferred_type in bitfield warnings (#116760) (PR #116785)

2025-03-25 Thread Oliver Hunt via cfe-commits
@@ -10509,14 +10516,18 @@ static bool AnalyzeBitFieldAssignment(Sema &S, FieldDecl *Bitfield, Expr *Init, ED->getNumPositiveBits() == FieldWidth) { DiagID = diag::warn_signed_bitfield_enum_conversion; } - + unsigned PreferredTypeDiagIndex =

[clang] Add an off-by-default warning to complain about MSVC bitfield padding (PR #117428)

2025-03-25 Thread Oliver Hunt via cfe-commits
@@ -6418,6 +6418,12 @@ def warn_signed_bitfield_enum_conversion : Warning< InGroup, DefaultIgnore; def note_change_bitfield_sign : Note< "consider making the bitfield type %select{unsigned|signed}0">; +def warn_ms_bitfield_mismatched_storage_packing : Warning< + "bit-field

[clang] [Clang] Consider preferred_type in bitfield warnings (#116760) (PR #116785)

2025-03-25 Thread Oliver Hunt via cfe-commits
@@ -6404,20 +6404,23 @@ def warn_bitfield_width_exceeds_type_width: Warning< def err_bitfield_too_wide : Error< "%select{bit-field %1|anonymous bit-field}0 is too wide (%2 bits)">; def warn_bitfield_too_small_for_enum : Warning< - "bit-field %0 is not wide enough to store al

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-25 Thread Timm Baeder via cfe-commits
@@ -11432,6 +11433,22 @@ static QualType mergeEnumWithInteger(ASTContext &Context, const EnumType *ET, return {}; } +QualType ASTContext::mergeTagTypes(QualType LHS, QualType RHS) { + // C17 and earlier and C++ disallow two tag definitions within the same TU + // from bei

[clang] [RISCV] Make RequiredExtensions for intrinsics scalable to more than 32 extensions. NFC (PR #132895)

2025-03-25 Thread Craig Topper via cfe-commits
topperc wrote: > Do you hit the same problem with `llvm::Bitset` as you do with `std::bitset`? Yeah. There's no way to access the underlying array. The constructor for llvm::Bitset takes a list of bits. Maybe we could print out the bit positions instead of the array? https://github.com/llvm/l

[libclc] [libclc] Move log1p/asinh/acosh to the CLC library (PR #132956)

2025-03-25 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck edited https://github.com/llvm/llvm-project/pull/132956 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-25 Thread James Y Knight via cfe-commits
https://github.com/jyknight edited https://github.com/llvm/llvm-project/pull/132232 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-25 Thread James Y Knight via cfe-commits
https://github.com/jyknight edited https://github.com/llvm/llvm-project/pull/132232 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Limit modernize-use-nullptr to C++11/C23 and later (PR #132816)

2025-03-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: None (higher-performance) Changes `nullptr` is not supported on earlier versions of either standard, so the tidy should not diagnose earlier uses. --- Full diff: https://github.com/llvm/llvm-project/pull/132816.diff 1 Files

[clang] [HLSL] Add __spirv__ macro (PR #132848)

2025-03-25 Thread Cassandra Beckley via cfe-commits
https://github.com/cassiebeckley updated https://github.com/llvm/llvm-project/pull/132848 >From 959f0374df39a97d22740ae81d132bed300159ea Mon Sep 17 00:00:00 2001 From: Cassandra Beckley Date: Mon, 24 Mar 2025 17:36:46 -0700 Subject: [PATCH 1/2] [HLSL] Add __spirv__ macro This macro can be used

[clang] [HLSL] Add __spirv__ macro (PR #132848)

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

[libclc] [libclc] Move log1p/asinh/acosh/atanh to the CLC library (PR #132956)

2025-03-25 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck edited https://github.com/llvm/llvm-project/pull/132956 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Make RequiredExtensions for intrinsics scalable to more than 32 extensions. NFC (PR #132895)

2025-03-25 Thread Craig Topper via cfe-commits
https://github.com/topperc updated https://github.com/llvm/llvm-project/pull/132895 >From f2414caba966f44d5ecb41e7e35b570d05b6fa53 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Tue, 25 Mar 2025 00:04:31 -0700 Subject: [PATCH 1/2] [RISCV] Make RequiredExtensions for intrinsics scalable to m

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-03-25 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Yeah I agree with @zyn0217 here. Otherwise I haven't been able to take a look at the crash yet. https://github.com/llvm/llvm-project/pull/132919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [llvm] [HLSL] Implement the `smoothstep` intrinsic (PR #132288)

2025-03-25 Thread Kaitlin Peng via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: %clang_cc1 %s -triple spirv-pc-vulkan-compute -verify + +typedef float float2 __attribute__((ext_vector_type(2))); + +float2 test_no_second_arg(float2 p0) { + return __builtin_spirv_smoothstep(p0); + // expected-error@-1 {{too few arguments to function

[libclc] [libclc] Move log1p/asinh/acosh to the CLC library (PR #132956)

2025-03-25 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/132956 These three functions all relatedin that they share tables and helper functions. Furthermore, the acosh builtins calls log1p. As with other work in this area, these builtins are now vectorized. To enable t

[clang] [RFC][clang] Fix for regression #130917 (PR #132214)

2025-03-25 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff c65fa9163e47af5e86b2a187dd45ae665cf5a996 a564da2384ae1412647d1134aaf5359fe30e75a7 --e

[clang] [clang-format] Correctly annotate requires clause in `&& requires(` (PR #132882)

2025-03-25 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/132882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-25 Thread via cfe-commits
@@ -0,0 +1,456 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c23 -pedantic -Wall -Wno-comment -verify=both,c23 %s +// RUN: %clang_cc1 -fsyntax-only -std=c17 -pedantic -Wall -Wno-comment -Wno-c23-extensions -verify=both,c17 %s + +/* WG14 N3037: + * Improved tag compatibility + * + *

[clang] [RFC][clang] Fix for regression #130917 (PR #132214)

2025-03-25 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin updated https://github.com/llvm/llvm-project/pull/132214 >From 91e057bf990e2c454b897982ed0b4e823bb3faba Mon Sep 17 00:00:00 2001 From: Dmitry Polukhin Date: Thu, 20 Mar 2025 06:51:46 -0700 Subject: [PATCH 1/4] [clang] Fix for regression #130917 Changes in #111992

[clang] [RFC][clang] Fix for regression #130917 (PR #132214)

2025-03-25 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin updated https://github.com/llvm/llvm-project/pull/132214 >From 91e057bf990e2c454b897982ed0b4e823bb3faba Mon Sep 17 00:00:00 2001 From: Dmitry Polukhin Date: Thu, 20 Mar 2025 06:51:46 -0700 Subject: [PATCH 1/3] [clang] Fix for regression #130917 Changes in #111992

[clang] [clang] Fix overload resolution ranking of inherited constructors (PR #132830)

2025-03-25 Thread Vlad Serebrennikov via cfe-commits
@@ -169,6 +169,20 @@ B b; // since-cxx11-error@-1 {{call to implicitly-deleted default constructor of 'B'}} // since-cxx11-note@#cwg2273-B {{default constructor of 'B' is implicitly deleted because base class 'A' has a deleted default constructor}} // since-cxx11-note@#cw

[clang] [RISCV] Make RequiredExtensions for intrinsics scalable to more than 32 extensions. NFC (PR #132895)

2025-03-25 Thread Sam Elliott via cfe-commits
lenary wrote: Do you hit the same problem with `llvm::Bitset` as you do with `std::bitset`. https://github.com/llvm/llvm-project/pull/132895 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-03-25 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: CC @mizvekov since it was suggested this is related to https://github.com/llvm/llvm-project/issues/126550 and it looked like based on the conversation there, there was some existing work going on. https://github.com/llvm/llvm-project/pull/132919 ___

[clang] [clang] Implement CWG2803 and CWG2958 (PR #132779)

2025-03-25 Thread Younan Zhang via cfe-commits
@@ -110,6 +110,8 @@ Resolutions to C++ Defect Reports two releases. The improvements to template template parameter matching implemented in the previous release, as described in P3310 and P3579, made this flag unnecessary. +- Implemented `CWG2803 Overload resolution for

[clang] [flang] [llvm] [Clang][AMDGPU] Expose buffer load lds as a clang builtin (PR #132048)

2025-03-25 Thread Matt Arsenault via cfe-commits
Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?= , Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?= , Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?= , Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?= , Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?= Message-ID: In-Reply-To: https://github.com/arsenm approv

[clang] [RFC][clang] Fix for regression #130917 (PR #132214)

2025-03-25 Thread Dmitry Polukhin via cfe-commits
@@ -2572,7 +2572,7 @@ Decl *TemplateDeclInstantiator::VisitFunctionDecl( // Friend function defined withing class template may stop being function // definition during AST merges from different modules, in this case decl // with function body should be used for instantiat

[clang] Add an off-by-default warning to complain about MSVC bitfield padding (PR #117428)

2025-03-25 Thread Oliver Hunt via cfe-commits
@@ -6418,6 +6418,12 @@ def warn_signed_bitfield_enum_conversion : Warning< InGroup, DefaultIgnore; def note_change_bitfield_sign : Note< "consider making the bitfield type %select{unsigned|signed}0">; +def warn_ms_bitfield_mismatched_storage_packing : Warning< + "bit-field

[clang] Add an off-by-default warning to complain about MSVC bitfield padding (PR #117428)

2025-03-25 Thread Oliver Hunt via cfe-commits
@@ -633,6 +633,50 @@ def Packed : DiagGroup<"packed", [PackedNonPod]>; def PaddedBitField : DiagGroup<"padded-bitfield">; def Padded : DiagGroup<"padded", [PaddedBitField]>; def UnalignedAccess : DiagGroup<"unaligned-access">; +def MSBitfieldCompatibility : DiagGroup<"ms-bitfie

[clang] [Clang] Consider preferred_type in bitfield warnings (#116760) (PR #116785)

2025-03-25 Thread Oliver Hunt via cfe-commits
@@ -0,0 +1,113 @@ +// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -fsyntax-only -verify=expected,preferrednotes -std=c11 -Wno-unused-value -Wno-unused-but-set-variable +// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -fsyntax-only -verify=expected,bitfieldwarning,prefe

[clang] Add an off-by-default warning to complain about MSVC bitfield padding (PR #117428)

2025-03-25 Thread Oliver Hunt via cfe-commits
@@ -0,0 +1,180 @@ + +// RUN: %clang_cc1 -fsyntax-only -Wms-bitfield-compatibility -verify -triple armv8 -std=c++23 %s +// RUN: %clang_cc1 -fsyntax-only -DMS_BITFIELDS -mms-bitfields -verify=msbitfields -triple armv8-apple-macos10.15 -std=c++23 %s + +// msbitfields-no-diagnostics

[clang] Add an off-by-default warning to complain about MSVC bitfield padding (PR #117428)

2025-03-25 Thread Oliver Hunt via cfe-commits
@@ -6418,6 +6418,12 @@ def warn_signed_bitfield_enum_conversion : Warning< InGroup, DefaultIgnore; def note_change_bitfield_sign : Note< "consider making the bitfield type %select{unsigned|signed}0">; +def warn_ms_bitfield_mismatched_storage_packing : Warning< + "bit-field

[clang] [clang] Fix overload resolution ranking of inherited constructors (PR #132830)

2025-03-25 Thread via cfe-commits
https://github.com/offsetof updated https://github.com/llvm/llvm-project/pull/132830 >From e458a6b79f560e803bdce414ea35f147ee4ce39d Mon Sep 17 00:00:00 2001 From: offsetof Date: Mon, 24 Mar 2025 21:06:44 + Subject: [PATCH 1/3] [clang] Fix overload resolution ranking of inherited constructo

[clang] [clang] Implement CWG2803 and CWG2958 (PR #132779)

2025-03-25 Thread via cfe-commits
https://github.com/offsetof updated https://github.com/llvm/llvm-project/pull/132779 >From 6c5441fd1e22e93de3a6c681842fe19f6e96fa62 Mon Sep 17 00:00:00 2001 From: offsetof Date: Mon, 24 Mar 2025 16:30:15 + Subject: [PATCH 1/3] [clang] Implement CWG2803 and CWG2958 CWG2803 "Overload resolut

[clang] [Clang] Consider preferred_type in bitfield warnings (#116760) (PR #116785)

2025-03-25 Thread Oliver Hunt via cfe-commits
@@ -6404,20 +6404,23 @@ def warn_bitfield_width_exceeds_type_width: Warning< def err_bitfield_too_wide : Error< "%select{bit-field %1|anonymous bit-field}0 is too wide (%2 bits)">; def warn_bitfield_too_small_for_enum : Warning< - "bit-field %0 is not wide enough to store al

[clang] [Clang] Consider preferred_type in bitfield warnings (#116760) (PR #116785)

2025-03-25 Thread Oliver Hunt via cfe-commits
@@ -10488,7 +10488,14 @@ static bool AnalyzeBitFieldAssignment(Sema &S, FieldDecl *Bitfield, Expr *Init, // The RHS is not constant. If the RHS has an enum type, make sure the // bitfield is wide enough to hold all the values of the enum without // truncation. -

[clang] [Clang] Consider preferred_type in bitfield warnings (#116760) (PR #116785)

2025-03-25 Thread Oliver Hunt via cfe-commits
@@ -6408,20 +6408,24 @@ def warn_bitfield_width_exceeds_type_width: Warning< def err_bitfield_too_wide : Error< "%select{bit-field %1|anonymous bit-field}0 is too wide (%2 bits)">; def warn_bitfield_too_small_for_enum : Warning< - "bit-field %0 is not wide enough to store al

[clang] [Clang] Consider preferred_type in bitfield warnings (#116760) (PR #116785)

2025-03-25 Thread Oliver Hunt via cfe-commits
@@ -6408,20 +6408,24 @@ def warn_bitfield_width_exceeds_type_width: Warning< def err_bitfield_too_wide : Error< "%select{bit-field %1|anonymous bit-field}0 is too wide (%2 bits)">; def warn_bitfield_too_small_for_enum : Warning< - "bit-field %0 is not wide enough to store al

[clang] [Clang] Consider preferred_type in bitfield warnings (#116760) (PR #116785)

2025-03-25 Thread Oliver Hunt via cfe-commits
@@ -0,0 +1,113 @@ +// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -fsyntax-only -verify=expected,preferrednotes -std=c11 -Wno-unused-value -Wno-unused-but-set-variable +// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -fsyntax-only -verify=expected,bitfieldwarning,prefe

[clang] [Clang] Consider preferred_type in bitfield warnings (#116760) (PR #116785)

2025-03-25 Thread Oliver Hunt via cfe-commits
@@ -6408,20 +6408,24 @@ def warn_bitfield_width_exceeds_type_width: Warning< def err_bitfield_too_wide : Error< "%select{bit-field %1|anonymous bit-field}0 is too wide (%2 bits)">; def warn_bitfield_too_small_for_enum : Warning< - "bit-field %0 is not wide enough to store al

[clang] [llvm] [HLSL] Implement the `smoothstep` intrinsic (PR #132288)

2025-03-25 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng updated https://github.com/llvm/llvm-project/pull/132288 >From 0a5da660c5aae053d87d556e59f98c121d916b79 Mon Sep 17 00:00:00 2001 From: kmpeng Date: Tue, 18 Mar 2025 13:25:10 -0700 Subject: [PATCH 1/7] create int_spv_smoothstep intrinsic, create smoothstep lowering & m

[clang] [RFC][clang] Fix for regression #130917 (PR #132214)

2025-03-25 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin updated https://github.com/llvm/llvm-project/pull/132214 >From 91e057bf990e2c454b897982ed0b4e823bb3faba Mon Sep 17 00:00:00 2001 From: Dmitry Polukhin Date: Thu, 20 Mar 2025 06:51:46 -0700 Subject: [PATCH 1/5] [clang] Fix for regression #130917 Changes in #111992

[clang] [profile] Add a clang option -fprofile-continuous that enables continuous instrumentation profiling mode (PR #124353)

2025-03-25 Thread Zequan Wu via cfe-commits
@@ -785,6 +786,34 @@ static void addPGOAndCoverageFlags(const ToolChain &TC, Compilation &C, D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Val; } + if (const auto *A = Args.getLastArg(options::OPT_fprofile_continuous)) { +if (!

[clang] [llvm] [HLSL] Implement the `smoothstep` intrinsic (PR #132288)

2025-03-25 Thread via cfe-commits
github-actions[bot] wrote: :warning: undef deprecator found issues in your code. :warning: You can test this locally with the following command: ``bash git diff -U0 --pickaxe-regex -S '([^a-zA-Z0-9#_-]undef[^a-zA-Z0-9_-]|UndefValue::get)' 2c8e26081fc5a023471622ddc98638431c66ac6f

[clang] [llvm] [RISCV][WIP] Add assembler support for Zvma (PR #132965)

2025-03-25 Thread Letu Ren via cfe-commits
https://github.com/FantasqueX created https://github.com/llvm/llvm-project/pull/132965 None >From b07a5cafd1a0f281012796fb23085828d8b64f68 Mon Sep 17 00:00:00 2001 From: Letu Ren Date: Wed, 26 Mar 2025 01:44:50 +0800 Subject: [PATCH] [RISCV] Add assembler support for Zvma --- .../Driver/prin

[clang] [clang] Allow parentheses around CTAD declarators (PR #132829)

2025-03-25 Thread via cfe-commits
https://github.com/offsetof updated https://github.com/llvm/llvm-project/pull/132829 >From 66833f41d26a6c6355ef67b2f9041ba771b690b7 Mon Sep 17 00:00:00 2001 From: offsetof Date: Mon, 24 Mar 2025 20:51:23 + Subject: [PATCH 1/2] [clang] Allow parentheses around CTAD declarators --- clang/do

[clang] [compiler-rt] [PGO][Offload] Hide GPU entrypoint on Darwin (PR #132966)

2025-03-25 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough created https://github.com/llvm/llvm-project/pull/132966 This PR partially reverts 83e180c and instead opts to hide the GPU entry point on Darwin platforms. Marking `__llvm_write_custom_profile` as used was causing issues on embedded platforms. >From e418

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-03-25 Thread Imad Aldij via cfe-commits
@@ -32,6 +32,26 @@ enum E2 : S::I { e }; #endif } // namespace cwg2516 +namespace cwg2517 { // cwg2517: 23 imdj wrote: Thank you, I wasn't sure how this work related to releases. I fixed it. https://github.com/llvm/llvm-project/pull/132919 __

[clang] [CIR] Add binary operators (PR #132420)

2025-03-25 Thread Morris Hafner via cfe-commits
@@ -143,6 +147,114 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { return createCast(loc, cir::CastKind::bitcast, src, newTy); } + mlir::Value createBinop(mlir::Value lhs, cir::BinOpKind kind, + const llvm::APInt &rhs) { +return create(

[clang] [clang] ASTContex: fix getCommonSugaredType for array types (PR #132559)

2025-03-25 Thread via cfe-commits
@@ -340,6 +340,9 @@ Bug Fixes to C++ Support by template argument deduction. - Clang is now better at instantiating the function definition after its use inside of a constexpr lambda. (#GH125747) +- Clang no longer crashes when trying to unify the types of arrays with + c

[clang] [clang] ASTContex: fix getCommonSugaredType for array types (PR #132559)

2025-03-25 Thread via cfe-commits
@@ -14371,6 +14375,22 @@ QualType ASTContext::getCommonSugaredType(QualType X, QualType Y, // necessarily canonical types, as they may still have sugared properties. // QX and QY will store the sum of all qualifiers in Xs and Ys respectively. auto Xs = ::unwrapSugar(SX,

[clang] [flang] [flang] Add -f[no-]slp-vectorize flags (PR #132801)

2025-03-25 Thread Kajetan Puchalski via cfe-commits
https://github.com/mrkajetanp updated https://github.com/llvm/llvm-project/pull/132801 >From d9b2a86d01688b69b8f116f6b52caeec8cd6e756 Mon Sep 17 00:00:00 2001 From: Kajetan Puchalski Date: Mon, 24 Mar 2025 17:28:03 + Subject: [PATCH 1/4] [flang] Add -f[no-]slp-vectorize flags Add -f[no-]sl

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-03-25 Thread Imad Aldij via cfe-commits
https://github.com/imdj updated https://github.com/llvm/llvm-project/pull/132919 >From 7905577616743f5158560a4b337148ef9cd25f1e Mon Sep 17 00:00:00 2001 From: Imad Aldij Date: Tue, 25 Mar 2025 14:50:55 +0200 Subject: [PATCH 1/6] [Clang] Implement CWG2517 Useless restriction on use of parameter

[clang] [clang] ASTContex: fix getCommonSugaredType for array types (PR #132559)

2025-03-25 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. https://github.com/llvm/llvm-project/pull/132559 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-03-25 Thread via cfe-commits
@@ -396,17 +396,6 @@ bool Sema::DiagnoseUseOfDecl(NamedDecl *D, ArrayRef Locs, targetDiag(*Locs.begin(), diag::err_thread_unsupported); } - if (isa(D) && isa(D->getDeclContext()) && - !isUnevaluatedContext()) { -// C++ [expr.prim.req.nested] p3 -//

[clang] [flang] [flang] Add -f[no-]slp-vectorize flags (PR #132801)

2025-03-25 Thread Tarun Prabhu via cfe-commits
@@ -3177,3 +3177,25 @@ bool tools::shouldEnableVectorizerAtOLevel(const ArgList &Args, bool isSlpVec) { return false; } + +/// Enable -fvectorize based on the optimization level selected. +void tools::handleVectorizeLoopsArgs(const ArgList &Args, +

[clang] [clang] ASTContex: fix getCommonSugaredType for array types (PR #132559)

2025-03-25 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. Looks reasonable, thanks! https://github.com/llvm/llvm-project/pull/132559 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] ASTContex: fix getCommonSugaredType for array types (PR #132559)

2025-03-25 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/132559 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-03-25 Thread via cfe-commits
https://github.com/cor3ntin commented: Thanks for working on this https://github.com/llvm/llvm-project/pull/132919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Allow parentheses around CTAD declarators (PR #132829)

2025-03-25 Thread via cfe-commits
cor3ntin wrote: > CC @Endilll Should this also add a test to > [cwg23xx.cpp](https://github.com/llvm/llvm-project/blob/main/clang/test/CXX/drs/cwg23xx.cpp)? Yes, please! https://github.com/llvm/llvm-project/pull/132829 ___ cfe-commits mailing list cf

[clang] Reapply "[Clang] Improve diagnostics for expansion length mismatch" (PR #121044)

2025-03-25 Thread via cfe-commits
@@ -756,125 +766,123 @@ bool Sema::CheckParameterPacksForExpansion( bool &RetainExpansion, std::optional &NumExpansions) { ShouldExpand = true; RetainExpansion = false; - std::pair FirstPack; - bool HaveFirstPack = false; - std::optional NumPartialExpansions; - Sour

[clang] Reapply "[Clang] Improve diagnostics for expansion length mismatch" (PR #121044)

2025-03-25 Thread via cfe-commits
@@ -888,31 +896,47 @@ bool Sema::CheckParameterPacksForExpansion( // Pack comes from another template parameter. 'S' is first // instantiated, expanding the outer pack 'Outer' to . The alias // declaration is accordingly substituted, leaving the template argum

[clang] Reapply "[Clang] Improve diagnostics for expansion length mismatch" (PR #121044)

2025-03-25 Thread via cfe-commits
@@ -888,31 +896,47 @@ bool Sema::CheckParameterPacksForExpansion( // Pack comes from another template parameter. 'S' is first // instantiated, expanding the outer pack 'Outer' to . The alias // declaration is accordingly substituted, leaving the template argum

[clang] Reapply "[Clang] Improve diagnostics for expansion length mismatch" (PR #121044)

2025-03-25 Thread via cfe-commits
@@ -874,8 +874,11 @@ class PackDeductionScope { SmallVector Unexpanded; S.collectUnexpandedParameterPacks(Pattern, Unexpanded); for (unsigned I = 0, N = Unexpanded.size(); I != N; ++I) { -unsigned Depth, Index; -std::tie(Depth, Index) = getDept

[clang] [clang] Placement new error when modifying consts (PR #132460)

2025-03-25 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. Thanks. Will you need me to merge that for you? https://github.com/llvm/llvm-project/pull/132460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [flang] [flang] Add -f[no-]slp-vectorize flags (PR #132801)

2025-03-25 Thread Tom Eccles via cfe-commits
@@ -1,10 +1,15 @@ ! RUN: %flang -### -S -fslp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s ! RUN: %flang -### -S -fno-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s +! RUN: %flang -### -S -O0 %s 2>&1 | FileCheck -check-prefix=C

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-25 Thread Aaron Ballman via cfe-commits
@@ -534,11 +534,6 @@ C23 implementation status Clang 16 - - String functions for freestanding implementations - https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2524.htm";>N2524 - No - AaronBallman wrote: This is a bit d

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-03-25 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 commented: Thanks for the prompt patch. https://github.com/llvm/llvm-project/pull/132919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-25 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/132232 >From 5008e3cff11bb019e22148926f0088fbb8fc530f Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 20 Mar 2025 11:00:05 -0400 Subject: [PATCH 1/6] [Docs] Document freestanding requirements This adds so

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-25 Thread Aaron Ballman via cfe-commits
@@ -1073,6 +1073,28 @@ inputs. Here is some example of ``$``-prefixed options: Language and Target-Independent Features +Freestanding Builds +--- +Passing the ``-ffreestanding`` flag causes Clang to build for a freestand

[clang] [clang] Fix overload resolution ranking of inherited constructors (PR #132830)

2025-03-25 Thread Vlad Serebrennikov via cfe-commits
@@ -169,6 +169,20 @@ B b; // since-cxx11-error@-1 {{call to implicitly-deleted default constructor of 'B'}} // since-cxx11-note@#cwg2273-B {{default constructor of 'B' is implicitly deleted because base class 'A' has a deleted default constructor}} // since-cxx11-note@#cw

[clang] [clang] Fix overload resolution ranking of inherited constructors (PR #132830)

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

[clang] [flang] [llvm] [Clang][AMDGPU] Expose buffer load lds as a clang builtin (PR #132048)

2025-03-25 Thread Matt Arsenault via cfe-commits
Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= Message-ID: In-Reply-To: @@ -44,6 +44,6 @@ int bar() { return no_

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-25 Thread via cfe-commits
@@ -0,0 +1,456 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c23 -pedantic -Wall -Wno-comment -verify=both,c23 %s +// RUN: %clang_cc1 -fsyntax-only -std=c17 -pedantic -Wall -Wno-comment -Wno-c23-extensions -verify=both,c17 %s + +/* WG14 N3037: + * Improved tag compatibility + * + *

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-25 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,456 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c23 -pedantic -Wall -Wno-comment -verify=both,c23 %s +// RUN: %clang_cc1 -fsyntax-only -std=c17 -pedantic -Wall -Wno-comment -Wno-c23-extensions -verify=both,c17 %s + +/* WG14 N3037: + * Improved tag compatibility + * + *

[clang] [llvm] [RISCV] Add Qualcomm uC Xqciio (External Input Output) extension (PR #132721)

2025-03-25 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. https://github.com/llvm/llvm-project/pull/132721 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add __spirv__ macro (PR #132848)

2025-03-25 Thread Steven Perron via cfe-commits
https://github.com/s-perron commented: Thanks. I was thinking of adding this myself, but it was pushed off. I don't know the best place to put it. I'll let others who know the FE review. https://github.com/llvm/llvm-project/pull/132848 ___ cfe-commits

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-03-25 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: If you update your branch with changes from `main`, unrelated changes in `cxx_dr_status.html` will disappear. https://github.com/llvm/llvm-project/pull/132919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [clang] ASTContex: fix getCommonSugaredType for array types (PR #132559)

2025-03-25 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/132559 >From c60a98049cf62956917f5cf8ab8a846cb3c2aada Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Sat, 22 Mar 2025 14:39:10 -0300 Subject: [PATCH] [clang] ASTContex: fix getCommonSugaredType for array types

[clang] [compiler-rt] [llvm] [FMV][AArch64] Add feature CSSC and detect on linux platform. (PR #132727)

2025-03-25 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: Alright, Wilco has confirmed that GCC will reuse the same detection bit. Any other remarks or are we happy with this change? https://github.com/llvm/llvm-project/pull/132727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-03-25 Thread Imad Aldij via cfe-commits
https://github.com/imdj converted_to_draft https://github.com/llvm/llvm-project/pull/132919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [libc] [llvm] [Clang][AMDGPU] Remove special handling for COV4 libraries (PR #132870)

2025-03-25 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > I'm confused about where this leaves the device library build. It's still > using the none code object version flag, and IIRC it had a mix of its own > reimplementation of this plus use of some of the builtins. Hm, you're probably right that the ROCm DL was relying on the spli

<    1   2   3   4   5   6   >