[clang] [WIP][AMDGPU] Support for type inferring image load/store builtins for AMDGPU (PR #140210)

2025-07-01 Thread Rana Pratap Reddy via cfe-commits
ranapratap55 wrote: > If the idea here is to remove the need for > https://github.com/ROCm/llvm-project/blob/amd-staging/amd/device-libs/ockl/src/base-image-intrinsics.ll > and > https://github.com/ROCm/llvm-project/blob/amd-staging/amd/device-libs/ockl/src/extended-image-intrinsics.ll > then

[clang] [CIR] Implement NotEqualOp for ComplexType (PR #146129)

2025-07-01 Thread Henrich Lauko via cfe-commits
@@ -1319,6 +1319,9 @@ def CmpOp : CIR_Op<"cmp", [Pure, SameTypeOperands]> { `cir.bool` result. The kinds of comparison available are: [lt,gt,ge,eq,ne] +Note: The 'complex' dialect has separate complex.eq and complex.neq +operations + xlauko wro

[clang] [llvm] AMDGPU: Implement tensor load and store instructions for gfx1250 (PR #146636)

2025-07-01 Thread Changpeng Fang via cfe-commits
@@ -621,6 +621,32 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, llvm::Function *F = CGM.getIntrinsic(IID, {LoadTy}); return Builder.CreateCall(F, {Addr}); } + case AMDGPU::BI__builtin_amdgcn_tensor_load_to_lds: + case AMDGPU::BI__builtin_amdg

[clang-tools-extra] [clang-tidy] add misc-constexpr check (PR #146553)

2025-07-01 Thread Denis Mikhailov via cfe-commits
@@ -0,0 +1,562 @@ +// RUN: %check_clang_tidy -std=c++11 -check-suffix=11 %s misc-use-constexpr %t -- -- -fno-delayed-template-parsing +// RUN: %check_clang_tidy -std=c++14 -check-suffix=11,14 %s misc-use-constexpr %t -- -- -fno-delayed-template-parsing +// RUN: %check_clang_tidy

[clang] __sys builtin support for AArch64 (PR #146456)

2025-07-01 Thread Daniel Paoliello via cfe-commits
https://github.com/dpaoliello approved this pull request. https://github.com/llvm/llvm-project/pull/146456 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add nothrow attribute to the call operation (PR #145178)

2025-07-01 Thread Bruno Cardoso Lopes via cfe-commits
@@ -227,26 +227,24 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { //======// cir::CallOp createCallOp(mlir::Location loc, mlir::SymbolRefAttr callee, - mlir::Type returnTyp

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

2025-07-01 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: >From an ABI perspective, this seems fine: if you want fp to always be valid, >sure, lets enforce that. Do we generate appropriate diagnostics for inline asm? Does the AArch64 backend actually support this flag? I briefly tried, and it looks like t

[clang] [CIR] Add nothrow attribute to the call operation (PR #145178)

2025-07-01 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/145178 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Fix mlir::ValueRange init from ArrayRef warning (PR #146577)

2025-07-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/146577 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Implement ds_atomic_async_barrier_arrive_b64/ds_atomic_barrier_arrive_rtn_b64 (PR #146409)

2025-07-01 Thread Changpeng Fang via cfe-commits
https://github.com/changpeng closed https://github.com/llvm/llvm-project/pull/146409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add nothrow attribute to the call operation (PR #145178)

2025-07-01 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/145178 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [lldb] Fix object format in the Triple of Mach-O files (approach 4) (PR #145157)

2025-07-01 Thread via cfe-commits
@@ -463,6 +463,27 @@ class Triple { const std::string &str() const { return Data; } + /// Return the triple string but only keep the first \p N components. + /// + /// The returned string will preserve the first \p N components exactly the + /// same as the original (in

[clang] [lldb] [llvm] [lldb] Fix object format in the Triple of Mach-O files (approach 4) (PR #145157)

2025-07-01 Thread via cfe-commits
https://github.com/royitaqi edited https://github.com/llvm/llvm-project/pull/145157 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5035d20 - AMDGPU: Implement ds_atomic_async_barrier_arrive_b64/ds_atomic_barrier_arrive_rtn_b64 (#146409)

2025-07-01 Thread via cfe-commits
Author: Changpeng Fang Date: 2025-07-01T11:08:49-07:00 New Revision: 5035d20dcbcea1edced779148ac69b84d3c97577 URL: https://github.com/llvm/llvm-project/commit/5035d20dcbcea1edced779148ac69b84d3c97577 DIFF: https://github.com/llvm/llvm-project/commit/5035d20dcbcea1edced779148ac69b84d3c97577.diff

[clang] [CIR] Add nothrow attribute to the call operation (PR #145178)

2025-07-01 Thread Bruno Cardoso Lopes via cfe-commits
@@ -662,13 +665,17 @@ static void printCallCommon(mlir::Operation *op, } printer << "(" << ops << ")"; + if (isNothrow) +printer << " nothrow"; bcardosolopes wrote: and here! https://github.com/llvm/llvm-project/pull/145178 _

[clang] [CIR] Add nothrow attribute to the call operation (PR #145178)

2025-07-01 Thread Bruno Cardoso Lopes via cfe-commits
@@ -611,6 +611,9 @@ static mlir::ParseResult parseCallCommon(mlir::OpAsmParser &parser, if (parser.parseRParen()) return mlir::failure(); + if (parser.parseOptionalKeyword("nothrow").succeeded()) +result.addAttribute("nothrow", mlir::UnitAttr::get(parser.getContext

[clang] [CIR] Add nothrow attribute to the call operation (PR #145178)

2025-07-01 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes commented: Thanks for the changes, more comments! https://github.com/llvm/llvm-project/pull/145178 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add nothrow attribute to the call operation (PR #145178)

2025-07-01 Thread Bruno Cardoso Lopes via cfe-commits
@@ -77,17 +77,38 @@ void CIRGenFunction::emitAggregateStore(mlir::Value value, Address dest) { builder.createStore(*currSrcLoc, value, dest); } +static void addAttributesFromFunctionProtoType(CIRGenBuilderTy &builder, + mlir::Na

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

2025-07-01 Thread Daniel Paoliello via cfe-commits
https://github.com/dpaoliello created https://github.com/llvm/llvm-project/pull/146582 There is no way in Arm64 Windows to indicate that a given function has used the Frame Pointer as a General Purpose Register, as such stack walks will always assume that the frame chain is valid and will foll

[clang] [C23][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)

2025-07-01 Thread Aaron Ballman via cfe-commits
@@ -7246,337 +7248,339 @@ class Parser : public CodeCompletionHandler { ParseStatementOrDeclaration(StmtVector &Stmts, ParsedStmtContext StmtCtx, SourceLocation *TrailingElseLoc = nullptr); - StmtResult ParseStatementOrDeclarationAfterAttribute

[clang] [C23][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)

2025-07-01 Thread Aaron Ballman via cfe-commits
@@ -35,7 +36,7 @@ void f(int n) { [[fallthrough]]; } case 8: -[[fallthrough]]; // expected-error {{does not directly precede switch label}} +[[fallthrough]]; // FIXME: The error {{does not directly precede switch label}} cannot reproduce in this translate

[clang] [C23][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)

2025-07-01 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c2x -verify %s AaronBallman wrote: ```suggestion // RUN: %clang_cc1 -fsyntax-only -std=c23 -verify %s ``` Maybe rename the file to be `c23` instead of `c2x` as well? https://github.com/llvm/llvm-project/pul

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

2025-07-01 Thread Sam Elliott via cfe-commits
lenary wrote: This seems to only implement the first bullet point in your commit message, and assembler/relocation/fixup support, right? Please update the PR description. I presume there will be follow-ups for the codegen/load-store support, plus subtarget info. https://github.com/llvm/llvm

[clang] [C23][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)

2025-07-01 Thread Aaron Ballman via cfe-commits
@@ -15,18 +15,19 @@ void f(int n) { return; } case 2: +// FIXME: Should we emit an error {{fallthrough annotation does not directly precede switch label}}? AaronBallman wrote: Yeah that seems like a regression in behavior. https://github.com/

[clang] [Clang] [CodeGen] UBSan Trap Reasons (PR #145967)

2025-07-01 Thread Anthony Tran via cfe-commits
anthonyhatran wrote: > Looks like we need to fix a few more things. Did you resolve the issue with > the existing test cases failing? Apologies for the belated reply on this one; I ran the test suite overnight just to double-check that the test cases I listed were actually caused by my change

[clang-tools-extra] [clang-tidy] add modernize-use-constexpr check (PR #146553)

2025-07-01 Thread Julian Schmidt via cfe-commits
5chmidti wrote: Thanks for testing this on your codebase so fast as well. > I got some fixits that do not compile, e.g.: > > ``` > std::erase_if(numbers, [](int n) { > return n % 2 == 0; > }); > ``` > > is changed into > > ``` > std::erase_if(numbers, [](int nconstexpr ) { > return n % 2 == 0

[clang-tools-extra] c56c349 - [clang-tidy] Switch misc-confusable-identifiers check to a faster algorithm. (#130369)

2025-07-01 Thread via cfe-commits
Author: Richard Smith Date: 2025-07-01T13:31:46-07:00 New Revision: c56c349d39464d859b0f8655a4502e5c06924b66 URL: https://github.com/llvm/llvm-project/commit/c56c349d39464d859b0f8655a4502e5c06924b66 DIFF: https://github.com/llvm/llvm-project/commit/c56c349d39464d859b0f8655a4502e5c06924b66.diff

[clang] [llvm] [mlir] [debuginfo][coro] Emit debug info labels for coroutine resume points (PR #141937)

2025-07-01 Thread Adrian Vogelsgesang via cfe-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/141937 >From 185be04e482344ce2f76eeb02859162e1838150e Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Tue, 27 May 2025 19:36:42 + Subject: [PATCH 1/6] [debuginfo][coro] Emit debug info labels for coro

[clang-tools-extra] [clang-tidy] Switch misc-confusable-identifiers check to a faster algorithm. (PR #130369)

2025-07-01 Thread Richard Smith via cfe-commits
https://github.com/zygoloid closed https://github.com/llvm/llvm-project/pull/130369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [analyzer] Correct Z3 test cases, fix exposed crashes (PR #146597)

2025-07-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-llvm-support Author: None (vabridgers) Changes PR145731 corrected the analyzer test runner to consider use of z3 when used by testcases, which exposed problems in test cases PR37855.c and crashes in z3-crosscheck.c This chang

[clang] [Clang][attr] Add cfi_salt attribute (PR #141846)

2025-07-01 Thread Bill Wendling via cfe-commits
@@ -3639,6 +3639,64 @@ make the function's CFI jump table canonical. See :ref:`the CFI documentation }]; } +def CFISaltDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +Use ``__attribute__((cfi_salt("")))`` on a function declaration, function ---

[clang] [Analysis] Remove an unnecessary cast (NFC) (PR #146547)

2025-07-01 Thread Tim Gymnich via cfe-commits
https://github.com/tgymnich approved this pull request. https://github.com/llvm/llvm-project/pull/146547 ___ 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 misc-constexpr check (PR #146553)

2025-07-01 Thread Denis Mikhailov via cfe-commits
denzor200 wrote: `constexpr` is one of the important additions of C++11. Most of the users will search this check in "modernize" section and will be misled by not finding it there. "misc-const-correctness" - not a modernize check at all, it even relevant for C++98, so it exists in "misc" htt

[clang] [clang][Sema] Suggest/Hint Standard Library Include File (PR #146227)

2025-07-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I'm not really a fan of how we're doing this. This should only be caused by a failed lookup. This also seems about 2x as complicated as it needs to be. I like the idea ehre, but not at this level of complexity. @AaronBallman perhaps has a better idea

[clang] [clang] Improve getFileIDLocal binary search. (PR #146510)

2025-07-01 Thread Haojian Wu via cfe-commits
@@ -855,35 +857,24 @@ FileID SourceManager::getFileIDLocal(SourceLocation::UIntTy SLocOffset) const { break; } - NumProbes = 0; - while (true) { -unsigned MiddleIndex = (GreaterIndex-LessIndex)/2+LessIndex; -SourceLocation::UIntTy MidOffset = -getLoc

[clang] [clang] Improve getFileIDLocal binary search. (PR #146510)

2025-07-01 Thread Haojian Wu via cfe-commits
@@ -855,35 +857,24 @@ FileID SourceManager::getFileIDLocal(SourceLocation::UIntTy SLocOffset) const { break; } - NumProbes = 0; - while (true) { -unsigned MiddleIndex = (GreaterIndex-LessIndex)/2+LessIndex; -SourceLocation::UIntTy MidOffset = -getLoc

[clang] [llvm] [mlir] [debuginfo][coro] Emit debug info labels for coroutine resume points (PR #141937)

2025-07-01 Thread Tom Tromey via cfe-commits
tromey wrote: FWIW I read through the DWARF/debuginfo bits and it looked reasonable to me. I found a couple small nits. I didn't read the other parts though. https://github.com/llvm/llvm-project/pull/141937 ___ cfe-commits mailing list cfe-commits@l

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

2025-07-01 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] 72a9c3c - [Analysis] Remove an unnecessary cast (NFC) (#146547)

2025-07-01 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-07-01T10:42:14-07:00 New Revision: 72a9c3cced898c3a8f7dcbbfaedca5e5438c9544 URL: https://github.com/llvm/llvm-project/commit/72a9c3cced898c3a8f7dcbbfaedca5e5438c9544 DIFF: https://github.com/llvm/llvm-project/commit/72a9c3cced898c3a8f7dcbbfaedca5e5438c9544.diff L

[clang] [Analysis] Remove an unnecessary cast (NFC) (PR #146547)

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

[clang] [CIR] Fix mlir::ValueRange init from ArrayRef warning (PR #146577)

2025-07-01 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/146577 Fix initalizing ValueRange with ArrayRef `ValueRange(ArrayRef(std::forward(arg))) {}` warning >From fc24ac864fe0517ab8c78969d4a508c1a9baf2af Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 1 Jul 20

[clang] [CIR] Fix mlir::ValueRange init from ArrayRef warning (PR #146577)

2025-07-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Amr Hesham (AmrDeveloper) Changes Fix initalizing ValueRange with ArrayRef `ValueRange(ArrayRef(std::forward(arg))) {}` warning --- Full diff: https://github.com/llvm/llvm-project/pull/146577.diff 1 Files Affected: - (mod

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

2025-07-01 Thread Ricardo Jesus via cfe-commits
@@ -1203,6 +1204,8 @@ def : ProcessorModel<"cortex-x4", NeoverseV2Model, ProcessorFeatures.X4, [TuneX4]>; def : ProcessorModel<"cortex-x925", NeoverseV2Model, ProcessorFeatures.X925, [TuneX925]>; +def : ProcessorModel<"gb10", NeoverseV

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-07-01 Thread Yuri Iozzelli via cfe-commits
@@ -165,14 +165,17 @@ void Writer::createCustomSections() { for (auto &pair : customSectionMapping) { StringRef name = pair.first; LLVM_DEBUG(dbgs() << "createCustomSection: " << name << "\n"); - -OutputSection *sec = make(std::string(name), pair.second); +Out

[clang-tools-extra] [clang-tidy] add misc-constexpr check (PR #146553)

2025-07-01 Thread Julian Schmidt via cfe-commits
5chmidti wrote: I ran this check on all of `clang/` and `clang-tools-extra/` and got no compilation errors from too aggressively changing things to `constexpr`. Some perf info from running the checks enabled in LLVM + this check: Running on: `clang/lib/Sema/SemaExprCXX.cpp` (1 diag): ```text =

[clang-tools-extra] [clang-tidy] add misc-constexpr check (PR #146553)

2025-07-01 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/146553 >From 16d5a3fb942673d1fda0ef4b17363a0b5d634fbb Mon Sep 17 00:00:00 2001 From: Julian Schmidt Date: Fri, 6 Sep 2024 22:58:46 +0200 Subject: [PATCH] [clang-tidy] add misc-constexpr check This check finds all fun

[clang] [clang][bytecode] Check pointer data type for bitcast eligibility (PR #146552)

2025-07-01 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/146552 So we get the proper type for a heap-allocated value. >From e8209bfa48669fc77e38ed9d20fd15d7795fdd35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 1 Jul 2025 17:37:10 +0200 Subject: [

[clang-tools-extra] [clang-tidy] add misc-constexpr check (PR #146553)

2025-07-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Julian Schmidt (5chmidti) Changes This check finds all functions and variables that can be declared as `constexpr`, using the specified standard version to check if the requirements are met. Fixes #115622 --- Patch is 95.12

[clang] [clang][bytecode] Check pointer data type for bitcast eligibility (PR #146552)

2025-07-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes So we get the proper type for a heap-allocated value. --- Full diff: https://github.com/llvm/llvm-project/pull/146552.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/InterpBuiltinBitCast.cpp (+4

[clang-tools-extra] [clang-tidy] add misc-constexpr check (PR #146553)

2025-07-01 Thread Baranov Victor via cfe-commits
vbvictor wrote: I'm +1 on the `modernize-use-constexpr`. https://github.com/llvm/llvm-project/pull/146553 ___ 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 misc-constexpr check (PR #146553)

2025-07-01 Thread Denis Mikhailov via cfe-commits
@@ -0,0 +1,562 @@ +// RUN: %check_clang_tidy -std=c++11 -check-suffix=11 %s misc-use-constexpr %t -- -- -fno-delayed-template-parsing +// RUN: %check_clang_tidy -std=c++14 -check-suffix=11,14 %s misc-use-constexpr %t -- -- -fno-delayed-template-parsing +// RUN: %check_clang_tidy

[clang-tools-extra] [clang-tidy] add misc-constexpr check (PR #146553)

2025-07-01 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,946 @@ +//===--- UseConstexprCheck.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 misc-constexpr check (PR #146553)

2025-07-01 Thread Baranov Victor via cfe-commits
@@ -19,6 +19,7 @@ set_target_properties(genconfusable PROPERTIES FOLDER "Clang Tools Extra/Sourceg add_clang_library(clangTidyMiscModule STATIC ConstCorrectnessCheck.cpp + UseConstexprCheck.cpp vbvictor wrote: Please fix ordering https://github.com/llvm/

[clang-tools-extra] [clang-tidy] add misc-constexpr check (PR #146553)

2025-07-01 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,946 @@ +//===--- UseConstexprCheck.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 misc-constexpr check (PR #146553)

2025-07-01 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,946 @@ +//===--- UseConstexprCheck.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 misc-constexpr check (PR #146553)

2025-07-01 Thread Baranov Victor via cfe-commits
@@ -43,6 +44,7 @@ class MiscModule : public ClangTidyModule { "misc-confusable-identifiers"); CheckFactories.registerCheck( "misc-const-correctness"); +CheckFactories.registerCheck("misc-use-constexpr"); vbvictor wrote: ditto https://g

[clang-tools-extra] [clang-tidy] add misc-constexpr check (PR #146553)

2025-07-01 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,946 @@ +//===--- UseConstexprCheck.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 misc-constexpr check (PR #146553)

2025-07-01 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,946 @@ +//===--- UseConstexprCheck.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] [lldb] [llvm] [lldb] Fix object format in the Triple of Mach-O files (approach 4) (PR #145157)

2025-07-01 Thread via cfe-commits
@@ -463,6 +463,27 @@ class Triple { const std::string &str() const { return Data; } + /// Return the triple string but only keep the first \p N components. + /// + /// The returned string will preserve the first \p N components exactly the + /// same as the original (in

[clang] [lldb] [llvm] [lldb] Fix object format in the Triple of Mach-O files (approach 4) (PR #145157)

2025-07-01 Thread via cfe-commits
https://github.com/royitaqi edited https://github.com/llvm/llvm-project/pull/145157 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [lldb] Fix object format in the Triple of Mach-O files (approach 4) (PR #145157)

2025-07-01 Thread via cfe-commits
https://github.com/royitaqi edited https://github.com/llvm/llvm-project/pull/145157 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [lldb] Fix object format in the Triple of Mach-O files (approach 4) (PR #145157)

2025-07-01 Thread via cfe-commits
https://github.com/royitaqi edited https://github.com/llvm/llvm-project/pull/145157 ___ 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 modernize-use-constexpr check (PR #146553)

2025-07-01 Thread Julian Schmidt via cfe-commits
5chmidti wrote: > I tried with [ITK](https://github.com/InsightSoftwareConsortium/ITK/) and the > resulting transformation did not compile. > > Many changes were of this form: > > ```diff > -const double Max = 1.0 - Min; > +constexpr double Max = 1.0 - Min; > ``` > > Which is

[clang] 8dbfe83 - [CIR] Fix mlir::ValueRange init from ArrayRef warning (#146577)

2025-07-01 Thread via cfe-commits
Author: Amr Hesham Date: 2025-07-01T20:32:04+02:00 New Revision: 8dbfe83681ed2066b3591be24c4a566b87177d12 URL: https://github.com/llvm/llvm-project/commit/8dbfe83681ed2066b3591be24c4a566b87177d12 DIFF: https://github.com/llvm/llvm-project/commit/8dbfe83681ed2066b3591be24c4a566b87177d12.diff LO

[clang] [C23][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)

2025-07-01 Thread Aaron Ballman via cfe-commits
@@ -80,6 +81,11 @@ Parser::ParseStatementOrDeclaration(StmtVector &Stmts, assert((CXX11Attrs.empty() || Res.isInvalid() || Res.isUsable()) && "attributes on empty statement"); + if (HasStdAttr && getLangOpts().C99 && AaronBallman wrote: Why are al

[clang] [CIR] Fix mlir::ValueRange init from ArrayRef warning (PR #146577)

2025-07-01 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/146577 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][attr] Add cfi_salt attribute (PR #141846)

2025-07-01 Thread Aaron Ballman via cfe-commits
@@ -3639,6 +3639,64 @@ make the function's CFI jump table canonical. See :ref:`the CFI documentation }]; } +def CFISaltDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +Use ``__attribute__((cfi_salt("")))`` on a function declaration, function ---

[clang] [CIR] Implement ArraySubscript for ComplexType (PR #146283)

2025-07-01 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/146283 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Implement ds_atomic_async_barrier_arrive_b64/ds_atomic_barrier_arrive_rtn_b64 (PR #146409)

2025-07-01 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/146409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Implement ds_atomic_async_barrier_arrive_b64/ds_atomic_barrier_arrive_rtn_b64 (PR #146409)

2025-07-01 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `ml-opt-rel-x86-64` running on `ml-opt-rel-x86-64-b1` while building `clang,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/185/builds/21236 Here i

[clang] [clang][bytecode] Check pointer data type for bitcast eligibility (PR #146552)

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

[clang] [clang][bytecode] Add back missing initialize call (PR #146589)

2025-07-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes This was only accidentally dropped, so add it back. --- Full diff: https://github.com/llvm/llvm-project/pull/146589.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCode/Interp.h (+1-5) ``d

[clang] [CIR] Comma Operator for ComplexType (PR #146204)

2025-07-01 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/146204 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6fafa46 - [CIR] Upstream PackIndexingExpr for ScalarExpr (#146239)

2025-07-01 Thread via cfe-commits
Author: Amr Hesham Date: 2025-07-01T20:59:53+02:00 New Revision: 6fafa46f8c1b335d08a59febb8bcb35a17fb177e URL: https://github.com/llvm/llvm-project/commit/6fafa46f8c1b335d08a59febb8bcb35a17fb177e DIFF: https://github.com/llvm/llvm-project/commit/6fafa46f8c1b335d08a59febb8bcb35a17fb177e.diff LO

[clang] [CIR] Upstream PackIndexingExpr for ScalarExpr (PR #146239)

2025-07-01 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/146239 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Comma Operator for ComplexType (PR #146204)

2025-07-01 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/146204 >From 57396eb457fb267a7b1ddfd79569dc3aa239535b Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 28 Jun 2025 10:35:06 +0200 Subject: [PATCH] [CIR] Comma Operator for ComplexType --- clang/lib/CIR/Cod

[clang] [clang][bytecode] Add back missing initialize call (PR #146589)

2025-07-01 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/146589 This was only accidentally dropped, so add it back. >From 6cf4ca471adacf319acf1fb73e60f664540ac88e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 1 Jul 2025 20:46:18 +0200 Subject: [PA

[clang-tools-extra] [clang-tidy] add modernize-use-constexpr check (PR #146553)

2025-07-01 Thread Julian Schmidt via cfe-commits
5chmidti wrote: Sorry for the silly docs mistakes, btw. I've updated the docs, added replacement string options, and fixed the `const` keyword removal. https://github.com/llvm/llvm-project/pull/146553 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [clang-tools-extra] [clang][modules] Serialize `CodeGenOptions` (PR #146422)

2025-07-01 Thread Ben Langmuir via cfe-commits
@@ -1181,8 +1183,9 @@ class Preprocessor { public: Preprocessor(const PreprocessorOptions &PPOpts, DiagnosticsEngine &diags, - const LangOptions &LangOpts, SourceManager &SM, - HeaderSearch &Headers, ModuleLoader &TheModuleLoader, +

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2025-07-01 Thread via cfe-commits
https://github.com/pizzud updated https://github.com/llvm/llvm-project/pull/67467 >From 04a3e8d8cbd6943f44a81fddb0524902202a1a78 Mon Sep 17 00:00:00 2001 From: David Pizzuto Date: Tue, 26 Sep 2023 10:45:42 -0700 Subject: [PATCH 01/21] [clang-tidy] Add bugprone-move-shared-pointer-contents chec

[clang-tools-extra] [clang-tidy] add modernize-use-constexpr check (PR #146553)

2025-07-01 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,562 @@ +// RUN: %check_clang_tidy -std=c++11 -check-suffix=11 %s misc-use-constexpr %t -- -- -fno-delayed-template-parsing +// RUN: %check_clang_tidy -std=c++14 -check-suffix=11,14 %s misc-use-constexpr %t -- -- -fno-delayed-template-parsing +// RUN: %check_clang_tidy

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-07-01 Thread Alon Zakai via cfe-commits
@@ -165,14 +165,17 @@ void Writer::createCustomSections() { for (auto &pair : customSectionMapping) { StringRef name = pair.first; LLVM_DEBUG(dbgs() << "createCustomSection: " << name << "\n"); - -OutputSection *sec = make(std::string(name), pair.second); +Out

[clang] [Analysis] Remove an unnecessary cast (NFC) (PR #146547)

2025-07-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: Kazu Hirata (kazutakahirata) Changes ME is already of ObjCMessageExpr *. --- Full diff: https://github.com/llvm/llvm-project/pull/146547.diff 1 Files Affected: - (modified) clang/lib/Analysis/CFG.cpp (+1-2) ``diff d

[clang] [clang][Sema] Suggest/Hint Standard Library Include File (PR #146227)

2025-07-01 Thread via cfe-commits
@@ -3613,6 +3613,16 @@ class Sema final : public SemaBase { ParsedType &SuggestedType, bool IsTemplateName = false); + // Try to suggest the missing standard library include files + // + // \param SymbolName the

[clang] [clang][Sema] Suggest/Hint Standard Library Include File (PR #146227)

2025-07-01 Thread via cfe-commits
@@ -554,6 +563,11 @@ bool Parser::ParseOptionalCXXScopeSpecifier( break; } + if (FailedNesatedNameBuilding && Tok.getKind() == tok::identifier) { Mr-Anyone wrote: I completed agree with you for the fact that this is really ugly code here. The problem

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-07-01 Thread Yuri Iozzelli via cfe-commits
https://github.com/yuri91 edited https://github.com/llvm/llvm-project/pull/146230 ___ 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-01 Thread Ricardo Jesus via cfe-commits
@@ -179,22 +179,39 @@ StringRef sys::detail::getHostCPUNameForARM(StringRef ProcCpuinfoContent) { // Look for the CPU implementer line. StringRef Implementer; StringRef Hardware; - StringRef Part; + SmallVector Parts; for (unsigned I = 0, E = Lines.size(); I != E; +

[clang] [Analysis] Remove an unnecessary cast (NFC) (PR #146547)

2025-07-01 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/146547 ME is already of ObjCMessageExpr *. >From e0f784569b26f2a8dd52fb73c1fd142f2d37ca1b Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Tue, 1 Jul 2025 07:49:58 -0700 Subject: [PATCH] [Analysis] Remove an u

[clang-tools-extra] [clang-tidy] add misc-constexpr check (PR #146553)

2025-07-01 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: misc-use-constexpr? :) https://github.com/llvm/llvm-project/pull/146553 ___ 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 misc-constexpr check (PR #146553)

2025-07-01 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,562 @@ +// RUN: %check_clang_tidy -std=c++11 -check-suffix=11 %s misc-use-constexpr %t -- -- -fno-delayed-template-parsing +// RUN: %check_clang_tidy -std=c++14 -check-suffix=11,14 %s misc-use-constexpr %t -- -- -fno-delayed-template-parsing +// RUN: %check_clang_tidy

[clang] [llvm] [mlir] [debuginfo][coro] Emit debug info labels for coroutine resume points (PR #141937)

2025-07-01 Thread Paul T Robinson via cfe-commits
@@ -2344,11 +2344,15 @@ void ModuleBitcodeWriter::writeDILocalVariable( void ModuleBitcodeWriter::writeDILabel( const DILabel *N, SmallVectorImpl &Record, unsigned Abbrev) { - Record.push_back((uint64_t)N->isDistinct()); + uint64_t IsArtificialFlag = uint64_t(N->isArt

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

2025-07-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Daniel Paoliello (dpaoliello) Changes There is no way in Arm64 Windows to indicate that a given function has used the Frame Pointer as a General Purpose Register, as such stack walks will always assume that the frame chain is valid

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

2025-07-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Daniel Paoliello (dpaoliello) Changes There is no way in Arm64 Windows to indicate that a given function has used the Frame Pointer as a General Purpose Register, as such stack walks will always assume that the frame chain is valid and wi

[clang-tools-extra] [clang-tidy] add misc-constexpr check (PR #146553)

2025-07-01 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: I'm ok with modernize-use-constexpr as well! https://github.com/llvm/llvm-project/pull/146553 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [debuginfo][coro] Emit debug info labels for coroutine resume points (PR #141937)

2025-07-01 Thread Paul T Robinson via cfe-commits
@@ -0,0 +1,148 @@ +; Tests that we add DILabels for the suspend points. +; +; We check both the generated LLVM: +; RUN: opt < %s -passes='cgscc(coro-split)' -S | FileCheck %s +; +; And the debug info: +; RUN: opt < %s -passes='cgscc(coro-split),coro-cleanup' \ +; RUN: | llc -O0

[clang] [llvm] [mlir] [debuginfo][coro] Emit debug info labels for coroutine resume points (PR #141937)

2025-07-01 Thread Paul T Robinson via cfe-commits
@@ -1478,6 +1479,18 @@ struct SwitchCoroutineSplitter { static void createResumeEntryBlock(Function &F, coro::Shape &Shape) { LLVMContext &C = F.getContext(); +DIBuilder DBuilder(*F.getParent(), /*AllowUnresolved*/ false); +DISubprogram *DIS = F.getSubprogram();

[clang] [llvm] [mlir] [debuginfo][coro] Emit debug info labels for coroutine resume points (PR #141937)

2025-07-01 Thread Paul T Robinson via cfe-commits
@@ -6975,16 +6975,22 @@ appear in the included source file. DILabel """ -``DILabel`` nodes represent labels within a :ref:`DISubprogram`. All fields of -a ``DILabel`` are mandatory. The ``scope:`` field must be one of either a -:ref:`DILexicalBlockFile`, a :ref:`DILexicalB

[clang] [llvm] [mlir] [debuginfo][coro] Emit debug info labels for coroutine resume points (PR #141937)

2025-07-01 Thread Paul T Robinson via cfe-commits
@@ -0,0 +1,148 @@ +; Tests that we add DILabels for the suspend points. +; +; We check both the generated LLVM: +; RUN: opt < %s -passes='cgscc(coro-split)' -S | FileCheck %s +; +; And the debug info: +; RUN: opt < %s -passes='cgscc(coro-split),coro-cleanup' \ +; RUN: | llc -O0

[clang] [llvm] [mlir] [debuginfo][coro] Emit debug info labels for coroutine resume points (PR #141937)

2025-07-01 Thread Paul T Robinson via cfe-commits
@@ -2240,14 +2242,28 @@ Error MetadataLoader::MetadataLoaderImpl::parseOneMetadata( break; } case bitc::METADATA_LABEL: { -if (Record.size() != 5) +if (Record.size() < 5 || Record.size() > 7) return error("Invalid record"); IsDistinct = Record[0]

[clang] [llvm] [mlir] [debuginfo][coro] Emit debug info labels for coroutine resume points (PR #141937)

2025-07-01 Thread Paul T Robinson via cfe-commits
@@ -688,9 +688,9 @@ static DIType *solveDIType(DIBuilder &Builder, Type *Ty, static void buildFrameDebugInfo(Function &F, coro::Shape &Shape, FrameDataInfo &FrameData) { DISubprogram *DIS = F.getSubprogram(); - // If there is no DISubprogram f

  1   2   3   4   5   >