[clang] 9f274a9 - [RISCV] Fix indentation for riscv_corev_alu.h in CMakeLists.txt. NFC.

2025-05-12 Thread Jim Lin via cfe-commits
Author: Jim Lin Date: 2025-05-13T14:46:08+08:00 New Revision: 9f274a95b13a7c3fbd95d8f80f915a5548df2629 URL: https://github.com/llvm/llvm-project/commit/9f274a95b13a7c3fbd95d8f80f915a5548df2629 DIFF: https://github.com/llvm/llvm-project/commit/9f274a95b13a7c3fbd95d8f80f915a5548df2629.diff LOG:

[clang] [C] Handle comma operator for implicit int->enum conversions (PR #138752)

2025-05-12 Thread Mikael Holmén via cfe-commits
mikaelholmen wrote: @AaronBallman @erichkeane Apparently we used a clang version from July 2023 to compile clang when the testcase failed. I made another try with a later build now and then I don't see the failure anymore so perhaps something has been fixed. Or it just went hiding but then I

[clang] [Serialization] Use StringRef::substr (NFC) (PR #139678)

2025-05-12 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/139678 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Stop changing DC when instantiating dependent friend specializations (PR #139436)

2025-05-12 Thread Younan Zhang via cfe-commits
zyn0217 wrote: @mizvekov It's not a big deal to turn them into explicit specializations after all... I pushed a commit https://github.com/llvm/llvm-project/pull/139436 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [AST] Use llvm::upper_bound (NFC) (PR #139664)

2025-05-12 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/139664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV][MC] Add support for Q extension (PR #139369)

2025-05-12 Thread Iris Shi via cfe-commits
@@ -291,6 +291,13 @@ def HasStdExtD : Predicate<"Subtarget->hasStdExtD()">, AssemblerPredicate<(all_of FeatureStdExtD), "'D' (Double-Precision Floating-Point)">; +def FeatureStdExtQ +: RISCVExtension<2, 2, "Quad-Precisio

[clang] Better diagnostics when assertion fails in `consteval` (PR #130458)

2025-05-12 Thread via cfe-commits
cor3ntin wrote: @jj-marr Thanks. Do you want us to merge that for you? https://github.com/llvm/llvm-project/pull/130458 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 13d80b4 - [AST] Use llvm::upper_bound (NFC) (#139664)

2025-05-12 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-05-12T23:24:46-07:00 New Revision: 13d80b4b12af3e6176972dad8218bd08ef51c45c URL: https://github.com/llvm/llvm-project/commit/13d80b4b12af3e6176972dad8218bd08ef51c45c DIFF: https://github.com/llvm/llvm-project/commit/13d80b4b12af3e6176972dad8218bd08ef51c45c.diff L

[clang] [clang][bytecode] Avoid classifying in visitArrayElemInit() (PR #139674)

2025-05-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes We usually call this more than once, but the type of the initializer never changes. Let's classify only once and pass that to visitArrayElemInit(). --- Full diff: https://github.com/llvm/llvm-project/pull/13

[clang] [clang][bytecode] Avoid classifying in visitArrayElemInit() (PR #139674)

2025-05-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/139674 We usually call this more than once, but the type of the initializer never changes. Let's classify only once and pass that to visitArrayElemInit(). Rate limit · GitHub b

[clang] [clang][bytecode] Optimize enum value range checks (PR #139672)

2025-05-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Only do the work if we really have to. --- Full diff: https://github.com/llvm/llvm-project/pull/139672.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/Interp.cpp (+2-3) - (modified) clang/lib/A

[clang] [clang][bytecode] Optimize enum value range checks (PR #139672)

2025-05-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/139672 Only do the work if we really have to. Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSy

[clang-tools-extra] [clang-tools-extra] Use llvm::unique (NFC) (PR #139663)

2025-05-12 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/139663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Save Immediate bit in Function (PR #139671)

2025-05-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/139671 Otherwise, we have to look at the FunctionDecl at every function call. >From dbfd167600797aea5dcc34fc2f6d9e6659363bda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 12 May 2025 17:59:3

[clang] [llvm] [RISCV] Add `zihintpause` LLVM/Clang intrinsic (PR #139519)

2025-05-12 Thread via cfe-commits
@@ -147,6 +147,13 @@ def ntl_load : RISCVBuiltin<"void(...)">; def ntl_store : RISCVBuiltin<"void(...)">; } // Features = "zihintntl", Attributes = [CustomTypeChecking] +//===--===// +// Zihintpause extension.

[clang] [llvm] [RISCV] Add `zihintpause` LLVM/Clang intrinsic (PR #139519)

2025-05-12 Thread via cfe-commits
https://github.com/imkiva updated https://github.com/llvm/llvm-project/pull/139519 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-se

[clang] [NFC][Clang] Adopt `TrailingObjects` API to build ArrayRef (PR #139639)

2025-05-12 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata approved this pull request. LGTM. Thanks! https://github.com/llvm/llvm-project/pull/139639 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISC-V] Allow intrinsics to be used with any pointer type. (PR #139634)

2025-05-12 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp edited https://github.com/llvm/llvm-project/pull/139634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Use llvm::upper_bound (NFC) (PR #139664)

2025-05-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr approved this pull request. https://github.com/llvm/llvm-project/pull/139664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV][MC] Add support for Q extension (PR #139369)

2025-05-12 Thread Pengcheng Wang via cfe-commits
@@ -0,0 +1,153 @@ +//===-- RISCVInstrInfoQ.td - RISC-V 'Q' 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: Ap

[clang] [llvm] [RISCV][MC] Add support for Q extension (PR #139369)

2025-05-12 Thread Pengcheng Wang via cfe-commits
@@ -291,6 +291,13 @@ def HasStdExtD : Predicate<"Subtarget->hasStdExtD()">, AssemblerPredicate<(all_of FeatureStdExtD), "'D' (Double-Precision Floating-Point)">; +def FeatureStdExtQ +: RISCVExtension<2, 2, "Quad-Precisio

[clang] [HIP] change default offload archs (PR #139281)

2025-05-12 Thread Matt Arsenault via cfe-commits
arsenm wrote: > It seems that the sample program ran without crashing, but the kernel > function was never actually executed. You can catch an "invalid device > function" error if you call `HIP_CHECK(hipGetLastError())` at the start of > main. > Lack of proper error checking in the host APIs

[clang] Reland "Reland [Modules] Remove unnecessary check when generating name lookup table in ASTWriter" (PR #139253)

2025-05-12 Thread Haojian Wu via cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/139253 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add `zihintpause` LLVM/Clang intrinsic (PR #139519)

2025-05-12 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp edited https://github.com/llvm/llvm-project/pull/139519 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HIP] change default offload archs (PR #139281)

2025-05-12 Thread Matt Arsenault via cfe-commits
arsenm wrote: > spir-v would probably be an OK alternative. It's not great (probably leases > some performance on the table vs the native build), but the binary will > presumably work on other machines. I'd probably go with just error and emit nothing, but I'm sure that will break someone's b

[clang] [clang][bytecode][NFC] Remove incorrect comment (PR #139571)

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

[clang] 79eed76 - [clang][bytecode][NFC] Remove incorrect comment (#139571)

2025-05-12 Thread via cfe-commits
Author: Timm Baeder Date: 2025-05-13T08:09:26+02:00 New Revision: 79eed76c58caedd9dc7c68b38c0dbc08d3ff3da3 URL: https://github.com/llvm/llvm-project/commit/79eed76c58caedd9dc7c68b38c0dbc08d3ff3da3 DIFF: https://github.com/llvm/llvm-project/commit/79eed76c58caedd9dc7c68b38c0dbc08d3ff3da3.diff L

[clang] [llvm] [HLSL] Add resource constructor with implicit binding for global resources (PR #138976)

2025-05-12 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/138976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Add resource constructor with implicit binding for global resources (PR #138976)

2025-05-12 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/138976 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-se

[clang] [llvm] [HLSL] Add resource constructor with implicit binding for global resources (PR #138976)

2025-05-12 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/138976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Better diagnostics when assertion fails in `consteval` (PR #130458)

2025-05-12 Thread JJ Marr via cfe-commits
https://github.com/jj-marr updated https://github.com/llvm/llvm-project/pull/130458 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-s

[clang-tools-extra] [clang-tools-extra] Use llvm::unique (NFC) (PR #139663)

2025-05-12 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/139663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV][MC] Add support for Q extension (PR #139369)

2025-05-12 Thread Iris Shi via cfe-commits
@@ -198,6 +198,9 @@ class RISCVSubtarget : public RISCVGenSubtargetInfo { bool useLoadStorePairs() const; bool useCCMovInsn() const; unsigned getFLen() const { +if (HasStdExtQ) el-ev wrote: Removed, thanks. https://github.com/llvm/llvm-project/pull/

[clang] [libclang/python] Add typing annotations for the Cursor class (PR #138103)

2025-05-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/138103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Add typing annotations for the Cursor class (PR #138103)

2025-05-12 Thread Vlad Serebrennikov via cfe-commits
@@ -1821,45 +1824,45 @@ def mangled_name(self): return self._mangled_name @property -def location(self): +def location(self) -> SourceLocation: """ Return the source location (the starting character) of the entity pointed at by th

[clang] Reland "Reland [Modules] Remove unnecessary check when generating name lookup table in ASTWriter" (PR #139253)

2025-05-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `premerge-monolithic-linux` running on `premerge-linux-1` while building `clang` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/31578 Here is

[clang] [llvm] [RISCV][MC] Add support for Q extension (PR #139369)

2025-05-12 Thread Iris Shi via cfe-commits
@@ -75,7 +75,7 @@ def ZhinxminZdinxExt: ExtInfo<"_INX", "Zfinx", ?, ?, FPR32INX, FPR64INX, FPR16INX>; def ZhinxZdinx32Ext : ExtInfo<"_IN32X", "ZdinxGPRPairRV32", [HasStdExtZhinx, HasStdExtZdinx, IsRV32]

[clang] [llvm] [RISCV][MC] Add support for Q extension (PR #139369)

2025-05-12 Thread Iris Shi via cfe-commits
https://github.com/el-ev updated https://github.com/llvm/llvm-project/pull/139369 >From d6136a57b911de936202f6136ff9965cc2651f8a Mon Sep 17 00:00:00 2001 From: Iris Shi <0...@owo.li> Date: Mon, 12 May 2025 13:19:06 +0800 Subject: [PATCH 1/2] [RISCV][MC] Add support for Q extension --- .../Driv

[clang] [llvm] [RISCV][MC] Add support for Q extension (PR #139369)

2025-05-12 Thread Iris Shi via cfe-commits
@@ -0,0 +1,151 @@ +//===-- RISCVInstrInfoQ.td - RISC-V 'Q' 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: Ap

[clang] [llvm] [RISCV][MC] Add support for Q extension (PR #139369)

2025-05-12 Thread Iris Shi via cfe-commits
@@ -674,6 +681,9 @@ void RISCVInstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB, } else if (RISCV::FPR64RegClass.hasSubClassEq(RC)) { Opcode = RISCV::FSD; IsScalableVector = false; + } else if (RISCV::FPR128RegClass.hasSubClassEq(RC)) { el-ev wr

[clang] [llvm] [RISCV][MC] Add support for Q extension (PR #139369)

2025-05-12 Thread Iris Shi via cfe-commits
https://github.com/el-ev updated https://github.com/llvm/llvm-project/pull/139369 >From 9a25e249fe060b3d4fcdaef69b664c08c3d2a56d Mon Sep 17 00:00:00 2001 From: Iris Shi <0...@owo.li> Date: Mon, 12 May 2025 13:19:06 +0800 Subject: [PATCH 1/2] [RISCV][MC] Add support for Q extension --- .../Driv

[clang] [NFC][Clang] Adopt `TrailingObjects` API to build ArrayRef (PR #139639)

2025-05-12 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/139639 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV][MC] Add support for Q extension (PR #139369)

2025-05-12 Thread Pengcheng Wang via cfe-commits
@@ -75,7 +75,7 @@ def ZhinxminZdinxExt: ExtInfo<"_INX", "Zfinx", ?, ?, FPR32INX, FPR64INX, FPR16INX>; def ZhinxZdinx32Ext : ExtInfo<"_IN32X", "ZdinxGPRPairRV32", [HasStdExtZhinx, HasStdExtZdinx, IsRV32]

[clang] 1d0ee12 - Reland "Reland [Modules] Remove unnecessary check when generating name lookup table in ASTWriter" (#139253)

2025-05-12 Thread via cfe-commits
Author: Haojian Wu Date: 2025-05-13T07:46:43+02:00 New Revision: 1d0ee12e3440629ab4ffedf95c3a3d8b7fc1698a URL: https://github.com/llvm/llvm-project/commit/1d0ee12e3440629ab4ffedf95c3a3d8b7fc1698a DIFF: https://github.com/llvm/llvm-project/commit/1d0ee12e3440629ab4ffedf95c3a3d8b7fc1698a.diff LO

[clang] [llvm] [RISCV] Add `zihintpause` LLVM/Clang intrinsic (PR #139519)

2025-05-12 Thread Pengcheng Wang via cfe-commits
@@ -147,6 +147,13 @@ def ntl_load : RISCVBuiltin<"void(...)">; def ntl_store : RISCVBuiltin<"void(...)">; } // Features = "zihintntl", Attributes = [CustomTypeChecking] +//===--===// +// Zihintpause extension.

[clang] [llvm] [RISCV] Add `zihintpause` LLVM/Clang intrinsic (PR #139519)

2025-05-12 Thread Pengcheng Wang via cfe-commits
@@ -1886,6 +1886,12 @@ let TargetPrefix = "riscv" in { def int_riscv_vsm3me : RISCVBinaryAAXUnMasked; } // TargetPrefix = "riscv" +// Zihintpause extensions +//===--===// +let TargetPrefix = "riscv" in { -

[clang] [llvm] [RISCV] Add `zihintpause` LLVM/Clang intrinsic (PR #139519)

2025-05-12 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp approved this pull request. LGTM with nits. https://github.com/llvm/llvm-project/pull/139519 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add `zihintpause` LLVM/Clang intrinsic (PR #139519)

2025-05-12 Thread Pengcheng Wang via cfe-commits
@@ -2198,6 +2198,15 @@ def : Pat<(binop_allwusers GPR:$rs1, immop_oneuse:$rs2), def : Pat<(i64 (add GPR:$rs1, negImm:$rs2)), (SUB GPR:$rs1, negImm:$rs2)>; } +//===--===// +// Zihintpause +//===---

[clang] [NFC][Clang] Adopt `TrailingObjects` API to build ArrayRef (PR #139639)

2025-05-12 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/139639 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Adopt `TrailingObjects` API to build ArrayRef (PR #139639)

2025-05-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Rahul Joshi (jurahul) Changes Adopt `getTrailingObjects()` overload that returns an ArrayRef that was added in https://github.com/llvm/llvm-project/pull/138970. --- Patch is 28.48 KiB, truncated to 20.00 KiB below, full version: https:/

[clang] [libclang/python] Add typing annotations for the Cursor class (PR #138103)

2025-05-12 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/138103 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[clang] [libclang/python] Add typing annotations for the Cursor class (PR #138103)

2025-05-12 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/138103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Add typing annotations for the Cursor class (PR #138103)

2025-05-12 Thread Jannick Kremer via cfe-commits
@@ -1913,7 +1916,7 @@ def type(self): return self._type @property -def canonical(self): +def canonical(self) -> Cursor | None: """Return the canonical Cursor corresponding to this Cursor. DeinAlptraum wrote: Okay, I did find a way

[clang] [libclang/python] Add typing annotations for the Cursor class (PR #138103)

2025-05-12 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/138103 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[clang-tools-extra] [clang-doc] Add HTMLMustacheGenerator.cpp (PR #138060)

2025-05-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-gcc-ubuntu-no-asserts` running on `doug-worker-6` while building `clang-tools-extra` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/202

[clang] [Clang][Sema] Disable checking invalid template id in initializer of primary variable template `std::format_kind` with libstdc++ (PR #139560)

2025-05-12 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Can you please describe the issue in the summary instead of just saying it fixes Also add details such as this is fixing an issue introduced by ... Also please as Erich asked, add a test too https://github.com/llvm/llvm-project/pull/139560 ___

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-05-12 Thread via cfe-commits
@@ -291,54 +291,59 @@ class LineJoiner { auto ShouldMergeShortFunctions = [this, &I, &NextLine, PreviousLine, TheLine]() { - if (Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_All) + if (Style.AllowShortFunctionsO

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-05-12 Thread via cfe-commits
@@ -5685,11 +5685,27 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line, if (Right.is(tok::r_brace) && Left.is(tok::l_brace) && !Left.Children.empty()) { // Support AllowShortFunctionsOnASingleLine for JavaScript. - return Style.AllowShort

[clang-tools-extra] [clang-doc] Add HTMLMustacheGenerator methods (PR #138061)

2025-05-12 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/138061 >From 1925647e9577d827a87d1c7ac4326836928f90e0 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Wed, 30 Apr 2025 08:09:41 -0700 Subject: [PATCH] [clang-doc] Add HTMLMustacheGenerator methods Split from #133161.

[clang-tools-extra] 3bdfa6f - [clang-doc] Add HTMLMustacheGenerator.cpp (#138060)

2025-05-12 Thread via cfe-commits
Author: Paul Kirth Date: 2025-05-12T18:54:04-07:00 New Revision: 3bdfa6f3e8ebb6b3c139a7f4929f7016a6f56386 URL: https://github.com/llvm/llvm-project/commit/3bdfa6f3e8ebb6b3c139a7f4929f7016a6f56386 DIFF: https://github.com/llvm/llvm-project/commit/3bdfa6f3e8ebb6b3c139a7f4929f7016a6f56386.diff LO

[clang-tools-extra] [clang-doc] Add HTMLMustacheGenerator methods (PR #138061)

2025-05-12 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/138061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Add HTMLMustacheGenerator.cpp (PR #138060)

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

[clang-tools-extra] [clang-doc] Add HTMLMustacheGenerator.cpp (PR #138060)

2025-05-12 Thread Paul Kirth via cfe-commits
ilovepi wrote: ### Merge activity * **May 12, 9:52 PM EDT**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/138060). https://github.com/llvm/llvm-project/pull/138060

[clang] [NFC][Clang] Adopt `TrailingObjects` convenience API in MacroArgs (PR #139635)

2025-05-12 Thread Kazu Hirata via cfe-commits
kazutakahirata wrote: @jurahul Thanks for the pointer in the description. So, in this particular case, we end up invoking the following? ``` FirstTrailingType *getTrailingObjects() { static_assert(sizeof...(TrailingTys) == 1, "Can use non-templated getTrailingObjects()

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2025-05-12 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/95220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2025-05-12 Thread Baranov Victor via cfe-commits
=��___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Adopt `TrailingObjects` convienence API in MacroArgs (PR #139635)

2025-05-12 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/139635 None >From 0207459bd4387a4af801cadb3c1213983563509e Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Mon, 12 May 2025 15:46:51 -0700 Subject: [PATCH] [NFC][Clang] Adopt `TrailingObjects` convienence API in Mac

[clang] [NFC][Clang] Adopt `TrailingObjects` convenience API in MacroArgs (PR #139635)

2025-05-12 Thread Rahul Joshi via cfe-commits
jurahul wrote: FYI, LLVM and MLIR change of similar nature: https://github.com/llvm/llvm-project/pull/138554 https://github.com/llvm/llvm-project/pull/139635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [NFC][Clang] Adopt `TrailingObjects` convenience API in MacroArgs (PR #139635)

2025-05-12 Thread Rahul Joshi via cfe-commits
jurahul wrote: I filled in the description now. I am doing similar changes on LLVM/MLIR side (change has been approved). I added these convenience APIs to TrailingObjects to support the common code patterns of a single trailing type as well as creating an ArrayRef from the trailing objects po

[clang] [perf-training][merge-fdata] Clean up input fdata files (PR #139650)

2025-05-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Amir Ayupov (aaupov) Changes BOLT AArch64 worker has been running out of disk space due to excessive fdata files being produced from clang-bolt builder. Delete merged fdata files to counter disk space waste. Test Plan: TBD --- Full diff:

[clang] [perf-training][merge-fdata] Clean up input fdata files (PR #139650)

2025-05-12 Thread Amir Ayupov via cfe-commits
https://github.com/aaupov created https://github.com/llvm/llvm-project/pull/139650 BOLT AArch64 worker has been running out of disk space due to excessive fdata files being produced from clang-bolt builder. Delete merged fdata files to counter disk space waste. Test Plan: TBD

[clang] [NFC][Clang] Adopt `TrailingObjects` convenience API in MacroArgs (PR #139635)

2025-05-12 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/139635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add `noalias` to `this` pointer in C++ constructors (PR #136792)

2025-05-12 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: These days, there's very high demand for "secure" C/C++. From this perspective, this optimization is a security threat: if you write code that does an undefined write to "this", you have a lurking security vulnerability could be exposed with any change to optimization heu

[clang] [clang] update diagnostic to say 'modification time' instead of mtime, NFC (PR #139637)

2025-05-12 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/139637 None >From ef70cfb8d8a468f87758b4f2f8c6efd85e5023ba Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Mon, 12 May 2025 16:02:22 -0700 Subject: [PATCH] [clang] update diagnostic to say 'modification time' in

[clang] [WebAssembly][Clang] Add __builtin_wasm_ref_is_null_extern (PR #139580)

2025-05-12 Thread Hood Chatham via cfe-commits
https://github.com/hoodmane edited https://github.com/llvm/llvm-project/pull/139580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add macro to suppress -Wunnecessary-virtual-specifier (PR #139614)

2025-05-12 Thread via cfe-commits
cor3ntin wrote: I'm slightly confused about the direction here. Either `anchor()` is a common practice, which we think is good, and we should reconsider the pertinence of the warnings, as other projects might run into the same issue (or maybe we want to provide a more ad-hoc way to annotate th

[clang] [WebAssembly][Clang] Add __builtin_wasm_ref_is_null_extern (PR #139580)

2025-05-12 Thread Hood Chatham via cfe-commits
@@ -168,7 +168,7 @@ bool Sema::checkArgCount(CallExpr *Call, unsigned DesiredArgCount) { return Diag(Range.getBegin(), diag::err_typecheck_call_too_many_args) << 0 /*function call*/ << DesiredArgCount << ArgCount - << /*is non object*/ 0 << Call->getArg(1)-

[clang] [NFC][Clang] Adopt `TrailingObjects` convenience API in MacroArgs (PR #139635)

2025-05-12 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/139635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly][Clang] Add __builtin_wasm_ref_is_null_extern (PR #139580)

2025-05-12 Thread Hood Chatham via cfe-commits
@@ -168,7 +168,7 @@ bool Sema::checkArgCount(CallExpr *Call, unsigned DesiredArgCount) { return Diag(Range.getBegin(), diag::err_typecheck_call_too_many_args) << 0 /*function call*/ << DesiredArgCount << ArgCount - << /*is non object*/ 0 << Call->getArg(1)-

[clang] [Clang][counted_by] Add support for 'counted_by' on struct pointers (PR #137250)

2025-05-12 Thread Bill Wendling via cfe-commits
bwendling wrote: Thanks, @AaronBallman! Anyone else want to take a look at this before it goes in? :-) https://github.com/llvm/llvm-project/pull/137250 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [WebAssembly][Clang] Add __builtin_wasm_ref_is_null_extern (PR #139580)

2025-05-12 Thread Hood Chatham via cfe-commits
https://github.com/hoodmane updated https://github.com/llvm/llvm-project/pull/139580 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-

[clang] [WebAssembly][Clang] Add __builtin_wasm_ref_is_null_extern (PR #139580)

2025-05-12 Thread Hood Chatham via cfe-commits
@@ -52,14 +52,33 @@ static bool CheckWasmBuiltinArgIsInteger(Sema &S, CallExpr *E, } bool SemaWasm::BuiltinWasmRefNullExtern(CallExpr *TheCall) { - if (TheCall->getNumArgs() != 0) + if (TheCall->getNumArgs() != 0) { hoodmane wrote: Oh right, `getArg(1)` wi

[clang] [llvm] Add support for Windows hot-patching (PR #138972)

2025-05-12 Thread via cfe-commits
@@ -0,0 +1,251 @@ +//===-- WindowsHotPatch.cpp - Support for Windows hotpatching -===// +// +// 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] [CIR] Upstream shift operators for VectorType (PR #139465)

2025-05-12 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. Looks good! https://github.com/llvm/llvm-project/pull/139465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland "Reland [Modules] Remove unnecessary check when generating name lookup table in ASTWriter" (PR #139253)

2025-05-12 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh approved this pull request. Thanks for the fix! LG https://github.com/llvm/llvm-project/pull/139253 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add macro to suppress -Wunnecessary-virtual-specifier (PR #139614)

2025-05-12 Thread Devon Loehr via cfe-commits
https://github.com/DKLoehr updated https://github.com/llvm/llvm-project/pull/139614 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-s

[clang] [clang] Constant-evaluate format strings as last resort (PR #135864)

2025-05-12 Thread via cfe-commits
https://github.com/apple-fcloutier updated https://github.com/llvm/llvm-project/pull/135864 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Aria

[clang] [llvm] Add support for Windows hot-patching (PR #138972)

2025-05-12 Thread via cfe-commits
sivadeilra wrote: > Oh so all this dance (`_ref_` and the additional metadata) is for code page > integrity purposes only? To keep them unmodified in memory? So how does then > the kernel use the PE metadata if it doesn't patch the code memory pages of > the initial (running) image? Is there a

[libc] [libcxx] [libcxxabi] [libunwind] [cmake] Normalize TARGET_SUBDIR paths (PR #138524)

2025-05-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `fuchsia-x86_64-linux` running on `fuchsia-debian-64-us-central1-b-1` while building `libc,libcxx,libcxxabi,libunwind` at step 4 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/11/builds/149

[clang] [clang] Implement address sanitizer on AIX (PR #129925)

2025-05-12 Thread Jake Egan via cfe-commits
https://github.com/jakeegan edited https://github.com/llvm/llvm-project/pull/129925 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Add pessimistic vscale_range for sve/sme (PR #137624)

2025-05-12 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I really don't want the dependency chain that involves clang converting the target feature list to an LLVM attribute string, then grabbing the attribute out of the llvm::Function to parse it back into a feature list. That ties together the target info and codegen in a wei

[clang] [PPC] Disable rop-protect for 32-bit OS targets. (PR #139619)

2025-05-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-powerpc Author: Sean Fertile (mandlebug) Changes The instructions are not supported on either 32-bit ELF (due to no redzone) or 32-bit AIX due to the instructions always using the full 64-bit width of the register inputs. --- Full diff: https:

[clang] [PPC] Disable rop-protect for 32-bit OS targets. (PR #139619)

2025-05-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Sean Fertile (mandlebug) Changes The instructions are not supported on either 32-bit ELF (due to no redzone) or 32-bit AIX due to the instructions always using the full 64-bit width of the register inputs. --- Full diff: https://g

[clang] [PPC] Disable rop-protect for 32-bit OS targets. (PR #139619)

2025-05-12 Thread Sean Fertile via cfe-commits
https://github.com/mandlebug created https://github.com/llvm/llvm-project/pull/139619 The instructions are not supported on either 32-bit ELF (due to no redzone) or 32-bit AIX due to the instructions always using the full 64-bit width of the register inputs. >From 6f089b31986290495a452d71fe24

[clang] [llvm] Add support for Windows hot-patching (PR #138972)

2025-05-12 Thread via cfe-commits
@@ -0,0 +1,20 @@ +// This verifies that hotpatch function attributes are correctly propagated when compiling directly to OBJ. +// +// RUN: %clang_cl -c --target=x86_64-windows-msvc -O2 /Z7 -fms-hotpatch-functions-file=%S/ms-hotpatch-functions.txt /Fo%t.obj %s si

[clang] [CIR] Upstream shift operators for VectorType (PR #139465)

2025-05-12 Thread Amr Hesham via cfe-commits
@@ -1399,8 +1400,10 @@ mlir::LogicalResult CIRToLLVMShiftOpLowering::matchAndRewrite( if (op.getIsShiftleft()) { rewriter.replaceOpWithNewOp(op, llvmTy, val, amt); } else { -assert(!cir::MissingFeatures::vectorType()); -bool isUnsigned = !cirValTy.isSigned(); +

[clang] [CIR] Upstream shift operators for VectorType (PR #139465)

2025-05-12 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/139465 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[clang] [llvm] Add macro to suppress -Wunnecessary-virtual-specifier (PR #139614)

2025-05-12 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 HEAD~1 HEAD --extensions cpp,h -- clang/include/clang/AST/Decl.h clang/include/clang/

[clang] [llvm] Add macro to suppress -Wunnecessary-virtual-specifier (PR #139614)

2025-05-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-llvm-ir Author: Devon Loehr (DKLoehr) Changes Followup to #138741. This adds the requested macro to silence `-Wunnecessary-virtual-specifier` when declaring virtual anchor functions in `final` classes, per [LLVM poli

[libunwind] fc3b67a - [cmake] Normalize TARGET_SUBDIR paths (#138524)

2025-05-12 Thread via cfe-commits
Author: Raul Tambre Date: 2025-05-12T15:59:39-04:00 New Revision: fc3b67aee852d99bbb5d2f4670695d8246375dac URL: https://github.com/llvm/llvm-project/commit/fc3b67aee852d99bbb5d2f4670695d8246375dac DIFF: https://github.com/llvm/llvm-project/commit/fc3b67aee852d99bbb5d2f4670695d8246375dac.diff L

  1   2   3   4   5   >