[clang] [llvm] [PowerPC] Add BCDCOPYSIGN and BCDSETSIGN Instruction Support (PR #144874)

2025-07-30 Thread Tony Varghese via cfe-commits
https://github.com/tonykuttai edited https://github.com/llvm/llvm-project/pull/144874 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang[ExprConst] Remove Loc param (PR #151461)

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

[clang] [CIR] Fix fallthrough warning (PR #151418)

2025-07-30 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/151418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

[clang] 3466cdb - [clang][CodeComplete] skip explicit obj param when creating signature string (#146649)

2025-07-30 Thread via cfe-commits
Author: Mythreya Kuricheti Date: 2025-07-31T02:12:25-04:00 New Revision: 3466cdb76944022d17a45fa66edd275bcd3a68d1 URL: https://github.com/llvm/llvm-project/commit/3466cdb76944022d17a45fa66edd275bcd3a68d1 DIFF: https://github.com/llvm/llvm-project/commit/3466cdb76944022d17a45fa66edd275bcd3a68d1.

[clang] [clang][sema] Remove unused local SourceLocation (PR #151455)

2025-07-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes getIntegerConstantExpr() doesn't force us to pass one, so don't. --- Full diff: https://github.com/llvm/llvm-project/pull/151455.diff 1 Files Affected: - (modified) clang/lib/Sema/SemaChecking.cpp (+1-3)

[clang] [clang][sema] Remove unused local SourceLocation (PR #151455)

2025-07-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/151455 getIntegerConstantExpr() doesn't force us to pass one, so don't. >From b17b17be089708f851c8aa2c643b9969a041a064 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 31 Jul 2025 07:53:22 +020

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

2025-07-30 Thread Mythreya Kuricheti via cfe-commits
@@ -6,9 +6,21 @@ int main() { A a {}; a. } -// RUN: %clang_cc1 -cc1 -fsyntax-only -code-completion-at=%s:%(line-2):5 -std=c++23 %s | FileCheck %s -// CHECK: COMPLETION: A : A:: -// CHECK-NEXT: COMPLETION: foo : [#void#]foo(<#int arg#>) -// CHECK-NEXT: COMPLETION: operator=

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

2025-07-30 Thread Mythreya Kuricheti via cfe-commits
https://github.com/MythreyaK updated https://github.com/llvm/llvm-project/pull/146649 >From 816845b3402afc67acf641778dd7f937d9b1dc53 Mon Sep 17 00:00:00 2001 From: Mythreya Kuricheti Date: Wed, 2 Jul 2025 01:26:25 -0700 Subject: [PATCH 1/5] [clang][CodeComplete] skip explicit obj param in Sign

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

2025-07-30 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/146649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-07-30 Thread Nathan Ridge via cfe-commits
@@ -4369,14 +4419,24 @@ TEST(CompletionTest, SkipExplicitObjectParameter) { Annotations Code(R"cpp( struct A { void foo(this auto&& self, int arg); + void bar(this A self, int arg); }; int main() { A a {}; - a.^ + a.$c1^; + (&

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

2025-07-30 Thread Nathan Ridge via cfe-commits
@@ -3267,6 +3267,56 @@ TEST(SignatureHelpTest, VariadicType) { } } +TEST(SignatureHelpTest, SkipExplicitObjectParameter) { + Annotations Code(R"cpp( +struct A { + void foo(this auto&& self, int arg); + void bar(this A self, int arg); +}; +int main() {

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

2025-07-30 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. Thanks -- I think this looks pretty good! https://github.com/llvm/llvm-project/pull/146649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[libclc] [libclc] Move mem_fence and barrier to clc library (PR #151446)

2025-07-30 Thread Wenju He via cfe-commits
https://github.com/wenju-he updated https://github.com/llvm/llvm-project/pull/151446 >From eed56d228c0613f563c23f9be23d681ef3d87f2b Mon Sep 17 00:00:00 2001 From: Wenju He Date: Thu, 31 Jul 2025 05:07:23 +0200 Subject: [PATCH 1/2] [libclc] Move mem_fence and barrier to clc library __clc_mem_fe

[clang] [Clang-Repl] Add custom function as lambda in launchExecutor and fetch PID of launched executor (PR #147478)

2025-07-30 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 approved this pull request. Looks okay to me, let's see what other reviewers have to say. https://github.com/llvm/llvm-project/pull/147478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [Clang-Repl] Add custom function as lambda in launchExecutor and fetch PID of launched executor (PR #147478)

2025-07-30 Thread Abhinav Kumar via cfe-commits
https://github.com/kr-2003 ready_for_review https://github.com/llvm/llvm-project/pull/147478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang-Repl] Add custom function as lambda in launchExecutor and fetch PID of launched executor (PR #147478)

2025-07-30 Thread Abhinav Kumar via cfe-commits
https://github.com/kr-2003 edited https://github.com/llvm/llvm-project/pull/147478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Fix diagnostics for int128 enums (PR #151340)

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

[clang] 1b9ee0b - [clang][bytecode] Fix diagnostics for int128 enums (#151340)

2025-07-30 Thread via cfe-commits
Author: Timm Baeder Date: 2025-07-31T05:59:17+02:00 New Revision: 1b9ee0bb74f23e48076d97267171cb92c3f63658 URL: https://github.com/llvm/llvm-project/commit/1b9ee0bb74f23e48076d97267171cb92c3f63658 DIFF: https://github.com/llvm/llvm-project/commit/1b9ee0bb74f23e48076d97267171cb92c3f63658.diff L

[clang] [CIR] Fix fallthrough warning (PR #151418)

2025-07-30 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper approved this pull request. LGTM, Thanks https://github.com/llvm/llvm-project/pull/151418 ___ 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 'enable-check-profiling' with aggregated results to 'run-clang-tidy' (PR #151011)

2025-07-30 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/151011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] NFC: Clean up construction of IntrusiveRefCntPtr from raw pointers for llvm::vfs::FileSystem. (PR #151407)

2025-07-30 Thread Jonas Devlieghere via cfe-commits
https://github.com/JDevlieghere approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/151407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CodeGen][AArch64] ptrauth intrinsic to safely construct relative ptr (PR #142047)

2025-07-30 Thread Abhay Kanhere via cfe-commits
https://github.com/AbhayKanhere updated https://github.com/llvm/llvm-project/pull/142047 >From 0ab5d47bfdb77d8e6870e6f80714790f0317ad8a Mon Sep 17 00:00:00 2001 From: Abhay Kanhere Date: Wed, 28 May 2025 16:35:05 -0700 Subject: [PATCH] [CodeGen][AArch64] ptrauth intrinsic to safely construct r

[clang] [CodeGen][counted_by] See past parentheses and no-op casts (PR #151266)

2025-07-30 Thread Bill Wendling via cfe-commits
@@ -471,3 +471,80 @@ size_t test9(struct annotated_sized_ptr *p, int index) { size_t test10(struct annotated_sized_ptr *p, int index) { return __bdos(&((unsigned int *) p->buf)[index]); } + +struct pr151236_struct { +int *a __counted_by(a_count); +short a_coun

[clang] [CIR] Fix warnings related to unused variables in release builds (PR #151412)

2025-07-30 Thread Andy Kaylor via cfe-commits
@@ -80,12 +80,12 @@ mlir::LogicalResult CIRGenFunction::emitStmt(const Stmt *s, #include "clang/AST/StmtNodes.inc" { // Remember the block we came in on. - mlir::Block *incoming = builder.getInsertionBlock(); + [[maybe_unused]] mlir::Block *incoming = builde

[clang] [CIR] Fix warnings related to unused variables in release builds (PR #151412)

2025-07-30 Thread Andy Kaylor via cfe-commits
@@ -1472,9 +1472,10 @@ Address CIRGenFunction::emitArrayToPointerDecay(const Expr *e) { if (e->getType()->isVariableArrayType()) return addr; - auto pointeeTy = mlir::cast(lvalueAddrTy.getPointee()); + [[maybe_unused]] auto pointeeTy = andykaylor wrot

[clang] [CIR] Fix warnings related to unused variables in release builds (PR #151412)

2025-07-30 Thread Andy Kaylor via cfe-commits
@@ -137,7 +137,7 @@ struct CallArg { /// A data-flow flag to make sure getRValue and/or copyInto are not /// called twice for duplicated IR emission. - mutable bool isUsed; + [[maybe_unused]] mutable bool isUsed; andykaylor wrote: Ironic, isn't it? htt

[clang] [CIR] Fix warnings related to unused variables in release builds (PR #151412)

2025-07-30 Thread Andy Kaylor via cfe-commits
@@ -216,7 +216,7 @@ void CIRGenFunction::emitAndUpdateRetAlloca(QualType type, mlir::Location loc, void CIRGenFunction::declare(mlir::Value addrVal, const Decl *var, QualType ty, mlir::Location loc, CharUnits alignment,

[clang] [CIR] Fix warnings related to unused variables in release builds (PR #151412)

2025-07-30 Thread Andy Kaylor via cfe-commits
@@ -439,7 +439,7 @@ class ScalarExprEmitter : public StmtVisitor { value = builder.getTrue(cgf.getLoc(e->getExprLoc())); } else if (type->isIntegerType()) { QualType promotedType; - bool canPerformLossyDemotionCheck = false; + [[maybe_unused]] bool ca

[clang] [llvm] Fix windows build failures with MSVC (PR #151414)

2025-07-30 Thread Hiroshi Yamauchi via cfe-commits
https://github.com/hjyamauchi closed https://github.com/llvm/llvm-project/pull/151414 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Fix windows build failures with MSVC (PR #151414)

2025-07-30 Thread Hiroshi Yamauchi via cfe-commits
https://github.com/hjyamauchi created https://github.com/llvm/llvm-project/pull/151414 None error: too big or took too long to generate ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Fix warnings related to unused variables in release builds (PR #151412)

2025-07-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes This fixes a number of warnings in release builds due to variables that were only being used in asserts. Some of these variables will later be used in non-debug code, but for now they are unused in release

[clang] [CIR] Fix warnings related to unused variables in release builds (PR #151412)

2025-07-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes This fixes a number of warnings in release builds due to variables that were only being used in asserts. Some of these variables will later be used in non-debug code, but for now they are unused in relea

[clang] [CIR] Fix warnings related to unused variables in release builds (PR #151412)

2025-07-30 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/151412 This fixes a number of warnings in release builds due to variables that were only being used in asserts. Some of these variables will later be used in non-debug code, but for now they are unused in release b

[clang] [llvm] [llvm] Extract and propagate callee_type metadata (PR #87575)

2025-07-30 Thread Prabhu Rajasekaran via cfe-commits
https://github.com/Prabhuk closed https://github.com/llvm/llvm-project/pull/87575 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add template argument support for {con,de}structor attributes. (PR #151400)

2025-07-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: None (tynasello) Changes Fixes: https://github.com/llvm/llvm-project/issues/67154 {Con, De}structor attributes in Clang only work with integer priorities (inconsistent with GCC). This commit adds support

[clang] [Clang] Add template argument support for {con,de}structor attributes. (PR #151400)

2025-07-30 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [Clang] Add template argument support for {con,de}structor attributes. (PR #151400)

2025-07-30 Thread via cfe-commits
https://github.com/tynasello created https://github.com/llvm/llvm-project/pull/151400 Fixes: https://github.com/llvm/llvm-project/issues/67154 {Con, De}structor attributes in Clang only work with integer priorities (inconsistent with GCC). This commit adds support to these attributes for temp

[clang-tools-extra] [clang-tidy][NFC] Enable `readability-avoid-return-with-void-value` check in the codebase (PR #151356)

2025-07-30 Thread Baranov Victor via cfe-commits
@@ -577,19 +579,26 @@ void NarrowingConversionsCheck::handleImplicitCast( SourceLocation SourceLoc = Lhs.getExprLoc(); switch (Cast.getCastKind()) { case CK_BooleanToSignedIntegral: -return handleBooleanToSignedIntegral(Context, SourceLoc, Lhs, Rhs); +handleBoolea

[clang-tools-extra] [clang-tidy][NFC] Enable `readability-avoid-return-with-void-value` check in the codebase (PR #151356)

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

[clang-tools-extra] [clang-tidy][NFC] Enable `readability-avoid-return-with-void-value` check in the codebase (PR #151356)

2025-07-30 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. Thank you for working on this! LGTM with couple nits https://github.com/llvm/llvm-project/pull/151356 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [llvm] [AMDGPU] Add V_ASHR_PK_I8_I32 and V_ASHR_PK_U8_I32 on gfx1250 (PR #151389)

2025-07-30 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec edited https://github.com/llvm/llvm-project/pull/151389 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Add gfx1250 v_cvt_sr_pk_bf16_f32 instruction (PR #151385)

2025-07-30 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec closed https://github.com/llvm/llvm-project/pull/151385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 62187a6 - [AMDGPU] Add gfx1250 v_cvt_sr_pk_bf16_f32 instruction (#151385)

2025-07-30 Thread via cfe-commits
Author: Stanislav Mekhanoshin Date: 2025-07-30T14:02:03-07:00 New Revision: 62187a60e61017c3a453bb138d27f9bdda27879d URL: https://github.com/llvm/llvm-project/commit/62187a60e61017c3a453bb138d27f9bdda27879d DIFF: https://github.com/llvm/llvm-project/commit/62187a60e61017c3a453bb138d27f9bdda2787

[clang] [clang-tools-extra] [clang]: Support `analyzer_noreturn` attribute in `CFG` (PR #150952)

2025-07-30 Thread Andrey Karlov via cfe-commits
https://github.com/negativ updated https://github.com/llvm/llvm-project/pull/150952 >From 417b4e465744f9a1d1704c87da4587626c9f5411 Mon Sep 17 00:00:00 2001 From: Andrey Karlov Date: Mon, 28 Jul 2025 16:23:21 +0300 Subject: [PATCH 1/2] Initial implementation --- .../bugprone/unchecked-optional

[clang] [llvm] [WebAssembly] Add gc target feature to addBleedingEdgeFeatures (PR #151294)

2025-07-30 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin approved this pull request. What was the cause for the yesterday's error? https://github.com/llvm/llvm-project/pull/151294 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [CIR] Upstream Unary Plus & Minus op for ComplexType (PR #150281)

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

[clang] 953be42 - [CIR] Upstream Unary Plus & Minus op for ComplexType (#150281)

2025-07-30 Thread via cfe-commits
Author: Amr Hesham Date: 2025-07-30T21:18:35+02:00 New Revision: 953be42e407593b5c5dd17283e2b0f8f7f7f4d6d URL: https://github.com/llvm/llvm-project/commit/953be42e407593b5c5dd17283e2b0f8f7f7f4d6d DIFF: https://github.com/llvm/llvm-project/commit/953be42e407593b5c5dd17283e2b0f8f7f7f4d6d.diff LO

[clang-tools-extra] [clang-tidy] Add modernize-make-direct check (PR #118120)

2025-07-30 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp edited https://github.com/llvm/llvm-project/pull/118120 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Analysis] Prevent revisiting block when searching for noreturn vars (PR #150582)

2025-07-30 Thread Paul Osmialowski via cfe-commits
pawosm-arm wrote: This bug affect release/21.x too, so this commit must be cherry-picked https://github.com/llvm/llvm-project/pull/150582 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [Analysis] Prevent revisiting block when searching for noreturn vars (PR #150582)

2025-07-30 Thread Paul Osmialowski via cfe-commits
pawosm-arm wrote: /cherry-pick 330b40e11fd20e9a29b9c24de17e4ba23afeedc6 https://github.com/llvm/llvm-project/pull/150582 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Analysis] Prevent revisiting block when searching for noreturn vars (PR #150582)

2025-07-30 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm milestoned https://github.com/llvm/llvm-project/pull/150582 ___ 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-make-direct check (PR #118120)

2025-07-30 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp requested changes to this pull request. Couple of minor changes. I'm not convinced about the name of the check, `make-function-to-direct` does not really say much. What is a "make function" and what is "direct"? Would it make sense to call it `modernize-use-cta

[clang] [analyzer] Retain address space information in getElementRegion (PR #151370)

2025-07-30 Thread via cfe-commits
https://github.com/vabridgers approved this pull request. LGTM, thanks for PR! https://github.com/llvm/llvm-project/pull/151370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream Unary Plus & Minus op for ComplexType (PR #150281)

2025-07-30 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/150281 ___ 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-make-direct check (PR #118120)

2025-07-30 Thread Carlos Galvez via cfe-commits
@@ -0,0 +1,46 @@ +.. title:: clang-tidy - modernize-make-direct + +modernize-make-direct += + +Replaces ``std::make_*`` function calls with direct constructor calls using class template +argument deduction (CTAD). + +==

[clang] [analyzer] Fix getElementRegion to retain address space information (PR #151249)

2025-07-30 Thread via cfe-commits
https://github.com/vabridgers closed https://github.com/llvm/llvm-project/pull/151249 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix getElementRegion to retain address space information (PR #151249)

2025-07-30 Thread via cfe-commits
https://github.com/vabridgers dismissed https://github.com/llvm/llvm-project/pull/151249 ___ 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-make-direct check (PR #118120)

2025-07-30 Thread Carlos Galvez via cfe-commits
@@ -0,0 +1,46 @@ +.. title:: clang-tidy - modernize-make-direct + +modernize-make-direct += + +Replaces ``std::make_*`` function calls with direct constructor calls using class template +argument deduction (CTAD). + +==

[clang] [Sema] Fix -Wunreachable-code false negative when operands differ only by implicit casts (PR #149972)

2025-07-30 Thread M. Zeeshan Siddiqui via cfe-commits
codemzs wrote: > > @AaronBallman @yronglin Thank you for the review. I don't have write > > permissions, can one of you please sign-off and push the change for me? > > Thanks! > > Sure! Could you add a release notes(in clang/docs/ReleaseNotes.rst Bug Fixes > in This Version section)? You can

[clang] [Sema] Fix -Wunreachable-code false negative when operands differ only by implicit casts (PR #149972)

2025-07-30 Thread M. Zeeshan Siddiqui via cfe-commits
https://github.com/codemzs edited https://github.com/llvm/llvm-project/pull/149972 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] disallow # operators in attribute argument lists (PR #147308)

2025-07-30 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > 1 nit on the release note, else this LGTM. > > We still need to let Aaron decide how long we are going to give WG21 a chance > to change this :) CC @hubert-reinterpretcast for other opinions. My reading of the CWG thread is that Core seems to think this should be rejecte

[clang] [CIR] Add vptr type and generate vptr field when needed (PR #151377)

2025-07-30 Thread Andy Kaylor via cfe-commits
andykaylor wrote: Corresponding changes at https://github.com/llvm/clangir/pull/1745 show how I intend to use this type. https://github.com/llvm/llvm-project/pull/151377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [CIR] Add vptr type and generate vptr field when needed (PR #151377)

2025-07-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes This adds a new CIR type, cir.vptr, and generates a field of that type when a record is declared that requires a vptr member. --- Full diff: https://github.com/llvm/llvm-project/pull/151377.diff 4 Files

[clang] [CIR] Add vptr type and generate vptr field when needed (PR #151377)

2025-07-30 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/151377 This adds a new CIR type, cir.vptr, and generates a field of that type when a record is declared that requires a vptr member. >From e6a0352f42818a13ece66f505d6cb107cb3dea0e Mon Sep 17 00:00:00 2001 From: And

[clang] [analyzer] Retain address space information in getElementRegion (PR #151370)

2025-07-30 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/151370 The factory method `MemRegionManager::getElementRegion()` is the main way of constructing `ElementRegion` objects, which are widespread in the analysis and may represent array elements (as lvalues), pointer a

[clang] [CIR] Upstream MulOp for ComplexType (PR #150834)

2025-07-30 Thread Amr Hesham via cfe-commits
@@ -0,0 +1,325 @@ +// complex-range basic +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -complex-range=basic -Wno-unused-value -fclangir -emit-cir -mmlir --mlir-print-ir-before=cir-canonicalize -o %t.cir %s 2>&1 | FileCheck --check-prefix=CIR-BEFORE-BASIC %s +/

[clang] [CIR] Upstream MulOp for ComplexType (PR #150834)

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

[clang] [Sema] Fix -Wunreachable-code false negative when operands differ only by implicit casts (PR #149972)

2025-07-30 Thread M. Zeeshan Siddiqui via cfe-commits
https://github.com/codemzs updated https://github.com/llvm/llvm-project/pull/149972 >From c97467c8adefbf494f673d88a7e9806f7ac74827 Mon Sep 17 00:00:00 2001 From: Zeeshan Siddiqui Date: Tue, 22 Jul 2025 06:37:54 + Subject: [PATCH] [Sema] Make incorrect-logic operator check cast-agnostic The

[clang] [clang-tools-extra] [Clang] [Diagnostics] Add a new text diagnostics format that supports nested diagnostics (PR #151234)

2025-07-30 Thread via cfe-commits
Sirraide wrote: > Thank you for working on this, I think it's a really cool improvement! > However, I think it probably also needs an RFC to get more community buy-in, > would you mind posting one (the content of the patch summary would suffice)? Yeah, if a pr’s description gets this long it p

[clang] [llvm] [CodeGen][AArch64] ptrauth intrinsic to safely construct relative ptr (PR #142047)

2025-07-30 Thread Abhay Kanhere via cfe-commits
https://github.com/AbhayKanhere updated https://github.com/llvm/llvm-project/pull/142047 >From c9d478a056fae873fd925f4df76189c4158fee8c Mon Sep 17 00:00:00 2001 From: Abhay Kanhere Date: Wed, 28 May 2025 16:35:05 -0700 Subject: [PATCH 1/2] [CodeGen][AArch64] ptrauth intrinsic to safely construc

[clang] [CIR] Add CIRGen for cir.unreachable and cir.trap (PR #151363)

2025-07-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Sirui Mu (Lancern) Changes This patch adds CIRGen support for `cir.unreachable` and `cir.trap`. It also adds missing LLVM lowering code for `cir.unreachable`. --- Full diff: https://github.com/llvm/llvm-project/pull/151363.diff 6 File

[clang] [CIR] Add CIRGen for cir.unreachable and cir.trap (PR #151363)

2025-07-30 Thread Sirui Mu via cfe-commits
https://github.com/Lancern created https://github.com/llvm/llvm-project/pull/151363 This patch adds CIRGen support for `cir.unreachable` and `cir.trap`. It also adds missing LLVM lowering code for `cir.unreachable`. >From 22fd4328f0b5695de47e001f135a92416c38bfbf Mon Sep 17 00:00:00 2001 From:

[clang] [Clang][Driver] Revise Cygwin ToolChain to call linker directly (PR #147960)

2025-07-30 Thread via cfe-commits
@@ -107,3 +110,282 @@ void Cygwin::AddClangSystemIncludeArgs(const ArgList &DriverArgs, addExternCSystemInclude(DriverArgs, CC1Args, SysRoot + "/usr/include"); addExternCSystemInclude(DriverArgs, CC1Args, SysRoot + "/usr/include/w32api"); } + +void cygwin::Linker::Constru

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-07-30 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > Oh excuse me, there's currently no target-specific behaviour. I missed the > HasFallback in HasFallback only applies to the two-argument form. I don't have a strong opinion about the names. The whole "fallback behavior" thing was written back in the early

[clang] [llvm] [CodeGen][AArch64] ptrauth intrinsic to safely construct relative ptr (PR #142047)

2025-07-30 Thread Abhay Kanhere via cfe-commits
@@ -4643,6 +4643,12 @@ def PtrauthAuthAndResign : Builtin { let Prototype = "void*(void*,int,void*,int,void*)"; } +def PtrauthAuthLoadRelativeAndSign : Builtin { + let Spellings = ["__builtin_ptrauth_auth_load_relative_and_sign"]; + let Attributes = [CustomTypeChecking, No

[clang] [llvm] [CodeGen][AArch64] ptrauth intrinsic to safely construct relative ptr (PR #142047)

2025-07-30 Thread Abhay Kanhere via cfe-commits
@@ -259,78 +284,6 @@ typedef __UINTPTR_TYPE__ ptrauth_generic_signature_t; /* The value is ptrauth_string_discriminator("init_fini") */ #define __ptrauth_init_fini_discriminator 0xd9d4 -#else - -#define ptrauth_strip(__value, __key) \

[clang] [llvm] [CodeGen][AArch64] ptrauth intrinsic to safely construct relative ptr (PR #142047)

2025-07-30 Thread Abhay Kanhere via cfe-commits
https://github.com/AbhayKanhere updated https://github.com/llvm/llvm-project/pull/142047 >From c9d478a056fae873fd925f4df76189c4158fee8c Mon Sep 17 00:00:00 2001 From: Abhay Kanhere Date: Wed, 28 May 2025 16:35:05 -0700 Subject: [PATCH 1/2] [CodeGen][AArch64] ptrauth intrinsic to safely construc

[clang] 2cf15a1 - Silence a not all control paths return a value warning; NFC

2025-07-30 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2025-07-30T13:00:06-04:00 New Revision: 2cf15a1a54fc45659f667113379891e6c06ce50a URL: https://github.com/llvm/llvm-project/commit/2cf15a1a54fc45659f667113379891e6c06ce50a DIFF: https://github.com/llvm/llvm-project/commit/2cf15a1a54fc45659f667113379891e6c06ce50a.diff

[clang] [clang] Implement -Walloc-size diagnostic option (PR #150028)

2025-07-30 Thread Aaron Ballman via cfe-commits
@@ -3542,6 +3542,59 @@ bool CallExpr::isBuiltinAssumeFalse(const ASTContext &Ctx) const { Arg->EvaluateAsBooleanCondition(ArgVal, Ctx) && !ArgVal; } +const AllocSizeAttr *CallExpr::getAllocSizeAttr() const { + if (const FunctionDecl *DirectCallee = getDirectCallee()

[clang] [clang] Implement -Walloc-size diagnostic option (PR #150028)

2025-07-30 Thread Aaron Ballman via cfe-commits
@@ -7818,6 +7819,35 @@ ExprResult Sema::CheckExtVectorCast(SourceRange R, QualType DestTy, return prepareVectorSplat(DestTy, CastExpr); } +/// Check that a call to alloc_size function specifies sufficient space for the +/// destination type. +static void CheckSufficientAllo

[clang] [clang] Implement -Walloc-size diagnostic option (PR #150028)

2025-07-30 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,40 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Walloc-size %s +struct Foo { int x[10]; }; + +typedef __typeof__(sizeof(int)) size_t; +void *my_malloc(size_t) __attribute__((alloc_size(1))); +void *my_calloc(size_t, size_t) __attribute__((alloc_size(2, 1))); + +void fo

[clang] [clang] Implement -Walloc-size diagnostic option (PR #150028)

2025-07-30 Thread Aaron Ballman via cfe-commits
@@ -932,6 +932,20 @@ An example of how to use ``alloc_size`` assert(__builtin_object_size(a, 0) == 100); } +When ``-Walloc-size`` is enabled, this attribute allows the compiler to +diagnose cases when the allocated memory is insufficient for the size of the +type the ret

[clang] [clang][Modules] Reporting Errors for Duplicating Link Declarations in `modulemap`s (PR #148959)

2025-07-30 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Gentle ping for review. Thanks! https://github.com/llvm/llvm-project/pull/148959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][RISCV] Fix clang dwarf info generation for unprtototyped function (PR #150022)

2025-07-30 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Having checks for different optimization levels and DWARF versions is probably fine... but a lot of those checks overlap with clang/test/CodeGenCXX/dbg-info-all-calls-described.cpp . Explicitly checking RV32 vs RV64 seems unproductive; this code isn't target-specific. ht

[clang] [clang-format] Disable IntegerLiteralSeparator for C++ before c++14 (PR #151273)

2025-07-30 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#151362 https://github.com/llvm/llvm-project/pull/151273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] Add diagnostic for 'factor' width mismatch in 'unroll partial' (PR #139986)

2025-07-30 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: > In the current implementation I switched to using OrigVar->getType() to get > the variable’s Type. Now getTypeSize() correctly returns 8 bits for char, 16 > for short, 64 for long, etc. That means code like now rejects, whereas it > used to compile. I think it should be

[clang] [HLSL] fix D3DCOLORtoUBYTE4 return type to be int (PR #151353)

2025-07-30 Thread Deric C. via cfe-commits
https://github.com/Icohedron edited https://github.com/llvm/llvm-project/pull/151353 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Do not warn about class methods with libc function names (PR #151270)

2025-07-30 Thread David Tarditi via cfe-commits
dtarditi wrote: I agree that we should probably check for the function being in the global scope or the `std` namespace. I think you can use `isGlobal` and `isStdNamespace` (in Decl.h and DeclBase.h respectively) to do those checks. https://github.com/llvm/llvm-project/pull/151270

[clang] [CIR] Add folders for bit manipulation operations (PR #150235)

2025-07-30 Thread Mingye Wang via cfe-commits
@@ -0,0 +1,129 @@ +// RUN: cir-opt -cir-canonicalize -cir-simplify -o %t.cir %s +// RUN: FileCheck --input-file=%t.cir %s + +!s32i = !cir.int +!u32i = !cir.int + +module { + cir.func @fold_clrsb() -> !s32i { +%0 = cir.const #cir.int<114514> : !s32i Artoria2e5

[clang] [HLSL] fix D3DCOLORtoUBYTE4 return type to be int (PR #151353)

2025-07-30 Thread Deric C. via cfe-commits
https://github.com/Icohedron edited https://github.com/llvm/llvm-project/pull/151353 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Disable IntegerLiteralSeparator for C++ before c++14 (PR #151273)

2025-07-30 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick 5fc482cfc0fa70c98e14d64d83dffbf7da03c303 https://github.com/llvm/llvm-project/pull/151273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] fix D3DCOLORtoUBYTE4 return type to be int (PR #151353)

2025-07-30 Thread Deric C. via cfe-commits
@@ -12,7 +12,7 @@ namespace hlsl { namespace __detail { -constexpr vector d3d_color_to_ubyte4_impl(vector V) { +constexpr vector d3d_color_to_ubyte4_impl(vector V) { Icohedron wrote: ```suggestion constexpr vector d3d_color_to_ubyte4_impl(float4 V) { ``` Why

[clang] [HLSL] fix D3DCOLORtoUBYTE4 return type to be int (PR #151353)

2025-07-30 Thread Deric C. via cfe-commits
https://github.com/Icohedron approved this pull request. https://github.com/llvm/llvm-project/pull/151353 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Disable IntegerLiteralSeparator for C++ before c++14 (PR #151273)

2025-07-30 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/151273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5fc482c - [clang-format] Disable IntegerLiteralSeparator for C++ before c++14 (#151273)

2025-07-30 Thread via cfe-commits
Author: Owen Pan Date: 2025-07-30T09:43:46-07:00 New Revision: 5fc482cfc0fa70c98e14d64d83dffbf7da03c303 URL: https://github.com/llvm/llvm-project/commit/5fc482cfc0fa70c98e14d64d83dffbf7da03c303 DIFF: https://github.com/llvm/llvm-project/commit/5fc482cfc0fa70c98e14d64d83dffbf7da03c303.diff LOG:

[clang] [clang-format] Disable IntegerLiteralSeparator for C++ before c++14 (PR #151273)

2025-07-30 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/151273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix getElementRegion to retain address space information (PR #151249)

2025-07-30 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: %clang_analyze_cc1 -triple amdgcn-unknown-unknown \ +// RUN: -analyzer-checker=core,unix.Malloc,debug.ExprInspection -verify \ +// RUN: -Wno-incompatible-pointer-types -Wno-unused-comparison %s + +// expected-no-diagnostics +// +// By default, pointers ar

[clang] [clang-tools-extra] [Clang] [Diagnostics] Add a new text diagnostics format that supports nested diagnostics (PR #151234)

2025-07-30 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Thank you for working on this, I think it's a really cool improvement! However, I think it probably also needs an RFC to get more community buy-in, would you mind posting one (the content of the patch summary would suffice)? CC @cjdb because I know he's interested in this k

[clang] [Clang][Basic] Enable `__has_feature(cfi)` (PR #151348)

2025-07-30 Thread via cfe-commits
@@ -303,6 +303,7 @@ FEATURE(is_trivially_assignable, LangOpts.CPlusPlus) FEATURE(is_trivially_constructible, LangOpts.CPlusPlus) FEATURE(is_trivially_copyable, LangOpts.CPlusPlus) FEATURE(is_union, LangOpts.CPlusPlus) +FEATURE(cfi, LangOpts.Sanitize.hasOneOf(SanitizerKind::CFI)

  1   2   3   4   >