[clang] [llvm] [AArch64] Mark aarch64_set_fpmr as IntrWriteMem (PR #146353)

2025-07-03 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm approved this pull request. https://github.com/llvm/llvm-project/pull/146353 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Add checker 'unix.cstring.MissingTerminatingZero' (PR #146664)

2025-07-03 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: As an initial review I added some high-level remarks. I will dig into the technical details once these are discussed and answered. https://github.com/llvm/llvm-project/pull/146664 ___ cfe-commits mailing list cf

[clang] [clang][analyzer] Add checker 'unix.cstring.MissingTerminatingZero' (PR #146664)

2025-07-03 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,91 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=unix.cstring.MissingTerminatingZero -verify %s + +#include "Inputs/system-header-simulator.h" + +void clang_analyzer_eval(int); + +size_t test_init_compound(int i) { + char src1[6] = {1,2,3,4,5,6}; + char src2[6] =

[clang] [clang][analyzer] Add checker 'unix.cstring.MissingTerminatingZero' (PR #146664)

2025-07-03 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,295 @@ +//=== MissingTerminatingZeroChecker.cpp -*- 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: Ap

[clang] [clang][analyzer] Add checker 'unix.cstring.MissingTerminatingZero' (PR #146664)

2025-07-03 Thread Donát Nagy via cfe-commits
@@ -2098,6 +2098,58 @@ Check the size argument passed into C string functions for common erroneous patt // warn: potential buffer overflow } +.. _unix-cstring-MissingTerminatingZero: + +unix.cstring.MissingTerminatingZero (C) +""" +Ch

[clang] [clang][analyzer] Add checker 'unix.cstring.MissingTerminatingZero' (PR #146664)

2025-07-03 Thread Donát Nagy via cfe-commits
@@ -2098,6 +2098,58 @@ Check the size argument passed into C string functions for common erroneous patt // warn: potential buffer overflow } +.. _unix-cstring-MissingTerminatingZero: + +unix.cstring.MissingTerminatingZero (C) +""" +Ch

[clang] [clang][analyzer] Add checker 'unix.cstring.MissingTerminatingZero' (PR #146664)

2025-07-03 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/146664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Add support for consteval in ConditionBRVisitor::VisitTerminator (PR #146859)

2025-07-03 Thread Imad Aldij via cfe-commits
https://github.com/imdj updated https://github.com/llvm/llvm-project/pull/146859 >From 1077e164158965e824097542dc4c3ecc8821d6dc Mon Sep 17 00:00:00 2001 From: Imad Aldij Date: Thu, 3 Jul 2025 13:50:55 +0300 Subject: [PATCH 1/2] Add support for consteval if in ConditionBRVisitor --- clang/lib/S

[clang] [analyzer] Add support for consteval in ConditionBRVisitor::VisitTerminator (PR #146859)

2025-07-03 Thread Imad Aldij via cfe-commits
https://github.com/imdj created https://github.com/llvm/llvm-project/pull/146859 Fix crash when ConditionBRVisitor::VisitTerminator is faced with `if consteval` which doesn't have the expected traditional condition Close - #139130 >From 1077e164158965e824097542dc4c3ecc8821d6dc Mon Sep 17 00:00

[libunwind] [libunwind] Add CMake option to enable execute-only code generation on AArch64 (PR #140554)

2025-07-03 Thread Csanád Hajdú via cfe-commits
Il-Capitano wrote: @MaskRay @ldionne @arichardson Gentle ping. I would like to get this approved and merged by the end of the month, can you take a look, please? https://github.com/llvm/llvm-project/pull/140554 ___ cfe-commits mailing list cfe-commit

[clang] [llvm] [RISCV][CodeGen] Add CodeGen support of Zibi experimental extension (PR #146858)

2025-07-03 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 c,h,cpp -- clang/test/Driver/print-supported-extensions-risc

[clang] [analyzer] Add support for consteval in ConditionBRVisitor::VisitTerminator (PR #146859)

2025-07-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Imad Aldij (imdj) Changes Fix crash when ConditionBRVisitor::VisitTerminator is faced with `if consteval` which doesn't have the expected traditional condition Close - #139130 --- Full diff: https://github.com/llvm/llvm-project/pull/1468

[clang] [analyzer] Add support for consteval in ConditionBRVisitor::VisitTerminator (PR #146859)

2025-07-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Imad Aldij (imdj) Changes Fix crash when ConditionBRVisitor::VisitTerminator is faced with `if consteval` which doesn't have the expected traditional condition Close - #139130 --- Full diff: https://github.com/llvm/llvm

[clang] [Clang] include attribute scope in diagnostics (PR #144619)

2025-07-03 Thread Aaron Ballman via cfe-commits
@@ -506,7 +506,15 @@ void clang::FormatASTNodeDiagnosticArgument( case DiagnosticsEngine::ak_attr: { const Attr *At = reinterpret_cast(Val); assert(At && "Received null Attr object!"); - OS << '\'' << At->getSpelling() << '\''; + + OS << '\''; + i

[clang] [analyzer] Add support for consteval in ConditionBRVisitor::VisitTerminator (PR #146859)

2025-07-03 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: Hey, could you add a LIT test that fails before your changes but passes after? https://github.com/llvm/llvm-project/pull/146859 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [llvm] [RISCV] Remove implied extension Zvfhmin for XAndesVPackFPH (PR #146861)

2025-07-03 Thread Jim Lin via cfe-commits
https://github.com/tclin914 created https://github.com/llvm/llvm-project/pull/146861 XAndesVPackFPH can actually be used independently without requiring Zvfhmin. Therefore, we remove the implicitly required Zvfhmin extension from XAndesVPackFPH and imply that the f extension is sufficient. >F

[clang] [Driver][RISCV] Fix incorrect compiler-rt path override in BareMetal toolchain after RISCVToolChain removal (PR #146849)

2025-07-03 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt edited https://github.com/llvm/llvm-project/pull/146849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][RISCV] Fix incorrect compiler-rt path override in BareMetal toolchain after RISCVToolChain removal (PR #146849)

2025-07-03 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt edited https://github.com/llvm/llvm-project/pull/146849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Fix typeof handling in enum declarations (PR #146394)

2025-07-03 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/146394 >From 94cd71d65fe27cdde0c39416a0e2e709af98ed0c Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Mon, 30 Jun 2025 13:26:57 -0400 Subject: [PATCH 1/4] [C23] Fix typeof handling in enum declarations We have

[clang] [llvm] [RISCV] Remove implied extension Zvfhmin for XAndesVPackFPH (PR #146861)

2025-07-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jim Lin (tclin914) Changes XAndesVPackFPH can actually be used independently without requiring Zvfhmin. Therefore, we remove the implicitly required Zvfhmin extension from XAndesVPackFPH and imply that the f extension is sufficient. ---

[clang] [RISCV] Move vendor clang intrinsics tests to seperate directory. NFC. (PR #146862)

2025-07-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jim Lin (tclin914) Changes I'd like to ensure that the tests under clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/ only come from https://github.com/riscv-non-isa/rvv-intrinsic-doc/tree/main/auto-generated --- Patch is 32.40 KiB,

[clang] [RISCV] Move vendor clang intrinsics tests to seperate directory. NFC. (PR #146862)

2025-07-03 Thread Jim Lin via cfe-commits
https://github.com/tclin914 created https://github.com/llvm/llvm-project/pull/146862 I'd like to ensure that the tests under clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/ only come from https://github.com/riscv-non-isa/rvv-intrinsic-doc/tree/main/auto-generated >From fde61340ea3ce043

[clang] [C23] Fix typeof handling in enum declarations (PR #146394)

2025-07-03 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > ```c++ > > > typeof(int){} x; // Probably parsed as typeof(int{}) > > > ``` > > > > > > Actually, I’m not sure what we think this is supposed to be; I haven’t > > checked. > > Actually, that’s just a compound literal; I forgot we supported those in C++. It's a reall

[clang] [clang][bytecode] Misc union fixes (PR #146824)

2025-07-03 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/146824 First, don't forget to also activate fields which are bitfields on assignment. Second, when deactivating fields, recurse into records. >From 590c6778439fd1410ce17793ddeb03de055771e0 Mon Sep 17 00:00:00 2001 Fr

[clang] [clang][bytecode] Misc union fixes (PR #146824)

2025-07-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes First, don't forget to also activate fields which are bitfields on assignment. Second, when deactivating fields, recurse into records. --- Full diff: https://github.com/llvm/llvm-project/pull/146824.diff 3

[clang-tools-extra] [clangd] Improve Markup Rendering (PR #140498)

2025-07-03 Thread via cfe-commits
@@ -118,8 +138,8 @@ class Document { BulletList &addBulletList(); /// Doesn't contain any trailing newlines. - /// We try to make the markdown human-readable, e.g. avoid extra escaping. - /// At least one client (coc.nvim) displays the markdown verbatim!

[clang] [clang][test] Avoid some C++14 warnings in discrim-union.cpp (PR #146829)

2025-07-03 Thread Timm Baeder via cfe-commits
tbaederr wrote: yes, done. https://github.com/llvm/llvm-project/pull/146829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][test] Avoid some C++14 warnings in discrim-union.cpp (PR #146829)

2025-07-03 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/146829 >From c193cfbdd9215ee1dbd84e00ecb47a51542da98b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 3 Jul 2025 09:57:40 +0200 Subject: [PATCH] [clang][test] Avoid some C++14 warnings in discr

[clang] [llvm] [RISCV] Added the MIPS prefetch extensions for MIPS RV64 P8700. (PR #145647)

2025-07-03 Thread via cfe-commits
github-actions[bot] wrote: @ukalappa-mips Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a

[clang] [clang][analyzer] Fix the false positive ArgInitializedness warning on unnamed bit-field (PR #145066)

2025-07-03 Thread via cfe-commits
@@ -2122,8 +2122,21 @@ SVal RegionStoreManager::getBindingForField(RegionBindingsConstRef B, if (const std::optional &V = B.getDirectBinding(R)) return *V; - // If the containing record was initialized, try to get its constant value. + // UnnamedBitField is always Und

[clang] [llvm] [RISCV] Added the MIPS prefetch extensions for MIPS RV64 P8700. (PR #145647)

2025-07-03 Thread Djordje Todorovic via cfe-commits
https://github.com/djtodoro closed https://github.com/llvm/llvm-project/pull/145647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4403123 - Revert "[win][aarch64] Always reserve frame pointers for Arm64 Windows" (#146836)

2025-07-03 Thread via cfe-commits
Author: David Spickett Date: 2025-07-03T10:03:48+01:00 New Revision: 44031237284e465f4fa97d2d9f4067cdecbc2dee URL: https://github.com/llvm/llvm-project/commit/44031237284e465f4fa97d2d9f4067cdecbc2dee DIFF: https://github.com/llvm/llvm-project/commit/44031237284e465f4fa97d2d9f4067cdecbc2dee.diff

[clang] [llvm] Revert "[win][aarch64] Always reserve frame pointers for Arm64 Windows" (PR #146836)

2025-07-03 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett created https://github.com/llvm/llvm-project/pull/146836 Reverts llvm/llvm-project#146582 Due to failures on many of Linaro's Linux flang bots: https://lab.llvm.org/buildbot/#/builders/17/builds/9292 ``` TEST 'Flang :: Semantics/windows.f9

[clang] [llvm] Revert "[win][aarch64] Always reserve frame pointers for Arm64 Windows" (PR #146836)

2025-07-03 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett closed https://github.com/llvm/llvm-project/pull/146836 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Revert "[win][aarch64] Always reserve frame pointers for Arm64 Windows" (PR #146836)

2025-07-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: David Spickett (DavidSpickett) Changes Reverts llvm/llvm-project#146582 Due to failures on many of Linaro's Linux flang bots: https://lab.llvm.org/buildbot/#/builders/17/builds/9292 ``` TEST 'Flang :: Semantic

[clang] [llvm] Revert "[win][aarch64] Always reserve frame pointers for Arm64 Windows" (PR #146836)

2025-07-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: David Spickett (DavidSpickett) Changes Reverts llvm/llvm-project#146582 Due to failures on many of Linaro's Linux flang bots: https://lab.llvm.org/buildbot/#/builders/17/builds/9292 ``` TEST 'Flang :: Semantics/windo

[clang] [llvm] Revert "[win][aarch64] Always reserve frame pointers for Arm64 Windows" (PR #146836)

2025-07-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: David Spickett (DavidSpickett) Changes Reverts llvm/llvm-project#146582 Due to failures on many of Linaro's Linux flang bots: https://lab.llvm.org/buildbot/#/builders/17/builds/9292 ``` TEST 'Flang :: Seman

[clang] [llvm] [win][aarch64] Always reserve frame pointers for Arm64 Windows (PR #146582)

2025-07-03 Thread David Spickett via cfe-commits
DavidSpickett wrote: I've reverted this due to a test failure on our Linux bots: https://lab.llvm.org/buildbot/#/builders/17/builds/9292 And if I understand correctly, flang needs another patch before it can build properly on Windows: ``` FAILED: include/flang/__fortran_builtins.mod C:/Users/

[clang] [llvm] Revert "[win][aarch64] Always reserve frame pointers for Arm64 Windows" (PR #146836)

2025-07-03 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-fast` running on `sanitizer-buildbot4` while building `clang,llvm` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/169/builds/12761 Here is the relevant p

[clang] [DebugInfo] Init DwarfVersion of MCOptions like the other. (PR #146666)

2025-07-03 Thread Liu Ke via cfe-commits
Sockke wrote: > I guess this would be visible when using clang to compile some assembly code > and requesting debug info of a specific version We have pre-built bitcode. When compiling bitcode, we need to request specific debug info version - like Distributed ThinLTO's backend process - to kee

[clang] [Driver][RISCV] Fix and print appropriate compiler-rt path when GCCInstallation is valid (PR #146849)

2025-07-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Garvit Gupta (quic-garvgupt) Changes Baremetal and RISCVToolchain used different paths for clangrt builtins relative to resource-dir before RISCVToolChain got removed in commit f8cb798 This created a discrepancy in behavior for riscv target

[clang] [Driver][RISCV] Fix and print appropriate compiler-rt path when GCCInstallation is valid (PR #146849)

2025-07-03 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt created https://github.com/llvm/llvm-project/pull/146849 Baremetal and RISCVToolchain used different paths for clangrt builtins relative to resource-dir before RISCVToolChain got removed in commit f8cb798 This created a discrepancy in behavior for riscv target wh

[clang] [llvm] [AArch64] Add support for -mcpu=gb10. (PR #146515)

2025-07-03 Thread Ricardo Jesus via cfe-commits
@@ -176,25 +176,43 @@ StringRef sys::detail::getHostCPUNameForARM(StringRef ProcCpuinfoContent) { SmallVector Lines; ProcCpuinfoContent.split(Lines, '\n'); - // Look for the CPU implementer line. + // Look for the CPU implementer and hardware lines, and store the CPU pa

[clang] [Driver][RISCV] Fix and print appropriate compiler-rt path when GCCInstallation is valid (PR #146849)

2025-07-03 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt edited https://github.com/llvm/llvm-project/pull/146849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #146844)

2025-07-03 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/146844 As discussed in PR #142353, the current testsuite of the `clang` Python bindings has several issues: - It `libclang.so` cannot be loaded into `python` to run the testsuite, the whole `ninja check-all` abo

[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #146844)

2025-07-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jannick Kremer (DeinAlptraum) Changes As discussed in PR #142353, the current testsuite of the `clang` Python bindings has several issues: - It `libclang.so` cannot be loaded into `python` to run the testsuite, the whole `ninja check-all

[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #146844)

2025-07-03 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: Next attempt after #146486. The only change is, that I removed `s390x` from the `XFAIL` directive. https://github.com/llvm/llvm-project/pull/146844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] [NFC][clang] Fix CodeGenSYCL::unique_stable_name_windows_diff test (PR #146854)

2025-07-03 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/146854 The test checks x86 target in fsycl-is-device mode. x86 is not a valid offloading target and IMO test meant to check fsycl-is-host mode to make sure host invocations of __builtin_sycl_unique_stable_name work

[clang] [Multilib] Extend the Multilib system to support an IncludepPath field. (PR #146651)

2025-07-03 Thread Simi Pallipurath via cfe-commits
https://github.com/simpal01 updated https://github.com/llvm/llvm-project/pull/146651 >From 30c353052c35f0117818aca3241e3dea6be2 Mon Sep 17 00:00:00 2001 From: Simi Pallipurath Date: Tue, 1 Jul 2025 21:25:00 +0100 Subject: [PATCH 1/2] [Multilib] Extend the Multilib system to support an Incl

[clang] ca0b566 - [NFC] [C++] [Modules] Mark P1979 as implemented and add test (#146841)

2025-07-03 Thread via cfe-commits
Author: Ashwin Kishin Banwari Date: 2025-07-03T19:03:39+08:00 New Revision: ca0b56639cf9f64ad774741b8f892c20d423f5d3 URL: https://github.com/llvm/llvm-project/commit/ca0b56639cf9f64ad774741b8f892c20d423f5d3 DIFF: https://github.com/llvm/llvm-project/commit/ca0b56639cf9f64ad774741b8f892c20d423f5

[clang] [NFC] [C++] [Modules] Mark P1979 as implemented and add test (PR #146841)

2025-07-03 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. https://github.com/llvm/llvm-project/pull/146841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] [C++] [Modules] Mark P1979 as implemented and add test (PR #146841)

2025-07-03 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/146841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5f62c79 - [C++20] [Modules] Use current named module to do module local lookup

2025-07-03 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-07-03T19:03:52+08:00 New Revision: 5f62c791061d5fb39e3686126042e4a090132efc URL: https://github.com/llvm/llvm-project/commit/5f62c791061d5fb39e3686126042e4a090132efc DIFF: https://github.com/llvm/llvm-project/commit/5f62c791061d5fb39e3686126042e4a090132efc.diff LO

[clang] [Clang] Fix evaluation context of lambdas appearing in discarded statements (PR #146857)

2025-07-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Corentin Jabot (cor3ntin) Changes Fixes 2 bugs reported in #146063 - The body of a lambda appearing in a discarded statement was sometimes considered discarded itself - A lambda conversion operator that was not odr-used was sometimes no

[clang] [Clang] Fix evaluation context of lambdas appearing in discarded statements (PR #146857)

2025-07-03 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/146857 Fixes 2 bugs reported in #146063 - The body of a lambda appearing in a discarded statement was sometimes considered discarded itself - A lambda conversion operator that was not odr-used was sometimes not def

[clang] [llvm] [RISCV][CodeGen] Add CodeGen support of Zibi experimental extension (PR #146858)

2025-07-03 Thread Boyao Wang via cfe-commits
https://github.com/BoyaoWang430 created https://github.com/llvm/llvm-project/pull/146858 This adds the CodeGen support of Zibi v0.1 experimental extension, which depends on #127463. The first commit is from the base PR. >From aea8133a1fe38791bad4a45e6dcc53d9fe05f771 Mon Sep 17 00:00:00 2001 Fr

[clang] [Clang] Fix evaluation context of lambdas appearing in discarded statements (PR #146857)

2025-07-03 Thread Timm Baeder via cfe-commits
@@ -18252,6 +18252,11 @@ static bool isImplicitlyDefinableConstexprFunction(FunctionDecl *Func) { if (Func->isImplicitlyInstantiable() || !Func->isUserProvided()) return true; + + // Lambda conversion operators are never user provided tbaederr wrote:

[clang] [llvm] [RISCV] Add big-endian support to RISC-V backend (PR #146534)

2025-07-03 Thread Djordje Todorovic via cfe-commits
djtodoro wrote: > What is your intention here around the LLVM 21 release cycle, knowing this is > a big feature and we are ~2 weeks from the branch date Hey @lenary, thank for mentioning that. I agree it is a big feature, so no need to rush to include it in the release. https://github.com/ll

[clang] [clang] SourceManager: Cache offsets for LastFileIDLookup to speed up getFileID (PR #146782)

2025-07-03 Thread Haojian Wu via cfe-commits
@@ -832,13 +835,11 @@ FileID SourceManager::getFileIDLocal(SourceLocation::UIntTy SLocOffset) const { unsigned LessIndex = 0; // upper bound of the search range. unsigned GreaterIndex = LocalSLocEntryTable.size(); - if (LastFileIDLookup.ID >= 0) { -// Use the LastFi

[clang] [DebugInfo] Init DwarfVersion of MCOptions like the other. (PR #146666)

2025-07-03 Thread Liu Ke via cfe-commits
Sockke wrote: Sorry for the noise - wrong reviewers were tagged by mistake. https://github.com/llvm/llvm-project/pull/14 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] SourceManager: Cache offsets for LastFileIDLookup to speed up getFileID (PR #146782)

2025-07-03 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/146782 >From 50c6fcb2a1167b65255d2edce9ef34789b85a7a5 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Wed, 2 Jul 2025 16:22:48 +0200 Subject: [PATCH 1/2] Cache the Offset for LastFileIDLookup. --- clang/include/clang/

[clang] [clang] SourceManager: Cache offsets for LastFileIDLookup to speed up getFileID (PR #146782)

2025-07-03 Thread Haojian Wu via cfe-commits
@@ -1901,9 +1903,8 @@ class SourceManager : public RefCountedBase { FileID getFileID(SourceLocation::UIntTy SLocOffset) const { // If our one-entry cache covers this offset, just return it. -if (isOffsetInFileID(LastFileIDLookup, SLocOffset)) +if (SLocOffset >=

[clang] [clang] SourceManager: Cache offsets for LastFileIDLookup to speed up getFileID (PR #146782)

2025-07-03 Thread Haojian Wu via cfe-commits
@@ -849,7 +850,12 @@ FileID SourceManager::getFileIDLocal(SourceLocation::UIntTy SLocOffset) const { FileID Res = FileID::get(int(GreaterIndex)); // Remember it. We have good locality across FileID lookups. LastFileIDLookup = Res; - NumLinearScans += Nu

[clang] [-Wunsafe-buffer-usage] Support span creation from std::initializer_list and begin/end pairs (PR #145311)

2025-07-03 Thread Hans Wennborg via cfe-commits
zmodem wrote: As a side effect (by changing DataInvocationGadget), this seems to have made -Wunsafe-buffer-usafe warn on unsafe uses of `std::string::data()`. (https://crbug.com/428945428). Was that intentional, and if so is there some test that should be updated to "lock it in"? https://git

[clang] 032966f - [RISCV] Added the MIPS prefetch extensions for MIPS RV64 P8700. (#145647)

2025-07-03 Thread via cfe-commits
Author: UmeshKalappa Date: 2025-07-03T10:59:10+02:00 New Revision: 032966ff5679804e826b76beab6306e277ef8d33 URL: https://github.com/llvm/llvm-project/commit/032966ff5679804e826b76beab6306e277ef8d33 DIFF: https://github.com/llvm/llvm-project/commit/032966ff5679804e826b76beab6306e277ef8d33.diff

[clang] [clang-tools-extra] [clang][CodeComplete] skip explicit obj param in SignatureHelp (PR #146649)

2025-07-03 Thread Mythreya Kuricheti via cfe-commits
MythreyaK wrote: The completion for `(&A::foo2)` is just `(A, int)`, not `foo(A, int)`. I tried to add a test case, like in this [godbolt](https://godbolt.org/z/77zE7e3oE) example, ```cpp struct A { void foo1(this A self, int arg) {} template void foo2(this T&& self, int arg, flo

[clang] [llvm] [AArch64] Mark aarch64_set_fpmr as IntrWriteMem (PR #146353)

2025-07-03 Thread via cfe-commits
https://github.com/CarolineConcatto updated https://github.com/llvm/llvm-project/pull/146353 >From 27917c4896f31bc3ffd7e466ff9bf1cea15ba476 Mon Sep 17 00:00:00 2001 From: CarolineConcatto Date: Mon, 30 Jun 2025 12:15:25 + Subject: [PATCH 1/2] [AArch64] Mark aarch64_set_fpmr as IntrWriteMem

[libclc] [libclc] Reduce include usage in OpenCL builtins (PR #146840)

2025-07-03 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/146840 This commit starts the process of reducing the amount of code included by OpenCL builtins, hopefully reducing build times in the process. It introduces a minimal OpenCL header - opencl-base.h - which includ

[clang] [clang] SourceManager: Cache offsets for LastFileIDLookup to speed up getFileID (PR #146782)

2025-07-03 Thread Haojian Wu via cfe-commits
@@ -1901,9 +1903,8 @@ class SourceManager : public RefCountedBase { FileID getFileID(SourceLocation::UIntTy SLocOffset) const { // If our one-entry cache covers this offset, just return it. -if (isOffsetInFileID(LastFileIDLookup, SLocOffset)) +if (SLocOffset >=

[clang] [Clang][SME] Refactor checkArmStreamingBuiltin. (PR #145941)

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

[clang] [llvm] [ORC] Replace ThreadSafeContext::getContext with withContextDo. (PR #146819)

2025-07-03 Thread Lang Hames via cfe-commits
lhames wrote: The failure on the Linux bot looks unrelated to this patch. Merging... https://github.com/llvm/llvm-project/pull/146819 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0bfa0bc - [ORC] Replace ThreadSafeContext::getContext with withContextDo. (#146819)

2025-07-03 Thread via cfe-commits
Author: Lang Hames Date: 2025-07-03T17:03:39+10:00 New Revision: 0bfa0bcd79f787db6194270bb838ae04ca46587e URL: https://github.com/llvm/llvm-project/commit/0bfa0bcd79f787db6194270bb838ae04ca46587e DIFF: https://github.com/llvm/llvm-project/commit/0bfa0bcd79f787db6194270bb838ae04ca46587e.diff LO

[clang] [llvm] [ORC] Replace ThreadSafeContext::getContext with withContextDo. (PR #146819)

2025-07-03 Thread Lang Hames via cfe-commits
https://github.com/lhames closed https://github.com/llvm/llvm-project/pull/146819 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Use range-based for loops (NFC) (PR #146811)

2025-07-03 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/146811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-scan-deps] Fix "unterminated conditional directive" bug (PR #146645)

2025-07-03 Thread Ziqing Luo via cfe-commits
@@ -393,7 +393,7 @@ static bool isQuoteCppDigitSeparator(const char *const Start, } void Scanner::skipLine(const char *&First, const char *const End) { ziqingluo-90 wrote: Yeah, this is much simpler. Thank you! This fix relies on the input source being vali

[clang] [Sema] Remove an unnecessary cast (NFC) (PR #146808)

2025-07-03 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/146808 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Add support for -mcpu=gb10. (PR #146515)

2025-07-03 Thread David Green via cfe-commits
@@ -176,25 +176,43 @@ StringRef sys::detail::getHostCPUNameForARM(StringRef ProcCpuinfoContent) { SmallVector Lines; ProcCpuinfoContent.split(Lines, '\n'); - // Look for the CPU implementer line. + // Look for the CPU implementer and hardware lines, and store the CPU pa

[clang] [llvm] Add __attribute__((visibility("default"))) attribute to certain symbols to stop them being hidden when linking clangInterpreter library to other libraries during Emscripten build (PR #1

2025-07-03 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: Can’t we solve this with a linker script provided externally when building llvm? https://github.com/llvm/llvm-project/pull/146786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [llvm] [Transforms] Add LifetimeMovePass (PR #144319)

2025-07-03 Thread Tomasz Miąsko via cfe-commits
@@ -0,0 +1,341 @@ +//===- LifetimeMove.cpp - Narrowing lifetimes -===// +// +// 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] [clang] [OpenMP] New OpenMP 6.0 self_maps clause - CodeGen (PR #134131)

2025-07-03 Thread via cfe-commits
Ritanya-B-Bharadwaj wrote: > 1. Update OpenMPSupport.rst, ReleaseNotes.rst. > 2. Did you modify the runtime, add the flag to sync runtime/compiler? ReleaseNote was updated in the previous patch - https://github.com/llvm/llvm-project/pull/129888 I have raised a separate PR for basic runtime supp

[clang] [llvm] Add __attribute__((visibility("default"))) attribute to certain symbols to stop them being hidden when linking clangInterpreter library to other libraries during Emscripten build (PR #1

2025-07-03 Thread via cfe-commits
mcbarton wrote: @vgvassilev Emscripten doesn't support linker scripts, and that is the platform that has the issue. https://github.com/llvm/llvm-project/pull/146786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [clang-scan-deps] Fix "unterminated conditional directive" bug (PR #146645)

2025-07-03 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 updated https://github.com/llvm/llvm-project/pull/146645 >From 161d7b6def818f16a2f8ab82ae4643abd09e8982 Mon Sep 17 00:00:00 2001 From: Ziqing Luo Date: Wed, 2 Jul 2025 15:46:37 +0800 Subject: [PATCH 1/3] [clang-scan-deps] Fix "unterminated conditional directive"

[clang] [clang][test] Avoid some C++14 warnings in discrim-union.cpp (PR #146829)

2025-07-03 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/146829 Before this patch, we emitted a bunch of irrelevant (to this test) warnings: ``` ../clang/test/SemaCXX/discrim-union.cpp:49:24: warning: 'constexpr' non-static member function will not be implicitly 'const' i

[clang] [llvm] Add __attribute__((visibility("default"))) attribute to certain symbols to stop them being hidden when linking clangInterpreter library to other libraries during Emscripten build (PR #1

2025-07-03 Thread Nikita Popov via cfe-commits
https://github.com/nikic commented: I'm super confused by what you are doing here. Most of the symbols you are annotating here are not inline and shouldn't be affected by `-fvisibility-inlines-hidden`. Some of them have already been annotated as LLVM_ABI in the header (and some of them haven't

[clang] [NFC] [C++] [Modules] Mark P1979 as implemented and add test (PR #146841)

2025-07-03 Thread Ashwin Kishin Banwari via cfe-commits
https://github.com/kish1n updated https://github.com/llvm/llvm-project/pull/146841 >From 4463daf4a8a42693fe5ed781356d02797e0fdef9 Mon Sep 17 00:00:00 2001 From: Ashwin Banwari Date: Thu, 3 Jul 2025 02:47:05 -0700 Subject: [PATCH 1/2] add test for P1979 to prove correctness --- clang/test/Sema

[clang] [clang][modules-driver] Add scanner to detect C++20 module presence (PR #145220)

2025-07-03 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,171 @@ +// The driver never checks to implicitly enable the explicit module build +// support unless at least two input files are provided. +// To trigger the C++20 module usage check, we always pass a second dummy file +// as input. +// TODO: Remove -fmodules everywhe

[clang-tools-extra] 0a02c28 - [clang-doc] add namespace references to VarInfo (#146964)

2025-07-03 Thread via cfe-commits
Author: Erick Velez Date: 2025-07-03T15:50:23-07:00 New Revision: 0a02c28e2912fdad4be8d7cb00fbcd2d3d75850a URL: https://github.com/llvm/llvm-project/commit/0a02c28e2912fdad4be8d7cb00fbcd2d3d75850a DIFF: https://github.com/llvm/llvm-project/commit/0a02c28e2912fdad4be8d7cb00fbcd2d3d75850a.diff L

[clang-tools-extra] [clang-doc] add namespace references to VarInfo (PR #146964)

2025-07-03 Thread Erick Velez via cfe-commits
https://github.com/evelez7 closed https://github.com/llvm/llvm-project/pull/146964 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][HLSL][RootSignature] Split up `HLSLRootSignatureUtils` (PR #146124)

2025-07-03 Thread Alex Sepkowski via cfe-commits
https://github.com/alsepkow edited https://github.com/llvm/llvm-project/pull/146124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][HLSL][RootSignature] Split up `HLSLRootSignatureUtils` (PR #146124)

2025-07-03 Thread Alex Sepkowski via cfe-commits
@@ -0,0 +1,56 @@ +//===- RootSignatureMetadata.h - HLSL Root Signature helpers --===// +// +// 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: Apa

[clang] [llvm] [NFC][HLSL][RootSignature] Split up `HLSLRootSignatureUtils` (PR #146124)

2025-07-03 Thread Alex Sepkowski via cfe-commits
https://github.com/alsepkow commented: LGTM outside of a few minor comments you may choose to address or not. https://github.com/llvm/llvm-project/pull/146124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [llvm] [NFC][HLSL][RootSignature] Split up `HLSLRootSignatureUtils` (PR #146124)

2025-07-03 Thread Alex Sepkowski via cfe-commits
@@ -103,7 +51,7 @@ class ResourceRange { getOverlapping(const RangeInfo &Info) const; // Return the mapped RangeInfo at X or nullptr if no mapping exists - LLVM_ABI const RangeInfo *lookup(uint32_t X) const; alsepkow wrote: LLVM_ABI no longer needed? h

[clang] [analyzer] Fix crash on compound literals with bitfields in unions (PR #146418)

2025-07-03 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/146418 >From 3611049b862e1738237c0092f1e13c08f409663f Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Mon, 30 Jun 2025 23:34:33 +0300 Subject: [PATCH 1/2] [analyzer] Fix crash on compound literals with bitfields

[clang] [llvm] [NFC][HLSL][RootSignature] Split up `HLSLRootSignatureUtils` (PR #146124)

2025-07-03 Thread Alex Sepkowski via cfe-commits
@@ -0,0 +1,194 @@ +//===- RootSignatureMetadata.h - HLSL Root Signature helpers --===// +// +// 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] [analyzer] Fix crash on compound literals with bitfields in unions (PR #146418)

2025-07-03 Thread Baranov Victor via cfe-commits
@@ -2187,7 +2187,10 @@ std::optional RegionStoreManager::getBindingForDerivedDefaultValue( // Lazy bindings are usually handled through getExistingLazyBinding(). // We should unify these two code paths at some point. -if (isa(val)) +// 'nonloc::ConcreteInt' va

[clang] [llvm] [RISCV][MC] Add MC support of Zibi experimental extension (PR #127463)

2025-07-03 Thread Jessica Clarke via cfe-commits
jrtc27 wrote: > > > This adds the support of Zibi v0.1 experimental extension. > > > References: > > > > > > * > > > https://lf-riscv.atlassian.net/wiki/spaces/USXX/pages/599261201/Branch+with+Immediate+Zibi+Ratification+Plan > > > > > > I cannot for the life of me find an actual specificatio

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-07-03 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. BTW, I've landed the 3 patches (excluding the problematic reported by Google) internally and we've used it for months. It looks good. https://github.com/llvm/llvm-project/pull/133057 ___ cfe-co

[clang] [clang][modules-driver] Add scanner to detect C++20 module presence (PR #145220)

2025-07-03 Thread Chuanqi Xu via cfe-commits
@@ -790,6 +792,35 @@ class Driver { /// compilation based on which -f(no-)?lto(=.*)? option occurs last. void setLTOMode(const llvm::opt::ArgList &Args); + /// BuildDefaultActions - Constructs the list of actions to perform + /// for the provided arguments, which are onl

[clang] [clang][modules-driver] Add scanner to detect C++20 module presence (PR #145220)

2025-07-03 Thread Chuanqi Xu via cfe-commits
@@ -577,6 +577,16 @@ def err_drv_reduced_module_output_overrided : Warning< "please consider use '-fmodule-output=' to specify the output file for reduced BMI explicitly">, InGroup>; +def remark_found_cxx20_module_usage : Remark< + "found C++20 module usage in file '%0'"

[clang] [clang][modules-driver] Add scanner to detect C++20 module presence (PR #145220)

2025-07-03 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/145220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   6   >