[clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-07-05 Thread JJ Marr via cfe-commits
https://github.com/jj-marr edited https://github.com/llvm/llvm-project/pull/146970 ___ 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 portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-07-05 Thread JJ Marr via cfe-commits
https://github.com/jj-marr edited https://github.com/llvm/llvm-project/pull/146970 ___ 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 portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-07-05 Thread via cfe-commits
@@ -0,0 +1,157 @@ +.. title:: clang-tidy - portability-avoid-platform-specific-fundamental-types + +portability-avoid-platform-specific-fundamental-types += + +Finds fundamental types and recommends using typedefs or fixed-width

[clang] [libclang] Add missing dllexport annotation (PR #147108)

2025-07-05 Thread Tomohiro Kashiwada via cfe-commits
kikairoya wrote: > > AFAIK the dllexport annotations have been added using some automated tools, > > so it may be good to find the person who added the other annotations, so it > > can be looked into why this was missing here, if the annotations otherwise > > were seemingly complete enough. >

[clang] [clang-format] Propagate `LeadingEmptyLinesAffected` when joining lines (PR #146761)

2025-07-05 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-buildbot3` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/169/builds/12866 Here is the relevant piece

[clang] [clang-format][NFC] Replace size() with empty() (PR #147164)

2025-07-05 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/147164 None >From e6945b8f51409e1ffd71a47b70e06599774d213e Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 5 Jul 2025 15:15:05 -0700 Subject: [PATCH] [clang-format][NFC] Replace size() with empty() --- clang/lib/F

[clang] [clang-format][NFC] Replace size() with empty() (PR #147164)

2025-07-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/147164.diff 5 Files Affected: - (modified) clang/lib/Format/Format.cpp (+1-1) - (modified) clang/lib/Format/FormatTokenLexer.cpp (+5-6) - (modi

[clang] [clang-format] Propagate `LeadingEmptyLinesAffected` when joining lines (PR #146761)

2025-07-05 Thread Owen Pan via cfe-commits
@@ -986,7 +986,7 @@ class LineJoiner { void join(AnnotatedLine &A, const AnnotatedLine &B) { assert(!A.Last->Next); assert(!B.First->Previous); -if (B.Affected) +if (B.Affected || (B.LeadingEmptyLinesAffected && A.Last->Children.empty())) owe

[clang] [NFC] [C++] [Modules] Mark P2788 as implemented and add test (PR #147138)

2025-07-05 Thread Ashwin Kishin Banwari via cfe-commits
https://github.com/kish1n created https://github.com/llvm/llvm-project/pull/147138 This is already implemented. >From af8f5b035416c72ed363266cd3560969c8da4d00 Mon Sep 17 00:00:00 2001 From: Ashwin Banwari Date: Sat, 5 Jul 2025 03:22:13 -0700 Subject: [PATCH] mark P2788 as implemented and add

[clang] [NFC] [C++] [Modules] Mark P2788 as implemented and add test (PR #147138)

2025-07-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ashwin Kishin Banwari (kish1n) Changes This is already implemented. --- Full diff: https://github.com/llvm/llvm-project/pull/147138.diff 2 Files Affected: - (added) clang/test/SemaCXX/P2788.cpp (+17) - (modified) clang/www/cxx_status.

[clang] [NFC] [C++] [Modules] Mark P2788 as implemented and add test (PR #147138)

2025-07-05 Thread Ashwin Kishin Banwari via cfe-commits
kish1n wrote: @ChuanqiXu9 https://github.com/llvm/llvm-project/pull/147138 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add new check: `modernize-use-concise-preprocessor-directives` (PR #146830)

2025-07-05 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook updated https://github.com/llvm/llvm-project/pull/146830 >From 9eb58438d2b4061ad7a6bdbd1db82a5fd4043948 Mon Sep 17 00:00:00 2001 From: Victor Chernyakin Date: Thu, 3 Jul 2025 00:19:52 -0700 Subject: [PATCH 1/8] [clang-tidy] Add new check: `modernize-use-concise-pr

[clang-tools-extra] [clang-tidy] Add new check: `modernize-use-concise-preprocessor-directives` (PR #146830)

2025-07-05 Thread Victor Chernyakin via cfe-commits
localspook wrote: Maybe I'm misunderstanding, but are you concerned about ```cpp #if defined(foo) && defined(bar) ``` being rewritten to this? ```cpp #ifdef foo && if defined(bar) ``` It won't do that, that's not valid syntax (there's not really any way to rewrite it). I've added a test to ensur

[clang-tools-extra] [clang-tidy] Add new check: `readability-use-concise-preprocessor-directives` (PR #146830)

2025-07-05 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook edited https://github.com/llvm/llvm-project/pull/146830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add new check: `readability-use-concise-preprocessor-directives` (PR #146830)

2025-07-05 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook edited https://github.com/llvm/llvm-project/pull/146830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [docs] Add clang/llvm release notes for mipsel-windows-* targets (PR #147133)

2025-07-05 Thread Brad Smith via cfe-commits
brad0 wrote: Missing a period at the end of each entry. https://github.com/llvm/llvm-project/pull/147133 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix coverage when `/fo` is used (PR #88201)

2025-07-05 Thread via cfe-commits
hsdk123 wrote: Hi, what would be the status here? Really looking forward to this https://github.com/llvm/llvm-project/pull/88201 ___ 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 portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-07-05 Thread JJ Marr via cfe-commits
@@ -0,0 +1,43 @@ +//===--- AvoidPlatformSpecificFundamentalTypesCheck.h - clang-tidy ---*- C++ +//-*-===// jj-marr wrote: This requires turning off `clang-format` since line 1 is too long. https://github.com/llvm/llvm-project/pull/146970 ___

[clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-07-05 Thread JJ Marr via cfe-commits
https://github.com/jj-marr edited https://github.com/llvm/llvm-project/pull/146970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [IncludeCleaner] display overview (PR #93932)

2025-07-05 Thread via cfe-commits
https://github.com/TheHillBright updated https://github.com/llvm/llvm-project/pull/93932 >From 83118c9429f3f391486e30f30e4b6f9b6308f8af Mon Sep 17 00:00:00 2001 From: TheHillBright <150074496+thehillbri...@users.noreply.github.com> Date: Fri, 31 May 2024 15:00:37 +0800 Subject: [PATCH] IncludeCl

[clang] [Clang] fix crash in codegen caused by deferred asm diagnostics under -fopenmp (PR #147163)

2025-07-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oleksandr T. (a-tarasyuk) Changes Fixes #140375 --- This patch addresses a crash in clang’s _codegen_ stage triggered by invalid inline assembly statements under `-fopenmp`. The root cause was _deferred_ diagnostic emission (using `Sema

[clang] [Clang] fix crash in codegen caused by deferred asm diagnostics under -fopenmp (PR #147163)

2025-07-05 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk ready_for_review https://github.com/llvm/llvm-project/pull/147163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang] Add missing dllexport annotation (PR #147108)

2025-07-05 Thread Tomohiro Kashiwada via cfe-commits
kikairoya wrote: > > Still it may be good to figure out why this hasn't been an issue so far, > > for whoever otherwise were using these dllexport annotations. > > I suspect it relates to module definition file (*.def). On MinGW, the symbol > is properly exported without annotation. Regular w

[clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-07-05 Thread JJ Marr via cfe-commits
jj-marr wrote: > You could make a universal option to configure autofixes. Make > semicolon-separated list of key-value pairs, e.g. > `int=int32_t;float=float32_t;char=char8_t`. User could specify any type he > wants, and remove/add fixes for `int`, `char` and so on. > > By default, we co

[clang] [libclang][Cygwin] Use __declspec(dllexport) for libclang on Cygwin (PR #147122)

2025-07-05 Thread Tomohiro Kashiwada via cfe-commits
kikairoya wrote: > > Before merge this, requires #147108 > > Can you elaborate on why this is needed - what happens without it - wouldn't > that issue be happening already now in regular win32 builds so far? The linker reports undefined reference to clang_install_aborting_llvm_fatal_error_han

[clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-07-05 Thread JJ Marr via cfe-commits
@@ -0,0 +1,246 @@ +//===--- AvoidPlatformSpecificFundamentalTypesCheck.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 portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-07-05 Thread JJ Marr via cfe-commits
https://github.com/jj-marr commented: comments for myself https://github.com/llvm/llvm-project/pull/146970 ___ 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 portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-07-05 Thread JJ Marr via cfe-commits
https://github.com/jj-marr edited https://github.com/llvm/llvm-project/pull/146970 ___ 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 portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-07-05 Thread JJ Marr via cfe-commits
@@ -0,0 +1,246 @@ +//===--- AvoidPlatformSpecificFundamentalTypesCheck.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] [clang-format] Propagate `LeadingEmptyLinesAffected` when joining lines (PR #146761)

2025-07-05 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux-bootstrap-msan` running on `sanitizer-buildbot10` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/94/builds/8621 Here is the relev

[clang] [RISCV] Correct type lowering of struct of fixed-vector array in VLS (PR #147173)

2025-07-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Brandon Wu (4vtomat) Changes Currently, struct of fixed-vector array is flattened and lowered to scalable vector. However only struct of 1-element-fixed-vector array should be lowered that way, struct of fixed-vector array of lengt

[clang] [RISCV] Correct type lowering of struct of fixed-vector array in VLS (PR #147173)

2025-07-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Brandon Wu (4vtomat) Changes Currently, struct of fixed-vector array is flattened and lowered to scalable vector. However only struct of 1-element-fixed-vector array should be lowered that way, struct of fixed-vector array of length >1 shou

[clang] [RISCV] Correct type lowering of struct of fixed-vector array in VLS (PR #147173)

2025-07-05 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat created https://github.com/llvm/llvm-project/pull/147173 Currently, struct of fixed-vector array is flattened and lowered to scalable vector. However only struct of 1-element-fixed-vector array should be lowered that way, struct of fixed-vector array of length >1 shoul

[clang] [libclang] Add missing dllexport annotation (PR #147108)

2025-07-05 Thread Tomohiro Kashiwada via cfe-commits
kikairoya wrote: https://github.com/llvm/llvm-project/blob/53359252688692f2b0e25f529335848db94cc166/clang/tools/libclang/CMakeLists.txt#L88-L93 MSVC doesn't use `libclang.def` and doesn't export `clang_install_aborting_llvm_fatal_error_handler`. ``` $ llvm-readobj --coff-exports '/c/Program Fil

[clang] [Driver][RISCV] Fix incorrect compiler-rt path override in BareMetal toolchain after RISCVToolChain removal (PR #146849)

2025-07-05 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab approved this pull request. https://github.com/llvm/llvm-project/pull/146849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Propagate `LeadingEmptyLinesAffected` when joining lines (PR #146761)

2025-07-05 Thread Eric Li via cfe-commits
@@ -986,7 +986,7 @@ class LineJoiner { void join(AnnotatedLine &A, const AnnotatedLine &B) { assert(!A.Last->Next); assert(!B.First->Previous); -if (B.Affected) +if (B.Affected || (B.LeadingEmptyLinesAffected && A.Last->Children.empty())) tJe

[clang] [libclang][Cygwin] Provide unversioned DLL file alongside versioned one (PR #147132)

2025-07-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Tomohiro Kashiwada (kikairoya) Changes On Cygwin, a shared library target generates a versioned DLL file like `cyg${OUTPUT_NAME}-${VERSION}.dll` and an import library `lib${OUTPUT_NAME}.dll.a`, but it does *not* generate the expected unve

[clang] [libclang][Cygwin] Provide unversioned DLL file alongside versioned one (PR #147132)

2025-07-05 Thread Tomohiro Kashiwada via cfe-commits
https://github.com/kikairoya created https://github.com/llvm/llvm-project/pull/147132 On Cygwin, a shared library target generates a versioned DLL file like `cyg${OUTPUT_NAME}-${VERSION}.dll` and an import library `lib${OUTPUT_NAME}.dll.a`, but it does *not* generate the expected unversioned

<    1   2