[clang] [HLSL][NFC] Refactor HLSLExternalSemaSource (PR #131032)

2025-03-20 Thread Ashley Coleman via cfe-commits
https://github.com/V-FEXrt approved this pull request. https://github.com/llvm/llvm-project/pull/131032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc][fix] crashes when generating HTML without `--repository` (PR #131698)

2025-03-20 Thread Paul Kirth via cfe-commits
ilovepi wrote: hey, sorry, I ended up landing https://github.com/llvm/llvm-project/pull/131939. There are two reasons: 1) I really wanted to fix that crash ASAP. 2) I made the mistake of stacking other patches on top of it with graphite, and it turns out it isn't easy to reorder them. As a re

[clang] [HLSL] Buffer handle globals should not be constants (PR #130231)

2025-03-20 Thread Justin Bogner via cfe-commits
https://github.com/bogner updated https://github.com/llvm/llvm-project/pull/130231 >From bf5e5b4b1060f51d37b05c905b4327a40316f158 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Thu, 6 Mar 2025 17:50:12 -0800 Subject: [PATCH] [HLSL] Buffer handle globals should not be constants If these are

[clang] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)

2025-03-20 Thread Sergei Barannikov via cfe-commits
@@ -0,0 +1,102 @@ +//===-- CGBuiltin.h - LLVM CodeGen wrappers for llvm::Value* --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)

2025-03-20 Thread Sergei Barannikov via cfe-commits
@@ -0,0 +1,102 @@ +//===-- CGBuiltin.h - LLVM CodeGen wrappers for llvm::Value* --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)

2025-03-20 Thread Sergei Barannikov via cfe-commits
@@ -0,0 +1,102 @@ +//===-- CGBuiltin.h - LLVM CodeGen wrappers for llvm::Value* --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [llvm] [HLSL] Implement dot2add intrinsic (PR #131237)

2025-03-20 Thread Ashley Coleman via cfe-commits
@@ -19681,6 +19681,21 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID, getDotProductIntrinsic(CGM.getHLSLRuntime(), VecTy0->getElementType()), ArrayRef{Op0, Op1}, nullptr, "hlsl.dot"); } + case Builtin::BI__builtin_hlsl_dot2add: { +llvm

[clang] [llvm] [HLSL] Implement dot2add intrinsic (PR #131237)

2025-03-20 Thread Ashley Coleman via cfe-commits
@@ -19681,6 +19681,21 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID, getDotProductIntrinsic(CGM.getHLSLRuntime(), VecTy0->getElementType()), ArrayRef{Op0, Op1}, nullptr, "hlsl.dot"); } + case Builtin::BI__builtin_hlsl_dot2add: { +llvm

[clang-tools-extra] [clang-tidy] 'modernize-use-starts-ends-with': fixed false positives on `find` and `rfind` (PR #129564)

2025-03-20 Thread Baranov Victor via cfe-commits
vbvictor wrote: Since commit access request takes time than I expected, could you please merge this PR, @nicovank? Thank you in advance https://github.com/llvm/llvm-project/pull/129564 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [llvm] Hlsl asint16 intrinsic (PR #131900)

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

[clang] [llvm] Hlsl asuint16 function (PR #132315)

2025-03-20 Thread via cfe-commits
https://github.com/metkarpoonam updated https://github.com/llvm/llvm-project/pull/132315 >From 6ce249d7e4bea669480c06a935f88a21894aba67 Mon Sep 17 00:00:00 2001 From: Poonam Vilas Metkar Date: Wed, 19 Mar 2025 09:16:30 -0700 Subject: [PATCH 1/8] Add asuint16 intrinsic and codegen test --- cla

[clang] [alpha.webkit.RetainPtrCtorAdoptChecker] Support adopt(cast(copy(~)) (PR #132316)

2025-03-20 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/132316 >From 642057c409b1c3b98ee4ecb16e95b5fb5be47a01 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Thu, 20 Mar 2025 17:54:22 -0700 Subject: [PATCH 1/2] [alpha.webkit.RetainPtrCtorAdoptChecker] Support adopt(cast(co

[clang] [alpha.webkit.RetainPtrCtorAdoptChecker] Support adopt(cast(copy(~)) (PR #132316)

2025-03-20 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 fe6bced9e40f7d4c35550c51ef9cdc7be2a055e7 642057c409b1c3b98ee4ecb16e95b5fb5be47a01 --e

[clang] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)

2025-03-20 Thread Jonathan Thackray via cfe-commits
@@ -61,6 +61,16 @@ add_clang_library(clangCodeGen CGAtomic.cpp CGBlocks.cpp CGBuiltin.cpp + TargetBuiltins/AArch64.cpp jthackray wrote: Done. https://github.com/llvm/llvm-project/pull/132252 ___ cfe-commits m

[clang] [llvm] [RISCV][MC] Implement MC for Base P extension (PR #123271)

2025-03-20 Thread Craig Topper via cfe-commits
@@ -0,0 +1,1079 @@ +//===-- RISCVInstrInfoP.td - RISC-V 'P' instructions ---*- tablegen -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: A

[clang] [llvm] Hlsl asuint16 function (PR #132315)

2025-03-20 Thread via cfe-commits
@@ -0,0 +1,38 @@ +; RUN: llc -O0 -verify-machineinstrs -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o - -filetype=obj | spirv-val %} + +; CHECK-DAG: %[[#half:]] = OpTypeFloat 16 metka

[clang] [llvm] Hlsl asuint16 function (PR #132315)

2025-03-20 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 fe6bced9e40f7d4c35550c51ef9cdc7be2a055e7 4c0e7637f9aa34bd13c6d0e5b72519eb0e543a99 --e

[clang] [llvm] [RISCV] Add Svrsw60t59b extension (PR #132321)

2025-03-20 Thread Craig Topper via cfe-commits
@@ -55,6 +55,7 @@ // CHECK-NOT: __riscv_svnapot {{.*$}} // CHECK-NOT: __riscv_svpbmt {{.*$}} // CHECK-NOT: __riscv_svvptc {{.*$}} +// CHECK-NOT: __riscv_svrsw60t59b {{.*$}} topperc wrote: This should be above __riscv_svvptc alphabetically https://github.com/l

[clang] [llvm] [RISCV] Add Svrsw60t59b extension (PR #132321)

2025-03-20 Thread Craig Topper via cfe-commits
@@ -984,6 +984,10 @@ def FeatureStdExtSvvptc : RISCVExtension<1, 0, "Obviating Memory-Management Instructions after Marking PTEs Valid">; +def FeatureStdExtSvrsw60t59b topperc wrote: Put this above FeatureStdExtSvvptc https://github

[clang] [Dependency Scanning] Teach `DependencyScanningTool::getModuleDependencies` to Process a List of Module Names (PR #129915)

2025-03-20 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/129915 >From 7f29cb0c9e422f00ce5b6b26af8ebfb228b59830 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Wed, 5 Mar 2025 11:16:38 -0800 Subject: [PATCH 1/3] Changing DependencyScanningTool::getModuleDependencies to tak

[clang] [llvm] [RISCV] Add Svrsw60t59b extension (PR #132321)

2025-03-20 Thread Craig Topper via cfe-commits
https://github.com/topperc requested changes to this pull request. Tests are failing. https://github.com/llvm/llvm-project/pull/132321 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Clang][CMake][MSVC] Install PDBs alongside executables" (PR #126934)

2025-03-20 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-s390x-linux-multistage` running on `systemz-1` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/98/builds/1168 Here is the relevant piece of the

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcisync (Sync Delay) extension (PR #132184)

2025-03-20 Thread via cfe-commits
https://github.com/hchandel updated https://github.com/llvm/llvm-project/pull/132184 >From 8c4875b817b303d611998f8a8ef9f444c282d2b1 Mon Sep 17 00:00:00 2001 From: Harsh Chandel Date: Thu, 20 Mar 2025 13:49:03 +0530 Subject: [PATCH 1/3] [RISCV] Add Qualcomm uC Xqcisync (Sync Delay) extension Th

[clang] [clang-tools-extra] [clang] NFC: Clear some uses of MemberPointerType::getClass (PR #131965)

2025-03-20 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: thanks! https://github.com/llvm/llvm-project/pull/131965 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-03-20 Thread Paul Kirth via cfe-commits
ilovepi wrote: > @ilovepi About `writeFileDefiniation`, what's your opinion about making it > similar to the markdown generator like this? > > ```c++ > static void writeFileDefinition(const ClangDocContext &CDCtx, const Location > &L); > ``` > > I think it's more better That would probably b

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

2025-03-20 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,342 @@ +//===--- UseScopedLockCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2025-03-20 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/126434 >From bc1b4ada7615d407c2df009f414d62da3857ee86 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Mon, 3 Mar 2025 09:25:03 +0300 Subject: [PATCH 01/11] [clang-tidy] add scoped-lock-check --- .../clang-tidy/m

[clang] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)

2025-03-20 Thread Sergei Barannikov via cfe-commits
@@ -0,0 +1,102 @@ +//===-- CGBuiltin.h - LLVM CodeGen wrappers for llvm::Value* --*- C++ -*-===// s-barannikov wrote: Copy&paste bug? Note that per updated coding standard this line may be the same as line 7. https://github.com/llvm/llvm-project/pull/13225

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-03-20 Thread Trevor Gross via cfe-commits
@@ -548,11 +543,28 @@ SystemZTargetLowering::SystemZTargetLowering(const TargetMachine &TM, } // Handle floating-point types. + if (!useSoftFloat()) { +// Promote all f16 operations to float, with some exceptions below. +for (unsigned Opc = 0; Opc < ISD::BUILTIN_

[clang] [Clang] Do not create dependent CallExpr having UnresolvedLookupExpr inside non-dependent context (PR #124609)

2025-03-20 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime` running on `omp-vega20-0` while building `clang` at step 7 "Add check check-offload". Full details are available at: https://lab.llvm.org/buildbot/#/builders/30/builds/18066 Here is the releva

[clang] [OpenMP 6.0] Parse/Sema support for reduction over private variable with reduction clause. (PR #129938)

2025-03-20 Thread CHANDRA GHALE via cfe-commits
chandraghale wrote: Thank you for the review. https://github.com/llvm/llvm-project/pull/129938 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] dot2add working for dxil without sema check (PR #131237)

2025-03-20 Thread Sumit Agarwal via cfe-commits
https://github.com/sumitsays updated https://github.com/llvm/llvm-project/pull/131237 >From 6d5c4053c90975d64e378e52779dab9c3ffb64cd Mon Sep 17 00:00:00 2001 From: Sumit Agarwal Date: Thu, 13 Mar 2025 16:02:32 -0700 Subject: [PATCH 1/5] dot2add working for dxil without sema check --- clang/in

[clang] [clang][bytecode] Implement __builtin_wmemchr (PR #132254)

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

[clang] [clang][CodeGen][AVR] Fix a crash in AVRABIInfo (PR #131976)

2025-03-20 Thread Eli Friedman via cfe-commits
@@ -114,3 +114,13 @@ struct s15 fooa(char a, char b) { x.arr[1] = b; return x; } + +struct s8_t { + char a; +}; + +// AVR: define {{.*}} i8 @foob(i8 {{.*}}) +// TINY define {{.*}} i8 @foob(i8 {{.*}}) efriedma-quic wrote: ```suggestion // AVR: define {{

[clang] [Clang] Force expressions with UO_Not to not be non-negative (PR #126846)

2025-03-20 Thread Richard Smith via cfe-commits
zygoloid wrote: > > But still I feel generate a warning for this case went too far. > > Yeah, that's probably right. Maybe for `-` on a signed operand, we should > just return the original range with the `NonNegative` flag cleared out, and > shouldn't add the extra bit for the `-128 -> 128` ed

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-03-20 Thread Craig Topper via cfe-commits
@@ -548,11 +543,28 @@ SystemZTargetLowering::SystemZTargetLowering(const TargetMachine &TM, } // Handle floating-point types. + if (!useSoftFloat()) { +// Promote all f16 operations to float, with some exceptions below. +for (unsigned Opc = 0; Opc < ISD::BUILTIN_

[clang] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)

2025-03-20 Thread Jonathan Thackray via cfe-commits
jthackray wrote: > This makes a lot of sense to me, just wondering why you chose > `clang/lib/CodeGen/BuiltinTargets/` rather than > `clang/lib/CodeGen/TargetBuiltins/`? The former shounds like it contains the > list of all builtin targets, rather than the codegen for target-specific > builti

[clang] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)

2025-03-20 Thread Jonathan Thackray via cfe-commits
jthackray wrote: > Seems something with AArch64 has made the CI unhappy as well. Thanks. It appears `clang-format` breaks some of the fragile `#define`s around `NEONMAP0` and similar. If I revert the `clang-format`, it passes. https://github.com/llvm/llvm-project/pull/132252 __

[clang] [Clang][NFC] Code cleanup in CGBuiltin.cpp (PR #132060)

2025-03-20 Thread Jonathan Thackray via cfe-commits
jthackray wrote: > The timing of this is sort of unfortunate with #132252; the merge conflict > there is going to be very painful. @jthackray , thoughts? @efriedma-quic I think I can update my diff after this is merged; yes, might take a while to resolve the diffs. https://github.com/llvm/llv

[clang] [clang-tools-extra] [clang] NFC: Clear some uses of MemberPointerType::getClass (PR #131965)

2025-03-20 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: seems like there are conflicts reverting this at head, could you take a look @mizvekov? https://github.com/llvm/llvm-project/pull/131965 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [clang-tools-extra] [lldb] Revert "Reland: [clang] preserve class type sugar when taking pointer to member" (PR #132280)

2025-03-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes Reverts llvm/llvm-project#132234 Needs to be reverted due to dependency. This blocks reverting another PR, see here: https://github.com/llvm/llvm-project/pull/131965#issuecomment-2741619498 --- Patch

[clang] [clang-tools-extra] [lldb] Revert "Reland: [clang] preserve class type sugar when taking pointer to member" (PR #132280)

2025-03-20 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime` running on `omp-vega20-0` while building `clang-tools-extra,clang,lldb` at step 7 "Add check check-offload". Full details are available at: https://lab.llvm.org/buildbot/#/builders/30/builds/180

[clang-tools-extra] [clang-doc] Avoid deref of invalid std::optional (PR #131939)

2025-03-20 Thread Paul Kirth via cfe-commits
ilovepi wrote: ### Merge activity * **Mar 20, 5: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/131939). https://github.com/llvm/llvm-project/pull/131939

[clang] Optimize Module Dependency Handling for Efficient Memory Usage (PR #132287)

2025-03-20 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 crash on invalid `std::initializer_list` template-id (PR #132284)

2025-03-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (offsetof) Changes In `Sema::BuildStdInitializerList`, check that the synthesized template-id `std::initializer_list` is valid (which might not be the case if the template has associated constraints or subsequent parameters with d

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcisync (Sync Delay) extension (PR #132184)

2025-03-20 Thread Craig Topper via cfe-commits
@@ -1655,6 +1667,10 @@ bool RISCVAsmParser::matchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode, return generateImmOutOfRangeError(Operands, ErrorInfo, 1, (1 << 5)); case Match_InvalidUImm5GE6Plus1: return generateImmOutOfRangeError(Operands, ErrorInfo, 6, (1 << 5)

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

2025-03-20 Thread Louis Dionne via cfe-commits
@@ -223,6 +223,13 @@ endif() # This can be used to detect whether we're in the runtimes build. set(LLVM_RUNTIMES_BUILD ON) +if (LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND UNIX AND ${CMAKE_SYSTEM_NAME} MATCHES "AIX") + # Set LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF as AIX doesn't s

[clang-tools-extra] a87a64b - [clang-doc] Avoid deref of invalid std::optional (#131939)

2025-03-20 Thread via cfe-commits
Author: Paul Kirth Date: 2025-03-20T14:04:58-07:00 New Revision: a87a64b2e487995f9de90a614c7caa7a888147df URL: https://github.com/llvm/llvm-project/commit/a87a64b2e487995f9de90a614c7caa7a888147df DIFF: https://github.com/llvm/llvm-project/commit/a87a64b2e487995f9de90a614c7caa7a888147df.diff LO

[clang-tools-extra] [clang-doc][NFC] Remove unnecessary directory cleanup (PR #132101)

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

[clang-tools-extra] [clang-doc] Correct improper file paths in HTML output (PR #132103)

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

[clang] Optimize Module Dependency Handling for Efficient Memory Usage (PR #132287)

2025-03-20 Thread Ayush Pareek via cfe-commits
https://github.com/ayushpareek2003 created https://github.com/llvm/llvm-project/pull/132287 Optimized addModuleFiles functions for both CompilerInvocation and CowCompilerInvocation to reduce redundant function calls and improve efficiency Introduced memory preallocation using reserve() when ea

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

2025-03-20 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng created https://github.com/llvm/llvm-project/pull/132288 Closes #99156. Tasks completed: - Implement `smoothstep` using HLSL source in `hlsl_intrinsics.h` - Implement the `smoothstep` SPIR-V target built-in in `clang/include/clang/Basic/BuiltinsSPIRV.td` - Add sema c

[clang] [Clang] [NFC] Introduce helpers for defining compatibilty warnings (PR #132129)

2025-03-20 Thread Aaron Ballman via cfe-commits
@@ -155,6 +155,38 @@ class DefaultWarnNoWerror { } class DefaultRemark { Severity DefaultSeverity = SEV_Remark; } +// C++ compatibility warnings. +multiclass CXXCompat< +string message, +int std_ver, +bit ext_warn = true, +string std_ver_override = ""#std_ver>

[clang] [CIR] Upstream initial for-loop support (PR #132266)

2025-03-20 Thread Bruno Cardoso Lopes via cfe-commits
@@ -52,6 +52,15 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { return cir::BoolAttr::get(getContext(), getBoolTy(), state); } + /// Create a for operation. + cir::ForOp createFor( + mlir::Location loc, + llvm::function_ref condBuilder,

[clang] [clang] Remove deprecated `FileManager` APIs (PR #132063)

2025-03-20 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/132063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 99b1a2a - [clang] Remove deprecated `FileManager` APIs (#132063)

2025-03-20 Thread via cfe-commits
Author: Jan Svoboda Date: 2025-03-20T09:38:19-07:00 New Revision: 99b1a2ac078fe52300d270b3e77ddbababa8f951 URL: https://github.com/llvm/llvm-project/commit/99b1a2ac078fe52300d270b3e77ddbababa8f951 DIFF: https://github.com/llvm/llvm-project/commit/99b1a2ac078fe52300d270b3e77ddbababa8f951.diff L

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Profile profraw generation for GPU instrumentation #76587 (PR #93365)

2025-03-20 Thread David Tellenbach via cfe-commits
dtellenbach wrote: @EthanLuisMcDonough I think your patch effectively introduces a dependency on libc because `__llvm_write_custom_profile` has `__attribute__((used))`` but calls e.g. `atoi` through `setupIOBuffer`. In compiler-rt it's not safe to make that assumption because it potentially b

[libclc] [libclc] add --only-needed to llvm-link when INTERNALIZE flag is set (PR #130871)

2025-03-20 Thread Wenju He via cfe-commits
wenju-he wrote: @frasercrmck could you please try this PR on https://github.com/intel/llvm repo? My experiment: clang --version clang version 21.0.0git (https://github.com/llvm/llvm-project f5ee10538b68835112323c241ca7db67ca78bf62) before PR: find . -name "builtins.link*.bc" -printf "%s\n" |

[clang] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)

2025-03-20 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 9b1f905b483a2b42e4681bbef42b2641f8ccf5ad c389db7ffd143fbf462aafc0e1897f96c7478fad --e

[clang] [clang][bytecode] Implement __builtin_wmemchr (PR #132254)

2025-03-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/132254 None >From d64d8d99a96d85b6048eff9130b29e5126ca9607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 20 Mar 2025 18:10:00 +0100 Subject: [PATCH] [clang][bytecode] Implement __builtin_wme

[clang] [NFC][analyzer] Multipart checker refactor 2: NullabilityChecker (PR #132250)

2025-03-20 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -491,7 +503,7 @@ void NullabilityChecker::reportBugIfInvariantHolds( N = C.addTransition(OriginalState, N); } - reportBug(Msg, Error, CK, N, Region, C.getBugReporter(), ValueExpr); + reportB

[clang] [clang][bytecode] Implement __builtin_wmemchr (PR #132254)

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

[clang] [NFC][analyzer] Multipart checker refactor 2: NullabilityChecker (PR #132250)

2025-03-20 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/132250 From d4878a62a69304dc2ae32902803f8c8efb1c69ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Thu, 20 Mar 2025 17:09:46 +0100 Subject: [PATCH 1/4] [NFC][analyzer] Multipart checker refactor

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

2025-03-20 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > This looks potentially-reasonable from the _Clang_ subproject POV, but from a > whole-project POV, I think we ought to actually provide a conforming > freestanding mode somehow, probably via llvm-libc. +1 > So I'd kinda like to hear from llvm-libc folks what they're thin

[clang] [llvm] Hlsl asint16 intrinsic (PR #131900)

2025-03-20 Thread via cfe-commits
https://github.com/metkarpoonam updated https://github.com/llvm/llvm-project/pull/131900 >From 7ef40ee7d88872dbee1345cbd822e4aed8a22626 Mon Sep 17 00:00:00 2001 From: Poonam Vilas Metkar Date: Tue, 18 Mar 2025 11:30:15 -0700 Subject: [PATCH 01/13] Add codegen tests, Sema tests, SPIR-V backend t

[clang] [llvm] [RISCV] Implement the implications of C extension (PR #132259)

2025-03-20 Thread Sam Elliott via cfe-commits
https://github.com/lenary edited https://github.com/llvm/llvm-project/pull/132259 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Implement the implications of C extension (PR #132259)

2025-03-20 Thread Sam Elliott via cfe-commits
@@ -25,8 +25,8 @@ addi a0, a1, 0 # CHECK: # encoding: [0xe0,0x1f] addi s0, sp, 1020 -# CHECK: .option arch, -c -.option arch, -c +# CHECK: .option arch, -c, -zca +.option arch, -c, -zca lenary wrote: This is because your predicates need a little bit of work,

[clang] [llvm] [AARCH64][Neon] switch to using bitcasts in arm_neon.h where appropriate (PR #127043)

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

[clang] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)

2025-03-20 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm edited https://github.com/llvm/llvm-project/pull/130973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Implement the implications of C extension (PR #132259)

2025-03-20 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 d0d33d2b5ba3369d4a5586234181055935965e49 e147dd68477b7e5ec9e6363a45fd7568fe595b04 --e

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

2025-03-20 Thread Mohamed Emad via cfe-commits
@@ -750,11 +754,15 @@ genHTML(const EnumInfo &I, const ClangDocContext &CDCtx) { Out.emplace_back(std::move(Table)); if (I.DefLoc) { -if (!CDCtx.RepositoryUrl) - Out.emplace_back(writeFileDefinition(*I.DefLoc)); -else - Out.emplace_back( - writeF

[clang] [llvm] [AARCH64][Neon] switch to using bitcasts in arm_neon.h where appropriate (PR #127043)

2025-03-20 Thread via cfe-commits
@@ -8747,28 +8752,32 @@ Value *CodeGenFunction::EmitCommonNeonBuiltinExpr( return Builder.CreateBitCast(Result, ResultType, NameHint); } -Value *CodeGenFunction::EmitAArch64CompareBuiltinExpr( -Value *Op, llvm::Type *Ty, const CmpInst::Predicate Fp, -const CmpInst::P

[clang] [clang-tools-extra] [clang-tidy] Avoid processing declarations in system headers (PR #128150)

2025-03-20 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: Thanks for the info, sorry this created trouble for you! An option to turn this behavior off should be easy to add. It's however problematic if it lasts for more than one release because it's harder to deprecate later. It would be good to have a unit test of this case, w

[clang] [NFC][analyzer] Multipart checker refactor 2: NullabilityChecker (PR #132250)

2025-03-20 Thread Donát Nagy via cfe-commits
@@ -1394,35 +1403,34 @@ void NullabilityChecker::printState(raw_ostream &Out, ProgramStateRef State, } } -void ento::registerNullabilityBase(CheckerManager &mgr) { - mgr.registerChecker(); -} - -bool ento::shouldRegisterNullabilityBase(const CheckerManager &mgr) { - retur

[clang] [llvm] [RISCV] Implement the implications of C extension (PR #132259)

2025-03-20 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw updated https://github.com/llvm/llvm-project/pull/132259 >From e147dd68477b7e5ec9e6363a45fd7568fe595b04 Mon Sep 17 00:00:00 2001 From: Jesse Huang Date: Thu, 20 Mar 2025 10:34:14 -0700 Subject: [PATCH 1/2] [RISCV] Implement the implications of C extension --- .../Cod

[clang] [llvm] [RISCV] Implement the implications of C extension (PR #132259)

2025-03-20 Thread Craig Topper via cfe-commits
@@ -25,8 +25,8 @@ addi a0, a1, 0 # CHECK: # encoding: [0xe0,0x1f] addi s0, sp, 1020 -# CHECK: .option arch, -c -.option arch, -c +# CHECK: .option arch, -c, -zca +.option arch, -c, -zca topperc wrote: Does just `.opt arch, -zca` work? https://github.com/llv

[clang] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)

2025-03-20 Thread Paul Walker via cfe-commits
@@ -473,6 +473,14 @@ std::optional Attribute::getVScaleRangeMax() const { return unpackVScaleRangeArgs(pImpl->getValueAsInt()).second; } +unsigned Attribute::getVScaleValue() const { + std::optional VScale = getVScaleRangeMax(); + if (VScale && *VScale == getVScaleRangeMi

[clang] [NFC][analyzer] Multipart checker refactor 2: NullabilityChecker (PR #132250)

2025-03-20 Thread Donát Nagy via cfe-commits
@@ -491,7 +503,7 @@ void NullabilityChecker::reportBugIfInvariantHolds( N = C.addTransition(OriginalState, N); } - reportBug(Msg, Error, CK, N, Region, C.getBugReporter(), ValueExpr); + reportBug(Msg, Error, Idx, N, Region, C.getBugReporter(), ValueExpr); -

[clang] [llvm] [RISCV] Implement the implications of C extension (PR #132259)

2025-03-20 Thread Jesse Huang via cfe-commits
@@ -25,8 +25,8 @@ addi a0, a1, 0 # CHECK: # encoding: [0xe0,0x1f] addi s0, sp, 1020 -# CHECK: .option arch, -c -.option arch, -c +# CHECK: .option arch, -c, -zca +.option arch, -c, -zca jaidTw wrote: I tried but failed, seems like both are required https://

[clang] [llvm] Hlsl asint16 intrinsic (PR #131900)

2025-03-20 Thread Ashley Coleman via cfe-commits
https://github.com/V-FEXrt approved this pull request. https://github.com/llvm/llvm-project/pull/131900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Buffer handle globals should not be constants (PR #130231)

2025-03-20 Thread Justin Bogner via cfe-commits
https://github.com/bogner closed https://github.com/llvm/llvm-project/pull/130231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream initial for-loop support (PR #132266)

2025-03-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes This change adds support for empty for-loops. This will be the infrastructre needed for complete for loops, but that depends on compare operations, which have not been upstreamed yet. --- Patch is 46.30

[clang] [llvm] Hlsl asint16 intrinsic (PR #131900)

2025-03-20 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,49 @@ +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.2-library %s -fnative-half-type -emit-llvm -O1 -o - | FileCheck %s + +// CHECK: define {{.*}}test_ints{{.*}}(i16 {{.*}} [[VAL:%.*]]){{.*}} +// CHECK-NOT: bitcast +// CHECK: ret i16

[clang] [CIR] Fix unary op folding (PR #132269)

2025-03-20 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/132269 Unary ops had previously been omitted from the list of ops handled in the CIRCanonicalizePass. Although the incubator code doesn't use them directly, the mlir folding code does. This change enables folding

[clang] [clang-tools-extra] [lldb] Reland: [clang] preserve class type sugar when taking pointer to member (PR #132234)

2025-03-20 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/132234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExprConst] Check record base classes for valid structs (PR #132270)

2025-03-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. I think this looks fine. https://github.com/llvm/llvm-project/pull/132270 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Fix unary op folding (PR #132269)

2025-03-20 Thread Andy Kaylor via cfe-commits
andykaylor wrote: @mmha This fixes the problem you noticed earlier. https://github.com/llvm/llvm-project/pull/132269 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExprConst] Check record base classes for valid structs (PR #132270)

2025-03-20 Thread Erich Keane via cfe-commits
@@ -7385,8 +7385,13 @@ class APValueToBufferConverter { for (size_t I = 0, E = CXXRD->getNumBases(); I != E; ++I) { const CXXBaseSpecifier &BS = CXXRD->bases_begin()[I]; CXXRecordDecl *BaseDecl = BS.getType()->getAsCXXRecordDecl(); +const APValue &

[clang] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)

2025-03-20 Thread Alexander Richardson via cfe-commits
arichardson wrote: This makes a lot of sense to me, just wondering why you chose `clang/lib/CodeGen/BuiltinTargets/` rather than `clang/lib/CodeGen/TargetBuiltins/`? The former shounds like it contains the list of all builtin targets, rather than the codegen for target-specific builtins. htt

[clang] [NFC][Static Analyzer] Rename and discuss about `NotNullConstraint` & `NotNullBufferConstraint` (PR #131374)

2025-03-20 Thread Ziqing Luo via cfe-commits
@@ -436,9 +436,9 @@ class StdLibraryFunctionsChecker llvm::raw_ostream &Out) const override; ValueConstraintPtr negate() const override { - NotNullBufferConstraint Tmp(*this); + BufferNullnessConstraint Tmp(*this); Tmp.Cannot

[clang] [CIR] Upstream initial for-loop support (PR #132266)

2025-03-20 Thread Andy Kaylor via cfe-commits
@@ -165,6 +165,25 @@ LValue CIRGenFunction::emitDeclRefLValue(const DeclRefExpr *e) { return LValue(); } +mlir::Value CIRGenFunction::evaluateExprAsBool(const Expr *e) { andykaylor wrote: Even for C, we want to generate a cir.bool value. The classic codege

[clang] [CIR] Upstream initial for-loop support (PR #132266)

2025-03-20 Thread Andy Kaylor via cfe-commits
@@ -52,6 +52,15 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { return cir::BoolAttr::get(getContext(), getBoolTy(), state); } + /// Create a for operation. + cir::ForOp createFor( + mlir::Location loc, + llvm::function_ref condBuilder,

[clang] [CIR] Upstream initial for-loop support (PR #132266)

2025-03-20 Thread Erich Keane via cfe-commits
@@ -280,3 +313,77 @@ mlir::LogicalResult CIRGenFunction::emitReturnStmt(const ReturnStmt &s) { return mlir::success(); } + +mlir::LogicalResult CIRGenFunction::emitForStmt(const ForStmt &s) { + cir::ForOp forOp; + + // TODO: pass in an array of attributes. + auto forStmt

[clang] [CIR] Upstream initial for-loop support (PR #132266)

2025-03-20 Thread Erich Keane via cfe-commits
@@ -165,6 +165,25 @@ LValue CIRGenFunction::emitDeclRefLValue(const DeclRefExpr *e) { return LValue(); } +mlir::Value CIRGenFunction::evaluateExprAsBool(const Expr *e) { erichkeane wrote: Ah, I see. So even 8-bit 'bool' type is getting converted. It is a

[clang] [CIR] Upstream initial for-loop support (PR #132266)

2025-03-20 Thread Erich Keane via cfe-commits
@@ -280,3 +313,77 @@ mlir::LogicalResult CIRGenFunction::emitReturnStmt(const ReturnStmt &s) { return mlir::success(); } + +mlir::LogicalResult CIRGenFunction::emitForStmt(const ForStmt &s) { + cir::ForOp forOp; + + // TODO: pass in an array of attributes. + auto forStmt

[clang] [Driver] Haiku address sanitizer support (PR #132335)

2025-03-20 Thread Brad Smith via cfe-commits
https://github.com/brad0 closed https://github.com/llvm/llvm-project/pull/132335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Haiku address sanitizer support (PR #132335)

2025-03-20 Thread David CARLIER via cfe-commits
https://github.com/devnexen approved this pull request. https://github.com/llvm/llvm-project/pull/132335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Haiku address sanitizer support (PR #132335)

2025-03-20 Thread David CARLIER via cfe-commits
@@ -281,3 +286,11 @@ void Haiku::addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, Tool *Haiku::buildLinker() const { return new tools::haiku::Linker(*this); } bool Haiku::HasNativeLLVMSupport() const { return true; } + +SanitizerMask Haiku::getSupportedSanitizers()

[clang] [clang-tools-extra] Reland: [clang] NFC: Clear some uses of MemberPointerType::getClass (PR #132317)

2025-03-20 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/132317 Relands Original PR: https://github.com/llvm/llvm-project/pull/131965 Addresses https://github.com/llvm/llvm-project/pull/131965#issuecomment-2741619498 * Fixes isIncompleteType for injected classes This clear

[clang] [Driver] Haiku address sanitizer support (PR #132335)

2025-03-20 Thread Brad Smith via cfe-commits
@@ -281,3 +286,11 @@ void Haiku::addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, Tool *Haiku::buildLinker() const { return new tools::haiku::Linker(*this); } bool Haiku::HasNativeLLVMSupport() const { return true; } + +SanitizerMask Haiku::getSupportedSanitizers()

  1   2   3   4   >