[clang] [CIR] Add OptInfo attribute (PR #146261)

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

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

2025-06-30 Thread Anthony Tran via cfe-commits
https://github.com/anthonyhatran edited https://github.com/llvm/llvm-project/pull/145967 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-06-30 Thread Anthony Tran via cfe-commits
@@ -4051,6 +4139,14 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked, llvm::BasicBlock *&TrapBB = TrapBBs[CheckHandlerID]; + llvm::DILocation *TrapLocation = Builder.getCurrentDebugLocation(); + llvm::StringRef TrapMessage = GetUBSanTrapForHandler(CheckHandlerI

[clang] [libcxx] [clang] [modules] Implement P3618R0: Allow attaching main to the global module (PR #146461)

2025-06-30 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari updated https://github.com/llvm/llvm-project/pull/146461 >From 845f99834c6c9a78c05396a0337051273b1ae138 Mon Sep 17 00:00:00 2001 From: Ashwin Banwari Date: Mon, 30 Jun 2025 20:45:39 -0700 Subject: [PATCH 1/7] Implement P3618R0 --- clang/docs/ReleaseNotes.rst

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

2025-06-30 Thread Anthony Tran via cfe-commits
@@ -0,0 +1,10 @@ +// RUN: %clang_cc1 -triple arm64-apple-macosx14.0.0 -O0 -debug-info-kind=standalone -dwarf-version=5 \ +// RUN: -fsanitize=signed-integer-overflow -fsanitize-trap=signed-integer-overflow -emit-llvm %s -o - | FileCheck %s + +int add_overflow(int a, int b) { + r

[clang] [clang] Mark GlobalAllocationFunctionVisibility as benign. (PR #145654)

2025-06-30 Thread Takuto Ikuta via cfe-commits
atetubou wrote: @cor3ntin @erichkeane could someone take a look at this PR? https://github.com/llvm/llvm-project/pull/145654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Add missing intrinsicis vrgatherei16/vslideup/vslidedown support for Zvfbfmin (PR #146309)

2025-06-30 Thread Jim Lin via cfe-commits
tclin914 wrote: Rebased https://github.com/llvm/llvm-project/pull/146309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Remove Native Client support (PR #133661)

2025-06-30 Thread Fangrui Song via cfe-commits
MaskRay wrote: > > Thanks for working on this! This will be the first time I'm not going to > > oppose an effort to remove Native Client support 🎉 Although I am going to > > ask you to wait a couple of months to land it, until we finally turn it off > > for good and start deleting the support

[clang] [llvm] Non constant size and offset in DWARF (PR #141106)

2025-06-30 Thread Adam Nemet via cfe-commits
anemet wrote: We're also seeing LTO failures with this: https://green.lab.llvm.org/job/llvm.org/job/clang-stage2-Rthinlto/900/ I think that this should be reverted. I also have a small reproducer but unfortunately it requires the Apple linker. https://github.com/llvm/llvm-project/pull/14110

[clang] [libcxx] [clang] [modules] Implement P3618R0: Allow attaching main to the global module (PR #146461)

2025-06-30 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. Sounds good. I'll merge this after the CI gets green. https://github.com/llvm/llvm-project/pull/146461 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [libcxx] [clang] [modules] Implement P3618R0: Allow attaching main to the global module (PR #146461)

2025-06-30 Thread Ashwin Banwari via cfe-commits
@@ -12400,12 +12400,9 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, void Sema::CheckMain(FunctionDecl *FD, const DeclSpec &DS) { // [basic.start.main]p3 - //The main function shall not be declared with a linkage-specification. - if (FD->isExter

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

2025-06-30 Thread Sam Elliott via cfe-commits
@@ -790,6 +790,9 @@ static constexpr DecoderListEntry DecoderList32[]{ {DecoderTableXmipscmov32, {RISCV::FeatureVendorXMIPSCMov}, "MIPS mips.ccmov"}, +{DecoderTableXmipscbop32, + {RISCV::FeatureVendorXMIPSCBOP}, + "MIPS mips.pref"}, le

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2025-06-30 Thread via cfe-commits
cppgent0 wrote: Ubuntu 24.04 installed clang-tidy-19 tried: ``` HeaderFilterRegex: '^(?!/usr/share/arduino/|/opt/arduino/).*' ExcludeHeaderFilterRegex : '/usr/share/arduino/.*|/opt/arduino/.*|.*/Arduino.h|.*/USBAPI.h' SystemHeaders: false ``` Get these warnings: ```-- 5] /usr/share/arduino/hard

[clang] WIP: fix assert in hasInitWithSideEffects (PR #146468)

2025-06-30 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: The change LGTM but I want a test to avoid further regression. https://github.com/llvm/llvm-project/pull/146468 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [libcxx] [clang] [modules] Implement P3618R0: Allow attaching main to the global module (PR #146461)

2025-06-30 Thread Chuanqi Xu via cfe-commits
@@ -12400,12 +12400,9 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, void Sema::CheckMain(FunctionDecl *FD, const DeclSpec &DS) { // [basic.start.main]p3 - //The main function shall not be declared with a linkage-specification. - if (FD->isExter

[clang] [libcxx] [clang] [modules] Implement P3618R0: Allow attaching main to the global module (PR #146461)

2025-06-30 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari updated https://github.com/llvm/llvm-project/pull/146461 >From 845f99834c6c9a78c05396a0337051273b1ae138 Mon Sep 17 00:00:00 2001 From: Ashwin Banwari Date: Mon, 30 Jun 2025 20:45:39 -0700 Subject: [PATCH 1/6] Implement P3618R0 --- clang/docs/ReleaseNotes.rst

[clang] [Sema] Fix lifetime extension for temporaries in range-based for loops in C++23 (PR #145164)

2025-06-30 Thread via cfe-commits
@@ -1341,6 +1341,14 @@ checkExprLifetimeImpl(Sema &SemaRef, const InitializedEntity *InitEntity, } if (IsGslPtrValueFromGslTempOwner && DiagLoc.isValid()) { + +if (SemaRef.getLangOpts().CPlusPlus23) { yronglin wrote: Only update this test

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

2025-06-30 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/146224 >From b671feb6c9bc14bcfe15c420979b2826c8664b80 Mon Sep 17 00:00:00 2001 From: yronglin Date: Sat, 28 Jun 2025 23:58:01 +0800 Subject: [PATCH] [C][Parser] Diagnostic for attribute declaration where statement is

[clang] [CodeGen] Remove unnecessary casts (NFC) (PR #146463)

2025-06-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Kazu Hirata (kazutakahirata) Changes Both of these functions return void. --- Full diff: https://github.com/llvm/llvm-project/pull/146463.diff 2 Files Affected: - (modified) clang/lib/CodeGen/CGStmtOpenMP.cpp (+1-1) - (modifie

[clang] WIP: fix assert in hasInitWithSideEffects (PR #146468)

2025-06-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Henrik G. Olsson (hnrklssn) Changes This fixes another instance of `Assertion failed: (NumCurrentElementsDeserializing == 0 && "should not be called while already deserializing")`. I ran into it while importing clang modules from Swift,

[clang] WIP: fix assert in hasInitWithSideEffects (PR #146468)

2025-06-30 Thread Henrik G. Olsson via cfe-commits
https://github.com/hnrklssn created https://github.com/llvm/llvm-project/pull/146468 This fixes another instance of `Assertion failed: (NumCurrentElementsDeserializing == 0 && "should not be called while already deserializing")`. I ran into it while importing clang modules from Swift, but I h

[clang] [libcxx] [clang] [modules] Implement P3618R0: Allow attaching main to the global module (PR #146461)

2025-06-30 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r HEAD~1...HEAD libcxx/utils/libcxx/test/features.py `` View the diff from darke

[clang] [libcxx] [clang] [modules] Implement P3618R0: Allow attaching main to the global module (PR #146461)

2025-06-30 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari updated https://github.com/llvm/llvm-project/pull/146461 >From 845f99834c6c9a78c05396a0337051273b1ae138 Mon Sep 17 00:00:00 2001 From: Ashwin Banwari Date: Mon, 30 Jun 2025 20:45:39 -0700 Subject: [PATCH 1/4] Implement P3618R0 --- clang/docs/ReleaseNotes.rst

[clang] ce159d2 - [RISCV] Put REQUIRES: riscv-registered-target in the first line of the file. NFC.

2025-06-30 Thread Jim Lin via cfe-commits
Author: Jim Lin Date: 2025-07-01T12:18:16+08:00 New Revision: ce159d20e52add25e51f2aa8c504726221b204ba URL: https://github.com/llvm/llvm-project/commit/ce159d20e52add25e51f2aa8c504726221b204ba DIFF: https://github.com/llvm/llvm-project/commit/ce159d20e52add25e51f2aa8c504726221b204ba.diff LOG:

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

2025-06-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/146466.diff 7 Files Affected: - (modified) clang/include/clang/Analysis/CFG.h (+3-4) - (modified) clang/lib/Analysis/CFG.cpp (+2-3) - (modi

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

2025-06-30 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/146466 None >From 1480b40e0ea317111b432465493b746c10706ffc Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 29 Jun 2025 12:27:42 -0700 Subject: [PATCH] [Analysis] Use range-based for loops (NFC) --- clan

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

2025-06-30 Thread via cfe-commits
https://github.com/ukalappa-mips edited https://github.com/llvm/llvm-project/pull/145647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Remove unnecessary casts (NFC) (PR #146463)

2025-06-30 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/146463 Both of these functions return void. >From ad23a71d5148d200f1db8c307ca3d60d1c229a56 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Mon, 30 Jun 2025 10:15:12 -0700 Subject: [PATCH] [CodeGen] Remove unn

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

2025-06-30 Thread Yaxun Liu via cfe-commits
@@ -635,5 +635,66 @@ TARGET_BUILTIN(__builtin_amdgcn_bitop3_b16, "IUi", "nc", "bitop3-insts") TARGET_BUILTIN(__builtin_amdgcn_cvt_sr_bf16_f32, "V2yV2yfUiIb", "nc", "f32-to-f16bf16-cvt-sr-insts") TARGET_BUILTIN(__builtin_amdgcn_cvt_sr_f16_f32, "V2hV2hfUiIb", "nc", "f32-to-

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

2025-06-30 Thread via cfe-commits
https://github.com/ukalappa-mips edited https://github.com/llvm/llvm-project/pull/145647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-06-30 Thread via cfe-commits
@@ -790,6 +790,9 @@ static constexpr DecoderListEntry DecoderList32[]{ {DecoderTableXmipscmov32, {RISCV::FeatureVendorXMIPSCMov}, "MIPS mips.ccmov"}, +{DecoderTableXmipscbop32, + {RISCV::FeatureVendorXMIPSCBOP}, + "MIPS mips.pref"}, uk

[clang] [libcxx] [clang] [modules] Implement P3618R0: Allow attaching main to the global module (PR #146461)

2025-06-30 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari updated https://github.com/llvm/llvm-project/pull/146461 >From 845f99834c6c9a78c05396a0337051273b1ae138 Mon Sep 17 00:00:00 2001 From: Ashwin Banwari Date: Mon, 30 Jun 2025 20:45:39 -0700 Subject: [PATCH 1/2] Implement P3618R0 --- clang/docs/ReleaseNotes.rst

[clang] [clang] Improve constexpr-unknown diagnostics. (PR #146288)

2025-06-30 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/146288 >From c678e8f0978480fadf3f7d2ffc30cd1d8229a9fa Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Sun, 29 Jun 2025 12:30:28 -0700 Subject: [PATCH 1/5] [clang] Improve constexpr-unknown diagnostics. APValue

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

2025-06-30 Thread via cfe-commits
@@ -103,9 +109,41 @@ class SWPFormat let Inst{6-0} = OPC_CUSTOM_0.Value; } +// Prefetch format. +let hasSideEffects = 0, mayLoad = 1, mayStore = 1 in +class Mips_prefetch_ri +: RVInst { + bits<9> imm9; + bits<5> rs1; + bits<5> hint; + + let Inst{31-29} = 0b000; + le

[clang] [libcxx] [clang] [modules] Implement P3618R0: Allow attaching main to the global module (PR #146461)

2025-06-30 Thread Ashwin Banwari via cfe-commits
ashwinbanwari wrote: CC @ChuanqiXu9 for review https://github.com/llvm/llvm-project/pull/146461 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [clang] [modules] Implement P3618R0: Allow attaching main to the global module (PR #146461)

2025-06-30 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari updated https://github.com/llvm/llvm-project/pull/146461 >From 845f99834c6c9a78c05396a0337051273b1ae138 Mon Sep 17 00:00:00 2001 From: Ashwin Banwari Date: Mon, 30 Jun 2025 20:45:39 -0700 Subject: [PATCH 1/3] Implement P3618R0 --- clang/docs/ReleaseNotes.rst

[clang] [libcxx] [clang] [modules] Implement P3618R0: Allow attaching main to the global module (PR #146461)

2025-06-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libcxx Author: Ashwin Banwari (ashwinbanwari) Changes Remove the prior warning for attaching extern "C++" to main. --- Full diff: https://github.com/llvm/llvm-project/pull/146461.diff 5 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+2) -

[clang] [libcxx] [clang] [modules] Implement P3618R0: Allow attaching main to the global module (PR #146461)

2025-06-30 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari created https://github.com/llvm/llvm-project/pull/146461 Remove the prior warning for attaching extern "C++" to main. >From 845f99834c6c9a78c05396a0337051273b1ae138 Mon Sep 17 00:00:00 2001 From: Ashwin Banwari Date: Mon, 30 Jun 2025 20:45:39 -0700 Subject: [PA

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

2025-06-30 Thread via cfe-commits
https://github.com/ukalappa-mips updated https://github.com/llvm/llvm-project/pull/145647 >From 8a1f98820b280b02f0662c7129a078680d67497f Mon Sep 17 00:00:00 2001 From: Umesh Kalappa Date: Wed, 25 Jun 2025 06:58:37 + Subject: [PATCH 1/4] Added prefetch extensions for MIPS RV64 P8700 and enab

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

2025-06-30 Thread Richard Smith via cfe-commits
https://github.com/zygoloid updated https://github.com/llvm/llvm-project/pull/130369 >From 78c9d5da85723040c30f00cb53e77c9dd4cc14b8 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Fri, 7 Mar 2025 22:49:37 + Subject: [PATCH 1/6] Switch misc-confusable-identifiers check to a faster algori

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

2025-06-30 Thread Richard Smith via cfe-commits
@@ -181,42 +160,105 @@ void ConfusableIdentifierCheck::check( if (!ND) return; - IdentifierInfo *NDII = ND->getIdentifier(); + addDeclToCheck(ND, cast(ND->getDeclContext() +->getNonTransparentContext())); + + // Associate template p

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

2025-06-30 Thread Richard Smith via cfe-commits
@@ -181,42 +160,105 @@ void ConfusableIdentifierCheck::check( if (!ND) return; - IdentifierInfo *NDII = ND->getIdentifier(); + addDeclToCheck(ND, cast(ND->getDeclContext() +->getNonTransparentContext())); + + // Associate template p

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

2025-06-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 @llvm/pr-subscribers-backend-arm Author: Adam Glass (AdamGlass) Changes [This is a resubmit of 145079 after some git clumsiness on my part responding to feedback] Adds support for __sys Clang builtin for AArch64 __sys is a long existin

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

2025-06-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Adam Glass (AdamGlass) Changes [This is a resubmit of 145079 after some git clumsiness on my part responding to feedback] Adds support for __sys Clang builtin for AArch64 __sys is a long existing MSVC intrinsic used to manage cac

[clang] [clang-tools-extra] [clang] skip explicit obj param in code complete (PR #146258)

2025-06-30 Thread via cfe-commits
https://github.com/MythreyaK ready_for_review https://github.com/llvm/llvm-project/pull/146258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-06-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Adam Glass (AdamGlass) Changes [This is a resubmit of 145079 after some git clumsiness on my part responding to feedback] Adds support for __sys Clang builtin for AArch64 __sys is a long existing MSVC intrinsic used to manage cache

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

2025-06-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Adam Glass (AdamGlass) Changes [This is a resubmit of 145079 after some git clumsiness on my part responding to feedback] Adds support for __sys Clang builtin for AArch64 __sys is a long existing MSVC intrinsic used to manage caches, tlb

[clang] [clang-tools-extra] [clang] skip explicit obj param in code complete (PR #146258)

2025-06-30 Thread via cfe-commits
MythreyaK wrote: > this is good to go Thanks for the confirmation! :shipit: ! https://github.com/llvm/llvm-project/pull/146258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-06-30 Thread Adam Glass via cfe-commits
https://github.com/AdamGlass created https://github.com/llvm/llvm-project/pull/146456 [This is a resubmit of 145079 after some git clumsiness on my part responding to feedback] Adds support for __sys Clang builtin for AArch64 __sys is a long existing MSVC intrinsic used to manage caches, tlbs

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

2025-06-30 Thread Richard Smith via cfe-commits
https://github.com/zygoloid updated https://github.com/llvm/llvm-project/pull/130369 >From 78c9d5da85723040c30f00cb53e77c9dd4cc14b8 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Fri, 7 Mar 2025 22:49:37 + Subject: [PATCH 1/5] Switch misc-confusable-identifiers check to a faster algori

[clang] [clang-tools-extra] [clang] skip explicit obj param in code complete (PR #146258)

2025-06-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clangd Author: Mythreya (MythreyaK) Changes Skips the first explicit object parameter when generating autocomplete suggestion string Fixes clangd/clangd#2339? --- Full diff: https://github.com/llvm/llvm-project/p

[clang] [Clang][Driver][SamplePGO] Enable -fsample-profile-use-profi for SamplePGO (PR #145957)

2025-06-30 Thread Snehasish Kumar via cfe-commits
snehasish wrote: Sounds reasonable to me. Can you split this into two changes, first let's commit the one which adds the opt out flag and then the one which makes it the default? https://github.com/llvm/llvm-project/pull/145957 ___ cfe-commits mailin

[clang] [flang] [Flang][AArch64][VecLib] Add libmvec support for Flang/AArch64 (PR #146453)

2025-06-30 Thread KAWASHIMA Takahiro via cfe-commits
kawashima-fj wrote: `sinh` is not converted to the libmvec function currently. I did not investigate the reason yet. In FIR, most math functions are converted to `math` dialect (`%23 = math.cosh %22 fastmath : f64`) but `sinh` is not converted to `math` dialect (`%23 = fir.call @sinh(%22) fast

[clang] [flang] [Flang][AArch64][VecLib] Add libmvec support for Flang/AArch64 (PR #146453)

2025-06-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-driver Author: KAWASHIMA Takahiro (kawashima-fj) Changes `-fveclib=libmvec` for AArch64 (NEON and SVE) in Clang was supported by #143696. This patch does the same for Flang. Vector functions defined in `libmvec` are used for the following Fortran

[clang] [flang] [Flang][AArch64][VecLib] Add libmvec support for Flang/AArch64 (PR #146453)

2025-06-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: KAWASHIMA Takahiro (kawashima-fj) Changes `-fveclib=libmvec` for AArch64 (NEON and SVE) in Clang was supported by #143696. This patch does the same for Flang. Vector functions defined in `libmvec` are used for the following Fortr

[clang] [flang] [Flang][AArch64][VecLib] Add libmvec support for Flang/AArch64 (PR #146453)

2025-06-30 Thread KAWASHIMA Takahiro via cfe-commits
https://github.com/kawashima-fj created https://github.com/llvm/llvm-project/pull/146453 `-fveclib=libmvec` for AArch64 (NEON and SVE) in Clang was supported by #143696. This patch does the same for Flang. Vector functions defined in `libmvec` are used for the following Fortran operator and f

[clang] [OpenACC][CIR] 'update' construct lowering + a few clauses (PR #146378)

2025-06-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-x86_64-debian-dylib` running on `gribozavr4` while building `clang` at step 7 "test-build-unified-tree-check-llvm". Full details are available at: https://lab.llvm.org/buildbot/#/builders/60/builds/31714 Here is the re

[clang] __sys builtin support (PR #145079)

2025-06-30 Thread Adam Glass via cfe-commits
AdamGlass wrote: test failed though it had succeeded here. i'll investigate. https://github.com/llvm/llvm-project/pull/145079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-06-30 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > This PR is part of a series aimed at implementing native support for explicit > module builds from the Clang driver. This is confusing. Since explicit modules is an unrelated term with C++20 modules. https://github.com/llvm/llvm-project/pull/145220

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

2025-06-30 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: This has a stronger impact on C++20 modules since C++20 modules need to generate codes. How does this patch handle consistency issue? e.g., What if `a.pcm` is compiled with `-O0` but the consumer is compiled with `-O1`? I hope we won't break such thin

[clang] [RISCV] Add missing intrinsicis vrgatherei16/vslideup/vslidedown support for Zvfbfmin (PR #146309)

2025-06-30 Thread Jim Lin via cfe-commits
tclin914 wrote: > > LLVM IR intrinsicis for vrgatherei16/vslideup/vslidedown have been > > supported. > > Sorry, I found LLVM IR intrinsicis for vrgatherei16/vslideup/vslidedown > actually haven't been supported. LLVM IR intrinsicis for vrgatherei16/vslideup/vslidedown have been supported no

[clang] [llvm] Fix Windows EH IP2State tables (remove +1 bias) (PR #144745)

2025-06-30 Thread via cfe-commits
https://github.com/sivadeilra updated https://github.com/llvm/llvm-project/pull/144745 >From 2bd3af28675d0033b92ea0b1c976aa47026b1e98 Mon Sep 17 00:00:00 2001 From: Arlie Davis Date: Fri, 13 Jun 2025 12:45:34 -0700 Subject: [PATCH] Fix IP2State tables style: revert one change Adjust tests ad

[clang] [analyzer] Avoid unnecessary super region invalidation in `CStringChecker` (PR #146212)

2025-06-30 Thread via cfe-commits
flovent wrote: CI failures seem unlreated to the new change in this PR. https://github.com/llvm/llvm-project/pull/146212 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-06-30 Thread Dan Liew via cfe-commits
https://github.com/delcypher requested changes to this pull request. Looks like we need to fix a few more things. Did you resolve the issue with the existing test cases failing? https://github.com/llvm/llvm-project/pull/145967 ___ cfe-commits mailing

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

2025-06-30 Thread Dan Liew via cfe-commits
@@ -4051,6 +4139,14 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked, llvm::BasicBlock *&TrapBB = TrapBBs[CheckHandlerID]; + llvm::DILocation *TrapLocation = Builder.getCurrentDebugLocation(); + llvm::StringRef TrapMessage = GetUBSanTrapForHandler(CheckHandlerI

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

2025-06-30 Thread Dan Liew via cfe-commits
https://github.com/delcypher edited https://github.com/llvm/llvm-project/pull/145967 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-06-30 Thread Dan Liew via cfe-commits
@@ -0,0 +1,10 @@ +// RUN: %clang_cc1 -triple arm64-apple-macosx14.0.0 -O0 -debug-info-kind=standalone -dwarf-version=5 \ +// RUN: -fsanitize=signed-integer-overflow -fsanitize-trap=signed-integer-overflow -emit-llvm %s -o - | FileCheck %s + +int add_overflow(int a, int b) { + r

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

2025-06-30 Thread Dan Liew via cfe-commits
@@ -85,6 +85,94 @@ enum VariableTypeDescriptorKind : uint16_t { //Miscellaneous Helper Methods //======// +static llvm::StringRef GetUBSanTrapForHandler(SanitizerHandler ID) { + switch

[clang] [NFC] Remove getDefaultCallingConvention IsBuiltin (PR #145904)

2025-06-30 Thread Harald van Dijk via cfe-commits
hvdijk wrote: The calling convention doesn't just apply at the LLVM level though. For that, you're right it wouldn't make a difference for RVV intrinsics, but it also applies at the Clang level to determine whether Clang passes arguments by value or by reference, and whether it promotes argume

[clang] [RISCV] Integrate RISCV target in baremetal toolchain object and deprecate RISCVToolchain object (PR #121831)

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

[clang] __sys builtin support (PR #145079)

2025-06-30 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/145079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] __sys builtin support (PR #145079)

2025-06-30 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/145079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] __sys builtin support (PR #145079)

2025-06-30 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,68 @@ +// REQUIRES: aarch64-registered-target + +// RUN: %clang_cc1 -triple arm64-windows -fms-compatibility -S \ +// RUN: -o - %s | FileCheck %s -check-prefix CHECK-ASM + +// RUN: %clang_cc1 -triple arm64-darwin -fms-compatibility -S \ +// RUN: -o - %s | FileCheck %s -

[clang-tools-extra] [clang-tidy] Add misc-bool-bitwise-operation check (PR #142324)

2025-06-30 Thread via cfe-commits
@@ -0,0 +1,83 @@ +// RUN: %check_clang_tidy %s misc-bool-bitwise-operation %t \ +// RUN: -config="{CheckOptions: { \ +// RUN: misc-bool-bitwise-operation.StrictMode: true }}" + +bool function_with_possible_side_effects(); + +void bad_possible_side_effects() { +bool a = t

[clang] [clang][diagnostics] Refactor "warn_doc_function_method_decl_mismatch" to use enum_select (PR #146426)

2025-06-30 Thread via cfe-commits
github-actions[bot] wrote: ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account. See [LLVM Developer Policy](https://llvm.org/docs/DeveloperPol

[clang] [clang][diagnostics] Update note_constexpr_invalid_cast to use enum_select and adjust its uses (PR #130868)

2025-06-30 Thread Ayokunle Amodu via cfe-commits
https://github.com/ayokunle321 edited https://github.com/llvm/llvm-project/pull/130868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][diagnostics] Refactor "warn_doc_function_method_decl_mismatch" to use enum_select (PR #146426)

2025-06-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ayokunle Amodu (ayokunle321) Changes Related: https://github.com/llvm/llvm-project/issues/123121 This patch refactors the `note_constexpr_invalid_cast `diagnostic to use enum_select instead of select. This gets rid of magic numbers in its

[clang] [clang][diagnostics] Refactor "warn_doc_function_method_decl_mismatch" to use enum_select (PR #146426)

2025-06-30 Thread Ayokunle Amodu via cfe-commits
https://github.com/ayokunle321 created https://github.com/llvm/llvm-project/pull/146426 Related: https://github.com/llvm/llvm-project/issues/123121 This patch refactors the `note_constexpr_invalid_cast `diagnostic to use enum_select instead of select. This gets rid of magic numbers in its call

[clang] [llvm] [STLForwardCompat] Implement llvm::type_identity (PR #146390)

2025-06-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-m68k-linux-cross` running on `suse-gary-m68k-cross` while building `clang,llvm` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/27/builds/12328 Here is the relevant p

[clang] f205e35 - [CIR] Upstream GenericSelectionExpr for ComplexType (#146265)

2025-06-30 Thread via cfe-commits
Author: Amr Hesham Date: 2025-06-30T22:25:01+02:00 New Revision: f205e354ae3e002158060c830778d8c5409a9984 URL: https://github.com/llvm/llvm-project/commit/f205e354ae3e002158060c830778d8c5409a9984 DIFF: https://github.com/llvm/llvm-project/commit/f205e354ae3e002158060c830778d8c5409a9984.diff LO

[clang] [CIR] Upstream GenericSelectionExpr for ComplexType (PR #146265)

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

[clang] [mlir] [OpenACC][CIR] Implement 'rest' of update clause lowering (PR #146414)

2025-06-30 Thread Valentin Clement バレンタイン クレメン via cfe-commits
https://github.com/clementval approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/146414 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[cmake] Refactor clang unittest cmake" (PR #134195)

2025-06-30 Thread Reid Kleckner via cfe-commits
rnk wrote: > Do I understand correctly that, as a result of this commit, the SemaTests > target no longer exists, and to work on / run the tests that it used to > include (such as HeuristicResolverTest.cpp), I have to build the > ClangdUnitTests target, which requires building 1000+ test sourc

[clang] [clang] Handle consteval constructors with default initialization. (PR #144970)

2025-06-30 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: ActOnCXXExitDeclInitializer does three things: - Some scope handling which isn't relevant in this context. - Does some special handling for variables, to compute whether the variable's initializer is manifestly constant-evaluated. - Calls PopExpressionEvaluationContext The

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

2025-06-30 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/146129 >From 964a930b9f96423d04155b9972bfd8540c59d911 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 27 Jun 2025 20:10:48 +0200 Subject: [PATCH 1/5] [CIR] Implement NotEqualOp for ComplexType --- clang/i

[clang] [llvm] [STLForwardCompat] Implement llvm::type_identity (PR #146390)

2025-06-30 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz closed https://github.com/llvm/llvm-project/pull/146390 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4c7d3e9 - [STLForwardCompat] Implement llvm::type_identity (#146390)

2025-06-30 Thread via cfe-commits
Author: Krzysztof Parzyszek Date: 2025-06-30T15:05:49-05:00 New Revision: 4c7d3e9315a55fa8ffe96436fda83c392be242b2 URL: https://github.com/llvm/llvm-project/commit/4c7d3e9315a55fa8ffe96436fda83c392be242b2 DIFF: https://github.com/llvm/llvm-project/commit/4c7d3e9315a55fa8ffe96436fda83c392be242b2

[clang] [mlir] [OpenACC][CIR] Implement 'rest' of update clause lowering (PR #146414)

2025-06-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-openacc @llvm/pr-subscribers-mlir Author: Erich Keane (erichkeane) Changes This implements the async, wait, if, and if_present (as well as device_type, but that is a detail of async/wait) lowering. All of these are implemented the same way they are f

[clang] [mlir] [OpenACC][CIR] Implement 'rest' of update clause lowering (PR #146414)

2025-06-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mlir-openacc Author: Erich Keane (erichkeane) Changes This implements the async, wait, if, and if_present (as well as device_type, but that is a detail of async/wait) lowering. All of these are implemented the same way they are for the compute constr

[clang] [mlir] [OpenACC][CIR] Implement 'rest' of update clause lowering (PR #146414)

2025-06-30 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/146414 This implements the async, wait, if, and if_present (as well as device_type, but that is a detail of async/wait) lowering. All of these are implemented the same way they are for the compute constructs,

[clang] [clang] Don't use raw source location in DeclarationName, NFC (PR #146412)

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

[clang] [llvm] Non constant size and offset in DWARF (PR #141106)

2025-06-30 Thread Tom Tromey via cfe-commits
tromey wrote: > I am seeing an assertion failure when building the Linux kernel for aarch64 > with LTO enabled. cvise spits out: Is this still happening for you? If so I will look at it this week. Sorry about this. https://github.com/llvm/llvm-project/pull/141106 ___

[clang] [clang-tools-extra] [libcxx] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-30 Thread via cfe-commits
@@ -2767,6 +2767,10 @@ class DependentBitIntTypeLoc final : public InheritingConcreteTypeLoc {}; +class PredefinedSugarTypeLoc final +: public InheritingConcreteTypeLoc {}; YexuanXiao wrote: I've simplified its definition, and now it's similar to `BTF

[clang] [clang] Don't use raw source location in DeclarationName, NFC (PR #146412)

2025-06-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Haojian Wu (hokein) Changes Converting back and forth for the source location raw encoding is unnecessary. --- Full diff: https://github.com/llvm/llvm-project/pull/146412.diff 1 Files Affected: - (modified) clang/include/clang/AST/Decl

[clang] [clang] Don't use raw source location in DeclarationName, NFC (PR #146412)

2025-06-30 Thread Haojian Wu via cfe-commits
https://github.com/hokein created https://github.com/llvm/llvm-project/pull/146412 Converting back and forth for the source location raw encoding is unnecessary. >From 21619dbe7f13c73c8657fac0410fe87ab8baeea4 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Mon, 30 Jun 2025 17:06:01 +0200 Subj

[clang-tools-extra] [clang-doc] serialize friends (PR #146165)

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

[clang-tools-extra] a68e447 - [clang-doc] serialize friends (#146165)

2025-06-30 Thread via cfe-commits
Author: Erick Velez Date: 2025-06-30T12:43:52-07:00 New Revision: a68e4470c16b4d45f78b6f69f59013c89bdf7ec2 URL: https://github.com/llvm/llvm-project/commit/a68e4470c16b4d45f78b6f69f59013c89bdf7ec2 DIFF: https://github.com/llvm/llvm-project/commit/a68e4470c16b4d45f78b6f69f59013c89bdf7ec2.diff L

[clang] 96b9b2e - [Clang] Fix '-Wformat-overflow' FP when floats had field-width and plus prefix (#144274)

2025-06-30 Thread via cfe-commits
Author: Baranov Victor Date: 2025-06-30T22:43:47+03:00 New Revision: 96b9b2e21de466490ba733a23e8bb6cbd39ad58c URL: https://github.com/llvm/llvm-project/commit/96b9b2e21de466490ba733a23e8bb6cbd39ad58c DIFF: https://github.com/llvm/llvm-project/commit/96b9b2e21de466490ba733a23e8bb6cbd39ad58c.diff

[clang] [Clang] Fix '-Wformat-overflow' FP when floats had field-width and plus prefix (PR #144274)

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

[clang] Disable -fdollars-in-identifiers by default (PR #135407)

2025-06-30 Thread Richard Smith via cfe-commits
zygoloid wrote: (I guess we could also warn if an object-like macro is expanded and the macro name is preceded or followed by a `$` with no whitespace, since that would also behave differently under `-fdollars-in-identifiers`, but I suspect that's not worth worrying about in practice.) https:

  1   2   3   4   5   >