[clang] [Clang][RFC] Intrododuce a builtin to determine the number of (PR #131515)

2025-03-16 Thread via cfe-commits
cor3ntin wrote: Please look at the doc/tests and confirm this would be suitable to implement [`std::exec::tag_of_t`](https://eel.is/c++draft/exec#snd.concepts-5) / P2300 @ldionne @jwakely @StephanTLavavej @philnik777 @ericniebler https://github.com/llvm/llvm-project/pull/131515 __

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

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

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

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

[clang] Reapply "[analyzer] Delay the checker constructions after parsing" (PR #128369)

2025-03-16 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/128369 >From ca3c1fb4e9aebb750ac5ed2b0451114ea0c6738c Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Sat, 22 Feb 2025 12:07:23 +0100 Subject: [PATCH] Reapply "[analyzer] Delay the checker constructions after pars

[clang] Reapply "[analyzer] Delay the checker constructions after parsing" (PR #128369)

2025-03-16 Thread Balazs Benics via cfe-commits
steakhal wrote: Ping @Xazax-hun @NagyDonat https://github.com/llvm/llvm-project/pull/128369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement Wpointer-bool-conversion-strict (PR #131523)

2025-03-16 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu edited https://github.com/llvm/llvm-project/pull/131523 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CIR] Add missing dependency on MLIR headers (PR #131057)

2025-03-16 Thread via cfe-commits
https://github.com/darkbuck updated https://github.com/llvm/llvm-project/pull/131057 >From 255050e6d1e3ebbf25b30c17a10be14d29e5dae7 Mon Sep 17 00:00:00 2001 From: Michael Liao Date: Tue, 4 Mar 2025 12:47:24 -0500 Subject: [PATCH] [clang][CIR] Add missing dependency on MLIR headers - Add depend

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-16 Thread Younan Zhang via cfe-commits
@@ -4160,6 +4160,54 @@ static bool CheckVecStepTraitOperandType(Sema &S, QualType T, return false; } +static ExprResult BuildStructuredBindingSizeTraitImpl(Sema &S, QualType T, + Expr *E, +

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-16 Thread Younan Zhang via cfe-commits
@@ -4160,6 +4160,54 @@ static bool CheckVecStepTraitOperandType(Sema &S, QualType T, return false; } +static ExprResult BuildStructuredBindingSizeTraitImpl(Sema &S, QualType T, + Expr *E, +

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-16 Thread Younan Zhang via cfe-commits
@@ -0,0 +1,168 @@ +// RUN: %clang_cc1 %s -std=c++2c -fsyntax-only -verify + +struct S0 {}; +struct S1 {int a;}; +struct S2 {int a; int b;}; +struct S3 {double a; int b; int c;}; + + + +struct SD : S1 {}; +struct SE1 : S1 { int b;}; + +class P1 {int a;}; // #note-private + + +temp

[clang] [llvm] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

2025-03-16 Thread Daniel Chen via cfe-commits
https://github.com/DanielCChen updated https://github.com/llvm/llvm-project/pull/131041 >From 9d3e16f3e7c5adf4b5e0c1c6ba861d9e0ffea23b Mon Sep 17 00:00:00 2001 From: Daniel Chen Date: Wed, 12 Mar 2025 18:23:14 -0400 Subject: [PATCH 1/8] [flang-rt] Pass the whole path of libflang_rt.runtime.a t

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-16 Thread Eric Niebler via cfe-commits
@@ -434,6 +434,36 @@ __datasizeof ``__datasizeof`` behaves like ``sizeof``, except that it returns the size of the type ignoring tail padding. +.. _builtin_structured_binding_size-doc: + +__builtin_structured_binding_size (C++) +--- +``__bu

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-16 Thread via cfe-commits
@@ -434,6 +434,36 @@ __datasizeof ``__datasizeof`` behaves like ``sizeof``, except that it returns the size of the type ignoring tail padding. +.. _builtin_structured_binding_size-doc: + +__builtin_structured_binding_size (C++) +--- +``__bu

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-16 Thread Eric Niebler via cfe-commits
@@ -434,6 +434,36 @@ __datasizeof ``__datasizeof`` behaves like ``sizeof``, except that it returns the size of the type ignoring tail padding. +.. _builtin_structured_binding_size-doc: + +__builtin_structured_binding_size (C++) +--- +``__bu

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-16 Thread A. Jiang via cfe-commits
@@ -434,6 +434,36 @@ __datasizeof ``__datasizeof`` behaves like ``sizeof``, except that it returns the size of the type ignoring tail padding. +.. _builtin_structured_binding_size-doc: + +__builtin_structured_binding_size (C++) +--- +``__bu

[clang-tools-extra] [clang-tidy] offer option to check sugared types in avoid-c-arrays check (PR #131468)

2025-03-16 Thread via cfe-commits
@@ -72,3 +72,9 @@ can be either ``char* argv[]`` or ``char** argv``, but cannot be .. code:: c++ const char name[] = "Some name"; + +.. option:: CheckSugaredTypes + + When set to `true` (default is `false`), type aliases, decltypes as well as EugeneZel

[clang-tools-extra] [clang-tidy] offer option to check sugared types in avoid-c-arrays check (PR #131468)

2025-03-16 Thread Baranov Victor via cfe-commits
@@ -72,3 +72,9 @@ can be either ``char* argv[]`` or ``char** argv``, but cannot be .. code:: c++ const char name[] = "Some name"; + +.. option:: CheckSugaredTypes + + When set to `true` (default is `false`), type aliases, decltypes as well as vbvictor

[clang] [clang][opencl] Allow passing all zeros to reqd_work_group_size (PR #131543)

2025-03-16 Thread Alexander Shaposhnikov via cfe-commits
https://github.com/alexander-shaposhnikov created https://github.com/llvm/llvm-project/pull/131543 Allow passing all zeros to reqd_work_group_size. Quote from https://rocm.docs.amd.com/projects/llvm-project/en/latest/LLVM/llvm/html/AMDGPUUsage.html#amdgpu-amdhsa-code-object-kernel-argument-met

[clang] [clang][opencl] Allow passing all zeros to reqd_work_group_size (PR #131543)

2025-03-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alexander Shaposhnikov (alexander-shaposhnikov) Changes Allow passing all zeros to reqd_work_group_size. Quote from https://rocm.docs.amd.com/projects/llvm-project/en/latest/LLVM/llvm/html/AMDGPUUsage.html#amdgpu-amdhsa-code-object-kernel

[clang] [clang][opencl] Allow passing all zeros to reqd_work_group_size (PR #131543)

2025-03-16 Thread Alexander Shaposhnikov via cfe-commits
https://github.com/alexander-shaposhnikov updated https://github.com/llvm/llvm-project/pull/131543 >From e1781606a72e86a13b032928f35403a2859f38b2 Mon Sep 17 00:00:00 2001 From: Alexander Shaposhnikov Date: Sun, 16 Mar 2025 22:27:05 + Subject: [PATCH] [clang][opencl] Allow passing all zeros

[clang] 91328db - [clang-format] Correctly annotate user-defined conversion functions (#131434)

2025-03-16 Thread via cfe-commits
Author: Owen Pan Date: 2025-03-16T16:11:39-07:00 New Revision: 91328dbae986dfa93cf2acef0a93361fd5ced66d URL: https://github.com/llvm/llvm-project/commit/91328dbae986dfa93cf2acef0a93361fd5ced66d DIFF: https://github.com/llvm/llvm-project/commit/91328dbae986dfa93cf2acef0a93361fd5ced66d.diff LOG:

[clang] [clang-format] Correctly annotate user-defined conversion functions (PR #131434)

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

[clang] [clang][opencl] Allow passing all zeros to reqd_work_group_size (PR #131543)

2025-03-16 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 3e6f618e86f5fbad2c2d5802416ec3d3366a2837 eed71b8c5a5ae670fa33ce4c20c9cbb72bbcf511 --e

[clang] 2dc123b - [clang][opencl] Allow passing all zeros to reqd_work_group_size (#131543)

2025-03-16 Thread via cfe-commits
Author: Alexander Shaposhnikov Date: 2025-03-16T16:21:46-07:00 New Revision: 2dc123b33d51fcccb9e1af7230bc6573f77b3ccc URL: https://github.com/llvm/llvm-project/commit/2dc123b33d51fcccb9e1af7230bc6573f77b3ccc DIFF: https://github.com/llvm/llvm-project/commit/2dc123b33d51fcccb9e1af7230bc6573f77b3

[clang] [clang][opencl] Allow passing all zeros to reqd_work_group_size (PR #131543)

2025-03-16 Thread Alexander Shaposhnikov via cfe-commits
https://github.com/alexander-shaposhnikov closed https://github.com/llvm/llvm-project/pull/131543 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4b86a7f - [clang-format] Update the minimum python version requirement

2025-03-16 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2025-03-16T16:42:19-07:00 New Revision: 4b86a7f3860a3cb0368e308494f65c103c02fa18 URL: https://github.com/llvm/llvm-project/commit/4b86a7f3860a3cb0368e308494f65c103c02fa18 DIFF: https://github.com/llvm/llvm-project/commit/4b86a7f3860a3cb0368e308494f65c103c02fa18.diff LOG:

[clang] Implement Wpointer-bool-conversion-strict (PR #131523)

2025-03-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yutong Zhu (YutongZhuu) Changes This PR implements the feature request from issue #9500. From the original issue: ```c _Bool foo(void) { _Bool x = (void *)0; // warn on this return (void *)0; // warn on this } ``` However, I believe

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-16 Thread via cfe-commits
@@ -5389,6 +5389,15 @@ void CXXNameMangler::mangleExpression(const Expr *E, unsigned Arity, Diags.Report(DiagID); return; } +case UETT_StructuredBindingSize: + Out << "u11__builtin_structured_binding_size"; halbi2 wrote: ```suggestion

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-16 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/131515 >From ae66e1cc48c721badc234ff5bc5a89aeb6cd2ea3 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Sun, 16 Mar 2025 14:04:15 +0100 Subject: [PATCH 1/2] [Clang][RFC] Intrododuce a builtin to determine the numbe

[clang] [NFC][analyzer] Framework for multipart checkers (PR #130985)

2025-03-16 Thread Donát Nagy via cfe-commits
NagyDonat wrote: > I'm somewhat unsatisfied, but it's not because of this PR. This is an > excellent way forward, I just wish we had a better abstraction. I agree that the architecture that's being formalized by this commit is not perfect. If I would be reimplementing a static analyzer from z

[clang] [clang-tools-extra] [CudaSPIRV] Allow using integral non-type template parameters as attribute args (PR #131546)

2025-03-16 Thread Alexander Shaposhnikov via cfe-commits
https://github.com/alexander-shaposhnikov created https://github.com/llvm/llvm-project/pull/131546 Allow using integral non-type template parameters as attribute arguments of reqd_work_group_size and work_group_size_hint. Test plan: ninja check-all >From 11495fcca75e25b6b89c991fed97d7d254b080

[clang] [clang-tools-extra] [CudaSPIRV] Allow using integral non-type template parameters as attribute args (PR #131546)

2025-03-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alexander Shaposhnikov (alexander-shaposhnikov) Changes Allow using integral non-type template parameters as attribute arguments of reqd_work_group_size and work_group_size_hint. Test plan: ninja check-all --- Full diff: https://github.c

[clang] [clang-tools-extra] [CudaSPIRV] Allow using integral non-type template parameters as attribute args (PR #131546)

2025-03-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Alexander Shaposhnikov (alexander-shaposhnikov) Changes Allow using integral non-type template parameters as attribute arguments of reqd_work_group_size and work_group_size_hint. Test plan: ninja check-all --- Full diff: https://

[clang] [clang-tools-extra] [CudaSPIRV] Allow using integral non-type template parameters as attribute args (PR #131546)

2025-03-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Alexander Shaposhnikov (alexander-shaposhnikov) Changes Allow using integral non-type template parameters as attribute arguments of reqd_work_group_size and work_group_size_hint. Test plan: ninja check-all --- Full diff: http

[clang] [clang] Change placeholder from `undef` to `poison` (PR #131533)

2025-03-16 Thread Pedro Lobo via cfe-commits
https://github.com/pedroclobo created https://github.com/llvm/llvm-project/pull/131533 Return a `poison` value, instead of `undef`, if there is no available SEH info. >From 6c231b0dba091d6f7c5b79a92dedeeb56166fd8f Mon Sep 17 00:00:00 2001 From: Pedro Lobo Date: Wed, 15 Jan 2025 20:14:30 +

[clang] [clang] Change placeholder from `undef` to `poison` (PR #131533)

2025-03-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Pedro Lobo (pedroclobo) Changes Return a `poison` value, instead of `undef`, if there is no available SEH info. --- Full diff: https://github.com/llvm/llvm-project/pull/131533.diff 1 Files Affected: - (modified) clang/lib/CodeGe

[clang] [clang] Change placeholder from `undef` to `poison` (PR #131533)

2025-03-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Pedro Lobo (pedroclobo) Changes Return a `poison` value, instead of `undef`, if there is no available SEH info. --- Full diff: https://github.com/llvm/llvm-project/pull/131533.diff 1 Files Affected: - (modified) clang/lib/CodeGen/CGExce

[clang] [Clang]Implement Wpointer-bool-conversion-strict (PR #131523)

2025-03-16 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu edited https://github.com/llvm/llvm-project/pull/131523 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][opencl] Allow passing all zeros to reqd_work_group_size (PR #131543)

2025-03-16 Thread Shangwu Yao via cfe-commits
https://github.com/ShangwuYao approved this pull request. Cool! https://github.com/llvm/llvm-project/pull/131543 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix UEFI Target info (PR #127290)

2025-03-16 Thread Petr Hosek via cfe-commits
@@ -835,19 +835,39 @@ class LLVM_LIBRARY_VISIBILITY UEFIX86_64TargetInfo public: UEFIX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) : UEFITargetInfo(Triple, Opts) { +LongWidth = LongAlign = 32; +DoubleAlign = LongLongAlign = 64; +Int

[clang] [clang-format] Correctly annotate user-defined conversion functions (PR #131434)

2025-03-16 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/131434 >From 46cde1b7667f36115d746326b78d011511cac738 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 15 Mar 2025 00:37:53 -0700 Subject: [PATCH 1/3] [clang-format] Correctly annotate user-defined conversion functio

[clang] [Clang]Implement Wpointer-bool-conversion-strict (PR #131523)

2025-03-16 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu updated https://github.com/llvm/llvm-project/pull/131523 >From f99d61ef3353e8559450e91ad8201f8fe7592a86 Mon Sep 17 00:00:00 2001 From: Yutong Zhu Date: Sun, 16 Mar 2025 11:15:31 -0400 Subject: [PATCH 1/2] Implement Wpointer-bool-conversion-strict --- clang/docs/R

[clang] [Clang][RFC] Intrododuce a builtin to determine the number of (PR #131515)

2025-03-16 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/131515 bindings that would be produced by ```cpp auto [...p] = expr; ``` This is necessary to implement P2300 (https://eel.is/c++draft/exec#snd.concepts-5), but can also be used to implement a general get func

[clang] [Clang][RFC] Intrododuce a builtin to determine the number of (PR #131515)

2025-03-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes bindings that would be produced by ```cpp auto [...p] = expr; ``` This is necessary to implement P2300 (https://eel.is/c++draft/exec#snd.concepts-5), but can also be used to implement a general get fu

[clang] Implement Wpointer-bool-conversion-strict (PR #131523)

2025-03-16 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu created https://github.com/llvm/llvm-project/pull/131523 This PR implements the feature request from issue #9500. From the original issue: ```c _Bool foo(void) { _Bool x = (void *)0; // warn on this return (void *)0; // warn on this } ``` However, I believe t

[clang] [NFC][analyzer] Framework for multipart checkers (PR #130985)

2025-03-16 Thread Balazs Benics via cfe-commits
=?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy Message-ID: In-Reply-To: ht

[clang] [clang-format] Correctly annotate user-defined conversion functions (PR #131434)

2025-03-16 Thread Owen Pan via cfe-commits
@@ -1639,6 +1639,31 @@ class AnnotatingParser { case tok::kw_operator: if (Style.isProto()) break; + // Handle C++ user-defined conversion function. + if (IsCpp && CurrentToken) { +const auto *Info = CurrentToken->Tok.getIdentifierInfo(); +

[clang] [Clang] Implement Wpointer-bool-conversion-strict (PR #131523)

2025-03-16 Thread via cfe-commits
MagentaTreehouse wrote: We should not flag [contextual conversions](https://en.cppreference.com/w/cpp/language/implicit_conversion#Contextual_conversions) to `bool`. This is supported by C++ Core Guidelines [ES.87: Don’t add redundant `==` or `!=` conditions](https://isocpp.github.io/CppCoreG

[clang] [Clang] Implement Wpointer-bool-conversion-strict (PR #131523)

2025-03-16 Thread via cfe-commits
hstk30-hw wrote: We have so many conversion from ptr to bool like null check stmt `if (!p) ...` . Open the option will get many warnings, and can't figure out the real case from it. https://github.com/llvm/llvm-project/pull/131523 ___ cfe-commits ma

[clang] [clang-tools-extra] [CudaSPIRV] Allow using integral non-type template parameters as attribute args (PR #131546)

2025-03-16 Thread Alexander Shaposhnikov via cfe-commits
https://github.com/alexander-shaposhnikov updated https://github.com/llvm/llvm-project/pull/131546 >From 86eefd7db18252d74f7b5891e7490653b6378eb0 Mon Sep 17 00:00:00 2001 From: Alexander Shaposhnikov Date: Mon, 17 Mar 2025 00:39:24 + Subject: [PATCH] [CudaSPIRV] Allow using integral non-typ

[clang] [C++20][Modules] Prevent premature calls to PassInterestingDeclsToConsumer() within FinishedDeserializing(). (PR #129982)

2025-03-16 Thread Shafik Yaghmour via cfe-commits
@@ -10792,47 +10822,54 @@ void ASTReader::FinishedDeserializing() { --NumCurrentElementsDeserializing; if (NumCurrentElementsDeserializing == 0) { -// Propagate exception specification and deduced type updates along -// redeclaration chains. -// -// We do t

[clang] [C++20][Modules] Prevent premature calls to PassInterestingDeclsToConsumer() within FinishedDeserializing(). (PR #129982)

2025-03-16 Thread Shafik Yaghmour via cfe-commits
@@ -4309,12 +4309,12 @@ Decl *ASTReader::ReadDeclRecord(GlobalDeclID ID) { void ASTReader::PassInterestingDeclsToConsumer() { assert(Consumer); - if (PassingDeclsToConsumer) + if (!CanPassDeclsToConsumer) return; // Guard variable to avoid recursively redoing the

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread Matt Arsenault via cfe-commits
@@ -32,9 +32,9 @@ static const char *const DataLayoutStringR600 = "-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1"; static const char *const DataLayoutStringAMDGCN = -"e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32" -"-p7:160:25

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread Matt Arsenault via cfe-commits
@@ -32,9 +32,9 @@ static const char *const DataLayoutStringR600 = "-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1"; static const char *const DataLayoutStringAMDGCN = -"e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32" -"-p7:160:25

[clang] [clang-tools-extra] [CudaSPIRV] Allow using integral non-type template parameters as attribute args (PR #131546)

2025-03-16 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,34 @@ +// RUN: %clang_cc1 -triple spirv64 -aux-triple x86_64-unknown-linux-gnu \ +// RUN: -fcuda-is-device -verify -fsyntax-only %s + +#include "Inputs/cuda.h" arsenm wrote: Probably should just locally define __global__ instead of depending on the f

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread Matt Arsenault via cfe-commits
@@ -32,9 +32,9 @@ static const char *const DataLayoutStringR600 = "-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1"; static const char *const DataLayoutStringAMDGCN = -"e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32" -"-p7:160:25

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread Shilei Tian via cfe-commits
@@ -32,9 +32,9 @@ static const char *const DataLayoutStringR600 = "-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1"; static const char *const DataLayoutStringAMDGCN = -"e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32" -"-p7:160:25

[clang] [clang] Mark some language options as benign. (PR #131569)

2025-03-16 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [clang] Fix a segfault when M is a nullptr (PR #130712)

2025-03-16 Thread via cfe-commits
https://github.com/matts1 updated https://github.com/llvm/llvm-project/pull/130712 >From 2c0dc1e7ee6a7ec499f4fcb88c79dc1aff8ce2ca Mon Sep 17 00:00:00 2001 From: Matt Stark Date: Mon, 10 Mar 2025 13:07:29 +1100 Subject: [PATCH] [clang] Fix a segfault when M is a nullptr --- clang/docs/ReleaseN

[clang] [clang] Mark some language options as benign. (PR #131569)

2025-03-16 Thread via cfe-commits
https://github.com/matts1 created https://github.com/llvm/llvm-project/pull/131569 I'm fairly certain that the options in this CL are benign, as I don't believe they affect the AST. * RTTI - shouldn't affect the AST, should only affect codegen * Trivial var init - also should only affect codeg

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-llvm-ir Author: Shilei Tian (shiltian) Changes The value of a null pointer is not always `0`. For example, on AMDGPU, the null pointer in address spaces 3 and 5 is `0x`. Currently, there is no target-independent way to

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 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 4fde8c341f9166e6ec6dff6e7704be175e382f5b c966236e1ec99fbd45063e0363873c8d8abe4c50 --e

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread Matt Arsenault via cfe-commits
@@ -13045,9 +13048,9 @@ This instruction requires several arguments: - Caller and callee both have the calling convention ``fastcc`` or ``tailcc``. - The call is in tail position (ret immediately follows call and ret uses value of call or is void). - - Option

[clang] [clang] Mark some language options as benign. (PR #131569)

2025-03-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matt (matts1) Changes I'm fairly certain that the options in this CL are benign, as I don't believe they affect the AST. * RTTI - shouldn't affect the AST, should only affect codegen * Trivial var init - also should only affect codegen *

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread Shilei Tian via cfe-commits
https://github.com/shiltian created https://github.com/llvm/llvm-project/pull/131557 The value of a null pointer is not always `0`. For example, on AMDGPU, the null pointer in address spaces 3 and 5 is `0x`. Currently, there is no target-independent way to get this information, making it

[clang] [llvm] [BPF] Make -mcpu=v3 as the default (PR #107008)

2025-03-16 Thread via cfe-commits
yonghong-song wrote: Thanks @yuvald-sweet-security I am not sure whether I can add default v1->v3 in llvm20 or not. But let me check anyway. Also, if the verification failure can be easily reproduced, could you submit the test case, we can do some analysis to see why and maybe verifier could b

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm commented: This needs an RFC. For reference a previous attempt was at #83109 https://github.com/llvm/llvm-project/pull/131557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread Shilei Tian via cfe-commits
@@ -32,9 +32,9 @@ static const char *const DataLayoutStringR600 = "-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1"; static const char *const DataLayoutStringAMDGCN = -"e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32" -"-p7:160:25

[clang] 752aa81 - [clang][RISCV] Rename variable name in SemaRISCV. NFC (#131261)

2025-03-16 Thread via cfe-commits
Author: Brandon Wu Date: 2025-03-17T12:55:59+08:00 New Revision: 752aa81c4ff754945c695ac771577c1370564411 URL: https://github.com/llvm/llvm-project/commit/752aa81c4ff754945c695ac771577c1370564411 DIFF: https://github.com/llvm/llvm-project/commit/752aa81c4ff754945c695ac771577c1370564411.diff LO

[clang-tools-extra] [clangd] Add `HeaderInsertion` yaml config option (PR #128503)

2025-03-16 Thread via cfe-commits
https://github.com/MythreyaK updated https://github.com/llvm/llvm-project/pull/128503 >From 60ffbf0067b52cf51b5ce1d8eaf98cd2a2737c6a Mon Sep 17 00:00:00 2001 From: Mythreya Date: Mon, 24 Feb 2025 04:34:38 -0800 Subject: [PATCH 1/2] [clangd] Add `HeaderInsertion` yaml config option This is the

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread Shilei Tian via cfe-commits
shiltian wrote: * **#131557** https://app.graphite.dev/github/pr/llvm/llvm-project/131557?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/131

[clang] [clang-tools-extra] [CudaSPIRV] Allow using integral non-type template parameters as attribute args (PR #131546)

2025-03-16 Thread Matt Arsenault via cfe-commits
@@ -753,12 +753,20 @@ void CodeGenModule::handleAMDGPUFlatWorkGroupSizeAttr( int32_t *MaxThreadsVal) { unsigned Min = 0; unsigned Max = 0; + auto Eval = [&](Expr *E) { +return E->EvaluateKnownConstInt(getContext()).getExtValue(); + }; if (FlatWGS) { -Min =

[clang] [clang-tools-extra] [CudaSPIRV] Allow using integral non-type template parameters as attribute args (PR #131546)

2025-03-16 Thread Matt Arsenault via cfe-commits
@@ -53,15 +53,15 @@ void TCETargetCodeGenInfo::setTargetAttributes( SmallVector Operands; Operands.push_back(llvm::ConstantAsMetadata::get(F)); -Operands.push_back( -llvm::ConstantAsMetadata::get(llvm::Constant::getIntegerValue( -

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread Shilei Tian via cfe-commits
shiltian wrote: The RFC is posted https://discourse.llvm.org/t/rfc-introduce-sentinel-pointer-value-to-datalayout/85265. https://github.com/llvm/llvm-project/pull/131557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread Shilei Tian via cfe-commits
shiltian wrote: > This needs an RFC. For reference a previous attempt was at #83109 The RFC was posted, as mentioned in a previous comment. https://github.com/llvm/llvm-project/pull/131557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] [clang-tools-extra] [CudaSPIRV] Allow using integral non-type template parameters as attribute args (PR #131546)

2025-03-16 Thread Alexander Shaposhnikov via cfe-commits
https://github.com/alexander-shaposhnikov updated https://github.com/llvm/llvm-project/pull/131546 >From 94a49544f02ac576cbe5bcd9274a0b95943f97a3 Mon Sep 17 00:00:00 2001 From: Alexander Shaposhnikov Date: Mon, 17 Mar 2025 00:39:24 + Subject: [PATCH] [CudaSPIRV] Allow using integral non-typ

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/131557 >From 86cd48c8f43b34d9fee97137db8abe6454d76268 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Sun, 16 Mar 2025 23:51:02 -0400 Subject: [PATCH] [DataLayout] Introduce sentinel pointer value MIME-Version: 1.0 C

[clang] [Clang-repl] Implementation for removeModule for wasm use case (PR #131558)

2025-03-16 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 41cece8c86399dd1ffcb6b7a8b50c10083fe5a40 56d3e301d01cb8ab8f44751d7684378f38b0661e --e

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread Matt Arsenault via cfe-commits
@@ -552,6 +553,11 @@ class DataLayout { /// /// This includes an explicitly requested alignment (if the global has one). Align getPreferredAlign(const GlobalVariable *GV) const; + + /// Returns the sentinel pointer value for a given address space. If the + /// address s

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread Matt Arsenault via cfe-commits
@@ -3143,7 +3143,10 @@ as follows: specified, the default index size is equal to the pointer size. All sizes are in bits. The address space, ``n``, is optional, and if not specified, denotes the default address space 0. The value of ``n`` must be -in the range [

[clang] [clang] Change placeholder from `undef` to `poison` (PR #131533)

2025-03-16 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/131533 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Address error recovery fixing infinite loop while parsing (PR #127569)

2025-03-16 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: Hi @vgvassilev, Would be nice to know your thoughts here https://github.com/llvm/llvm-project/pull/127569 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix an incorrect assumption on getTemplatedDecl() (PR #131559)

2025-03-16 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/131559 >From a3d01049bca20b9d44a07499b3204756edc8d0e1 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Mon, 17 Mar 2025 12:41:42 +0800 Subject: [PATCH 1/2] [Clang] Fix an incorrect assumption on getTemplatedDecl() Si

[clang] [clang-tools-extra] [CudaSPIRV] Allow using integral non-type template parameters as attribute args (PR #131546)

2025-03-16 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 2dc123b33d51fcccb9e1af7230bc6573f77b3ccc 86eefd7db18252d74f7b5891e7490653b6378eb0 --e

[clang] [Clang-repl] Implementation for removeModule for wasm use case (PR #131558)

2025-03-16 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: Has some debug logs for now (shall be removed once ready) Also the issue tracking this on emscripten is https://github.com/emscripten-core/emscripten/issues/23793 https://github.com/llvm/llvm-project/pull/131558 ___ cfe-commits mail

[clang] [Clang-repl] Implementation for removeModule for wasm use case (PR #131558)

2025-03-16 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 created https://github.com/llvm/llvm-project/pull/131558 Raising as draft for now. This PR implements the removeModule function that can be put to use while running clang-repl in the browser. The implementation works as we would like it to. But due to some issues

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/131557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix an incorrect assumption on getTemplatedDecl() (PR #131559)

2025-03-16 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/131559 Since a68d20e98, we've been calling HandleDelayedAccessCheck() for concept declarations when the declaration contains invalid member accesses. However, a concept declaration is TemplateDecl such that doesn't co

[clang] [Clang] Fix an incorrect assumption on getTemplatedDecl() (PR #131559)

2025-03-16 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/131559 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][RISCV] Rename variable name in SemaRISCV. NFC (PR #131261)

2025-03-16 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat closed https://github.com/llvm/llvm-project/pull/131261 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add new check: modernize-use-scoped-lock (PR #126434)

2025-03-16 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM with nits 1. follow LLVM coding guideline to remove `{}` for only one lines if / for / ... 2. personal I prefer to use different function name instead of `emitDiag` for everythings. https://github.com/llvm/llvm-project/pull/126434

[clang] [clang][CodeComplete] Add code completion for if constexpr and consteval (PR #124315)

2025-03-16 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. Thanks, LGTM! https://github.com/llvm/llvm-project/pull/124315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeComplete] Add code completion for if constexpr and consteval (PR #124315)

2025-03-16 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/124315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 009d362 - [clang][CodeComplete] Add code completion for if constexpr and consteval (#124315)

2025-03-16 Thread via cfe-commits
Author: Letu Ren Date: 2025-03-17T02:45:19-04:00 New Revision: 009d36222cfdb59f49597e01d157ca4f65ac9295 URL: https://github.com/llvm/llvm-project/commit/009d36222cfdb59f49597e01d157ca4f65ac9295 DIFF: https://github.com/llvm/llvm-project/commit/009d36222cfdb59f49597e01d157ca4f65ac9295.diff LOG:

[clang] [clang-format] Correctly annotate user-defined conversion functions (PR #131434)

2025-03-16 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/131434 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Design Overview (PR #126654)

2025-03-16 Thread Katya Romanova via cfe-commits
romanova-ekaterina wrote: > Hi Reviewers! Thanks for the feedback here. I wanted to draw attention to > something that I mentioned briefly in the description - the possibility of a > plugin interface as opposed to invoking an external process that consumes > JSON. > > There are some theoretic

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Design Overview (PR #126654)

2025-03-16 Thread Katya Romanova via cfe-commits
romanova-ekaterina wrote: > > Thanks for the heads up, so I should not do a detailed code review for > > PR127749? Is there more info on what you mean by a "no-backend DTLTO"? > > Actually, please review whatever you would like to at this point, Theresa. I > don't want to get in the way of hea

[clang-tools-extra] [clang-tidy] offer option to check sugared types in avoid-c-arrays check (PR #131468)

2025-03-16 Thread via cfe-commits
@@ -0,0 +1,126 @@ +// RUN: %check_clang_tidy -std=c++17 %s modernize-avoid-c-arrays %t -- \ stmuench wrote: I just followed the approach for all the existing tests where different use cases got put into separate .cpp files. Was this not correct? https://github

[clang] [clang-format] Correctly annotate user-defined conversion functions (PR #131434)

2025-03-16 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/131434 >From 46cde1b7667f36115d746326b78d011511cac738 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 15 Mar 2025 00:37:53 -0700 Subject: [PATCH 1/2] [clang-format] Correctly annotate user-defined conversion functio

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Design Overview (PR #126654)

2025-03-16 Thread Katya Romanova via cfe-commits
romanova-ekaterina wrote: > > Thanks for the heads up, so I should not do a detailed code review for > > PR127749? Is there more info on what you mean by a "no-backend DTLTO"? > > Actually, please review whatever you would like to at this point, Theresa. I > don't want to get in the way of hea

  1   2   >