[clang-tools-extra] [clang-tidy] Add new check 'bugprone-inconsistent-ifelse-braces' (PR #162361)

2025-10-24 Thread Davide Cunial via cfe-commits
https://github.com/capitan-davide updated https://github.com/llvm/llvm-project/pull/162361 >From 5f61932af5a90b52b5939406a929734dd6353316 Mon Sep 17 00:00:00 2001 From: Davide Cunial Date: Fri, 24 Oct 2025 08:18:09 +0200 Subject: [PATCH 1/3] [clang-tidy] Add new check 'bugprone-inconsistent-if

[clang-tools-extra] [clang-tidy] Add new check 'bugprone-inconsistent-ifelse-braces' (PR #162361)

2025-10-24 Thread Davide Cunial via cfe-commits
https://github.com/capitan-davide updated https://github.com/llvm/llvm-project/pull/162361 >From 5f61932af5a90b52b5939406a929734dd6353316 Mon Sep 17 00:00:00 2001 From: Davide Cunial Date: Fri, 24 Oct 2025 08:18:09 +0200 Subject: [PATCH 1/3] [clang-tidy] Add new check 'bugprone-inconsistent-if

[clang] [clang] Proofread LanguageExtensions.rst (PR #165082)

2025-10-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/165082.diff 1 Files Affected: - (modified) clang/docs/LanguageExtensions.rst (+38-38) ``diff diff --git a/clang/docs/LanguageExten

[clang] [clang] Proofread LanguageExtensions.rst (PR #165082)

2025-10-24 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/165082 None >From f6a8317781e105b309cddbb336c12d95b006693f Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 24 Oct 2025 16:19:56 -0700 Subject: [PATCH] [clang] Proofread LanguageExtensions.rst --- clang/

[clang] [Clang][CodeGen][CIR][NFC] Refactor CGCXXABI classes for code sharing (PR #165078)

2025-10-24 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 origin/main HEAD --extensions cpp,h -- clang/include/clang/CodeGenShared/CXXABIShared

[clang] [Clang][CodeGen][CIR][NFC] Refactor CGCXXABI classes for code sharing (PR #165078)

2025-10-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes This refactors the CGCXXABI and ItaniumCXXABI classes in LLVM IR codegen and their CIR codegen counterparts so that common code can be shared between the two. This is a small first step towards better c

[clang] [Clang][CodeGen][CIR][NFC] Refactor CGCXXABI classes for code sharing (PR #165078)

2025-10-24 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/165078 This refactors the CGCXXABI and ItaniumCXXABI classes in LLVM IR codegen and their CIR codegen counterparts so that common code can be shared between the two. This is a small first step towards better code

[clang] [clang-format] Option to insert spaces before the closing `*/` (PR #162105)

2025-10-24 Thread Björn Schäpers via cfe-commits
@@ -19,13 +19,226 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/Support/Debug.h" #include +#include #define DEBUG_TYPE "format-token-breaker" namespace clang { namespace format { static constexpr StringRef Blanks(" \t\v\f\r"); +static constexpr size_t BlockComme

[clang] [clang-format] Option to insert spaces before the closing `*/` (PR #162105)

2025-10-24 Thread Björn Schäpers via cfe-commits
@@ -332,6 +332,181 @@ TEST_F(FormatTestComments, UnderstandsSingleLineComments) { verifyNoCrash(StringRef("/*\\\0\n/", 6)); } +TEST_F(FormatTestComments, InsertsSpaceAfterOpeningBlockComment) { + FormatStyle Style = getLLVMStyle(); + Style.SpaceInComments.AfterOpeningComm

[clang] [clang-format] Option to insert spaces before the closing `*/` (PR #162105)

2025-10-24 Thread Björn Schäpers via cfe-commits
@@ -332,6 +332,181 @@ TEST_F(FormatTestComments, UnderstandsSingleLineComments) { verifyNoCrash(StringRef("/*\\\0\n/", 6)); } +TEST_F(FormatTestComments, InsertsSpaceAfterOpeningBlockComment) { + FormatStyle Style = getLLVMStyle(); + Style.SpaceInComments.AfterOpeningComm

[clang] [clang-format] Option to insert spaces before the closing `*/` (PR #162105)

2025-10-24 Thread Björn Schäpers via cfe-commits
@@ -315,6 +315,19 @@ class AnnotatedLine; /// A wrapper around a \c Token storing information about the /// whitespace characters preceding it. + +// Describes the kind of a block comment. +enum class CommentKind { + // A plain comment, i.e. /* ... */. + Plain, + // A comme

[clang] [clang-format] Option to insert spaces before the closing `*/` (PR #162105)

2025-10-24 Thread Björn Schäpers via cfe-commits
@@ -6612,6 +6612,38 @@ the configuration (without a prefix: ``Auto``). int a [5];vs. int a[5]; int a [5][5]; vs. int a[5][5]; +.. _SpaceInComments: + +**SpaceInComments** (``Struct``) :versionbadge:`clang-format 21` :ref:

[clang] [clang-format] Option to insert spaces before the closing `*/` (PR #162105)

2025-10-24 Thread Björn Schäpers via cfe-commits
@@ -4684,6 +4684,36 @@ struct FormatStyle { /// \version 17 bool SpaceBeforeJsonColon; + /// Defines how clang-format should treat spaces around block comment + /// delimiters and specialized inline comments (such as parameter name + /// annotations). The default `Leave

[clang] [clang-format] Option to insert spaces before the closing `*/` (PR #162105)

2025-10-24 Thread Björn Schäpers via cfe-commits
@@ -315,6 +315,19 @@ class AnnotatedLine; /// A wrapper around a \c Token storing information about the /// whitespace characters preceding it. + +// Describes the kind of a block comment. +enum class CommentKind { + // A plain comment, i.e. /* ... */. + Plain, + // A comme

[clang] 44601d1 - Reapply "Reapply "[clang-format] Annotate ::operator and Foo::operator… (#165038)

2025-10-24 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2025-10-24T23:01:47-07:00 New Revision: 44601d1a7a8a9df879998ae0a193ccab851d4131 URL: https://github.com/llvm/llvm-project/commit/44601d1a7a8a9df879998ae0a193ccab851d4131 DIFF: https://github.com/llvm/llvm-project/commit/44601d1a7a8a9df879998ae0a193ccab851d4131.diff LOG:

[clang-tools-extra] [clang-tidy] Add new check 'bugprone-inconsistent-ifelse-braces' (PR #162361)

2025-10-24 Thread Davide Cunial via cfe-commits
https://github.com/capitan-davide updated https://github.com/llvm/llvm-project/pull/162361 >From 5f61932af5a90b52b5939406a929734dd6353316 Mon Sep 17 00:00:00 2001 From: Davide Cunial Date: Fri, 24 Oct 2025 08:18:09 +0200 Subject: [PATCH 1/2] [clang-tidy] Add new check 'bugprone-inconsistent-if

[clang] Revert "[clang-format] Annotate ::operator and Foo::operator correctly" (PR #164670)

2025-10-24 Thread via cfe-commits
owenca wrote: > As per @efriedma-quic's comment I'll go ahead and revert the commit again to > prevent the immediate breakage. @PiJoules, I don't know if @efriedma-quic's comment was an endorsement of your original hasty (and incomplete) revert, but it didn't address the first part of the pol

[clang] [AMDGPU][Clang] Support for type inferring extended image builtins for AMDGPU (PR #164358)

2025-10-24 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 origin/main HEAD --extensions cl,cpp,c -- clang/test/CodeGen/builtins-extended-image.

[clang] [AMDGPU][Clang] Support for type inferring extended image builtins for AMDGPU (PR #164358)

2025-10-24 Thread Rana Pratap Reddy via cfe-commits
@@ -133,8 +133,8 @@ Value *EmitAMDGPUWorkGroupSize(CodeGenFunction &CGF, unsigned Index) { } llvm::MDBuilder MDHelper(CGF.getLLVMContext()); - llvm::MDNode *RNode = MDHelper.createRange(APInt(16, 1), - APInt(16, CGF.getTarget().getMaxOpenCLWorkGroupSize() + 1)); +

[clang] [clang-format] Option to insert spaces before the closing `*/` (PR #162105)

2025-10-24 Thread via cfe-commits
https://github.com/Men-cotton updated https://github.com/llvm/llvm-project/pull/162105 >From d94783989b0324e1a68ed6f4eff3cc4166cc0a06 Mon Sep 17 00:00:00 2001 From: mencotton Date: Tue, 7 Oct 2025 23:14:20 +0900 Subject: [PATCH] [clang-format] Add SpaceInComments controls for block comment del

[clang] [clang] Diagnose writing out return type in explicit instantiation of function that returns `auto` (PR #165073)

2025-10-24 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook created https://github.com/llvm/llvm-project/pull/165073 None >From a65ee6a8b03329397dd2a48da8667a1f3c9b0d0f Mon Sep 17 00:00:00 2001 From: Victor Chernyakin Date: Fri, 24 Oct 2025 21:28:21 -0700 Subject: [PATCH] [clang] Diagnose writing out return type in explici

[clang] [clang][bytecode] Check memcmp for block pointers (PR #165070)

2025-10-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes We can't read from non-block pointers anyway. Fixes https://github.com/llvm/llvm-project/issues/165061 --- Full diff: https://github.com/llvm/llvm-project/pull/165070.diff 2 Files Affected: - (modified) c

[clang] [clang][bytecode] Check memcmp for block pointers (PR #165070)

2025-10-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/165070 We can't read from non-block pointers anyway. Fixes https://github.com/llvm/llvm-project/issues/165061 >From af82b4cfc197481303ba6686044ae873908fd8ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?

[clang] [clang][docs] assert.h is not a good candidate for a textual header (PR #165057)

2025-10-24 Thread Richard Smith via cfe-commits
@@ -421,13 +421,7 @@ As an example, the module map file for the C standard library might look a bit l .. parsed-literal:: - module std [system] [extern_c] { zygoloid wrote: I see you mentioned this in the PR description. I suppose whether this is appropri

[libunwind] [libunwind] Fix execution flow imbalance when using C++ Exceptions (PR #165066)

2025-10-24 Thread Med Ismail Bennani via cfe-commits
https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/165066 >From 9a50b58ae54528ad75cd53a74dfb28207b824379 Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Fri, 24 Oct 2025 19:21:46 -0700 Subject: [PATCH 1/2] [libunwind] Fix execution flow imbalance when usin

[libunwind] [libunwind] Fix execution flow imbalance when using C++ Exceptions (PR #165066)

2025-10-24 Thread Med Ismail Bennani via cfe-commits
https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/165066 >From 9a50b58ae54528ad75cd53a74dfb28207b824379 Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Fri, 24 Oct 2025 19:21:46 -0700 Subject: [PATCH 1/2] [libunwind] Fix execution flow imbalance when usin

[libunwind] [libunwind] Fix execution flow imbalance when using C++ Exceptions (PR #165066)

2025-10-24 Thread Med Ismail Bennani via cfe-commits
https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/165066 >From 4cddd9b2d45fcbcbaa2c8f17a7e61d40fdc0c971 Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Fri, 24 Oct 2025 19:21:46 -0700 Subject: [PATCH 1/2] [libunwind] Fix execution flow imbalance when usin

[libunwind] [libunwind] Fix execution flow imbalance when using C++ Exceptions (PR #165066)

2025-10-24 Thread Med Ismail Bennani via cfe-commits
https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/165066 >From 4cddd9b2d45fcbcbaa2c8f17a7e61d40fdc0c971 Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Fri, 24 Oct 2025 19:21:46 -0700 Subject: [PATCH 1/2] [libunwind] Fix execution flow imbalance when usin

[libunwind] [libunwind] Fix execution flow imbalance when using C++ Exceptions (PR #165066)

2025-10-24 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 origin/main HEAD --extensions cpp,h,c,hpp -- libunwind/src/Registers.hpp libunwind/sr

[libunwind] [libunwind] Fix execution flow imbalance when using C++ Exceptions (PR #165066)

2025-10-24 Thread Med Ismail Bennani via cfe-commits
https://github.com/medismailben edited https://github.com/llvm/llvm-project/pull/165066 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Fix execution flow imbalance when using C++ Exceptions (PR #165066)

2025-10-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libunwind Author: Med Ismail Bennani (medismailben) Changes This patch should fix tracing support when using C++ Exceptions. When unwinding C++ Exceptions, libunwind would have a first searching phase to detect its caller landing pad using the personal

[libunwind] [libunwind] Fix execution flow imbalance when using C++ Exceptions (PR #165066)

2025-10-24 Thread Med Ismail Bennani via cfe-commits
https://github.com/medismailben created https://github.com/llvm/llvm-project/pull/165066 This patch should fix tracing support when using C++ Exceptions. When unwinding C++ Exceptions, libunwind would have a first searching phase to detect its caller landing pad using the personality function,

[clang] [AMDGPU][Clang] Support for type inferring extended image builtins for AMDGPU (PR #164358)

2025-10-24 Thread Shilei Tian via cfe-commits
@@ -133,8 +133,8 @@ Value *EmitAMDGPUWorkGroupSize(CodeGenFunction &CGF, unsigned Index) { } llvm::MDBuilder MDHelper(CGF.getLLVMContext()); - llvm::MDNode *RNode = MDHelper.createRange(APInt(16, 1), - APInt(16, CGF.getTarget().getMaxOpenCLWorkGroupSize() + 1)); +

[clang] [AMDGPU][Clang] Support for type inferring extended image builtins for AMDGPU (PR #164358)

2025-10-24 Thread Rana Pratap Reddy via cfe-commits
ranapratap55 wrote: @shiltian @yxsamliu @arsenm ping. https://github.com/llvm/llvm-project/pull/164358 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Match bitsin(typeof(x)) - popcnt(x) to s_bcnt0_i32 on AMDGPU (PR #164847)

2025-10-24 Thread Patrick Simmons via cfe-commits
https://github.com/linuxrocks123 updated https://github.com/llvm/llvm-project/pull/164847 >From ddda6473ab7ae8485a906a749eebad0853b857ca Mon Sep 17 00:00:00 2001 From: Patrick Simmons Date: Thu, 23 Oct 2025 11:50:32 -0500 Subject: [PATCH 1/5] Initial work --- clang/include/clang/Basic/Builtin

[clang] [clang-tools-extra] [llvm] [clang][headers] Need a way for math.h to share the definitions of INIFINITY and NAN with float.h (PR #164348)

2025-10-24 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `ppc64le-flang-rhel-clang` running on `ppc64le-flang-rhel-test` while building `clang-tools-extra,clang,llvm` at step 6 "test-build-unified-tree-check-flang". Full details are available at: https://lab.llvm.org/buildbot/#/buil

[clang] [CIR] Emit CIR builtins: coroAlloc, coroBegin, and coroSize (PR #164180)

2025-10-24 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-win-x-aarch64` running on `as-builder-2` while building `clang` at step 15 "test-check-cxx-aarch64-unknown-linux-gnu". Full details are available at: https://lab.llvm.org/buildbot/#/builders/193/builds/11695 Here

[clang] [CIR][NFC] Update TypeCache file to use MLIR-style camel case (PR #165060)

2025-10-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: None (Andres-Salamanca) Changes This PR updates the file `CIRGenTypeCache` to use MLIR-style camel case naming.The change was inspired by the discussion here: https://github.com/llvm/llvm-project/pull/164180#discussion_r2461444730 ---

[clang] [CIR][NFC] Update TypeCache file to use MLIR-style camel case (PR #165060)

2025-10-24 Thread via cfe-commits
https://github.com/Andres-Salamanca created https://github.com/llvm/llvm-project/pull/165060 This PR updates the file `CIRGenTypeCache` to use MLIR-style camel case naming.The change was inspired by the discussion here: https://github.com/llvm/llvm-project/pull/164180#discussion_r2461444730 >F

[compiler-rt] [libunwind] [compiler-rt][libunwind] Allow for CET on OpenBSD (PR #164341)

2025-10-24 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/164341 >From e39255b6327f2dec4c8f9881f0ee84bf6383bbb0 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Mon, 20 Oct 2025 19:49:08 -0400 Subject: [PATCH] [compiler-rt][libunwind] Allow for CET on OpenBSD --- compiler-rt/C

[clang] [OpenMP][clang][HIP][CUDA] fix weak alias emit on device compilation (PR #164326)

2025-10-24 Thread via cfe-commits
https://github.com/Jason-VanBeusekom updated https://github.com/llvm/llvm-project/pull/164326 >From 26b90e0098e62949cf8341cddcb69f3faf7000db Mon Sep 17 00:00:00 2001 From: Jason Van Beusekom Date: Mon, 20 Oct 2025 14:16:10 -0500 Subject: [PATCH 1/3] [OpenMP][clang][HIP][CUDA] fix weak alias emi

[clang] [clang][docs] assert.h is not a good candidate for a textual header (PR #165057)

2025-10-24 Thread Richard Smith via cfe-commits
@@ -421,13 +421,7 @@ As an example, the module map file for the C standard library might look a bit l .. parsed-literal:: - module std [system] [extern_c] { zygoloid wrote: Why remove the extern_c here? This seems like a pretty good example of a time when

[clang] [clang][docs] assert.h is not a good candidate for a textual header (PR #165057)

2025-10-24 Thread Richard Smith via cfe-commits
zygoloid wrote: > This isn't a problem with ``. Nonetheless I think X-macros are a better example to use here than ``. I'd suggest just undoing the first change (removing `assert.h` from the example `std` module) but the rest of the change LGTM. https://github.com/llvm/llvm-project/pull/16505

[clang] [clang][docs] assert.h is not a good candidate for a textual header (PR #165057)

2025-10-24 Thread Richard Smith via cfe-commits
zygoloid wrote: > As a textual header: > #define NDEBUG > #include This isn't a problem with ``. If `` intends to pick up the state of the `NDEBUG` macro from the translation unit that includes it, then it's not a modular header, and shouldn't be declared as one. https://github.com/llvm/llv

[clang] [Clang][Sema] Allow counted_by on void* in GNU mode (PR #164737)

2025-10-24 Thread Dan Liew via cfe-commits
@@ -132,9 +132,20 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, // `BoundsSafetyCheckUseOfCountAttrPtr` // // * When the pointee type is always an incomplete type (e.g. -// `void`) the attribute is disallowed by this method

[clang] [Clang][Sema] Allow counted_by on void* in GNU mode (PR #164737)

2025-10-24 Thread Dan Liew via cfe-commits
@@ -132,9 +132,20 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, // `BoundsSafetyCheckUseOfCountAttrPtr` // // * When the pointee type is always an incomplete type (e.g. -// `void`) the attribute is disallowed by this method

[clang] [Clang][Sema] Allow counted_by on void* in GNU mode (PR #164737)

2025-10-24 Thread Dan Liew via cfe-commits
delcypher wrote: > > What happens with this? > > ``` > > struct T { > > int count; > > void* __counted_by(count) ptr; > > }; > > > > void use(struct T* t) { > > t = 0; > > } > > ``` > > > > > > > > > > > > > > > > > > > > > > > > Previously th

[clang] [clang][docs] assert.h is not a good candidate for a textual header (PR #165057)

2025-10-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ian Anderson (ian-twilightcoder) Changes The C standard behavior of `assert` cannot be accomplished with clang modules, either as a normal modular header, or a textual header. As a normal modular header: #define NDEBUG #include

[clang] [clang][docs] assert.h is not a good candidate for a textual header (PR #165057)

2025-10-24 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder created https://github.com/llvm/llvm-project/pull/165057 The C standard behavior of `assert` cannot be accomplished with clang modules, either as a normal modular header, or a textual header. As a normal modular header: #define NDEBUG #include This pattern

[clang] [llvm] [AMDGPU] Add intrinsics for v_[pk]_add_{min|max}_* instructions (PR #164731)

2025-10-24 Thread Stanislav Mekhanoshin via cfe-commits
rampitec wrote: > > Pattern is trivial, but practically impossible to achieve from a source > > code. > > No, the saturating add pattern is already matched and has clang builtins I agree. But I do not want to educate everyone every odd day how to get it working. Users wanted intrinsics, I giv

[clang] [X86][Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - allow AVX512 mask predicate intrinsics to be used in constexpr (PR #165054)

2025-10-24 Thread via cfe-commits
https://github.com/sskzakaria updated https://github.com/llvm/llvm-project/pull/165054 >From 00115fd82621a909b6ee8bf049159fd09da3cba1 Mon Sep 17 00:00:00 2001 From: sskzakaria Date: Fri, 24 Oct 2025 18:01:57 -0400 Subject: [PATCH 1/3] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - all

[clang] [X86][Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - allow AVX512 mask predicate intrinsics to be used in constexpr (PR #165054)

2025-10-24 Thread via cfe-commits
https://github.com/sskzakaria edited https://github.com/llvm/llvm-project/pull/165054 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Constexpr movepi (PR #165054)

2025-10-24 Thread via cfe-commits
https://github.com/sskzakaria updated https://github.com/llvm/llvm-project/pull/165054 >From 00115fd82621a909b6ee8bf049159fd09da3cba1 Mon Sep 17 00:00:00 2001 From: sskzakaria Date: Fri, 24 Oct 2025 18:01:57 -0400 Subject: [PATCH 1/2] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - all

[clang] Constexpr movepi (PR #165054)

2025-10-24 Thread via cfe-commits
https://github.com/sskzakaria created https://github.com/llvm/llvm-project/pull/165054 Enables constexpr evaluation for the following AVX512 Instrinsics: ``` _mm_movepi8_mask _mm256_movepi8_mask _mm512_movepi8_mask _mm_movepi16_mask _mm256_movepi16_mask _mm512_movepi16_mask _mm_movepi32_mask _mm

[clang] [CIR] Emit CIR builtins: coroAlloc, coroBegin, and coroSize (PR #164180)

2025-10-24 Thread via cfe-commits
https://github.com/Andres-Salamanca closed https://github.com/llvm/llvm-project/pull/164180 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4448ff4 - [CIR] Emit CIR builtins: coroAlloc, coroBegin, and coroSize (#164180)

2025-10-24 Thread via cfe-commits
Author: Andres-Salamanca Date: 2025-10-24T17:55:29-05:00 New Revision: 4448ff453d25e402aeab55749a99df5ff5ea81f1 URL: https://github.com/llvm/llvm-project/commit/4448ff453d25e402aeab55749a99df5ff5ea81f1 DIFF: https://github.com/llvm/llvm-project/commit/4448ff453d25e402aeab55749a99df5ff5ea81f1.di

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-10-24 Thread Kelvin Li via cfe-commits
kkwli wrote: I encounter the following issue when building flang-rt. ``` [29/50] Building Fortran object flang-rt/...lang_rt.runtime.dir/ieee_arithmetic.f90. FAILED: flang-rt/lib/runtime/CMakeFiles/obj.flang_rt.runtime.dir/ieee_arithmetic.f90.o lib/clang/22/finclude/powerpc64le-unknown-linux-g

[clang] [clang] Proofread UsersManual.rst (PR #164928)

2025-10-24 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/164928 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b4d11c9 - [clang] Proofread UsersManual.rst (#164928)

2025-10-24 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-10-24T15:30:50-07:00 New Revision: b4d11c98917c3fd0e09f826a85232c322678299b URL: https://github.com/llvm/llvm-project/commit/b4d11c98917c3fd0e09f826a85232c322678299b DIFF: https://github.com/llvm/llvm-project/commit/b4d11c98917c3fd0e09f826a85232c322678299b.diff L

[clang-tools-extra] [llvm] [Github][CI] Add default gha user for tooling containers (PR #164294)

2025-10-24 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor closed https://github.com/llvm/llvm-project/pull/164294 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [Github][CI] Add default gha user for tooling containers (PR #164294)

2025-10-24 Thread Aiden Grossman via cfe-commits
https://github.com/boomanaiden154 approved this pull request. LGTM. Thanks for fixing this up. https://github.com/llvm/llvm-project/pull/164294 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang-tools-extra] [llvm] [Github][CI] Add default gha user for tooling containers (PR #164294)

2025-10-24 Thread Aiden Grossman via cfe-commits
boomanaiden154 wrote: > Will delete it from Github once merged Not sure you need to do that. It's just another tag among all the others in there. https://github.com/llvm/llvm-project/pull/164294 ___ cfe-commits mailing list [email protected]

[clang] [clang][DependencyScanning] Implementation of `CompilerInstanceWithContext` to Improve By-Name Queries (PR #164345)

2025-10-24 Thread Ben Langmuir via cfe-commits
@@ -125,16 +116,33 @@ class DependencyScanningWorker { DependencyConsumer &Consumer, DependencyActionController &Controller, std::optional TUBuffer = std::nullopt); - /// Run the dependency scanning tool for a given clang driver command-line - /// for a specific

[clang] [clang][DependencyScanning] Implementation of `CompilerInstanceWithContext` to Improve By-Name Queries (PR #164345)

2025-10-24 Thread Ben Langmuir via cfe-commits
@@ -150,6 +151,54 @@ std::shared_ptr initializeScanInstanceDependencyCollector( DependencyActionController &Controller, PrebuiltModulesAttrsMap PrebuiltModulesASTMap, llvm::SmallVector &StableDirs); + +class CompilerInstanceWithContext { + // Context + Dependency

[clang] [clang][DependencyScanning] Implementation of `CompilerInstanceWithContext` to Improve By-Name Queries (PR #164345)

2025-10-24 Thread Ben Langmuir via cfe-commits
@@ -704,3 +703,163 @@ bool DependencyScanningAction::runInvocation( return Result; } + +const std::string CompilerInstanceWithContext::FakeFileBuffer = +std::string(MAX_NUM_NAMES, ' '); + +llvm::Error CompilerInstanceWithContext::initialize() { + std::tie(OverlayFS, Com

[clang] [clang][DependencyScanning] Implementation of `CompilerInstanceWithContext` to Improve By-Name Queries (PR #164345)

2025-10-24 Thread Ben Langmuir via cfe-commits
@@ -339,6 +341,10 @@ class ModuleDepCollector final : public DependencyCollector { std::optional ProvidedStdCXXModule; std::vector RequiredStdCXXModules; + /// A pointer to the preprocessor callback so we can invoke it directly + /// if needed. + ModuleDepCollectorPP *

[clang-tools-extra] [llvm] [Github][CI] Add default gha user for tooling containers (PR #164294)

2025-10-24 Thread Baranov Victor via cfe-commits
vbvictor wrote: Thank you for suggestion, I build https://github.com/orgs/llvm/packages/container/package/ci-ubuntu-24.04-format-fix-gha package from this branch locally and tested - it worked. https://github.com/llvm/llvm-project/pull/164294 ___ cfe

[clang-tools-extra] [llvm] [Github][CI] Add default gha user for tooling containers (PR #164294)

2025-10-24 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/164294 >From e21c01db0cfeae856cb2f88d64f6fb8cd760fa85 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Mon, 20 Oct 2025 21:14:57 +0300 Subject: [PATCH 1/6] [Github][CI] Add default gha user for tooling containers

[clang-tools-extra] [llvm] [Github][CI] Add default gha user for tooling containers (PR #164294)

2025-10-24 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/164294 >From e21c01db0cfeae856cb2f88d64f6fb8cd760fa85 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Mon, 20 Oct 2025 21:14:57 +0300 Subject: [PATCH 1/5] [Github][CI] Add default gha user for tooling containers

[clang-tools-extra] [llvm] [Github][CI] Add default gha user for tooling containers (PR #164294)

2025-10-24 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r origin/main...HEAD llvm/utils/git/code-format-helper.py `` :warning: The reproduct

[clang-tools-extra] [llvm] [Github][CI] Add default gha user for tooling containers (PR #164294)

2025-10-24 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 origin/main HEAD --extensions cpp -- clang-tools-extra/clang-tidy/ClangTidy.cpp --dif

[clang-tools-extra] [llvm] [Github][CI] Add default gha user for tooling containers (PR #164294)

2025-10-24 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/164294 >From e21c01db0cfeae856cb2f88d64f6fb8cd760fa85 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Mon, 20 Oct 2025 21:14:57 +0300 Subject: [PATCH 1/3] [Github][CI] Add default gha user for tooling containers

[clang-tools-extra] [llvm] [TEST][WIP] Run clang-tidy inside ci-container (PR #160193)

2025-10-24 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor closed https://github.com/llvm/llvm-project/pull/160193 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [Github][CI] Add default gha user for tooling containers (PR #164294)

2025-10-24 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/164294 >From e21c01db0cfeae856cb2f88d64f6fb8cd760fa85 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Mon, 20 Oct 2025 21:14:57 +0300 Subject: [PATCH 1/2] [Github][CI] Add default gha user for tooling containers

[clang] [llvm] [Clang] Fix cleanup attribute by delaying type checks after the type is deduced (PR #164440)

2025-10-24 Thread Guillot Tony via cfe-commits
to268 wrote: As found by Aaron, there is an additional bug with templated types that will need to be fixed before landing this PR. See: https://godbolt.org/z/8E83bx7jK I am currently getting the same diagnostic emitted in the `test2()` function. https://github.com/llvm/llvm-project/pull/164440

[clang] Revert "Reapply "[clang-format] Annotate ::operator and Foo::operator… (PR #165038)

2025-10-24 Thread via cfe-commits
https://github.com/PiJoules closed https://github.com/llvm/llvm-project/pull/165038 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] bd27abc - Revert "Reapply "[clang-format] Annotate ::operator and Foo::operator… (#165038)

2025-10-24 Thread via cfe-commits
Author: PiJoules Date: 2025-10-24T14:36:23-07:00 New Revision: bd27abcceedfc60f4598124aa022cd0b766da3d8 URL: https://github.com/llvm/llvm-project/commit/bd27abcceedfc60f4598124aa022cd0b766da3d8 DIFF: https://github.com/llvm/llvm-project/commit/bd27abcceedfc60f4598124aa022cd0b766da3d8.diff LOG:

[clang] Revert "Reapply "[clang-format] Annotate ::operator and Foo::operator… (PR #165038)

2025-10-24 Thread Prabhu Rajasekaran via cfe-commits
https://github.com/Prabhuk approved this pull request. https://github.com/llvm/llvm-project/pull/165038 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] close IsStandardConversion hole when adding cfi_unchecked_callee (PR #164592)

2025-10-24 Thread Bruno De Fraine via cfe-commits
https://github.com/brunodf-snps closed https://github.com/llvm/llvm-project/pull/164592 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e07aef9 - [clang][Sema] close IsStandardConversion hole when adding cfi_unchecked_callee (#164592)

2025-10-24 Thread via cfe-commits
Author: Bruno De Fraine Date: 2025-10-24T23:33:25+02:00 New Revision: e07aef9dde4cc84af8b696b97c294b6497ce667a URL: https://github.com/llvm/llvm-project/commit/e07aef9dde4cc84af8b696b97c294b6497ce667a DIFF: https://github.com/llvm/llvm-project/commit/e07aef9dde4cc84af8b696b97c294b6497ce667a.dif

[clang] [X86][Clang] Allow constexpr evaluation of F16C CVTPS2PH intrinsics (PR #162295)

2025-10-24 Thread Hanyang Xu via cfe-commits
ericxu233 wrote: @RKSimon > Do you think you can handle the avx512 vcvtps2ph*_mask builtins as well? It > should main Do I do all vcvtps2ph instructions? Some instructions are from AVX512_FP16 which have native support for half-precision floats. In order to support these instructions, I nee

[clang] [X86][Clang] Allow constexpr evaluation of F16C CVTPS2PH intrinsics (PR #162295)

2025-10-24 Thread Hanyang Xu via cfe-commits
@@ -12442,6 +12442,81 @@ bool VectorExprEvaluator::VisitCallExpr(const CallExpr *E) { return Success(APValue(Elems.data(), NumElems), E); } + + case clang::X86::BI__builtin_ia32_vcvtps2ph: + case clang::X86::BI__builtin_ia32_vcvtps2ph256: { +APValue SrcVec; +i

[clang] [X86][Clang] Allow constexpr evaluation of F16C CVTPS2PH intrinsics (PR #162295)

2025-10-24 Thread Hanyang Xu via cfe-commits
@@ -67,3 +67,60 @@ __m128i test_mm256_cvtps_ph(__m256 a) { // CHECK: call <8 x i16> @llvm.x86.vcvtps2ph.256(<8 x float> %{{.*}}, i32 0) return _mm256_cvtps_ph(a, 0); } + +// A value exactly halfway between 1.0 and the next representable FP16 number. +// In binary, its signi

[clang] [X86][Clang] Allow constexpr evaluation of F16C CVTPS2PH intrinsics (PR #162295)

2025-10-24 Thread Hanyang Xu via cfe-commits
@@ -67,3 +67,60 @@ __m128i test_mm256_cvtps_ph(__m256 a) { // CHECK: call <8 x i16> @llvm.x86.vcvtps2ph.256(<8 x float> %{{.*}}, i32 0) return _mm256_cvtps_ph(a, 0); } + +// A value exactly halfway between 1.0 and the next representable FP16 number. +// In binary, its signi

[clang] [X86][Clang] Allow constexpr evaluation of F16C CVTPS2PH intrinsics (PR #162295)

2025-10-24 Thread Hanyang Xu via cfe-commits
@@ -67,3 +67,60 @@ __m128i test_mm256_cvtps_ph(__m256 a) { // CHECK: call <8 x i16> @llvm.x86.vcvtps2ph.256(<8 x float> %{{.*}}, i32 0) return _mm256_cvtps_ph(a, 0); } + +// A value exactly halfway between 1.0 and the next representable FP16 number. +// In binary, its signi

[clang] [X86][Clang] Allow constexpr evaluation of F16C CVTPS2PH intrinsics (PR #162295)

2025-10-24 Thread Hanyang Xu via cfe-commits
@@ -3002,6 +3002,91 @@ static bool interp__builtin_vec_set(InterpState &S, CodePtr OpPC, return true; } +static bool interp__builtin_ia32_vcvtps2ph(InterpState &S, CodePtr OpPC, + const CallExpr *Call) { + // Arguments are: vector

[clang] [X86][Clang] Allow constexpr evaluation of F16C CVTPS2PH intrinsics (PR #162295)

2025-10-24 Thread Hanyang Xu via cfe-commits
@@ -3002,6 +3002,91 @@ static bool interp__builtin_vec_set(InterpState &S, CodePtr OpPC, return true; } +static bool interp__builtin_ia32_vcvtps2ph(InterpState &S, CodePtr OpPC, + const CallExpr *Call) { + // Arguments are: vector

[clang] [X86][Clang] Allow constexpr evaluation of F16C CVTPS2PH intrinsics (PR #162295)

2025-10-24 Thread Hanyang Xu via cfe-commits
@@ -3002,6 +3002,91 @@ static bool interp__builtin_vec_set(InterpState &S, CodePtr OpPC, return true; } +static bool interp__builtin_ia32_vcvtps2ph(InterpState &S, CodePtr OpPC, + const CallExpr *Call) { + // Arguments are: vector

[clang] [X86][Clang] Allow constexpr evaluation of F16C CVTPS2PH intrinsics (PR #162295)

2025-10-24 Thread Hanyang Xu via cfe-commits
https://github.com/ericxu233 updated https://github.com/llvm/llvm-project/pull/162295 >From 77575319c2b2b382aa7af9121390aceb34f5d23f Mon Sep 17 00:00:00 2001 From: ericxu233 Date: Sun, 5 Oct 2025 01:41:40 -0400 Subject: [PATCH 1/3] [X86][Clang] Allow constexpr evaluation of F16C CVTPS2PH intri

[clang] [NFC][clang] cleanup dead code (PR #164977)

2025-10-24 Thread Steven Perron via cfe-commits
https://github.com/s-perron approved this pull request. https://github.com/llvm/llvm-project/pull/164977 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [clang][headers] Need a way for math.h to share the definitions of INIFINITY and NAN with float.h (PR #164348)

2025-10-24 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ppc64le-linux-multistage` running on `ppc64le-clang-multistage-test` while building `clang-tools-extra,clang,llvm` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/76/bu

[clang] [OpenMP][clang][HIP][CUDA] fix weak alias emit on device compilation (PR #164326)

2025-10-24 Thread via cfe-commits
@@ -0,0 +1,63 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --check-globals all --version 6 +// REQUIRES: amdgpu-registered-target +// RUN: %clang_cc1 -x hip -triple x86_64-unknown-linux-gnu -aux-triple amdgcn-amd-amdhsa -emit-llvm-b

[clang] [OpenMP][clang][HIP][CUDA] fix weak alias emit on device compilation (PR #164326)

2025-10-24 Thread via cfe-commits
@@ -0,0 +1,36 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --check-globals all --version 6 +// REQUIRES: nvptx-registered-target +// RUN: %clang_cc1 -x cuda -triple x86_64-unknown-linux-gnu -aux-triple nvptx64-nvidia-cuda -emit-llvm

[clang] [OpenMP][clang][HIP][CUDA] fix weak alias emit on device compilation (PR #164326)

2025-10-24 Thread via cfe-commits
@@ -4065,8 +4065,40 @@ void CodeGenModule::EmitGlobal(GlobalDecl GD) { // If this is an alias definition (which otherwise looks like a declaration) // emit it now. - if (Global->hasAttr()) + if (Global->hasAttr()) { +if (LangOpts.OpenMPIsTargetDevice || LangOpts.CUDA

[clang] [OpenMP][clang][HIP][CUDA] fix weak alias emit on device compilation (PR #164326)

2025-10-24 Thread via cfe-commits
@@ -4065,8 +4065,40 @@ void CodeGenModule::EmitGlobal(GlobalDecl GD) { // If this is an alias definition (which otherwise looks like a declaration) // emit it now. - if (Global->hasAttr()) + if (Global->hasAttr()) { +if (LangOpts.OpenMPIsTargetDevice || LangOpts.CUDA

[clang] [OpenMP][clang][HIP][CUDA] fix weak alias emit on device compilation (PR #164326)

2025-10-24 Thread via cfe-commits
@@ -4065,8 +4065,40 @@ void CodeGenModule::EmitGlobal(GlobalDecl GD) { // If this is an alias definition (which otherwise looks like a declaration) // emit it now. - if (Global->hasAttr()) + if (Global->hasAttr()) { +if (LangOpts.OpenMPIsTargetDevice || LangOpts.CUDA

[clang] [llvm] [HLSL][DXIL][SPRIV] Added WaveActiveMin intrinsic (PR #164385)

2025-10-24 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 approved this pull request. LGTM, thanks for doing this! https://github.com/llvm/llvm-project/pull/164385 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP][clang][HIP][CUDA] fix weak alias emit on device compilation (PR #164326)

2025-10-24 Thread via cfe-commits
@@ -4065,8 +4065,40 @@ void CodeGenModule::EmitGlobal(GlobalDecl GD) { // If this is an alias definition (which otherwise looks like a declaration) // emit it now. - if (Global->hasAttr()) + if (Global->hasAttr()) { +if (LangOpts.OpenMPIsTargetDevice || LangOpts.CUDA

[clang] [OpenMP][clang][HIP][CUDA] fix weak alias emit on device compilation (PR #164326)

2025-10-24 Thread via cfe-commits
Jason-VanBeusekom wrote: [16c1a68](https://github.com/llvm/llvm-project/pull/164326/commits/16c1a6888b87644f24c07a75c067d9e25eb1ac3e) Addresses the above feedback (minus documentation). I refactored the code to be more readable about the states, while, also, reducing the nested conditionals an

[clang] [CIR] Emit CIR builtins: coroAlloc, coroBegin, and coroSize (PR #164180)

2025-10-24 Thread via cfe-commits
https://github.com/Andres-Salamanca updated https://github.com/llvm/llvm-project/pull/164180 >From 3e24f4b1e5b1d15f34e38755ebe7c44ec09b9fba Mon Sep 17 00:00:00 2001 From: Andres Salamanca Date: Sun, 19 Oct 2025 16:03:51 -0500 Subject: [PATCH 1/3] [CIR] Emit CIR builtins: coroAlloc, coroBegin, a

  1   2   3   4   5   >