[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-11-09 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/111499 >From fa191212f1d0e381503c250c3387e10a5f244576 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Sun, 10 Nov 2024 07:42:49 + Subject: [PATCH] Introduce [[clang::lifetime_capture_by]] --- clang/include/clan

[clang] [llvm] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-11-09 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/111499 >From 1aae3527ccba1eeaa8da4dd4309dcbdf590c4adf Mon Sep 17 00:00:00 2001 From: Sergei Barannikov Date: Sun, 3 Nov 2024 20:37:26 +0300 Subject: [PATCH] [MC] Make generated `MCInstPrinter::getMnemonic` const (NFC) (

[clang] [llvm] [RISCV] Use the 'B' extension in RISC-V profile definitions (PR #113942)

2024-11-09 Thread Alex Bradbury via cfe-commits
https://github.com/asb closed https://github.com/llvm/llvm-project/pull/113942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e149528 - [RISCV] Use the 'B' extension in RISC-V profile definitions (#113942)

2024-11-09 Thread via cfe-commits
Author: Alex Bradbury Date: 2024-11-10T07:18:05Z New Revision: e1495283cf74590fbdeb6d46ad815b4d10b1902f URL: https://github.com/llvm/llvm-project/commit/e1495283cf74590fbdeb6d46ad815b4d10b1902f DIFF: https://github.com/llvm/llvm-project/commit/e1495283cf74590fbdeb6d46ad815b4d10b1902f.diff LOG:

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [libunwind][libcxx][libcxxabi][compiler-rt-builtins] Fix Exception Handling build for wasm (PR #79667)

2024-11-09 Thread via cfe-commits
https://github.com/trcrsired updated https://github.com/llvm/llvm-project/pull/79667 >From 2b526821d4e70f3ea83f95d25f804d9fbcf82612 Mon Sep 17 00:00:00 2001 From: cqwrteur <100043421+trcrsi...@users.noreply.github.com> Date: Sat, 1 Jun 2024 02:55:50 -0400 Subject: [PATCH] [libunwind][libcxx][lib

[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-11-09 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: > I did not get to the end of this PR yet, but I was wondering if it would make > sense to split it up. One PR could add the attribute with the semantic > analysis (e.g., warnings for ill-formed arguments). The second PR could > introduce the lifetime analysis part. WDYT? Makes s

[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-11-09 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/111499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang: Relax LangOpts checks when lexing quoted numbers during preprocessing (PR #95798)

2024-11-09 Thread Nishith Kumar M Shah via cfe-commits
@@ -2068,7 +2068,8 @@ bool Lexer::LexNumericConstant(Token &Result, const char *CurPtr) { } // If we have a digit separator, continue. - if (C == '\'' && (LangOpts.CPlusPlus14 || LangOpts.C23)) { + if (C == '\'' && + (LangOpts.CPlusPlus14 || LangOpts.C23 || Parsing

[clang] [TableGen] Use heterogenous lookups with std::map (NFC) (PR #115633)

2024-11-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes Heterogenous lookups allow us to call find with StringRef, avoiding a temporary heap allocation of std::string. --- Full diff: https://github.com/llvm/llvm-project/pull/115633.diff 1 Files Affected:

[clang] [TableGen] Use heterogenous lookups with std::map (NFC) (PR #115633)

2024-11-09 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/115633 Heterogenous lookups allow us to call find with StringRef, avoiding a temporary heap allocation of std::string. >From 555068b382041e37e00891416fee3cac7982f071 Mon Sep 17 00:00:00 2001 From: Kazu Hirata

[clang] [llvm] [Clang-Repl] Add support for out-of-process execution. (PR #110418)

2024-11-09 Thread via cfe-commits
https://github.com/SahilPatidar updated https://github.com/llvm/llvm-project/pull/110418 >From 519dd2c99bc2200d364a184e416ec03b609e1910 Mon Sep 17 00:00:00 2001 From: SahilPatidar Date: Fri, 7 Jun 2024 13:30:08 +0530 Subject: [PATCH 01/13] [Clang-Repl] Implement out-of-process execution interf

[clang-tools-extra] Fix false positive in bugprone-throw-keyword-missing (PR #115302)

2024-11-09 Thread LLVM Continuous Integration via cfe-commits
Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux-bootstrap-asan` running on `sanitizer-buildbot7` while building `clang-tools-extra` at step 2 "annotate". Full details are available at: https://la

[clang] [llvm] [X86][AMX] Support AMX-MOVRS (PR #115151)

2024-11-09 Thread Phoebe Wang via cfe-commits
@@ -27291,6 +27291,13 @@ static SDValue LowerINTRINSIC_W_CHAIN(SDValue Op, const X86Subtarget &Subtarget, return DAG.getNode(ISD::MERGE_VALUES, dl, Op->getVTList(), SetCC, Operation.getValue(1)); } +case Intrinsic::x86_t2rpntlvwz0rs_inter

[clang] [llvm] [X86][AMX] Support AMX-MOVRS (PR #115151)

2024-11-09 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang deleted https://github.com/llvm/llvm-project/pull/115151 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV][Clang] Add RequiredFeatures to zvfh intrinsics (PR #115436)

2024-11-09 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat approved this pull request. Somehow I missed [this](https://github.com/llvm/llvm-project/issues/94306) issue, thanks for fixing this! https://github.com/llvm/llvm-project/pull/115436 ___ cfe-commits mailing list cfe-commits@

[clang] [llvm] [X86][AMX] Support AMX-TF32 (PR #115625)

2024-11-09 Thread Phoebe Wang via cfe-commits
@@ -6101,6 +6101,25 @@ let TargetPrefix = "x86" in { Intrinsic<[llvm_v16i32_ty], [llvm_i16_ty, llvm_i16_ty, llvm_x86amx_ty, llvm_i32_ty], []>; + + def int_x86_tmmultf32ps : ClangBuiltin<"__builtin_ia32_tmmultf32ps"

[clang] [llvm] [X86][AMX] Support AMX-TF32 (PR #115625)

2024-11-09 Thread Phoebe Wang via cfe-commits
@@ -660,6 +660,10 @@ _storebe_i64(void * __P, long long __D) { #include #endif +#if !defined(__SCE__) || __has_feature(modules) || defined(__AMX_TF32__) +#include +#endif + phoebewang wrote: ditto. https://github.com/llvm/llvm-project/pull/115625 _

[clang] [llvm] [X86][AMX] Support AMX-TF32 (PR #115625)

2024-11-09 Thread Phoebe Wang via cfe-commits
@@ -151,6 +151,7 @@ set(x86_files amxfp16intrin.h amxfp8intrin.h amxintrin.h + amxtf32intrin.h phoebewang wrote: Missing the new file. https://github.com/llvm/llvm-project/pull/115625 ___ cfe-commits mailing

[clang] [llvm] [X86][AMX] Support AMX-TF32 (PR #115625)

2024-11-09 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 0ac4821b718dd14e80d3856efa532d52df6878bb 556c19502b877c2ffa918047517553521bf287af --e

[clang] [llvm] [X86][AMX] Support AMX-MOVRS (PR #115151)

2024-11-09 Thread Phoebe Wang via cfe-commits
@@ -369,3 +369,94 @@ let Predicates = [HasAMXTRANSPOSE, In64BitMode] in { } } } // HasAMXTILE, HasAMXTRANSPOSE + +let Predicates = [HasAMXMOVRS, HasAMXTRANSPOSE, In64BitMode], SchedRW = [WriteSystem] in { + def T2RPNTLVWZ0RS : I<0xf8, MRMSrcMemFSIB, (outs TILEPair:$ds

[clang] [llvm] [X86][AMX] Support AMX-MOVRS (PR #115151)

2024-11-09 Thread Phoebe Wang via cfe-commits
@@ -37605,6 +37653,39 @@ X86TargetLowering::EmitInstrWithCustomInserter(MachineInstr &MI, MI.eraseFromParent(); // The pseudo is gone now. return BB; } + case X86::PT2RPNTLVWZ0RS: + case X86::PT2RPNTLVWZ0RST1: + case X86::PT2RPNTLVWZ1RS: + case X86::PT2RPNTL

[clang] [llvm] [X86][AMX] Support AMX-MOVRS (PR #115151)

2024-11-09 Thread Phoebe Wang via cfe-commits
@@ -37553,6 +37572,35 @@ X86TargetLowering::EmitInstrWithCustomInserter(MachineInstr &MI, MI.eraseFromParent(); // The pseudo is gone now. return BB; } + case X86::PTILELOADDRS: + case X86::PTILELOADDRST1: { phoebewang wrote: Merge with above. ht

[clang] [llvm] [X86][AMX] Support AMX-TF32 (PR #115625)

2024-11-09 Thread Feng Zou via cfe-commits
https://github.com/fzou1 updated https://github.com/llvm/llvm-project/pull/115625 >From b1d9799b99b45b5af2b63868c4c3b139dbf9378c Mon Sep 17 00:00:00 2001 From: Feng Zou Date: Sat, 26 Oct 2024 18:44:32 +0800 Subject: [PATCH 1/3] [X86][AMX] Support AMX-TF32 Ref.: https://cdrdv2.intel.com/v1/dl/g

[clang] [llvm] [X86][AMX] Support AMX-MOVRS (PR #115151)

2024-11-09 Thread Phoebe Wang via cfe-commits
@@ -27291,6 +27291,13 @@ static SDValue LowerINTRINSIC_W_CHAIN(SDValue Op, const X86Subtarget &Subtarget, return DAG.getNode(ISD::MERGE_VALUES, dl, Op->getVTList(), SetCC, Operation.getValue(1)); } +case Intrinsic::x86_t2rpntlvwz0rs_inter

[clang] [llvm] [X86][AMX] Support AMX-TF32 (PR #115625)

2024-11-09 Thread Feng Zou via cfe-commits
https://github.com/fzou1 updated https://github.com/llvm/llvm-project/pull/115625 >From b1d9799b99b45b5af2b63868c4c3b139dbf9378c Mon Sep 17 00:00:00 2001 From: Feng Zou Date: Sat, 26 Oct 2024 18:44:32 +0800 Subject: [PATCH 1/2] [X86][AMX] Support AMX-TF32 Ref.: https://cdrdv2.intel.com/v1/dl/g

[clang] [llvm] [X86][AMX] Support AMX-MOVRS (PR #115151)

2024-11-09 Thread Phoebe Wang via cfe-commits
@@ -5342,9 +5411,45 @@ void X86DAGToDAGISel::Select(SDNode *Node) { SDValue Disp = CurDAG->getTargetConstant(0, dl, MVT::i32); SDValue Segment = CurDAG->getRegister(0, MVT::i16); SDValue Chain = Node->getOperand(0); - MachineSDNode *CNode; SDValue

[clang] [llvm] [X86][AMX] Support AMX-MOVRS (PR #115151)

2024-11-09 Thread Phoebe Wang via cfe-commits
@@ -5307,6 +5338,44 @@ void X86DAGToDAGISel::Select(SDNode *Node) { ReplaceNode(Node, CNode); return; } +case Intrinsic::x86_tileloaddrs64: +case Intrinsic::x86_tileloaddrst164: { phoebewang wrote: ditto. https://github.com/llvm/llvm-p

[clang] [llvm] [X86][AMX] Support AMX-MOVRS (PR #115151)

2024-11-09 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang edited https://github.com/llvm/llvm-project/pull/115151 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86][AMX] Support AMX-MOVRS (PR #115151)

2024-11-09 Thread Phoebe Wang via cfe-commits
@@ -5189,6 +5193,33 @@ void X86DAGToDAGISel::Select(SDNode *Node) { ReplaceNode(Node, CNode); return; } +case Intrinsic::x86_tileloaddrs64_internal: +case Intrinsic::x86_tileloaddrst164_internal: { + if (!Subtarget->hasAMXMOVRS()) +break; --

[clang] [llvm] [X86][AMX] Support AMX-MOVRS (PR #115151)

2024-11-09 Thread Phoebe Wang via cfe-commits
@@ -687,6 +696,32 @@ bool X86ExpandPseudo::expandMI(MachineBasicBlock &MBB, MI.setDesc(TII->get(Opc)); return true; } + case X86::PT2RPNTLVWZ0RSV: + case X86::PT2RPNTLVWZ0RST1V: + case X86::PT2RPNTLVWZ1RSV: + case X86::PT2RPNTLVWZ1RST1V: { phoebew

[clang] [llvm] [X86][AMX] Support AMX-MOVRS (PR #115151)

2024-11-09 Thread Phoebe Wang via cfe-commits
@@ -558,6 +558,15 @@ bool X86ExpandPseudo::expandMI(MachineBasicBlock &MBB, MI.setDesc(TII->get(GET_EGPR_IF_ENABLED(X86::LDTILECFG))); return true; } + case X86::PTILELOADDRSV: + case X86::PTILELOADDRST1V: { +for (unsigned i = 2; i > 0; --i) + MI.removeOper

[clang] [llvm] [X86][AMX] Support AMX-MOVRS (PR #115151)

2024-11-09 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang edited https://github.com/llvm/llvm-project/pull/115151 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86][AMX] Support AMX-MOVRS (PR #115151)

2024-11-09 Thread Phoebe Wang via cfe-commits
@@ -4738,6 +4738,7 @@ static bool isAMXOpcode(unsigned Opc) { case X86::TILELOADD_EVEX: case X86::TILESTORED_EVEX: case X86::PTILEPAIRLOAD: + case X86::TILELOADDRS: phoebewang wrote: This is not needed. https://github.com/llvm/llvm-project/pull/115151

[clang] [llvm] [X86][AMX] Support AMX-MOVRS (PR #115151)

2024-11-09 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang commented: Add Clang release note Add `Features["amx-movrs"]` in Host.cpp Add `AMX_MOVRS` in X86TargetParser.def Add `ImpliedFeaturesAMX_MOVRS` in X86TargetParser.cpp https://github.com/llvm/llvm-project/pull/115151 ___ c

[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)

2024-11-09 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat updated https://github.com/llvm/llvm-project/pull/100346 >From 1c8201daa6925cac510ff8751ffd79a6b95f2315 Mon Sep 17 00:00:00 2001 From: Brandon Wu Date: Sun, 21 Jul 2024 09:49:11 -0700 Subject: [PATCH 1/2] [RISCV][VLS] Support RISCV VLS calling convention This patch a

[clang] [llvm] [X86][AMX] Support AMX-TF32 (PR #115625)

2024-11-09 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,194 @@ +/*===- amxtf32intrin.h - AMX_TF32 intrinsics -*- 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: Apac

[clang] [llvm] [X86][AMX] Support AMX-TF32 (PR #115625)

2024-11-09 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,47 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+amx-tile,+avx512f, \ +; RUN: -mattr=+amx-tf32,+amx-transpose -verify-machineinstrs | FileCheck %s + +define void @test_amx(i8* %

[clang] [llvm] [X86][AMX] Support AMX-TF32 (PR #115625)

2024-11-09 Thread Phoebe Wang via cfe-commits
@@ -37686,6 +37686,28 @@ X86TargetLowering::EmitInstrWithCustomInserter(MachineInstr &MI, MI.eraseFromParent(); // The pseudo is gone now. return BB; } + case X86::PTMMULTF32PS: + case X86::PTTMMULTF32PS: { +const DebugLoc &DL = MI.getDebugLoc(); +unsigned

[clang] [llvm] [X86][AMX] Support AMX-TF32 (PR #115625)

2024-11-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Feng Zou (fzou1) Changes Ref.: https://cdrdv2.intel.com/v1/dl/getContent/671368 --- Patch is 39.66 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/115625.diff 31 Files Affected: - (modified)

[clang] [llvm] [X86][AMX] Support AMX-TF32 (PR #115625)

2024-11-09 Thread Feng Zou via cfe-commits
https://github.com/fzou1 created https://github.com/llvm/llvm-project/pull/115625 Ref.: https://cdrdv2.intel.com/v1/dl/getContent/671368 >From b1d9799b99b45b5af2b63868c4c3b139dbf9378c Mon Sep 17 00:00:00 2001 From: Feng Zou Date: Sat, 26 Oct 2024 18:44:32 +0800 Subject: [PATCH] [X86][AMX] Supp

[clang] [StaticAnalyzer] early return if sym is concrete on assuming (PR #115579)

2024-11-09 Thread Ding Fei via cfe-commits
danix800 wrote: Yes these two are related. Solver is the root cause, the checker crash is the effect. Either fix could cover the crash but not enough without the other. The solver is inherently incapable of solving some constraints, which would brings in some overly constrainted states. We co

[clang-tools-extra] Add bugprone-undefined-sprintf-overlap (PR #114244)

2024-11-09 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,82 @@ +//===--- UndefinedSprintfOverlapCheck.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: Apa

[clang-tools-extra] Add bugprone-undefined-sprintf-overlap (PR #114244)

2024-11-09 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,82 @@ +//===--- UndefinedSprintfOverlapCheck.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: Apa

[clang-tools-extra] Add bugprone-undefined-sprintf-overlap (PR #114244)

2024-11-09 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank edited https://github.com/llvm/llvm-project/pull/114244 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add bugprone-undefined-sprintf-overlap (PR #114244)

2024-11-09 Thread Nicolas van Kempen via cfe-commits
nicovank wrote: Oops, crossed signals with @5chmidti. Hopefully not too much overlap sorry. https://github.com/llvm/llvm-project/pull/114244 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang-tools-extra] Add bugprone-undefined-sprintf-overlap (PR #114244)

2024-11-09 Thread Nicolas van Kempen via cfe-commits
@@ -0,0 +1,36 @@ +//===--- UndefinedSprintfOverlapCheck.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] Add bugprone-undefined-sprintf-overlap (PR #114244)

2024-11-09 Thread Nicolas van Kempen via cfe-commits
@@ -153,6 +153,7 @@ Clang-Tidy Checks :doc:`bugprone-too-small-loop-variable `, :doc:`bugprone-unchecked-optional-access `, :doc:`bugprone-undefined-memory-manipulation `, + :doc:`bugprone-undefined-sprintf-overlap `, "Yes" nicovank wrote: ```sug

[clang-tools-extra] Add bugprone-undefined-sprintf-overlap (PR #114244)

2024-11-09 Thread Nicolas van Kempen via cfe-commits
@@ -0,0 +1,23 @@ +.. title:: clang-tidy - bugprone-undefined-sprintf-overlap + +bugprone-undefined-sprintf-overlap nicovank wrote: Just to throw another option out there, `bugprone-sprintf-argument-overlap`. Others might have opinions. https://github.com/llvm/l

[clang-tools-extra] Add bugprone-undefined-sprintf-overlap (PR #114244)

2024-11-09 Thread Nicolas van Kempen via cfe-commits
@@ -0,0 +1,23 @@ +.. title:: clang-tidy - bugprone-undefined-sprintf-overlap + +bugprone-undefined-sprintf-overlap +== + +Warns if any arguments to the ``sprintf`` family of functions overlap with the +first argument. + +.. code-block:: c++ + +c

[clang-tools-extra] Add bugprone-undefined-sprintf-overlap (PR #114244)

2024-11-09 Thread Nicolas van Kempen via cfe-commits
@@ -0,0 +1,82 @@ +//===--- UndefinedSprintfOverlapCheck.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: Apa

[clang-tools-extra] Add bugprone-undefined-sprintf-overlap (PR #114244)

2024-11-09 Thread Nicolas van Kempen via cfe-commits
@@ -0,0 +1,59 @@ +// RUN: %check_clang_tidy %s bugprone-undefined-sprintf-overlap %t + +using size_t = decltype(sizeof(int)); + +extern "C" int sprintf(char *s, const char *format, ...); +extern "C" int snprintf(char *s, size_t n, const char *format, ...); + +namespace std { + in

[clang-tools-extra] Add bugprone-undefined-sprintf-overlap (PR #114244)

2024-11-09 Thread Nicolas van Kempen via cfe-commits
@@ -0,0 +1,82 @@ +//===--- UndefinedSprintfOverlapCheck.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: Apa

[clang-tools-extra] Add bugprone-undefined-sprintf-overlap (PR #114244)

2024-11-09 Thread Nicolas van Kempen via cfe-commits
@@ -0,0 +1,82 @@ +//===--- UndefinedSprintfOverlapCheck.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: Apa

[clang-tools-extra] Add bugprone-undefined-sprintf-overlap (PR #114244)

2024-11-09 Thread Nicolas van Kempen via cfe-commits
@@ -0,0 +1,36 @@ +//===--- UndefinedSprintfOverlapCheck.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] Add bugprone-undefined-sprintf-overlap (PR #114244)

2024-11-09 Thread Nicolas van Kempen via cfe-commits
@@ -0,0 +1,82 @@ +//===--- UndefinedSprintfOverlapCheck.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: Apa

[clang-tools-extra] Add bugprone-undefined-sprintf-overlap (PR #114244)

2024-11-09 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank edited https://github.com/llvm/llvm-project/pull/114244 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add bugprone-undefined-sprintf-overlap (PR #114244)

2024-11-09 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank commented: I have questions regarding the motivation behind adding this check: 1. How common is this bug? 2. What happens in practice at runtime? 3. What are existing ways of detecting this, if any? https://github.com/llvm/llvm-project/pull/114244 _

[clang-tools-extra] Add bugprone-undefined-sprintf-overlap (PR #114244)

2024-11-09 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,23 @@ +.. title:: clang-tidy - bugprone-undefined-sprintf-overlap + +bugprone-undefined-sprintf-overlap +== + +Warns if any arguments to the ``sprintf`` family of functions overlap with the +first argument. 5chmidti wrote

[clang-tools-extra] Add bugprone-undefined-sprintf-overlap (PR #114244)

2024-11-09 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,82 @@ +//===--- UndefinedSprintfOverlapCheck.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: Apa

[clang-tools-extra] Add bugprone-undefined-sprintf-overlap (PR #114244)

2024-11-09 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,82 @@ +//===--- UndefinedSprintfOverlapCheck.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: Apa

[clang-tools-extra] Add bugprone-undefined-sprintf-overlap (PR #114244)

2024-11-09 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,82 @@ +//===--- UndefinedSprintfOverlapCheck.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: Apa

[clang-tools-extra] Add bugprone-undefined-sprintf-overlap (PR #114244)

2024-11-09 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,82 @@ +//===--- UndefinedSprintfOverlapCheck.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: Apa

[clang-tools-extra] Add bugprone-undefined-sprintf-overlap (PR #114244)

2024-11-09 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,36 @@ +//===--- UndefinedSprintfOverlapCheck.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] Add bugprone-undefined-sprintf-overlap (PR #114244)

2024-11-09 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/114244 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add bugprone-undefined-sprintf-overlap (PR #114244)

2024-11-09 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti requested changes to this pull request. There are some false-negatives that exist for this check: E.g., ```c++ // from tests char bufss[10][10][10]; sprintf(bufss[0][1], "%s", bufss[0][1]); ``` or `*( *(bufss + 0) + 1)`. Though these can border on requiring, e

[clang-tools-extra] Add bugprone-undefined-sprintf-overlap (PR #114244)

2024-11-09 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,82 @@ +//===--- UndefinedSprintfOverlapCheck.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: Apa

[clang-tools-extra] Fix false positive in bugprone-throw-keyword-missing (PR #115302)

2024-11-09 Thread LLVM Continuous Integration via cfe-commits
Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-bootstrap-asan` running on `sanitizer-buildbot1` while building `clang-tools-extra` at step 2 "annotate". Full details are available at: https://lab

[clang-tools-extra] [clang-tidy] fix bugprone-sizeof-expression when sizeof expression with template types (PR #115275)

2024-11-09 Thread Julian Schmidt via cfe-commits
@@ -175,7 +175,8 @@ Changes in existing checks - Improved :doc:`bugprone-sizeof-expression ` check to find suspicious usages of ``sizeof()``, ``alignof()``, and ``offsetof()`` when adding or - subtracting from a pointer directly or when used to scale a numeric value. + su

[clang-tools-extra] [clang-tidy] fix bugprone-sizeof-expression when sizeof expression with template types (PR #115275)

2024-11-09 Thread Julian Schmidt via cfe-commits
@@ -385,3 +385,8 @@ int ValidExpressions() { sum += sizeof(PtrArray) / sizeof(A[0]); return sum; } + +template +int ValidateTemplateTypeExpressions(T t) { + return sizeof(t.val) / sizeof(t.val[0]); +} 5chmidti wrote: Please note the issue somewhere on thi

[clang-tools-extra] [clang-tidy] fix bugprone-sizeof-expression when sizeof expression with template types (PR #115275)

2024-11-09 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. https://github.com/llvm/llvm-project/pull/115275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] RFC: [clang-tidy] [analyzer] Move nondeterministic pointer usage check to tidy (PR #110471)

2024-11-09 Thread Julian Schmidt via cfe-commits
5chmidti wrote: FYI: #115620 & #115621 https://github.com/llvm/llvm-project/pull/110471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 69fb9bc - Fix false positive in bugprone-throw-keyword-missing (#115302)

2024-11-09 Thread via cfe-commits
Author: Carlos Galvez Date: 2024-11-09T22:04:17+01:00 New Revision: 69fb9bcde0312e672e6f2280f8662784731d79e6 URL: https://github.com/llvm/llvm-project/commit/69fb9bcde0312e672e6f2280f8662784731d79e6 DIFF: https://github.com/llvm/llvm-project/commit/69fb9bcde0312e672e6f2280f8662784731d79e6.diff

[clang-tools-extra] Fix false positive in bugprone-throw-keyword-missing (PR #115302)

2024-11-09 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: https://github.com/carlosgalvezp closed https://github.com/llvm/llvm-project/pull/115302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang-tools-extra] Fix false positive in bugprone-throw-keyword-missing (PR #115302)

2024-11-09 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/115302 >From c6ad9d042612c63cb9862782f17082e07277fc2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= Date: Wed, 6 Nov 2024 08:52:06 + Sub

[clang] [llvm] [HLSL] Add `Increment`/`DecrementCounter` methods to structured buffers (PR #114148)

2024-11-09 Thread Helena Kotas via cfe-commits
@@ -271,53 +246,70 @@ struct BuiltinTypeDeclBuilder { return *this; } + FieldDecl *getResourceHandleField() { +FieldDecl *FD = Fields["h"]; hekota wrote: Both [] operator and lookup will add the field if it is not already there. I will update it t

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-09 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/114588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][NFC] Make RegionStore dumps deterministic (PR #115615)

2024-11-09 Thread Balazs Benics via cfe-commits
@@ -232,27 +233,86 @@ class RegionBindingsRef : public llvm::ImmutableMapRefhttps://github.com/llvm/llvm-project/pull/115615 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [analyzer][NFC] Make RegionStore dumps deterministic (PR #115615)

2024-11-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes Dump the memory space clusters before the other clusters, in alphabetical order. Then default bindings over direct bindings, and if any has symbolic offset, then those should come before

[clang] [analyzer][NFC] Make RegionStore dumps deterministic (PR #115615)

2024-11-09 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/115615 Dump the memory space clusters before the other clusters, in alphabetical order. Then default bindings over direct bindings, and if any has symbolic offset, then those should come before the ones with concrete

[clang] [llvm] [RISCV] Use the 'B' extension in RISC-V profile definitions (PR #113942)

2024-11-09 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/113942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-09 Thread Farzon Lotfi via cfe-commits
@@ -1407,6 +1408,19 @@ void addInstrRequirements(const MachineInstr &MI, Reqs.addCapability(SPIRV::Capability::SplitBarrierINTEL); } break; + case SPIRV::OpKill: { +Reqs.addCapability(SPIRV::Capability::Shader); + } break; + case SPIRV::OpDemoteToHelperInvo

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-09 Thread Farzon Lotfi via cfe-commits
@@ -633,7 +633,8 @@ void RequirementHandler::initAvailableCapabilities(const SPIRVSubtarget &ST) { if (ST.isAtLeastSPIRVVer(VersionTuple(1, 6))) addAvailableCaps({Capability::DotProduct, Capability::DotProductInputAll, Capability::DotProductInput4x8

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-09 Thread Farzon Lotfi via cfe-commits
@@ -164,6 +164,9 @@ class SPIRVInstructionSelector : public InstructionSelector { unsigned comparisonOpcode, MachineInstr &I) const; bool selectCross(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const; + bool selectClip(Re

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-09 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/114588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-09 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/114588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-09 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,39 @@ +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.3-pixel %s -fnative-half-type -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple spirv-vulkan-pixel %s -fnative-half-type -emit-llvm -o -

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-09 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/114588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-09 Thread Farzon Lotfi via cfe-commits
@@ -99,6 +99,7 @@ def int_dx_step : DefaultAttrsIntrinsic<[LLVMMatchType<0>], [llvm_anyfloat_ty, L def int_dx_splitdouble : DefaultAttrsIntrinsic<[llvm_anyint_ty, LLVMMatchType<0>], [LLVMScalarOrSameVectorWidth<0, llvm_double_ty>], [IntrNoMem]>; def int_dx_radians : Defa

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-09 Thread Farzon Lotfi via cfe-commits
@@ -91,6 +91,7 @@ let TargetPrefix = "spv" in { def int_spv_sign : DefaultAttrsIntrinsic<[LLVMScalarOrSameVectorWidth<0, llvm_i32_ty>], [llvm_any_ty], [IntrNoMem]>; def int_spv_radians : DefaultAttrsIntrinsic<[LLVMMatchType<0>], [llvm_anyfloat_ty], [IntrNoMem]>; def int

[clang] [PAC][Driver] Add `-faarch64-jump-table-hardening` flag (PR #113149)

2024-11-09 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: @ahmedbougacha @ahatanak Please let me know if you have any objections on this. https://github.com/llvm/llvm-project/pull/113149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [llvm] [PAC][ELF][AArch64] Support signed personality function pointer (PR #113148)

2024-11-09 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: Would be glad to see everyone's feedback on the changes. https://github.com/llvm/llvm-project/pull/113148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add [[clang::no_specializations]] (PR #101469)

2024-11-09 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 bfe486fe764667d514124faf2b39afb7e7322640 5dd5dd4e7a7733412fb20368202c657f97b635a2 --e

[clang] [Clang] Add [[clang::no_specializations]] (PR #101469)

2024-11-09 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: I went for only adding `[[clang::no_specialization]]` to function templates, since the other cases seem even more unlikely to me and seem to have a higher implementation complexity. Is that OK? https://github.com/llvm/llvm-project/pull/101469 _

[clang] [Clang] Add [[clang::no_specializations]] (PR #101469)

2024-11-09 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/101469 >From 82ab798fc72c6de64ae527d96393f0dc67307e98 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 1 Aug 2024 12:30:22 +0200 Subject: [PATCH 1/6] [Clang] Add [[clang::diagnose_specializations]] --- cl

[clang] [analyzer] Refine LCV handling in Store for better taint propagation (PR #114835)

2024-11-09 Thread Balazs Benics via cfe-commits
steakhal wrote: > Thanks for the explanation -- code example reduction friendliness is a good > point that I didn't think about. Based on this, I support keeping that > commit, but perhaps add some remarks (in comments or the commit message, > wherever you think it's well-placed) that mentions

[clang] [analyzer] Refine LCV handling in Store for better taint propagation (PR #114835)

2024-11-09 Thread Balazs Benics via cfe-commits
@@ -15,20 +19,103 @@ struct empty { void test_copy_return() { aggr s1 = {1, 2}; aggr const& cr1 = aggr(s1); - clang_analyzer_dump(cr1); // expected-warning-re {{&lifetime_extended_object{aggr, cr1, S{{[0-9]+}}} }} + clang_analyzer_dump_lref(cr1); // expected-warning-re

[clang] [analyzer] Refine LCV handling in Store for better taint propagation (PR #114835)

2024-11-09 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/114835 >From 26f0cfabe3328c8eb8a861dd5d1d541921499f0c Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Sat, 9 Nov 2024 15:55:08 +0100 Subject: [PATCH 1/5] [analyzer][NFC] Make RegionStore dumps deterministic Dump t

[clang] [llvm] [clang-format] Add new cmake target, `clang-format-style-options`, for updating ClangFormatStyleOptions.rst. (PR #111513)

2024-11-09 Thread Iuri Chaer via cfe-commits
https://github.com/ichaer edited https://github.com/llvm/llvm-project/pull/111513 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang-format] Add new cmake target, `clang-format-style-options`, for updating ClangFormatStyleOptions.rst. (PR #111513)

2024-11-09 Thread Iuri Chaer via cfe-commits
https://github.com/ichaer edited https://github.com/llvm/llvm-project/pull/111513 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang-format] Add CI check confirming ClangFormatStyleOptions.rst is up-to-date. (PR #111513)

2024-11-09 Thread Iuri Chaer via cfe-commits
https://github.com/ichaer updated https://github.com/llvm/llvm-project/pull/111513 >From 7db80ba448fe4f434362de505330f504b9362844 Mon Sep 17 00:00:00 2001 From: Iuri Chaer Date: Tue, 8 Oct 2024 10:52:13 +0100 Subject: [PATCH 1/7] [clang-format] Add CI check confirming ClangFormatStyleOptions.r

  1   2   >