[clang] [llvm] [HLSL] Add support to branch/flatten attributes to switch (PR #131739)

2025-03-17 Thread via cfe-commits
https://github.com/joaosaffran created https://github.com/llvm/llvm-project/pull/131739 closes: [#125754](https://github.com/llvm/llvm-project/issues/125754) >From 145b3b1c10faffa15477083e530fcc50c71ff2ea Mon Sep 17 00:00:00 2001 From: joaosaffran Date: Tue, 18 Mar 2025 06:14:12 + Subject:

[clang] [llvm] [RISCV] Add Zilsd and Zclsd Extensions (PR #131094)

2025-03-17 Thread via cfe-commits
@@ -0,0 +1,25 @@ +# RUN: llvm-mc %s -triple=riscv32 -mattr=+zilsd -M no-aliases -show-encoding \ +# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s +# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+zilsd < %s \ +# RUN: | llvm-objdump --mattr=+zilsd --n

[clang] [clang][bytecode] Compile most recent function decl (PR #131730)

2025-03-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes We used to always do this because all calls went through the code path that calls getMostRecentDecl(). Do it now, too. --- Full diff: https://github.com/llvm/llvm-project/pull/131730.diff 4 Files Affected:

[clang] [llvm] [RISCV] Add Zilsd and Zclsd Extensions (PR #131094)

2025-03-17 Thread via cfe-commits
https://github.com/dong-miao updated https://github.com/llvm/llvm-project/pull/131094 >From bcdf9641037507b855a20a8ba5d26b127dd248e8 Mon Sep 17 00:00:00 2001 From: dong-miao Date: Sat, 4 Jan 2025 17:53:58 +0800 Subject: [PATCH 01/30] Update RISCVSystemOperands.td --- llvm/lib/Target/RISCV/RIS

[clang] 2f808dd - [clang][bytecode] Compile most recent function decl (#131730)

2025-03-17 Thread via cfe-commits
Author: Timm Baeder Date: 2025-03-18T07:29:38+01:00 New Revision: 2f808dd0702ba3c364eb4373714a1fb09078909d URL: https://github.com/llvm/llvm-project/commit/2f808dd0702ba3c364eb4373714a1fb09078909d DIFF: https://github.com/llvm/llvm-project/commit/2f808dd0702ba3c364eb4373714a1fb09078909d.diff L

[clang] [clang][bytecode] Compile most recent function decl (PR #131730)

2025-03-17 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/131730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Zilsd and Zclsd Extensions (PR #131094)

2025-03-17 Thread Sudharsan Veeravalli via cfe-commits
@@ -0,0 +1,22 @@ +# RUN: not llvm-mc -triple=riscv32 -mattr=+zclsd < %s 2>&1 | FileCheck %s + +## GPRPairC +c.ld t1, 4(sp) # CHECK: :[[@LINE]]:6: error: invalid operand for instruction +c.sd s2, 4(sp) # CHECK: :[[@LINE]]:6: error: invalid operand for instruction + +## GPRPairNoX0

[clang] [llvm] [RISCV] Add Zilsd and Zclsd Extensions (PR #131094)

2025-03-17 Thread Sudharsan Veeravalli via cfe-commits
@@ -0,0 +1,25 @@ +# RUN: llvm-mc %s -triple=riscv32 -mattr=+zilsd -M no-aliases -show-encoding \ +# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s +# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+zilsd < %s \ +# RUN: | llvm-objdump --mattr=+zilsd --n

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

2025-03-17 Thread Carlos Alberto Enciso via cfe-commits
CarlosAlbertoEnciso wrote: > > > To work out which class A this refers to would involve parsing the > > > template parameter correctly and matching to the correct anonymous > > > namespace. While this technically isn’t impossible > > > > > > Are you sure about that? Anonymous types are confin

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

2025-03-17 Thread Younan Zhang via cfe-commits
zyn0217 wrote: > Thank you for the quick fix, I would have also added the test that did not > crash but issued a diagnostic from the issue as well: #131530 > > unless we have a similar test already. Yeah, probably it merits a followup NFC patch https://github.com/llvm/llvm-project/pull/1315

[clang] [clang][bytecode] Compile most recent function decl (PR #131730)

2025-03-17 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/131730 We used to always do this because all calls went through the code path that calls getMostRecentDecl(). Do it now, too. >From eee0c1cb26452fa0ba96fa842eb7b343751d5baf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ti

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

2025-03-17 Thread Takuto Ikuta via cfe-commits
@@ -0,0 +1,31 @@ +// RUN: split-file %s %t + +// There are two requirements here to result in the owner of a macro being null. atetubou wrote: Which macro has null owner module in this test? https://github.com/llvm/llvm-project/pull/130712 _

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

2025-03-17 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 1/2] [clang] Fix a segfault when M is a nullptr --- clang/docs/Rele

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

2025-03-17 Thread Takuto Ikuta via cfe-commits
@@ -318,6 +318,7 @@ Bug Fixes to C++ Support - Fixed an assertion failure affecting code that uses C++23 "deducing this". (#GH130272) - Clang now properly instantiates destructors for initialized members within non-delegating constructors. (#GH93251) - Correctly diagnoses if

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

2025-03-17 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay commented: Haven't read all comments. But the PR now changes many files, and there is a noticeable change to clang/lib/Driver/ToolChains/PPCLinux.cpp . However, the description hasn't been updated. https://github.com/llvm/llvm-project/pull/131041

[clang] [llvm] [DirectX] Implement Shader Flags Analysis for ResMayNotAlias (PR #131070)

2025-03-17 Thread Finn Plummer via cfe-commits
@@ -0,0 +1,39 @@ +; RUN: opt -S --passes="print-dx-shader-flags" 2>&1 %s | FileCheck %s + +target triple = "dxil-pc-shadermodel6.8-library" + +; CHECK: Combined Shader Flags for Module +; CHECK-NEXT: Shader Flags Value: 0x20010 + +; CHECK: Note: extra DXIL module flags: +

[clang] A more precise matching for the driver test (PR #129611)

2025-03-17 Thread Fangrui Song via cfe-commits
MaskRay wrote: > #128894 seems to have caused a problem on the ppc64le bot. I _think_ this > fixes it, but this test seems a bit janky to me. I don't really see why the > driver's sub-commands would ever be out of order, and the imprecise matches > seem flaky. > > Not sure if @MaskRay or @yxs

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

2025-03-17 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 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][DepScan] Pass references to ModuleDeps instead of ModuleID in lookupModuleOutput callbacks, NFCI (PR #131688)

2025-03-17 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/131688 This allows clients to reference more read-only attributes, like IsInStableDirectories. >From 99d2648f4c786e56d1fba51751a418e6858d2f7b Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Mon, 10 Mar 2025 11:

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

2025-03-17 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] [AArch64] Add an option to get the TLS pointer from software (PR #130932)

2025-03-17 Thread via cfe-commits
https://github.com/xerpi updated https://github.com/llvm/llvm-project/pull/130932 From 0836ddbda0f00117ebbd82b13f3a1ba12cbdbfa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergi=20=28=E3=82=BB=E3=83=AB=E3=82=B8=29?= Date: Wed, 12 Mar 2025 16:20:07 +0900 Subject: [PATCH] [AArch64] Add an option to

[clang] Headers: prefer `corecrt_malloc.h` to `malloc.h` (PR #131668)

2025-03-17 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd updated https://github.com/llvm/llvm-project/pull/131668 >From 8415be6e59aa2f8a23a3e484b1c8053f4d0c7206 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Mon, 17 Mar 2025 13:31:05 -0700 Subject: [PATCH] Headers: prefer `corecrt_malloc.h` to `malloc.h` This all

[clang] [clang] Refine handling of C++20 aggregate initialization (PR #131320)

2025-03-17 Thread via cfe-commits
https://github.com/offsetof updated https://github.com/llvm/llvm-project/pull/131320 >From 6840e3be5a8019acdc115160fc748306e8ce384a Mon Sep 17 00:00:00 2001 From: offsetof Date: Sun, 16 Mar 2025 09:59:44 + Subject: [PATCH 1/2] [clang] Refine handling of C++20 aggregate initialization * Mov

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

2025-03-17 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/9] [flang-rt] Pass the whole path of libflang_rt.runtime.a t

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

2025-03-17 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 01/11] [flang-rt] Pass the whole path of libflang_rt.runtime.a

[clang] [clang-format] add option to bin-pack keyworded parameters (PR #131605)

2025-03-17 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks requested changes to this pull request. You need to add a parsing test for your option and annotation tests for the annotation. https://github.com/llvm/llvm-project/pull/131605 ___ cfe-commits mailing list cfe-com

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

2025-03-17 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 6616acd80cd91a0075e3cd481bb9a6d82fd4ea9e 7ab3382e11226d8a519402224f81a15f2ac40180 --e

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

2025-03-17 Thread Daniel Chen via cfe-commits
@@ -101,3 +102,19 @@ bool PPCLinuxToolChain::SupportIEEEFloat128( return GlibcSupportsFloat128((Twine(D.DyldPrefix) + Linker).str()) && !(D.CCCIsCXX() && HasUnsupportedCXXLib); } + +void PPCLinuxToolChain::addFortranRuntimeLibs( +const ArgList &Args, llvm::opt::A

[clang] [llvm] [DirectX] Implement Shader Flags Analysis for ResMayNotAlias (PR #131070)

2025-03-17 Thread Finn Plummer via cfe-commits
@@ -176,10 +198,16 @@ void ModuleShaderFlags::initialize(Module &M, DXILResourceTypeMap &DRTM, continue; } + // Set ResMayNotAlias to true if DXIL version < 1.8 and there are UAVs + // present globally. + if (CanSetResMayNotAlias && MMDI.DXILVersi

[clang] [alpha.webkit.UncountedCallArgsChecker] os_log functions should be treated as safe. (PR #131500)

2025-03-17 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/131500 >From 38660deefa24a6014d60c63428b45006d18a1488 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sat, 15 Mar 2025 23:02:55 -0700 Subject: [PATCH 1/3] [alpha.webkit.UncountedCallArgsChecker] os_log functions shoul

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-17 Thread Daniel Chen via cfe-commits
@@ -1187,16 +1187,19 @@ endif() # Build with _XOPEN_SOURCE on AIX, as stray macros in _ALL_SOURCE mode tend to # break things. In this case we need to enable the large-file API as well. if (UNIX AND ${CMAKE_SYSTEM_NAME} MATCHES "AIX") - add_compile_definitions(_XOPEN_S

[clang] disable unary, vector mask (PR #130400)

2025-03-17 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: https://sourcegraph.com/search?q=context:global+__builtin_shufflevector%5C%28%5BA-Za-z0-9_%5D%2B%2C.%5BA-Za-z0-9_%5D%2B%5C%29+-file:.*test.*&patternType=regexp&case=yes&sm=0 doesn't show use in the wild, but perhaps someone can devise a better search string. In the meantime,

[clang] [HLSL] Implement min and max overloads using templates (PR #131666)

2025-03-17 Thread Sarah Spall via cfe-commits
@@ -54,5 +54,67 @@ clamp(U p0, V p1, W p2) { return clamp(p0, (U)p1, (U)p2); } +//===--===// +// max builtin overloads +//===--===// + +tem

[clang] [ARM, MVE] Change placeholder from `undef` to `poison` (PR #131689)

2025-03-17 Thread Pedro Lobo via cfe-commits
https://github.com/pedroclobo created https://github.com/llvm/llvm-project/pull/131689 Call `insertelement` on a `poison` value instead of `undef`. >From f90247df8bbb6e24aab4476ea8ef9ef5d990edb3 Mon Sep 17 00:00:00 2001 From: Pedro Lobo Date: Mon, 17 Mar 2025 22:50:51 + Subject: [PATCH] [A

[clang] 541b8f2 - [clang][driver] Use rva22u64_v as the default march for Fuchsia targets (#131183)

2025-03-17 Thread via cfe-commits
Author: Paul Kirth Date: 2025-03-17T16:03:55-07:00 New Revision: 541b8f2e14d495e250a0eefaac4b09ce0e27348f URL: https://github.com/llvm/llvm-project/commit/541b8f2e14d495e250a0eefaac4b09ce0e27348f DIFF: https://github.com/llvm/llvm-project/commit/541b8f2e14d495e250a0eefaac4b09ce0e27348f.diff LO

[clang] [clang][driver] Use rva22u64_v as the default march for Fuchsia targets (PR #131183)

2025-03-17 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed https://github.com/llvm/llvm-project/pull/131183 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX] Implement Shader Flags Analysis for ResMayNotAlias (PR #131070)

2025-03-17 Thread Finn Plummer via cfe-commits
inbelic wrote: Sure, although I would maybe argue that setting the module flag with a comment makes it more clear which shader flag we are interested in testing here. Just a suggestion though https://github.com/llvm/llvm-project/pull/131070 _

[clang] [clang][driver] Use rva22u64_v as the default march for Fuchsia targets (PR #131183)

2025-03-17 Thread Paul Kirth via cfe-commits
ilovepi wrote: ### Merge activity * **Mar 17, 7:02 PM EDT**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/131183). https://github.com/llvm/llvm-project/pull/131183

[clang] [clang][DepScan] Pass references to ModuleDeps instead of ModuleID in lookupModuleOutput callbacks, NFCI (PR #131688)

2025-03-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Cyndy Ishida (cyndyishida) Changes This allows clients to reference more read-only attributes, like IsInStableDirectories. --- Full diff: https://github.com/llvm/llvm-project/pull/131688.diff 5 Files Affected: - (modified) clang/inclu

[clang] [C2y] Add octal prefixes, deprecate unprefixed octals (PR #131626)

2025-03-17 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,95 @@ +// RUN: %clang_cc1 -verify=expected,c2y -pedantic -std=c2y %s +// RUN: %clang_cc1 -verify=expected,c2y,compat -Wpre-c2y-compat -std=c2y %s +// RUN: %clang_cc1 -verify=expected,ext -pedantic -std=c23 %s +// RUN: %clang_cc1 -verify=expected,ext -pedantic -x c++ -Wn

[clang] [Clang] Link libgcc_s.1.dylib when building for macOS 10.5 and older (PR #124651)

2025-03-17 Thread via cfe-commits
https://github.com/Un1q32 updated https://github.com/llvm/llvm-project/pull/124651 >From d4e97c4113086c3d2dfa3bf6e9ecfee377f8c4b6 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Mon, 27 Jan 2025 18:00:34 -0500 Subject: [PATCH 1/3] [Clang] Link libgcc_s.1.dylib when building for macOS 10.5 and olde

[clang] [alpha.webkit.UncountedCallArgsChecker] os_log functions should be treated as safe. (PR #131500)

2025-03-17 Thread Ryosuke Niwa via cfe-commits
@@ -695,9 +695,13 @@ RefPtr object(); void someFunction(const RefCounted&); void test2() { -someFunction(*object()); + someFunction(*object()); } void system_header() { callMethod(object); } + +void log(RefCountable* obj) { + os_log_msg(os_log_create("WebKit", "D

[clang] cfa07cc - [clang][bytecode] Fix builtin_memchr with non-0 start index (#131633)

2025-03-17 Thread via cfe-commits
Author: Timm Baeder Date: 2025-03-17T19:02:55+01:00 New Revision: cfa07ccdfcf03cbd48086fe9988f97e3a776b02c URL: https://github.com/llvm/llvm-project/commit/cfa07ccdfcf03cbd48086fe9988f97e3a776b02c DIFF: https://github.com/llvm/llvm-project/commit/cfa07ccdfcf03cbd48086fe9988f97e3a776b02c.diff L

[clang] [HLSL] Implement min and max overloads using templates (PR #131666)

2025-03-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sarah Spall (spall) Changes Replace min and max overload implementation using macros with one using templates. Enable new overloads of the forms: vector min/max(vector p0, U p1) vector min/max(U p0, vector p1) vector

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

2025-03-17 Thread Alexander Shaposhnikov via cfe-commits
@@ -8,9 +8,23 @@ __attribute__((reqd_work_group_size(128, 1, 1))) __global__ void reqd_work_group_size_128_1_1() {} +template +__attribute__((reqd_work_group_size(a, b, c))) +__global__ void reqd_work_group_size_a_b_c() {} + +template <> +__global__ void reqd_work_group_size_

[clang] [llvm] [DirectX] Implement Shader Flags Analysis for ResMayNotAlias (PR #131070)

2025-03-17 Thread Finn Plummer via cfe-commits
https://github.com/inbelic commented: Nice work, just some minor comments/questions. As mentioned, we should have a definitive answer to if we need SRV to be included at all here (both in code comments and testcases). https://github.com/llvm/llvm-project/pull/131070 ___

[clang] [llvm] [DirectX] Implement Shader Flags Analysis for ResMayNotAlias (PR #131070)

2025-03-17 Thread Finn Plummer via cfe-commits
@@ -176,10 +198,16 @@ void ModuleShaderFlags::initialize(Module &M, DXILResourceTypeMap &DRTM, continue; } + // Set ResMayNotAlias to true if DXIL version < 1.8 and there are UAVs + // present globally. + if (CanSetResMayNotAlias && MMDI.DXILVersi

[clang] [llvm] [OffloadBundler] Rework the ctor of `OffloadTargetInfo` to support AMDGPU's generic target (PR #122629)

2025-03-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/122629 >From 36c15623d308ecacdfe1fdd18a085dfd3d5c2712 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Mon, 17 Mar 2025 12:31:06 -0400 Subject: [PATCH 1/4] [OffloadBundler] Rework the ctor of `OffloadTargetInfo` to s

[clang] [Headers] Create stub spirvintrin.h (PR #131164)

2025-03-17 Thread Jon Chesterfield via cfe-commits
JonChesterfield wrote: OK, we can't have spirv64-unknown-unknown at this point. But we could get this compiling using a mixture of spirv intrinsics (where they exist) and amdgpu intrinsics for spirv64-amd-amdhsa, leaving a preprocessor error for other targets. I'll take a stab at that. https:

[clang] [clang-format] add option to bin-pack keyworded parameters (PR #131605)

2025-03-17 Thread Eugene Shalygin via cfe-commits
@@ -148,6 +160,24 @@ class AnnotatingParser { } } + const FormatStyle::FunctionDeclarationWithKeywords * + isInsideFunctionWithKeywordedParameters(const FormatToken &Token) const { +const FormatToken *Previous = &Token; +while (auto Prev = Previous->getPrevious

[clang] [compiler-rt] [Coverage] Fix region termination for GNU statement expressions (PR #130976)

2025-03-17 Thread Justin Cady via cfe-commits
justincady wrote: @MaskRay If you're satisfied with the current diff, could you please commit this whenever you get the chance? Thank you. https://github.com/llvm/llvm-project/pull/130976 ___ 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-17 Thread Alexander Shaposhnikov via cfe-commits
https://github.com/alexander-shaposhnikov updated https://github.com/llvm/llvm-project/pull/131546 >From 6f00315409719797e353854a7e73f6eb75674dae 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] [clang][DependencyScanning] Track modules that resolve from "shared" locations (PR #130634)

2025-03-17 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/130634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX] Implement Shader Flags Analysis for ResMayNotAlias (PR #131070)

2025-03-17 Thread Finn Plummer via cfe-commits
@@ -0,0 +1,39 @@ +; RUN: opt -S --passes="print-dx-shader-flags" 2>&1 %s | FileCheck %s + +target triple = "dxil-pc-shadermodel6.8-library" + +; CHECK: Combined Shader Flags for Module +; CHECK-NEXT: Shader Flags Value: 0x20010 inbelic wrote: It seems th

[clang] [llvm] [DirectX] Implement Shader Flags Analysis for ResMayNotAlias (PR #131070)

2025-03-17 Thread Finn Plummer via cfe-commits
inbelic wrote: Are we able to add the `-res-may-alias` flag here so that we keep our testcase isolated on the current flag being tested? Or add the module flag I suppose https://github.com/llvm/llvm-project/pull/131070 _

[clang] [llvm] [DirectX] Implement Shader Flags Analysis for ResMayNotAlias (PR #131070)

2025-03-17 Thread Finn Plummer via cfe-commits
inbelic wrote: Can we add a comment in these test files to describe what they are distinctly testing? It is not immediately clear to me https://github.com/llvm/llvm-project/pull/131070 ___ cfe-commits mailing list cf

[clang] [CIR] Upstream global initialization for ArrayType (PR #131657)

2025-03-17 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I did a quick look, I'll count on the CIR reviewers to do a closer look. https://github.com/llvm/llvm-project/pull/131657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] disable unary, vector mask (PR #130400)

2025-03-17 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: The current behavior seems to be intentional, at least it was added as part of 1fa36050abd8b798927829f0b0a4362f9e9c63eb which was solving https://github.com/llvm/llvm-project/issues/12837. CC @efriedma-quic https://github.com/llvm/llvm-project/pull/130400 _

[clang] [clang][DependencyScanning] Track modules that resolve from "shared" locations (PR #130634)

2025-03-17 Thread Cyndy Ishida via cfe-commits
@@ -739,6 +795,12 @@ ModuleDepCollectorPP::handleTopLevelModule(const Module *M) { MDC.ScanInstance.getASTReader()->visitInputFileInfos( *MF, /*IncludeSystem=*/true, [&](const serialization::InputFileInfo &IFI, bool IsSystem) { +if (MD.IsShareable) { +

[clang] [clang][DependencyScanning] Track modules that resolve from "shared" locations (PR #130634)

2025-03-17 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/130634 >From aca254a154489fda68292f6d06a866ae7011a7f6 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Mon, 10 Mar 2025 09:06:32 -0700 Subject: [PATCH 1/5] [clang][DependencyScanning] Track modules that resolve f

[clang] [compiler-rt] [Coverage] Fix region termination for GNU statement expressions (PR #130976)

2025-03-17 Thread Justin Cady via cfe-commits
@@ -346,6 +346,12 @@ int elsecondnoret(void) { return 0; } +// CHECK-LABEL: _Z18statementexprnoretb +int statementexprnoret(bool crash) { + int rc = ({ if (crash) abort(); 0; }); // CHECK-NOT: Gap,File 0, [[@LINE]]:41 -> [[@LINE+1]]:3 = 0 justincady wrote:

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-17 Thread Mohamed Emad via cfe-commits
https://github.com/hulxv updated https://github.com/llvm/llvm-project/pull/131280 >From bf9bd4156cb7f652c9cf0477f537e5c58b470448 Mon Sep 17 00:00:00 2001 From: hulxv Date: Fri, 14 Mar 2025 07:39:15 +0200 Subject: [PATCH 1/4] [clang-doc] [feat] add `--repository-line-prefix` argument (fix #5981

[clang] [compiler-rt] [Coverage] Fix region termination for GNU statement expressions (PR #130976)

2025-03-17 Thread Justin Cady via cfe-commits
https://github.com/justincady updated https://github.com/llvm/llvm-project/pull/130976 >From 6f3557780d06d6a2b1a7f315c49a3ad533d821e5 Mon Sep 17 00:00:00 2001 From: Justin Cady Date: Wed, 12 Mar 2025 11:23:19 -0400 Subject: [PATCH 1/3] [Coverage] Fix region termination for GNU statement expres

[clang] [alpha.webkit.UncountedCallArgsChecker] os_log functions should be treated as safe. (PR #131500)

2025-03-17 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/131500 >From 38660deefa24a6014d60c63428b45006d18a1488 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sat, 15 Mar 2025 23:02:55 -0700 Subject: [PATCH 1/2] [alpha.webkit.UncountedCallArgsChecker] os_log functions shoul

[clang] Headers: prefer `corecrt_malloc.h` to `malloc.h` (PR #131668)

2025-03-17 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 2e6402ca2c6c33ccf41d74383a8e3afb82489410 8415be6e59aa2f8a23a3e484b1c8053f4d0c7206 --e

[clang] [Clang][NFC] Extend cmplx range tests for #131129 (PR #131447)

2025-03-17 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: This is a lot of tests... do we really need every combination of type/operator/flag? I guess it makes sure we don't have gaps, but thousands of lines of tests seems excessive. https://github.com/llvm/llvm-project/pull/131447 ___

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

2025-03-17 Thread via cfe-commits
https://github.com/Prabhuk updated https://github.com/llvm/llvm-project/pull/127290 >From 3e6122744f355954edb6a5450ae4220ba39bc9c1 Mon Sep 17 00:00:00 2001 From: prabhukr Date: Fri, 14 Feb 2025 16:53:33 -0800 Subject: [PATCH 1/6] [clang] Fix UEFI Target info For X64 UEFI targets, making the in

[clang] [clang][DependencyScanning] Track modules that resolve from "shared" locations (PR #130634)

2025-03-17 Thread Cyndy Ishida via cfe-commits
@@ -157,6 +157,32 @@ static void optimizeCWD(CowCompilerInvocation &BuildInvocation, StringRef CWD) { } } +/// Check a subset of invocation options to determine whether the current +/// context can safely be considered as shareable. +static bool areOptionsInSharedDir(CowCom

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

2025-03-17 Thread Alexander Richardson 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] Fix array types comparison in getCommonSugaredType (PR #131649)

2025-03-17 Thread Matheus Izvekov via cfe-commits
@@ -0,0 +1,10 @@ +// RUN: %clang_cc1 -triple x86_64-linux-gnu %s + +bool a; +constexpr const unsigned char c[] = { 5 }; +constexpr const unsigned char d[1] = { 0 }; +auto b = (a ? d : c); + +constexpr const unsigned char c1[][1] = {{ 5 }}; +constexpr const unsigned char d1[1][1] =

[clang] [llvm] update_test_checks: add new --filter-out-after option (PR #129739)

2025-03-17 Thread Henrik G. Olsson via cfe-commits
https://github.com/hnrklssn approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/129739 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DependencyScanning] Track modules that resolve from "shared" locations (PR #130634)

2025-03-17 Thread Ben Langmuir via cfe-commits
@@ -739,6 +795,12 @@ ModuleDepCollectorPP::handleTopLevelModule(const Module *M) { MDC.ScanInstance.getASTReader()->visitInputFileInfos( *MF, /*IncludeSystem=*/true, [&](const serialization::InputFileInfo &IFI, bool IsSystem) { +if (MD.IsShareable) { +

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

2025-03-17 Thread via cfe-commits
@@ -835,16 +835,22 @@ 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] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-17 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson 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] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-17 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson 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 array types comparison in getCommonSugaredType (PR #131649)

2025-03-17 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov requested changes to this pull request. https://github.com/llvm/llvm-project/pull/131649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix array types comparison in getCommonSugaredType (PR #131649)

2025-03-17 Thread Matheus Izvekov via cfe-commits
@@ -14171,6 +14171,15 @@ static QualType getCommonSugarTypeNode(ASTContext &Ctx, const Type *X, static auto unwrapSugar(SplitQualType &T, Qualifiers &QTotal) { SmallVector R; while (true) { +if (const auto *ATy = dyn_cast(T.Ty)) { + // C++ 9.3.3.4p3: Any type of t

[clang] [NFC][analyzer] Use `CheckerBase::getName` in checker option handling (PR #131612)

2025-03-17 Thread Balazs Benics via cfe-commits
@@ -39,6 +39,9 @@ class ProgramPointTag { public: ProgramPointTag(void *tagKind = nullptr) : TagKind(tagKind) {} virtual ~ProgramPointTag(); + + /// The description of this program point which will be displayed when the + /// ExplodedGraph is dumped in DOT format for debu

[clang] [clang-format] add option to bin-pack keyworded parameters (PR #131605)

2025-03-17 Thread Björn Schäpers via cfe-commits
@@ -148,6 +160,24 @@ class AnnotatingParser { } } + const FormatStyle::FunctionDeclarationWithKeywords * + isInsideFunctionWithKeywordedParameters(const FormatToken &Token) const { +const FormatToken *Previous = &Token; +while (auto Prev = Previous->getPrevious

[clang] [clang][DependencyScanning] Track modules that resolve from "shared" locations (PR #130634)

2025-03-17 Thread Ben Langmuir via cfe-commits
@@ -157,6 +157,32 @@ static void optimizeCWD(CowCompilerInvocation &BuildInvocation, StringRef CWD) { } } +/// Check a subset of invocation options to determine whether the current +/// context can safely be considered as shareable. +static bool areOptionsInSharedDir(CowCom

[clang] Headers: prefer `corecrt_malloc.h` to `malloc.h` (PR #131668)

2025-03-17 Thread Saleem Abdulrasool via cfe-commits
@@ -13,7 +13,7 @@ #include #ifdef _WIN32 -#include +#include compnerd wrote: Thanks for the typo correction! I think that I can add in a `!defined(__MINGW32__)` condition. https://github.com/llvm/llvm-project/pull/131668 _

[clang] Headers: prefer `corecrt_malloc.h` to `malloc.h` (PR #131668)

2025-03-17 Thread Martin Storsjö via cfe-commits
@@ -13,7 +13,7 @@ #include #ifdef _WIN32 -#include +#include mstorsjo wrote: mingw-w64 doesn't have `corecrt_malloc.h` (yet), so unfortunately we can't go this way in general. Perhaps we could for `!defined(__MINGW32__)` or `defined(_MSC_VER)` though. A

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

2025-03-17 Thread Alexander Shaposhnikov via cfe-commits
https://github.com/alexander-shaposhnikov updated https://github.com/llvm/llvm-project/pull/131546 >From b5aefb3a95c726e188e5cb4f5b3a340766a68107 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] [HLSL] Implement min and max overloads using templates (PR #131666)

2025-03-17 Thread Chris B via cfe-commits
@@ -54,5 +54,67 @@ clamp(U p0, V p1, W p2) { return clamp(p0, (U)p1, (U)p2); } +//===--===// +// max builtin overloads +//===--===// + +tem

[clang-tools-extra] [clang-tidy] Improve `readability-function-size`: count class member initializers as statements (PR #131669)

2025-03-17 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor created https://github.com/llvm/llvm-project/pull/131669 Improve `readability-function-size` by counting class member initializers as statements. Relates to https://github.com/llvm/llvm-project/issues/131126#issuecomment-2725906714. This PR in draft state until htt

[clang] Headers: prefer `corecrt_malloc.h` to `malloc.h` (PR #131668)

2025-03-17 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd created https://github.com/llvm/llvm-project/pull/131668 This allows us to target a lower level library (corecrt) rather than the higher level library (ucrt) which can be helpful in mordularising the SDK. >From f8dea4c8a85c018a3c7ef5eadd00f2da96fe1737 Mon Sep 17 00:

[clang] Headers: prefer `corecrt_malloc.h` to `malloc.h` (PR #131668)

2025-03-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Saleem Abdulrasool (compnerd) Changes This allows us to target a lower level library (corecrt) rather than the higher level library (ucrt) which can be helpful in mordularising the SDK. --- Full diff: https://github.com/llvm/llvm-pr

[clang] [llvm] [OffloadBundler] Rework the ctor of `OffloadTargetInfo` to support AMDGPU's generic target (PR #122629)

2025-03-17 Thread Yaxun Liu via cfe-commits
@@ -84,31 +84,27 @@ OffloadTargetInfo::OffloadTargetInfo(const StringRef Target, : BundlerConfig(BC) { // TODO: Add error checking from ClangOffloadBundler.cpp - auto TargetFeatures = Target.split(':'); - auto TripleOrGPU = TargetFeatures.first.rsplit('-'); - - if (cl

[clang] [clang-format] add option to bin-pack keyworded parameters (PR #131605)

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

[clang] [C2y] Add octal prefixes, deprecate unprefixed octals (PR #131626)

2025-03-17 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. Thanks Aaron! https://github.com/llvm/llvm-project/pull/131626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Coverage] Fix region termination for GNU statement expressions (PR #130976)

2025-03-17 Thread Justin Cady via cfe-commits
https://github.com/justincady updated https://github.com/llvm/llvm-project/pull/130976 >From 6f3557780d06d6a2b1a7f315c49a3ad533d821e5 Mon Sep 17 00:00:00 2001 From: Justin Cady Date: Wed, 12 Mar 2025 11:23:19 -0400 Subject: [PATCH 1/2] [Coverage] Fix region termination for GNU statement expres

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-17 Thread Mohamed Emad via cfe-commits
@@ -866,11 +878,15 @@ genHTML(const RecordInfo &I, Index &InfoIndex, const ClangDocContext &CDCtx, Out.emplace_back(std::make_unique(HTMLTag::TAG_H1, InfoTitle)); if (I.DefLoc) { -if (!CDCtx.RepositoryUrl) - Out.emplace_back(writeFileDefinition(*I.DefLoc)); -

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

2025-03-17 Thread Tristan Ross via cfe-commits
@@ -835,16 +835,22 @@ 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-tools-extra] [clang][dataflow] For bugprone-unchecked-optional-access report range (PR #131055)

2025-03-17 Thread Jan Voung via cfe-commits
https://github.com/jvoung closed https://github.com/llvm/llvm-project/pull/131055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement min and max overloads using templates (PR #131666)

2025-03-17 Thread Sarah Spall via cfe-commits
spall wrote: > LGTM! Unfortunate about the macros not working out but this alternative is > pretty convenient. They would have worked if we didn't need even more overloads! https://github.com/llvm/llvm-project/pull/131666 ___ cfe-commits mailing list

[clang] [HLSL] Implement min and max overloads using templates (PR #131666)

2025-03-17 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 approved this pull request. LGTM! Unfortunate about the macros not working out but this alternative is pretty convenient. https://github.com/llvm/llvm-project/pull/131666 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [HLSL] Add bounds checks for the HLSL `fmod` vector arguments and return types (PR #131035)

2025-03-17 Thread Sarah Spall via cfe-commits
https://github.com/spall closed https://github.com/llvm/llvm-project/pull/131035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e3ef5f2 - [HLSL] Add bounds checks for the HLSL `fmod` vector arguments and return types (#131035)

2025-03-17 Thread via cfe-commits
Author: Kaitlin Peng Date: 2025-03-17T13:05:26-07:00 New Revision: e3ef5f2928f4077c48aebbddd288442d6ff76b62 URL: https://github.com/llvm/llvm-project/commit/e3ef5f2928f4077c48aebbddd288442d6ff76b62 DIFF: https://github.com/llvm/llvm-project/commit/e3ef5f2928f4077c48aebbddd288442d6ff76b62.diff

[clang] 6f659b0 - [clang][dataflow] For bugprone-unchecked-optional-access report range (#131055)

2025-03-17 Thread via cfe-commits
Author: Jan Voung Date: 2025-03-17T16:04:15-04:00 New Revision: 6f659b0060d615435ceec53de407a8084656bc98 URL: https://github.com/llvm/llvm-project/commit/6f659b0060d615435ceec53de407a8084656bc98 DIFF: https://github.com/llvm/llvm-project/commit/6f659b0060d615435ceec53de407a8084656bc98.diff LOG

[clang] [clang-format] add option to bin-pack keyworded parameters (PR #131605)

2025-03-17 Thread Björn Schäpers via cfe-commits
@@ -82,6 +82,7 @@ namespace format { TYPE(FunctionAnnotationRParen) \ TYPE(FunctionDeclarationName) \ TYPE(FunctionDeclarationLParen)

  1   2   3   4   5   6   >