[clang] [clang][analyzer] Add checker 'alpha.core.FixedAddressDereference' (PR #127191)

2025-02-17 Thread Balázs Kéri via cfe-commits
https://github.com/balazske updated https://github.com/llvm/llvm-project/pull/127191 From 1f2ad6d5ce6f11fb031ec2175527f56ea86761ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Mon, 3 Feb 2025 15:35:31 +0100 Subject: [PATCH 1/3] [clang][analyzer] Add checker 'alpha.c

[clang] Fix error recovery while PTU cleanup (PR #127467)

2025-02-17 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff ecb7f5aaeed2de738a79f1bb78b2196718007176 6ff448ed506e0ef75db2c9974a628a965e85df2f --e

[clang] [clang] Fix false positive regression for lifetime analysis warning. (PR #127460)

2025-02-17 Thread Utkarsh Saxena via cfe-commits
@@ -1239,11 +1239,12 @@ static AnalysisResult analyzePathForGSLPointer(const IndirectLocalPath &Path, } // Check the return type, e.g. // const GSLOwner& func(const Foo& foo [[clang::lifetimebound]]) +// GSLOwner* func(cosnt Foo& foo [[clang::lifetimebound]

[clang] [llvm] [OpenMP] Missing implicit otherwise clause in metadirective. (PR #127113)

2025-02-17 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/127113 >From 1995b54afcc9fab93e7e80d3993d3396f193b31d Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Thu, 13 Feb 2025 11:24:32 -0800 Subject: [PATCH 1/3] [OpenMP] Missing implicit otherwise clause in metadi

[clang] [llvm] [OpenMP] Missing implicit otherwise clause in metadirective. (PR #127113)

2025-02-17 Thread Zahira Ammarguellat via cfe-commits
@@ -2882,6 +2882,12 @@ StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective( /*ReadDirectiveWithinMetadirective=*/true); break; } +// If no match is found and no otherwise clause is present, skip +// OMP5.2 Chapter 7.4: If no otherwise cla

[clang] [clang-linker-wrapper] Avoid repeated hash lookups (NFC) (PR #127443)

2025-02-17 Thread Kazu Hirata via cfe-commits
@@ -1060,8 +1060,9 @@ Expected getSymbolsFromBitcode(MemoryBufferRef Buffer, OffloadKind Kind, if (Sym.isFormatSpecific() || !Sym.isGlobal()) continue; - bool NewSymbol = Syms.count(Sym.getName()) == 0; - auto OldSym = NewSymbol ? Sym_None : Syms[Sym.g

[clang] [llvm] [OpenMP] Missing implicit otherwise clause in metadirective. (PR #127113)

2025-02-17 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff f3a1d558116904b793ff8ece7dae9605b741b178 ab69f1e2a41737e023f18c1a14a2b4ef6e31da37 --e

[clang] [llvm] [LLVM][Triple][NFCI] Add function to test for offloading triples (PR #126956)

2025-02-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. LGTM but I'd like to get a second stamp on it. https://github.com/llvm/llvm-project/pull/126956 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [llvm] [LLVM][Triple][NFCI] Add function to test for offloading triples (PR #126956)

2025-02-17 Thread Joseph Huber via cfe-commits
@@ -1109,6 +1109,11 @@ class Triple { Env == llvm::Triple::EABIHF; } + /// Tests if the target represents a device which can be offloaded to. + bool isOffloadingTarget() const { +return isAMDGPU() || isNVPTX() || isSPIRV(); + } jhuber6 wrot

[clang] [OpenMP] Silently accept `neon_vector_type` for the offloading device (PR #127439)

2025-02-17 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/127439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Add -f[no-]vectorize flags (PR #119718)

2025-02-17 Thread Tarun Prabhu via cfe-commits
@@ -3986,11 +3986,15 @@ defm assumptions : BoolFOption<"assumptions", "Disable codegen and compile-time checks for C++23's [[assume]] attribute">, PosFlag>; + +let Visibility = [ClangOption, FlangOption] in { tarunprabhu wrote: Do you know if thi

[clang] [clang][analyzer] Teach the BlockInCriticalSectionChecker about O_NONBLOCK streams (PR #127049)

2025-02-17 Thread Balazs Benics via cfe-commits
steakhal wrote: > LLVM Buildbot has detected a new failure on builder > `clang-cmake-x86_64-avx512-win` running on `avx512-intel64-win` while > building `clang` at step 6 "ninja check 1". > > Full details are available at: > https://lab.llvm.org/buildbot/#/builders/81/builds/4823 This doesn'

[clang] [llvm] [LLVM][Triple][NFCI] Add function to test for offloading triples (PR #126956)

2025-02-17 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 requested changes to this pull request. https://github.com/llvm/llvm-project/pull/126956 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add new check `readability-use-numeric-limits` (PR #127430)

2025-02-17 Thread Katherine Whitlock via cfe-commits
@@ -91,6 +91,13 @@ Improvements to clang-tidy New checks ^^ +- New :doc:`readability-use-numeric-limits + ` check. + + Replaces certain integer literals with equivalent calls to stellar-aria wrote: Fixed by matching the doc to this line https://git

[clang] [llvm] [OpenMP] Missing implicit otherwise clause in metadirective. (PR #127113)

2025-02-17 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/127113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] Silently accept `neon_vector_type` for the offloading device (PR #127439)

2025-02-17 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,6 @@ +// RUN: %clang -fopenmp --offload-arch=sm_90 -nocudalib -target aarch64-unknown-linux-gnu -c -Xclang -verify %s shiltian wrote: Use `%clang_cc1` here instead of the driver. https://github.com/llvm/llvm-project/pull/127439 __

[clang] [libc] [Clang] Add handlers for 'match_any' and 'match_all' to `gpuintrin.h` (PR #127504)

2025-02-17 Thread Shilei Tian via cfe-commits
@@ -92,6 +92,14 @@ LIBC_INLINE uint32_t shuffle(uint64_t lane_mask, uint32_t idx, uint32_t x, return __gpu_shuffle_idx_u32(lane_mask, idx, x, width); } +LIBC_INLINE uint64_t match_any(uint64_t lane_mask, uint32_t x) { + return __gpu_match_any_u32(lane_mask, x); +} + +LIBC_

[clang] [llvm] [LLVM][Triple][NFCI] Add function to test for offloading triples (PR #126956)

2025-02-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/126956 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][Triple][NFCI] Add function to test for offloading triples (PR #126956)

2025-02-17 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/126956 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen][ObjC] Invalidate cached ObjC class layout information after parsing ObjC class implementations if new ivars are added to the interface (PR #126591)

2025-02-17 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak updated https://github.com/llvm/llvm-project/pull/126591 >From 5101ebcb921fb621f9abcd7371337732f2d307b5 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Wed, 5 Feb 2025 14:47:45 -0800 Subject: [PATCH] [CodeGen][ObjC] Invalidate cached ObjC class layout informatio

[clang] [libc] [Clang] Add handlers for 'match_any' and 'match_all' to `gpuintrin.h` (PR #127504)

2025-02-17 Thread Joseph Huber via cfe-commits
@@ -92,6 +92,14 @@ LIBC_INLINE uint32_t shuffle(uint64_t lane_mask, uint32_t idx, uint32_t x, return __gpu_shuffle_idx_u32(lane_mask, idx, x, width); } +LIBC_INLINE uint64_t match_any(uint64_t lane_mask, uint32_t x) { + return __gpu_match_any_u32(lane_mask, x); +} + +LIBC_

[clang] [libc] [Clang] Add handlers for 'match_any' and 'match_all' to `gpuintrin.h` (PR #127504)

2025-02-17 Thread Matt Arsenault via cfe-commits
@@ -162,6 +162,62 @@ __gpu_shuffle_idx_u64(uint64_t __lane_mask, uint32_t __idx, uint64_t __x, ((uint64_t)__gpu_shuffle_idx_u32(__lane_mask, __idx, __lo, __width)); } +// Returns a bitmask marking all lanes that have the same value of __x. +_DEFAULT_FN_ATTRS static _

[clang] [clang-repl] Disable EmulatedTLS on Windows for interpreter executor (PR #127468)

2025-02-17 Thread Aaron Jomy via cfe-commits
https://github.com/aaronj0 edited https://github.com/llvm/llvm-project/pull/127468 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Lower modf builtin using `llvm.modf` intrinsic (PR #126750)

2025-02-17 Thread Matt Arsenault via cfe-commits
@@ -4096,6 +4114,15 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, case Builtin::BI__builtin_frexpf128: case Builtin::BI__builtin_frexpf16: return RValue::get(emitFrexpBuiltin(*this, E, Intrinsic::frexp)); + case Builtin::BImodf: +

[clang] [TBAA] Refine pointer-tbaa for void pointers by pointer depth (PR #126047)

2025-02-17 Thread Bruno De Fraine via cfe-commits
brunodf-snps wrote: If no other remarks get raised, I think this can be merged in a day or two? (Will have to be done by someone with commit access.) https://github.com/llvm/llvm-project/pull/126047 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [clang] Fix false positive regression for lifetime analysis warning. (PR #127460)

2025-02-17 Thread Haojian Wu via cfe-commits
hokein wrote: / cherry-pick 9c49b188b8e1434eb774ee8422124ad3e8870dce https://github.com/llvm/llvm-project/pull/127460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Diagnose the code with trailing comma in the function call. (PR #125232)

2025-02-17 Thread Haojian Wu via cfe-commits
hokein wrote: clang19 rejects this code as well, https://godbolt.org/z/Yf96W8KWv. To make this case work, I think we should use the `__VA_OPT__`. `#define debug_nok(...) fprintf(stderr, "qwerty" __VA_OPT__(,) ## __VA_ARGS__)` https://github.com/llvm/llvm-project/pull/125232 __

[clang-tools-extra] [clang-tidy] Add new check `readability-use-numeric-limits` (PR #127430)

2025-02-17 Thread via cfe-commits
@@ -91,6 +91,13 @@ Improvements to clang-tidy New checks ^^ +- New :doc:`readability-use-numeric-limits + ` check. + + Replaces certain integer literals with equivalent calls to EugeneZelenko wrote: Please synchronize with first statement in documen

[clang] [libc] [Clang] Add handlers for 'match_any' and 'match_all' to `gpuintrin.h` (PR #127504)

2025-02-17 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/127504 >From 821ad9e2fb7c3a6b39bc0b782342dcfd9c1b32c6 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Mon, 17 Feb 2025 09:04:03 -0600 Subject: [PATCH] [Clang] Add handlers for 'match_any' and 'match_all' to `gpuintr

[libclc] [libclc] Fix dependencies on generated convert builtins (PR #127515)

2025-02-17 Thread Michał Górny via cfe-commits
https://github.com/mgorny approved this pull request. Thanks for looking into it. https://github.com/llvm/llvm-project/pull/127515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add new check `readability-use-numeric-limits` (PR #127430)

2025-02-17 Thread Katherine Whitlock via cfe-commits
https://github.com/stellar-aria updated https://github.com/llvm/llvm-project/pull/127430 >From ba0eef9808b42b01e356cd5c87745f7477e07c68 Mon Sep 17 00:00:00 2001 From: Katherine Whitlock Date: Sun, 16 Feb 2025 22:45:06 -0500 Subject: [PATCH 1/3] [clang-tidy] Add new check `readability-use-numer

[clang] [alpha.webkit.UnretainedLocalVarsChecker] Add a checker for local variables to NS and CF types. (PR #127554)

2025-02-17 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/127554 >From d6c4e1a23dc0cc6850c5cfdceecc2e1be8943592 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Mon, 17 Feb 2025 18:18:09 -0800 Subject: [PATCH 1/3] [alpha.webkit.UnretainedLocalVarsChecker] Add a checker for lo

[clang] [alpha.webkit.UnretainedLocalVarsChecker] Add a checker for local variables to NS and CF types. (PR #127554)

2025-02-17 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/127554 This PR adds alpha.webkit.UnretainedLocalVarsChecker by generalizing RawPtrRefLocalVarsChecker. It checks local variables to NS or CF types are guarded with a RetainPtr or not. The new checker is effective for NS

[clang] [Feature]: merge host and kernel dependencies for heterogeneous compilation (PR #119513)

2025-02-17 Thread via cfe-commits
https://github.com/zhouronghua updated https://github.com/llvm/llvm-project/pull/119513 >From d8114ad228621a5ca038d0972908d0f82f8b580a Mon Sep 17 00:00:00 2001 From: "ronghua.zhou" Date: Fri, 14 Feb 2025 01:04:51 + Subject: [PATCH] [Feature]: support for the BC library file into the compile

[clang-tools-extra] [clang-tidy] Add new check `readability-use-numeric-limits` (PR #127430)

2025-02-17 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,23 @@ +.. title:: clang-tidy - readability-use-numeric-limits + +readability-use-numeric-limits +== + + Replaces certain integer literals with equivalent calls to + ``std::numeric_limits::min()`` or ``std::numeric_limits::max()``. + +Before:

[clang-tools-extra] [clang-tidy] Add new check `readability-use-numeric-limits` (PR #127430)

2025-02-17 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,41 @@ +//===--- UseNumericLimitsCheck.h - clang-tidy ---*- 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: Apa

[clang-tools-extra] [clang-tidy] Add new check `readability-use-numeric-limits` (PR #127430)

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

[clang-tools-extra] [clang-tidy] Add new check `readability-use-numeric-limits` (PR #127430)

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

[clang-tools-extra] [clang-tidy] Add new check `readability-use-numeric-limits` (PR #127430)

2025-02-17 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,41 @@ +//===--- UseNumericLimitsCheck.h - clang-tidy ---*- 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: Apa

[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

2025-02-17 Thread via cfe-commits
TiborGY wrote: @michael-kenzel Was there a reason why this never got merged? https://github.com/llvm/llvm-project/pull/72040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Allow arrays to copy-initialize (PR #127557)

2025-02-17 Thread Chris B via cfe-commits
https://github.com/llvm-beanz created https://github.com/llvm/llvm-project/pull/127557 This change allows array variables to copy-initialize from other arrays. It also corrects a small error in HLSL C-Style casting that did not error on casting to arrays if elementwise and splat conversions fa

[clang] [clang-repl] fix error recovery while parsing completely fails (PR #127087)

2025-02-17 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: There are quite some made by @kr-2003 and me here. 1) We realize even without this fix, stuff worked perfectly on our Macos ARM devices. So looks like a Ubuntu issue anyways ![image](https://github.com/user-attachments/assets/666d5cc4-1f42-4c4a-8ff6-81aa67bc4650) 2) Obviousl

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-02-17 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 edited https://github.com/llvm/llvm-project/pull/127467 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add new check `readability-use-numeric-limits` (PR #127430)

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

[clang-tools-extra] [clang-tidy] Add new check `readability-use-numeric-limits` (PR #127430)

2025-02-17 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,134 @@ +//===--- UseNumericLimitsCheck.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 `readability-use-numeric-limits` (PR #127430)

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

[clang] [clang][LoongArch] Add OHOS target (PR #127555)

2025-02-17 Thread Brad Smith via cfe-commits
brad0 wrote: Remove all of the OHOS_LOCAL comment markers. https://github.com/llvm/llvm-project/pull/127555 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix false positive regression for lifetime analysis warning. (PR #127460)

2025-02-17 Thread via cfe-commits
llvmbot wrote: >/cherry-pick 9c49b188b8e1434eb774ee8422124ad3e8870dce Error: Command failed due to missing milestone. https://github.com/llvm/llvm-project/pull/127460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [clang][LoongArch] Add OHOS target (PR #127555)

2025-02-17 Thread via cfe-commits
https://github.com/Ami-zhang updated https://github.com/llvm/llvm-project/pull/127555 >From daf1b4de8da9809c01147c9703e4ad83cc2e8231 Mon Sep 17 00:00:00 2001 From: Ami-zhang Date: Tue, 18 Feb 2025 10:00:25 +0800 Subject: [PATCH] [clang][LoongArch] Add OHOS target Add support for OHOS on LoongA

[clang] [clang][LoongArch] Add OHOS target (PR #127555)

2025-02-17 Thread Brad Smith via cfe-commits
brad0 wrote: You have to push any new changes first. https://github.com/llvm/llvm-project/pull/127555 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Allow arrays to copy-initialize (PR #127557)

2025-02-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Chris B (llvm-beanz) Changes This change allows array variables to copy-initialize from other arrays. It also corrects a small error in HLSL C-Style casting that did not error on casting to arrays if elementwise and splat conversions fail

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2025-02-17 Thread Anutosh Bhat via cfe-commits
@@ -571,11 +571,8 @@ StmtResult Parser::ParseExprStatement(ParsedStmtContext StmtCtx) { } Token *CurTok = nullptr; - // If the semicolon is missing at the end of REPL input, consider if - // we want to do value printing. Note this is only enabled in C++ mode - // since

[clang] [llvm] [RISCV] Add sifive-p470 processor (PR #102022)

2025-02-17 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `flang-x86_64-windows` running on `minipc-ryzen-win` while building `clang,llvm` at step 7 "test-build-unified-tree-check-flang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/166/builds/8 Here is t

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

2025-02-17 Thread Vincent Lee via cfe-commits
@@ -294,6 +305,32 @@ ThinBackend createInProcessThinBackend(ThreadPoolStrategy Parallelism, bool ShouldEmitIndexFiles = false, bool ShouldEmitImportsFiles = false); +/// This ThinBackend generates t

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

2025-02-17 Thread Vincent Lee via cfe-commits
https://github.com/thevinster commented: The example of using `llvm/utils/dtlto/local.py` is super useful. Could be worth mentioning that explicitly as a helpful tip for folks looking to integrate with their distribution process. Looking forward to the smaller patches. https://github.com/llv

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

2025-02-17 Thread Vincent Lee via cfe-commits
https://github.com/thevinster edited https://github.com/llvm/llvm-project/pull/126654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Address error recovery fixing infinite loop while parsing (PR #127569)

2025-02-17 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 created https://github.com/llvm/llvm-project/pull/127569 I was interested in recovering error for some use cases. Before the change ``` clang-repl> void foo() { int x = 5; <<< inputs >>>:1:1: error: expected expression <<< inputs >>>:1:1: error: expected expression

[clang] [clang] Predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-compatible modes (PR #127568)

2025-02-17 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja updated https://github.com/llvm/llvm-project/pull/127568 >From f10028a540d277e255a3c12e4ce6deb20a4165b8 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Tue, 18 Feb 2025 13:57:30 +0800 Subject: [PATCH] [clang] Predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-compat

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2025-02-17 Thread Vassil Vassilev via cfe-commits
@@ -571,11 +571,8 @@ StmtResult Parser::ParseExprStatement(ParsedStmtContext StmtCtx) { } Token *CurTok = nullptr; - // If the semicolon is missing at the end of REPL input, consider if - // we want to do value printing. Note this is only enabled in C++ mode - // since

[clang-tools-extra] 0b719d3 - [clangd] Enable parsing of forwarding functions in the preamble by default (#127359)

2025-02-17 Thread via cfe-commits
Author: Nathan Ridge Date: 2025-02-18T00:59:45-05:00 New Revision: 0b719d3d63100c6af66b015f796ab74d3d218107 URL: https://github.com/llvm/llvm-project/commit/0b719d3d63100c6af66b015f796ab74d3d218107 DIFF: https://github.com/llvm/llvm-project/commit/0b719d3d63100c6af66b015f796ab74d3d218107.diff

[clang-tools-extra] [clangd] Enable parsing of forwarding functions in the preamble by default (PR #127359)

2025-02-17 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/127359 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-compatible modes (PR #127568)

2025-02-17 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja updated https://github.com/llvm/llvm-project/pull/127568 >From 2c9e6e45944891af54cba9648297a996bb4d8cca Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Tue, 18 Feb 2025 14:03:35 +0800 Subject: [PATCH] [clang] Predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-compat

[clang] [clang-repl] Address error recovery fixing infinite loop while parsing (PR #127569)

2025-02-17 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: This happens because the while loop is running only taking `eof` into account and not `annot_repl_input_end` which is specific to clang-repl i'd assume hence it never terminates. I need to add tests for the same. But that being said here is something concerning I think

[clang] [clang-repl] Address error recovery fixing infinite loop while parsing (PR #127569)

2025-02-17 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: cc @ferdymercury https://github.com/llvm/llvm-project/pull/127569 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Address error recovery fixing infinite loop while parsing (PR #127569)

2025-02-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Anutosh Bhat (anutosh491) Changes I was interested in recovering error for some use cases. Before the change ``` clang-repl> void foo() { int x = 5; <<< inputs >>>:1:1: error: expected expression <<< inputs >>>:1:1: error: expected express

[clang] Check the type of Objective-C++ instance variables in WebKit member variable checkers. (PR #127570)

2025-02-17 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/127570 Like a C++ member variable, every Objective-C++ instance variable must be a RefPtr, Ref CheckedPtr, or CheckedRef to an object, not a raw pointer or reference. >From f93a95fc02a9389fda9597c6dffe0f16d8bc2bf1 Mon

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2025-02-17 Thread Anutosh Bhat via cfe-commits
@@ -571,11 +571,8 @@ StmtResult Parser::ParseExprStatement(ParsedStmtContext StmtCtx) { } Token *CurTok = nullptr; - // If the semicolon is missing at the end of REPL input, consider if - // we want to do value printing. Note this is only enabled in C++ mode - // since

[clang] Check the type of Objective-C++ instance variables in WebKit member variable checkers. (PR #127570)

2025-02-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ryosuke Niwa (rniwa) Changes Like a C++ member variable, every Objective-C++ instance variable must be a RefPtr, Ref CheckedPtr, or CheckedRef to an object, not a raw pointer or reference. --- Full diff: https://github.com/llvm/llvm-proj

[clang] Check the type of Objective-C++ instance variables in WebKit member variable checkers. (PR #127570)

2025-02-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ryosuke Niwa (rniwa) Changes Like a C++ member variable, every Objective-C++ instance variable must be a RefPtr, Ref CheckedPtr, or CheckedRef to an object, not a raw pointer or reference. --- Full diff: https://github.

[clang] d09cce1 - [clang][Index] Use HeuristicResolver in libIndex (#125153)

2025-02-17 Thread via cfe-commits
Author: Nathan Ridge Date: 2025-02-18T01:13:35-05:00 New Revision: d09cce166de9fc4fa243bdb4a2ea22df08110abd URL: https://github.com/llvm/llvm-project/commit/d09cce166de9fc4fa243bdb4a2ea22df08110abd DIFF: https://github.com/llvm/llvm-project/commit/d09cce166de9fc4fa243bdb4a2ea22df08110abd.diff

[clang] [clang][Index] Use HeuristicResolver in libIndex (PR #125153)

2025-02-17 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/125153 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Address error recovery fixing infinite loop while parsing (PR #127569)

2025-02-17 Thread via cfe-commits
ferdymercury wrote: @vgvassilev or @hahnjo might know the answer https://github.com/llvm/llvm-project/pull/127569 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Update Docs related to Annotation Token (PR #127571)

2025-02-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Anutosh Bhat (anutosh491) Changes The update in the source code was made through #89811 --- Full diff: https://github.com/llvm/llvm-project/pull/127571.diff 1 Files Affected: - (modified) clang/docs/ClangRepl.rst (+1-8) ``di

[clang] [llvm] [RISCV] Add sifive-p470 processor (PR #102022)

2025-02-17 Thread Pengcheng Wang via cfe-commits
wangpc-pp wrote: > LLVM Buildbot has detected a new failure on builder `flang-x86_64-windows` > running on `minipc-ryzen-win` while building `clang,llvm` at step 7 > "test-build-unified-tree-check-flang". > > Full details are available at: > https://lab.llvm.org/buildbot/#/builders/166/builds

[clang] [compiler-rt] [openmp] [TSan][OpenMP][Archer] Treat all reduction operations as atomic (PR #74631)

2025-02-17 Thread via cfe-commits
TiborGY wrote: @jprotze Are you still planning to get this PR merged? https://github.com/llvm/llvm-project/pull/74631 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Suppress data-layout warnings during linking (PR #127532)

2025-02-17 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/127532 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Suppress data-layout warnings during linking (PR #127532)

2025-02-17 Thread Matt Arsenault via cfe-commits
@@ -1,8 +1,4 @@ -#if __clang_major__ >= 7 -target datalayout = "e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5" -#else -target datalayout = "e-p:32:32-p1:64

[clang] [libc] [Clang] Add handlers for 'match_any' and 'match_all' to `gpuintrin.h` (PR #127504)

2025-02-17 Thread Joseph Huber via cfe-commits
@@ -162,6 +162,62 @@ __gpu_shuffle_idx_u64(uint64_t __lane_mask, uint32_t __idx, uint64_t __x, ((uint64_t)__gpu_shuffle_idx_u32(__lane_mask, __idx, __lo, __width)); } +// Returns a bitmask marking all lanes that have the same value of __x. +_DEFAULT_FN_ATTRS static _

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-02-17 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja requested changes to this pull request. https://github.com/llvm/llvm-project/pull/120920 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [alpha.webkit.UnretainedLocalVarsChecker] Add a checker for local variables to NS and CF types. (PR #127554)

2025-02-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ryosuke Niwa (rniwa) Changes This PR adds alpha.webkit.UnretainedLocalVarsChecker by generalizing RawPtrRefLocalVarsChecker. It checks local variables to NS or CF types are guarded with a RetainPtr or not. The new checke

[clang] [clang][LoongArch] Add OHOS target (PR #127555)

2025-02-17 Thread via cfe-commits
https://github.com/Ami-zhang created https://github.com/llvm/llvm-project/pull/127555 Add support for OHOS on LoongArch. This patch is taken from part of the https://gitee.com/openharmony/third_party_llvm-project/pulls/554, the original author is @caiwei. >From e53bc2f03be0d2088f27e336167f74a

[clang] [clang][LoongArch] Add OHOS target (PR #127555)

2025-02-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: None (Ami-zhang) Changes Add support for OHOS on LoongArch. This patch is taken from part of the https://gitee.com/openharmony/third_party_llvm-project/pulls/554, the original author is @caiwei. --- Full

[clang] [clang] Predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-compatible modes (PR #127568)

2025-02-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-platform-windows Author: A. Jiang (frederick-vs-ja) Changes This patch makes Clang predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-compatible modes. The macro can make the `offsetof` provided by MS UCRT's `` to select the `__builtin_offsetof` ver

[clang] [clang] Predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-compatible modes (PR #127568)

2025-02-17 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja created https://github.com/llvm/llvm-project/pull/127568 This patch makes Clang predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-compatible modes. The macro can make the `offsetof` provided by MS UCRT's `` to select the `__builtin_offsetof` version, so with it Cla

[clang] [Feature]: merge host and kernel dependencies for heterogeneous compilation (PR #119513)

2025-02-17 Thread via cfe-commits
https://github.com/zhouronghua updated https://github.com/llvm/llvm-project/pull/119513 >From 8d32a285c8288d08e876597614d8cf6df9a1d5b5 Mon Sep 17 00:00:00 2001 From: "ronghua.zhou" Date: Fri, 14 Feb 2025 01:04:51 + Subject: [PATCH] [Feature]: support for the BC library file into the compile

[clang] [clang][LoongArch] Add OHOS target (PR #127555)

2025-02-17 Thread via cfe-commits
Ami-zhang wrote: > Remove all of the OHOS_LOCAL begin / end comment markers. Done. Thank you for your review. https://github.com/llvm/llvm-project/pull/127555 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [clang][LoongArch] Add OHOS target (PR #127555)

2025-02-17 Thread Brad Smith via cfe-commits
@@ -3,13 +3,15 @@ // RUN: %clang_cc1 -x c++ -E -dM -ffreestanding -triple=riscv64-linux-ohos < /dev/null | FileCheck %s -match-full-lines -check-prefix=RISCV64-OHOS-CXX // RUN: %clang_cc1 -x c++ -E -dM -ffreestanding -triple=mipsel-linux-ohos < /dev/null | FileCheck %s -match-

[clang] [clang][LoongArch] Add OHOS target (PR #127555)

2025-02-17 Thread via cfe-commits
@@ -111,6 +111,8 @@ std::string OHOS::getMultiarchTriple(const llvm::Triple &T) const { return "x86_64-linux-ohos"; case llvm::Triple::aarch64: return "aarch64-linux-ohos"; + case llvm::Triple::loongarch64: Ami-zhang wrote: Yeah. Just on loongarch6

[clang] [clang][LoongArch] Add OHOS target (PR #127555)

2025-02-17 Thread via cfe-commits
https://github.com/Ami-zhang edited https://github.com/llvm/llvm-project/pull/127555 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Store full decl/def range with symbol locations (PR #118102)

2025-02-17 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Two quick thoughts, based on reading the discussion so far and a cursory glance at the patch: 1. Do we need to store a decl/def range in both `Symbol::Definition` and `Symbol::CanonicalDeclaration`? We could cut the memory usage overhead of the patch in half by only hav

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

2025-02-17 Thread Jonas Paulsson via cfe-commits
@@ -6464,6 +6522,70 @@ static SDValue lowerAddrSpaceCast(SDValue Op, SelectionDAG &DAG) { return Op; } +SDValue SystemZTargetLowering::lowerFP_EXTEND(SDValue Op, + SelectionDAG &DAG) const { + SDValue In = Op.getOperand(Op->isSt

[clang] [clang][LoongArch] Add OHOS target (PR #127555)

2025-02-17 Thread Brad Smith via cfe-commits
brad0 wrote: That looks better. https://github.com/llvm/llvm-project/pull/127555 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-02-17 Thread Jonas Paulsson via cfe-commits
@@ -6464,6 +6522,70 @@ static SDValue lowerAddrSpaceCast(SDValue Op, SelectionDAG &DAG) { return Op; } +SDValue SystemZTargetLowering::lowerFP_EXTEND(SDValue Op, + SelectionDAG &DAG) const { + SDValue In = Op.getOperand(Op->isSt

[clang] [clang][LoongArch] Add OHOS target (PR #127555)

2025-02-17 Thread Brad Smith via cfe-commits
@@ -111,6 +111,8 @@ std::string OHOS::getMultiarchTriple(const llvm::Triple &T) const { return "x86_64-linux-ohos"; case llvm::Triple::aarch64: return "aarch64-linux-ohos"; + case llvm::Triple::loongarch64: brad0 wrote: No loongarch32 addition here

[clang] [Feature]: merge host and kernel dependencies for heterogeneous compilation (PR #119513)

2025-02-17 Thread via cfe-commits
https://github.com/zhouronghua updated https://github.com/llvm/llvm-project/pull/119513 >From f32a96d2016e68f2ccf1311847e31f70affc409b Mon Sep 17 00:00:00 2001 From: "ronghua.zhou" Date: Fri, 14 Feb 2025 01:04:51 + Subject: [PATCH] [Feature]: support for the BC library file into the compile

[clang] [clang][Sema] Fix type of an statement expression ending with an atomic type (PR #119711)

2025-02-17 Thread Alejandro Álvarez Ayllón via cfe-commits
alejandro-alvarez-sonarsource wrote: Thanks! Do you mind doing the merge, since I can't? https://github.com/llvm/llvm-project/pull/119711 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang-tools-extra] [clang-tidy] Add bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2025-02-17 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/121291 >From 42e03bb9cc9bd815476b0a3f06ac5f58826e3708 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Fri, 31 Jan 2025 19:29:05 +0300 Subject: [PATCH 1/4] [clang-tidy] add new check bugprone-reset-ambiguous-call

[clang] [HLSL] Implement the 'and' HLSL function (PR #127098)

2025-02-17 Thread Chris B via cfe-commits
@@ -2245,6 +2245,36 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { break; } + case Builtin::BI__builtin_hlsl_and: { +if (SemaRef.checkArgCount(TheCall, 2)) + return true; +if (CheckVectorElementCallArgs(&SemaRef, TheCal

[libclc] [libclc] Disable external-calls testing for clspv targets (PR #127529)

2025-02-17 Thread Michał Górny via cfe-commits
https://github.com/mgorny approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/127529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-02-17 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: > Any other feedback on this patch? > > For those who haven't followed the RFC, the RFC received positive reviews, > and we have reached a consensus to move forward with the proposal. > https://discourse.llvm.org/t/rfc-ptrauth-qualifier/80710/31 @ahatanak I personally have no

<    1   2   3   4   5   >