[clang-tools-extra] [clang-tidy][docs] improve documentation on cppcoreguidelines-narrowing-conversions (#111510) (PR #118209)

2024-12-02 Thread Jonas Toth via cfe-commits
@@ -27,6 +27,29 @@ This check will flag: - All applications of binary operators with a narrowing conversions. For example: ``int i; i+= 0.1;``. +Note that arithmetic with integer types may perform implicit conversions if the used integer types are smaller than ``int``. +T

[clang] c1dcf75 - [clang][bytecode] Implement __builtin_reduce_mul (#118287)

2024-12-02 Thread via cfe-commits
Author: Timm Baeder Date: 2024-12-02T14:03:53+01:00 New Revision: c1dcf75a7cf8840ddf20b622148c4ab0c3b16943 URL: https://github.com/llvm/llvm-project/commit/c1dcf75a7cf8840ddf20b622148c4ab0c3b16943 DIFF: https://github.com/llvm/llvm-project/commit/c1dcf75a7cf8840ddf20b622148c4ab0c3b16943.diff L

[clang] [clang][bytecode] Implement __builtin_reduce_mul (PR #118287)

2024-12-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/118287 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Implement __builtin_reduce_and (PR #118289)

2024-12-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/118289 None >From 3b59280cae47010df112ae9aff091e3fc0708686 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 2 Dec 2024 14:03:16 +0100 Subject: [PATCH] [clang][bytecode] Implement __builtin_redu

[clang] [clang][bytecode] Implement __builtin_reduce_and (PR #118289)

2024-12-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/118289.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/InterpBuiltin.cpp (+5-1) - (modified) clang/test/AST/ByteCode/builtin-functions.

[clang] [clang][bytecode] Implement __builtin_reduce_and (PR #118289)

2024-12-02 Thread via cfe-commits
graphite-app[bot] wrote: ## Your org has enabled the Graphite merge queue for merging into main Add the label “FP Bundles” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. You must have a Graphite account and log in to Graphite in order to use the

[clang] [ExprConst] Handle floating- and char literals in FastEvaluateAsRValue (PR #118294)

2024-12-02 Thread via cfe-commits
https://github.com/Sirraide commented: Seems fine, though I wonder at what point we might want to rewrite this to be a switch statement on the StmtClass because we’re checking for like 5 different expressions here at this point https://github.com/llvm/llvm-project/pull/118294 _

[clang] [clang][Driver] Use shared_ptr in the Compilation class (PR #116406)

2024-12-02 Thread David Truby via cfe-commits
@@ -63,41 +56,39 @@ Compilation::getArgsForToolChain(const ToolChain *TC, StringRef BoundArch, if (!TC) TC = &DefaultToolChain; - DerivedArgList *&Entry = TCArgs[{TC, BoundArch, DeviceOffloadKind}]; + std::shared_ptr &Entry = + TCArgs[{TC, BoundArch, DeviceOffloa

[clang] [clang][Driver] Use shared_ptr in the Compilation class (PR #116406)

2024-12-02 Thread David Truby via cfe-commits
https://github.com/DavidTruby edited https://github.com/llvm/llvm-project/pull/116406 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Allow f16/bf16 for DS_READ_TR16_B64 gfx950 builtins (PR #118297)

2024-12-02 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/118297 >From 10bece71d7a36fa70c10c5a4ccd0962b293ee642 Mon Sep 17 00:00:00 2001 From: Sirish Pande Date: Thu, 18 Jul 2024 14:27:57 -0500 Subject: [PATCH] AMDGPU: Allow f16/bf16 for DS_READ_TR16_B64 gfx950 builtins Co-au

[clang] [clang][bytecode] Implement __builtin_reduce_xor (PR #118299)

2024-12-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/118299 None >From ef14e182caffbd2f4f2e6470fdb53efd00910eb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 2 Dec 2024 14:51:03 +0100 Subject: [PATCH] [clang][bytecode] Implement __builtin_redu

[clang] [lld] [llvm] [Windows] Add support for emitting PGO/LTO magic strings in the Windows PE debug directory (PR #114260)

2024-12-02 Thread Mikołaj Piróg via cfe-commits
mikolaj-pirog wrote: > As I'm not a Windows developer, I defer to other reviewers' expertise on > MSVC's PGO/LTO feature. > > However, to be honest, I'm unsure about the value of porting the strings > given the large feature differences between Clang and MSVC on PGO and LTO. > `clang -flto -c

[clang] [llvm] [HLSL] Disallow named struct types as parameters in target extension types (PR #115971)

2024-12-02 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/115971 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Disallow named struct types as parameters in target extension types (PR #115971)

2024-12-02 Thread Justin Bogner via cfe-commits
@@ -40,10 +40,42 @@ TEST(TypesTest, TargetExtType) { Type *A = TargetExtType::get(Context, "typea"); Type *Aparam = TargetExtType::get(Context, "typea", {}, {0, 1}); Type *Aparam2 = TargetExtType::get(Context, "typea", {}, {0, 1}); + // Opaque types with same parameter

[clang] [llvm] [HLSL] Disallow named struct types as parameters in target extension types (PR #115971)

2024-12-02 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. Looks good! https://github.com/llvm/llvm-project/pull/115971 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Xtensa] Default to unsigned char (PR #115967)

2024-12-02 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson updated https://github.com/llvm/llvm-project/pull/115967 >From e428a45e9638d0d310bd21e46acf4175b09815c9 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Tue, 12 Nov 2024 16:24:08 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?

[clang] [Xtensa] Default to unsigned char (PR #115967)

2024-12-02 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson edited https://github.com/llvm/llvm-project/pull/115967 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)

2024-12-02 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google updated https://github.com/llvm/llvm-project/pull/118281 >From ffba96ae0b32a25b810c46c46e9c360c3eef400d Mon Sep 17 00:00:00 2001 From: Maksim Ivanov Date: Mon, 2 Dec 2024 10:03:25 + Subject: [PATCH 1/3] [clang] Warn [[clang::lifetimebound]] misusages on types

[clang] Revert [Clang] prevent errors for deduction guides using deduced type aliases (PR #118165)

2024-12-02 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk closed https://github.com/llvm/llvm-project/pull/118165 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIR-V] Fixup storage class for global private (PR #116636)

2024-12-02 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts closed https://github.com/llvm/llvm-project/pull/116636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] constexpr built-in elementwise bitreverse function. (PR #118177)

2024-12-02 Thread via cfe-commits
@@ -11322,9 +11323,18 @@ bool VectorExprEvaluator::VisitCallExpr(const CallExpr *E) { for (unsigned EltNum = 0; EltNum < SourceLen; ++EltNum) { APSInt Elt = Source.getVectorElt(EltNum).getInt(); - ResultElements.push_back( - APValue(APSInt(APInt(Info.C

[clang-tools-extra] [NFC] Fix uninitialized data member in constructor. (PR #118324)

2024-12-02 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/118324 >From 4142b5bd36a4f7a554196687e191a09dba9e4dcf Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Mon, 2 Dec 2024 09:09:21 -0800 Subject: [PATCH 1/2] [NFC] Fix uninitialized data member in constructor. -

[clang] [llvm] [AArch64] Implement FP8 SVE intrinsics for widening conversions (PR #118123)

2024-12-02 Thread via cfe-commits
@@ -0,0 +1,78 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 +; RUN: llc -mattr=+bf16,+sve2,+fp8 < %s | FileCheck %s SpencerAbson wrote: nit: I'm not sure we need `+bf16` in these. https://github.com/llvm

[clang] f8b4182 - Revert "[SPIR-V] Fixup storage class for global private (#116636)" (#118312)

2024-12-02 Thread via cfe-commits
Author: Nathan Gauër Date: 2024-12-02T17:32:54+01:00 New Revision: f8b4182f076f8fe55f9d5f617b5a25008a77b22f URL: https://github.com/llvm/llvm-project/commit/f8b4182f076f8fe55f9d5f617b5a25008a77b22f DIFF: https://github.com/llvm/llvm-project/commit/f8b4182f076f8fe55f9d5f617b5a25008a77b22f.diff

[clang] [clang][Driver] Use shared_ptr in the Compilation class (PR #116406)

2024-12-02 Thread David Truby via cfe-commits
@@ -63,41 +56,39 @@ Compilation::getArgsForToolChain(const ToolChain *TC, StringRef BoundArch, if (!TC) TC = &DefaultToolChain; - DerivedArgList *&Entry = TCArgs[{TC, BoundArch, DeviceOffloadKind}]; + std::shared_ptr &Entry = DavidTruby wrote: You ca

[clang] [llvm] Revert "[SPIR-V] Fixup storage class for global private (#116636)" (PR #118312)

2024-12-02 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts closed https://github.com/llvm/llvm-project/pull/118312 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add '-Warray-compare' flag for C++ below version 20 (PR #118031)

2024-12-02 Thread Amr Hesham via cfe-commits
@@ -10264,6 +10264,10 @@ def warn_depr_array_comparison : Warning< "to compare array addresses, use unary '+' to decay operands to pointers">, InGroup; +def warn_array_comparison : Warning< + "comparison between two arrays compare their addresses and will be deprecated i

[clang] [flang] [clang][driver] Special care for -l flags in config files (PR #117573)

2024-12-02 Thread David Truby via cfe-commits
@@ -0,0 +1 @@ +-ffast-math -Wl,--as-needed | -lm -Wl,-Bstatic -lhappy -Wl,-Bdynamic DavidTruby wrote: Could we just pick a character to prefix each argument with that indicates that that argument should come at the end? `$` maybe? e.g. ``` -ffast-math $-lm -Wl

[clang-tools-extra] [NFC] Fix uninitialized data member in constructor. (PR #118324)

2024-12-02 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/118324 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [NFC] Fix uninitialized scalar field in constructor. (PR #118324)

2024-12-02 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/118324 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Driver] Use shared_ptr in the Compilation class (PR #116406)

2024-12-02 Thread David Truby via cfe-commits
@@ -100,7 +100,7 @@ class Compilation { return false; } }; - std::map TCArgs; + std::map> TCArgs; DavidTruby wrote: This can be a unique_ptr, as TCArgs owns the underlying DerivedArgList. https://github.com/llvm/llvm-project/pull/116406

[clang] [HLSL] Add ByteAddressBuffer, RWByteAddressBuffer and RasterizerOrderedByteAddressBuffer definitions to HLSLExternalSemaSource #113477 (PR #116699)

2024-12-02 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/116699 >From 84c1c4dc168b4d20c9f0f0131548080d32f3f02b Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Sat, 9 Nov 2024 01:34:16 + Subject: [PATCH 01/19] adding definition --- clang/lib/Sema/HLSLExternalSemaS

[clang] [flang] [clang][driver] Special care for -l flags in config files (PR #117573)

2024-12-02 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm updated https://github.com/llvm/llvm-project/pull/117573 >From bc66202680198f0e5d1289c62f79ca5799e6f2ac Mon Sep 17 00:00:00 2001 From: Pawel Osmialowski Date: Mon, 25 Nov 2024 14:46:55 + Subject: [PATCH] [clang][driver] Special care for -l and -Wl, flags in con

[clang] [flang] [clang][driver] Special care for -l flags in config files (PR #117573)

2024-12-02 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm edited https://github.com/llvm/llvm-project/pull/117573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

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

2024-12-02 Thread 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] Add an off-by-default warning to complain about MSVC bitfield padding (PR #117428)

2024-12-02 Thread via cfe-commits
https://github.com/Sirraide commented: So I take it we decided not to enable it by default in `-fms-compatibility` mode then? https://github.com/llvm/llvm-project/pull/117428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [clang] Fix non-deterministic infinite recursion... (PR #118288)

2024-12-02 Thread via cfe-commits
graphite-app[bot] wrote: ## Your org has enabled the Graphite merge queue for merging into main Add the label “FP Bundles” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. You must have a Graphite account and log in to Graphite in order to use the

[clang] [clang] Fix non-deterministic infinite recursion... (PR #118288)

2024-12-02 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource created https://github.com/llvm/llvm-project/pull/118288 ...in `ASTContext::getAutoTypeInternal` Given ```cpp template < typename > concept C1 = true; template < typename , auto > concept C2 = true; template < C1 auto V, C2< V > auto> struct S

[clang] [clang] Fix non-deterministic infinite recursion... (PR #118288)

2024-12-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alejandro Álvarez Ayllón (alejandro-alvarez-sonarsource) Changes ...in `ASTContext::getAutoTypeInternal` Given ```cpp template < typename > concept C1 = true; template < typename , auto > concept C2 = true; template < C1 auto V, C2< V >

[clang] [Clang][AArch64]Refactor typespec handling in SveEmitter.cpp (PR #117717)

2024-12-02 Thread via cfe-commits
@@ -570,27 +579,35 @@ void SVEType::applyTypespec(StringRef TS) { for (char I : TS) { switch (I) { case 'Q': + assert(Kind == Invalid && "Invalid use of modifer!"); Kind = Svcount; break; case 'P': + assert(Kind == Invalid && "Invalid use

[clang] [ExprConst] Handle floating- and char literals in FastEvaluateAsRValue (PR #118294)

2024-12-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/118294 This is part of a three-patch series that results in some nice (but not substantial) compile-time improvements: http://llvm-compile-time-tracker.com/compare.php?from=fe1c4f0106fe4fd6d61c38ba46e71fda8f4d1573&to

[clang] [ExprConst] Handle floating- and char literals in FastEvaluateAsRValue (PR #118294)

2024-12-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes This is part of a three-patch series that results in some nice (but not substantial) compile-time improvements: http://llvm-compile-time-tracker.com/compare.php?from=fe1c4f0106fe4fd6d61c38ba46e71fda8f4d1573&

[clang] [AArch64][SME] Fix bug on SMELd1St1 (PR #118109)

2024-12-02 Thread Tulio Magno Quites Machado Filho via cfe-commits
tuliom wrote: @wwwatermiao I noticed the author name in the commit is `unknown`. Is that intentional? Would you like to change it? https://github.com/llvm/llvm-project/pull/118109 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [Clang] Permit noescape on non-pointer types (PR #117344)

2024-12-02 Thread Gábor Horváth via cfe-commits
@@ -1,7 +1,12 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s +// expected-no-diagnostics + template void test1(T __attribute__((noescape)) arr, int size); -// expected-warning@+1 {{'noescape' attribute only applies to pointer arguments}} -void test2(int __attribute__((noes

[clang] [analyzer][Z3] Restore the original timeout of 15s (PR #118291)

2024-12-02 Thread Kristóf Umann via cfe-commits
Szelethus wrote: I also have some just-in-case measurements cooking to confirm that we don't observe any nondeterminism with these values. Previous measurements of mine were made with _all_ configs set to 0. Our downstream release goes off with the patch totally reverted. https://github.com/l

[clang] [clang] constexpr built-in elementwise bitreverse function. (PR #118177)

2024-12-02 Thread via cfe-commits
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/118177 >From 69c3275b5119adc049821aacf2b9f01641d73aad Mon Sep 17 00:00:00 2001 From: c8ef Date: Sun, 1 Dec 2024 00:10:58 +0800 Subject: [PATCH 1/3] constexpr elementwise bitreverse --- clang/docs/LanguageExtensions.rst

[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)

2024-12-02 Thread Ilya Biryukov via cfe-commits
@@ -8612,7 +8612,10 @@ static void HandleLifetimeBoundAttr(TypeProcessingState &State, CurType = State.getAttributedType( createSimpleAttr(State.getSema().Context, Attr), CurType, CurType); +return; } + State.getSema().Diag(Attr.getLoc(), diag::err_

[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)

2024-12-02 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov commented: Thanks for digging through that! This clearly looks like a good improvement and I wanted to mention that we had users genuinely confused about this before. I only have a few suggestions, otherwise very supportive of the patch. https://github.com/llvm

[clang] [clang] Fix non-deterministic infinite recursion... (PR #118288)

2024-12-02 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated https://github.com/llvm/llvm-project/pull/118288 From 998ea6184faa12f6137d5b20f0a5f9279b14623a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?= Date: Mon, 2 Dec 2024 10:48:52 +0100 Subject: [PATCH 1/2] [c

[clang] [clang][bytecode] Implement __builtin_reduce_and (PR #118289)

2024-12-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/118289 >From a46b7045a7b043c7a984bc5cc33004162ed65380 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 2 Dec 2024 14:03:16 +0100 Subject: [PATCH] [clang][bytecode] Implement __builtin_reduce_and

[clang] [Clang][AArch64]Refactor typespec handling in SveEmitter.cpp (PR #117717)

2024-12-02 Thread via cfe-commits
https://github.com/SpencerAbson updated https://github.com/llvm/llvm-project/pull/117717 >From 850b7c0173f47a382093ff345d9bf35ee9e1643e Mon Sep 17 00:00:00 2001 From: Spencer Abson Date: Tue, 26 Nov 2024 13:49:12 + Subject: [PATCH 1/8] Refactor parts of SveEmitter.cpp --- clang/include/cl

[clang] [Clang][AArch64]Refactor typespec handling in SveEmitter.cpp (PR #117717)

2024-12-02 Thread Sander de Smalen via cfe-commits
@@ -570,27 +579,35 @@ void SVEType::applyTypespec(StringRef TS) { for (char I : TS) { switch (I) { case 'Q': + assert(Kind == Invalid && "Invalid use of modifer!"); Kind = Svcount; break; case 'P': + assert(Kind == Invalid && "Invalid use

[clang] [Clang][AArch64]Refactor typespec handling in SveEmitter.cpp (PR #117717)

2024-12-02 Thread Sander de Smalen via cfe-commits
@@ -570,27 +579,35 @@ void SVEType::applyTypespec(StringRef TS) { for (char I : TS) { switch (I) { case 'Q': + assert(Kind == Invalid && "Invalid use of modifer!"); Kind = Svcount; break; case 'P': + assert(Kind == Invalid && "Invalid use

[clang] [clang][bytecode] Implement __builtin_reduce_and (PR #118289)

2024-12-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/118289 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Preserve fixed form in fc1 -x value (PR #117563)

2024-12-02 Thread via cfe-commits
https://github.com/macurtis-amd updated https://github.com/llvm/llvm-project/pull/117563 >From 2b61143e7bac96ee01cfbded4a26ac8206d6b247 Mon Sep 17 00:00:00 2001 From: Matthew Curtis Date: Mon, 2 Dec 2024 07:16:28 -0600 Subject: [PATCH] [flang] Treat pre-processed input as fixed --- clang/lib/

[clang] [analyzer][Z3] Restore the original timeout of 15s (PR #118291)

2024-12-02 Thread via cfe-commits
graphite-app[bot] wrote: ## Your org has enabled the Graphite merge queue for merging into main Add the label “FP Bundles” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. You must have a Graphite account and log in to Graphite in order to use the

[clang] [flang] [Flang][LoongArch] Enable clang command-line options in flang. (PR #118244)

2024-12-02 Thread David Truby via cfe-commits
https://github.com/DavidTruby approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/118244 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64]Refactor typespec handling in SveEmitter.cpp (PR #117717)

2024-12-02 Thread via cfe-commits
@@ -570,27 +579,35 @@ void SVEType::applyTypespec(StringRef TS) { for (char I : TS) { switch (I) { case 'Q': + assert(Kind == Invalid && "Invalid use of modifer!"); Kind = Svcount; break; case 'P': + assert(Kind == Invalid && "Invalid use

[clang] [clang][bytecode] Implement __builtin_reduce_or (PR #118292)

2024-12-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/118292 None >From 778afb1f6e35f551b0eb56b055d21755f0c55136 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 2 Dec 2024 14:24:11 +0100 Subject: [PATCH] [clang][bytecode] Implement __builtin_redu

[clang] [flang] [flang] Treat pre-processed input as fixed (PR #117563)

2024-12-02 Thread via cfe-commits
https://github.com/macurtis-amd edited https://github.com/llvm/llvm-project/pull/117563 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Implement __builtin_reduce_or (PR #118292)

2024-12-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/118292.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/InterpBuiltin.cpp (+6-1) - (modified) clang/test/AST/ByteCode/builtin-functions.

[clang] [Clang] Add '-Warray-compare' flag for C++ below version 20 (PR #118031)

2024-12-02 Thread Erich Keane via cfe-commits
@@ -10264,6 +10264,11 @@ def warn_depr_array_comparison : Warning< "to compare array addresses, use unary '+' to decay operands to pointers">, InGroup; +def warn_array_comparison : Warning< + "comparison between two arrays; " erichkeane wrote: I would lo

[clang-tools-extra] [clang-tidy] ignore `[[clang::lifetimebound]]` param in return-const-ref-from-parameter (PR #118315)

2024-12-02 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/118315 None >From 8a9fc5dfc40ecc46a21ce7c537e2ffe0dbbac8b0 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 2 Dec 2024 23:50:12 +0800 Subject: [PATCH] [clang-tidy] ignore `[[clang::lifetimebound]]` param in

[clang] [flang] [flang] Treat pre-processed input as fixed (PR #117563)

2024-12-02 Thread via cfe-commits
@@ -777,6 +777,15 @@ void Flang::ConstructJob(Compilation &C, const JobAction &JA, addFortranDialectOptions(Args, CmdArgs); + // 'flang -E' always produces output that is suitable for use as fixed form + // Fortran. However it is only valid free form source if the origin

[clang-tools-extra] [clang-tidy] ignore `[[clang::lifetimebound]]` param in return-const-ref-from-parameter (PR #118315)

2024-12-02 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 ready_for_review https://github.com/llvm/llvm-project/pull/118315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libcxx] [llvm] [openmp] [polly] [llvm] Move sub-project lead maintainers into their own Maintainers.md files (PR #118309)

2024-12-02 Thread David Spickett via cfe-commits
@@ -434,29 +433,17 @@ Others only have a lead maintainer listed here. [Flang maintainers](https://github.com/llvm/llvm-project/blob/main/flang/Maintainers.txt) -[LLD maintainers](https://github.com/llvm/llvm-project/blob/main/lld/CODE_OWNERS.TXT) - -[LLDB maintainers](http

[clang] [clang] constexpr built-in elementwise bitreverse function. (PR #118177)

2024-12-02 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/118177 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [clang][driver] Special care for -l flags in config files (PR #117573)

2024-12-02 Thread David Truby via cfe-commits
@@ -0,0 +1 @@ +-ffast-math -Wl,--as-needed | -lm -Wl,-Bstatic -lhappy -Wl,-Bdynamic DavidTruby wrote: Can we check that this works for multiple line config files? E.g. I would expect: ``` -ffast-math | -lm -Wl,--as-needed | -Wl,-Bstatic -lhappy | -Wl,-Bdynamic `

[clang] [Clang] Add '-Warray-compare' flag for C++ below version 20 (PR #118031)

2024-12-02 Thread Shafik Yaghmour via cfe-commits
shafik wrote: Note paper [Remove Deprecated Array Comparisons from C++26](https://wg21.link/p2865) although the lastest version is not public yet. https://github.com/llvm/llvm-project/pull/118031 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [Xtensa] Default to unsigned char (PR #115967)

2024-12-02 Thread Alexey Gerenkov via cfe-commits
gerekon wrote: > Thanks, do you believe we need a backwards compatibility flag for the ABI to > be consistent with older clang or is this safe to land? I think as far as we can control behavior with `-fsigned-char` we do not need another option for this. @MabezDev WDYT? Will it be critical fo

[clang] [Clang][AArch64]Refactor typespec handling in SveEmitter.cpp (PR #117717)

2024-12-02 Thread via cfe-commits
SpencerAbson wrote: Thank you @sdesmalen-arm https://github.com/llvm/llvm-project/pull/117717 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][opt][Transforms][SPIR-V] Enable `InferAddressSpaces` for SPIR-V (PR #110897)

2024-12-02 Thread Alex Voicu via cfe-commits
@@ -91,6 +97,88 @@ SPIRVTargetMachine::SPIRVTargetMachine(const Target &T, const Triple &TT, setRequiresStructuredCFG(false); } +enum AddressSpace { + Function = storageClassToAddressSpace(SPIRV::StorageClass::Function), + CrossWorkgroup = + storageClassToAddressSpac

[clang] Revert [Clang] prevent errors for deduction guides using deduced type aliases (PR #118165)

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

[clang] [Clang][OpenCL][AMDGPU] Allow a kernel to call another kernel (PR #115821)

2024-12-02 Thread Shilei Tian via cfe-commits
@@ -1780,6 +1786,15 @@ void CXXNameMangler::mangleDeviceStubName(const IdentifierInfo *II) { << II->getName(); } +void CXXNameMangler::mangleOCLDeviceStubName(const IdentifierInfo *II) { + // ::= __clang_ocl_kern_imp_ + // ::= [n] + // ::= + StringRef OCLDevi

[clang] [clang] Document the return value of __builtin_COLUMN (PR #118360)

2024-12-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (GeorgeKA) Changes PR for issue #78657 Updated clang/docs/LanguageExtensions.rst to detail the return value of __builtin_COLUMN for this implementation. -- Fyi, this is my first contribution, so please bear with me. There already

[clang-tools-extra] [clang-tidy] ignore `[[clang::lifetimebound]]` param in return-const-ref-from-parameter (PR #118315)

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

[clang] [Clang] Permit noescape on non-pointer types (PR #117344)

2024-12-02 Thread Erich Keane via cfe-commits
@@ -1,7 +1,12 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s +// expected-no-diagnostics + template void test1(T __attribute__((noescape)) arr, int size); -// expected-warning@+1 {{'noescape' attribute only applies to pointer arguments}} -void test2(int __attribute__((noes

[clang] [clang] Fix non-deterministic infinite recursion... (PR #118288)

2024-12-02 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 0611fdd32046c41647a7719252166033f7bce2f2 998ea6184faa12f6137d5b20f0a5f9279b14623a --e

[clang] [flang] [flang] Preserve fixed form in fc1 -x value (PR #117563)

2024-12-02 Thread via cfe-commits
macurtis-amd wrote: (Sorry for the delayed response ... was on Thanksgiving holiday) @banach-space @DavidTruby Thanks for looking at this! Latest version of the fix simply adds `-ffixed-form` for pre-processed input, unless the user manually specifies `-ffixed-form` or `-ffree-form`. https://

[clang] [Darwin][Driver][clang] Prioritise `-isysroot` over `--sysroot` consistently (PR #115993)

2024-12-02 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: > > However, notably, even on Darwin, if you pass _both_ flags, you still get > > the intended behavior of `-isysroot` affecting headers, and `--sysroot` > > affecting libraries. Your change would break that. > > What's the use-case for this? > > Because for most users, you

[clang] [llvm] [SPIR-V] Fixup storage class for global private (PR #116636)

2024-12-02 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts edited https://github.com/llvm/llvm-project/pull/116636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add '-Warray-compare' flag for C++ below version 20 (PR #118031)

2024-12-02 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: All comments are addressed, please take a second look. https://github.com/llvm/llvm-project/pull/118031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SelectionDAG][PowerPC] Add an intrinsic for memcmp. (PR #118178)

2024-12-02 Thread Stefan Pintilie via cfe-commits
stefanp-ibm wrote: > You'll have to create an RFC on discourse if you want to add a new > target-independent memory intrinsic. > > Though if changing the name is the extent of the "special handling" you need, > we probably shouldn't be adding an intrinsic for that. We will want to add more ha

[clang] [clang] constexpr built-in elementwise bitreverse function. (PR #118177)

2024-12-02 Thread Simon Pilgrim via cfe-commits
@@ -11322,9 +11323,18 @@ bool VectorExprEvaluator::VisitCallExpr(const CallExpr *E) { for (unsigned EltNum = 0; EltNum < SourceLen; ++EltNum) { APSInt Elt = Source.getVectorElt(EltNum).getInt(); - ResultElements.push_back( - APValue(APSInt(APInt(Info.C

[clang] [Clang] Add '-Warray-compare' flag for C++ below version 20 (PR #118031)

2024-12-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/118031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [clang][driver] Special care for -l flags in config files (PR #117573)

2024-12-02 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm edited https://github.com/llvm/llvm-project/pull/117573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Treat pre-processed input as fixed (PR #117563)

2024-12-02 Thread David Truby via cfe-commits
@@ -777,6 +777,15 @@ void Flang::ConstructJob(Compilation &C, const JobAction &JA, addFortranDialectOptions(Args, CmdArgs); + // 'flang -E' always produces output that is suitable for use as fixed form + // Fortran. However it is only valid free form source if the origin

[clang] [Clang] Add '-Warray-compare' flag for C++ below version 20 (PR #118031)

2024-12-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/118031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add '-Warray-compare' flag for C++ below version 20 (PR #118031)

2024-12-02 Thread Erich Keane via cfe-commits
@@ -702,6 +702,7 @@ def GNUStatementExpressionFromMacroExpansion : def GNUStatementExpression : DiagGroup<"gnu-statement-expression", [GNUStatementExpressionFromMacroExpansion]>; def StringConcatation : DiagGroup<"string-concatenation">;

[clang] [Clang] Add '-Warray-compare' flag for C++ below version 20 (PR #118031)

2024-12-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Think I'm happy here with 1 nit, but please let the others take a look. https://github.com/llvm/llvm-project/pull/118031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [CIR] Fix warning in CIRGenAction.cpp (PR #118389)

2024-12-02 Thread David Olsen via cfe-commits
https://github.com/dkolsen-pgi created https://github.com/llvm/llvm-project/pull/118389 Fix a compiler warning in `CIRGenConsumer::HandleTranslationUnit` in `clang/lib/CIR/FrontendAction/CIRGenAction.cpp`. The warning was about a `default:` section in a switch statement that already covered a

[clang] [CIR] Fix warning in CIRGenAction.cpp (PR #118389)

2024-12-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: David Olsen (dkolsen-pgi) Changes Fix a compiler warning in `CIRGenConsumer::HandleTranslationUnit` in `clang/lib/CIR/FrontendAction/CIRGenAction.cpp`. The warning was about a `default:` section in a switch statement that already cover

[clang] [CIR] Fix warning in CIRGenAction.cpp (PR #118389)

2024-12-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: David Olsen (dkolsen-pgi) Changes Fix a compiler warning in `CIRGenConsumer::HandleTranslationUnit` in `clang/lib/CIR/FrontendAction/CIRGenAction.cpp`. The warning was about a `default:` section in a switch statement that already covered

[clang] [CIR] Fix warning in CIRGenAction.cpp (PR #118389)

2024-12-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/118389 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)

2024-12-02 Thread Maksim Ivanov via cfe-commits
@@ -8612,7 +8612,10 @@ static void HandleLifetimeBoundAttr(TypeProcessingState &State, CurType = State.getAttributedType( createSimpleAttr(State.getSema().Context, Attr), CurType, CurType); +return; } + State.getSema().Diag(Attr.getLoc(), diag::err_

[clang] [llvm] Revert "[SPIR-V] Fixup storage class for global private (#116636)" (PR #118312)

2024-12-02 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts updated https://github.com/llvm/llvm-project/pull/118312 From e8c3d6da73e95fd03e5ccdf8e08bdc99ff52e6f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nathan=20Gau=C3=ABr?= Date: Mon, 2 Dec 2024 16:50:47 +0100 Subject: [PATCH 1/2] Revert "[SPIR-V] Fixup storage class for glo

[clang] [NFC][HLSL] Allow target intrinsic switching to optionally be set. (PR #117648)

2024-12-02 Thread Tex Riddell via cfe-commits
https://github.com/tex3d approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/117648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Allow f16/bf16 for DS_READ_TR16_B64 gfx950 builtins (PR #118297)

2024-12-02 Thread Matt Arsenault via cfe-commits
arsenm wrote: ### Merge activity * **Dec 2, 2:39 PM EST**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/118297). https://github.com/llvm/llvm-project/pull/118297 __

[clang] [llvm] AMDGPU: Allow f16/bf16 for DS_READ_TR16_B64 gfx950 builtins (PR #118297)

2024-12-02 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/118297 >From 46aca3bb3fef8903d9388d352be00ddd9aecf68b Mon Sep 17 00:00:00 2001 From: Sirish Pande Date: Thu, 18 Jul 2024 14:27:57 -0500 Subject: [PATCH] AMDGPU: Allow f16/bf16 for DS_READ_TR16_B64 gfx950 builtins Co-au

  1   2   3   4   5   6   >