[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-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] [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 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 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] [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] 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] [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] [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] [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][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
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-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
@@ -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
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] [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] [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][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] 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] [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-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-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 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] [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 created https://github.com/llvm/llvm-project/pull/147163 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 `SemaDia

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

2025-07-05 Thread Martin Storsjö via cfe-commits
mstorsjo 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? https://github.com/llvm/llvm-project/pull/147122 __

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

2025-07-05 Thread Martin Storsjö via cfe-commits
mstorsjo 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. Sorry, not

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

2025-07-05 Thread Martin Storsjö via cfe-commits
mstorsjo 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. https://github.com

[clang-tools-extra] [clangd] Extend call hierarchy for enum constants (PR #147042)

2025-07-05 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/147042 ___ 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
https://github.com/tJener closed https://github.com/llvm/llvm-project/pull/146761 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-07-05 Thread via cfe-commits
Author: Eric Li Date: 2025-07-05T17:06:59-04:00 New Revision: 878ce210e30f8ebcb4b73d834f91229a403e2376 URL: https://github.com/llvm/llvm-project/commit/878ce210e30f8ebcb4b73d834f91229a403e2376 DIFF: https://github.com/llvm/llvm-project/commit/878ce210e30f8ebcb4b73d834f91229a403e2376.diff LOG:

[clang] [clang-format] Stop crashing when the input contains `??/\n` (PR #147156)

2025-07-05 Thread Owen Pan via cfe-commits
owenca wrote: > I added code to count the number of characters in the escape sequence > probably just because the block of code used to have a comment saying someone > should add the feature. > I am not sure we should support the trigraph. I don't know anyone who uses > it. The C2y draft does

[clang] 83401ed - [clang][bytecode] Narrow allocated single-array Pointer (#147160)

2025-07-05 Thread via cfe-commits
Author: Timm Baeder Date: 2025-07-05T22:15:58+02:00 New Revision: 83401ed6a233b9c027682025fd3e2b56560dbe6e URL: https://github.com/llvm/llvm-project/commit/83401ed6a233b9c027682025fd3e2b56560dbe6e DIFF: https://github.com/llvm/llvm-project/commit/83401ed6a233b9c027682025fd3e2b56560dbe6e.diff L

[clang] [clang][bytecode] Narrow allocated single-array Pointer (PR #147160)

2025-07-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/147160 ___ 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 Owen Pan via cfe-commits
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/146761 ___ 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 updated https://github.com/llvm/llvm-project/pull/146970 >From 3ef4feb748551806c863529306fefb2bd914e5be Mon Sep 17 00:00:00 2001 From: JJ Marr Date: Thu, 3 Jul 2025 17:17:06 -0400 Subject: [PATCH 01/14] AvoidFundamentalIntegerTypesCheck --- .../AvoidFundamentalInteg

[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: Done. https://github.com/llvm/llvm-project/pull/146970 ___ cfe-commits mailing list cfe-com

[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,111 @@ +.. 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-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 updated https://github.com/llvm/llvm-project/pull/146970 >From 3ef4feb748551806c863529306fefb2bd914e5be Mon Sep 17 00:00:00 2001 From: JJ Marr Date: Thu, 3 Jul 2025 17:17:06 -0400 Subject: [PATCH 01/10] AvoidFundamentalIntegerTypesCheck --- .../AvoidFundamentalInteg

[clang] [clang][bytecode] Narrow allocated single-array Pointer (PR #147160)

2025-07-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Since the result should not be an array element. --- Full diff: https://github.com/llvm/llvm-project/pull/147160.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCode/InterpBuiltin.cpp (+1-1) `

[clang] [clang][bytecode] Narrow allocated single-array Pointer (PR #147160)

2025-07-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/147160 Since the result should not be an array element. >From 231e1c5de7aef91d176da018fc44735bb62d76c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 5 Jul 2025 20:27:19 +0200 Subject: [PATCH

[clang-tools-extra] [clang-tidy] Teach `modernize-type-traits` about more type traits (PR #147074)

2025-07-05 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook updated https://github.com/llvm/llvm-project/pull/147074 >From 7ad6f7b8663980183e8bb8e79843942870e36267 Mon Sep 17 00:00:00 2001 From: Victor Chernyakin Date: Fri, 4 Jul 2025 07:42:54 -0700 Subject: [PATCH 1/6] [clang-tidy] Teach `modernize-type-traits` about more

[clang-tools-extra] [clang-tidy] Teach `modernize-type-traits` about more type traits (PR #147074)

2025-07-05 Thread Victor Chernyakin via cfe-commits
@@ -130,6 +155,10 @@ static const llvm::StringSet<> TypeTraits = { "result_of", "invoke_result", "type_identity", +"compare_three_way_result", +"common_comparison_category", localspook wrote: > We usually don't care if there would be a warn

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

2025-07-05 Thread Lukas Döllerer via cfe-commits
Lukasdoe wrote: I just figured out a problem with the current implementation: When wasm-ld eliminates functions, their relocations are just written to the tombstone value, which is 0. This is not conformant to the spec, because it both leads to branch hints for the wrong function (typically fu

[clang-tools-extra] [clang-tidy] Teach `modernize-type-traits` about more type traits (PR #147074)

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

[clang-tools-extra] [clang-tidy] Teach `modernize-type-traits` about more type traits (PR #147074)

2025-07-05 Thread Baranov Victor via cfe-commits
@@ -130,6 +155,10 @@ static const llvm::StringSet<> TypeTraits = { "result_of", "invoke_result", "type_identity", +"compare_three_way_result", +"common_comparison_category", vbvictor wrote: We usually don't care if there would be a warning

[clang-tools-extra] [clang-tidy] Teach `modernize-type-traits` about more type traits (PR #147074)

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

[clang-tools-extra] [clang-tidy] Teach `modernize-type-traits` about more type traits (PR #147074)

2025-07-05 Thread Victor Chernyakin via cfe-commits
@@ -130,6 +155,10 @@ static const llvm::StringSet<> TypeTraits = { "result_of", "invoke_result", "type_identity", +"compare_three_way_result", +"common_comparison_category", localspook wrote: Hm, I've looked into it some more, and it turns

[clang] [Sema] Remove an unnecessary cast (NFC) (PR #147154)

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

[clang] 430c037 - [Sema] Remove an unnecessary cast (NFC) (#147154)

2025-07-05 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-07-05T10:44:52-07:00 New Revision: 430c0376c8a0bc427d8de09d6af2a68e6bf93caa URL: https://github.com/llvm/llvm-project/commit/430c0376c8a0bc427d8de09d6af2a68e6bf93caa DIFF: https://github.com/llvm/llvm-project/commit/430c0376c8a0bc427d8de09d6af2a68e6bf93caa.diff L

[clang] fb2c761 - [clang][bytecode] Fix comparing pointers pointing to base classes (#146285)

2025-07-05 Thread via cfe-commits
Author: Timm Baeder Date: 2025-07-05T19:42:50+02:00 New Revision: fb2c7610e831646c5e01986306e8771730c937ff URL: https://github.com/llvm/llvm-project/commit/fb2c7610e831646c5e01986306e8771730c937ff DIFF: https://github.com/llvm/llvm-project/commit/fb2c7610e831646c5e01986306e8771730c937ff.diff L

[clang] [clang][bytecode] Fix comparing pointers pointing to base classes (PR #146285)

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

[clang] [Sema] Remove an unnecessary cast (NFC) (PR #147154)

2025-07-05 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/147154 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-07-05 Thread Denis Mikhailov via cfe-commits
denzor200 wrote: > I believe all PiotrZSL's comments are correctly resolved, and we could merge > it next week if there would be no more reviews. One nit from me: since we > don't match template functions, we could add `Limitations` section in check > docs to avoid potential confusion and fals

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

2025-07-05 Thread Baranov Victor via cfe-commits
vbvictor wrote: I believe all PiotrZSL's comments are correctly resolved, and we could merge it next week if there would be no more reviews. One nit from me: since we don't match template functions, we could add `Limitations` section in check docs to avoid potential confusion and false-negativ

[clang] [clang-format] Stop crashing when the input contains `??/\n` (PR #147156)

2025-07-05 Thread via cfe-commits
sstwcw wrote: I am not sure we should support the trigraph. I don't know anyone who uses it. The C2y draft does not mention it. Not even in the change log that it got removed. To stop the program from crashing, should I remove all the code for handling it instead? https://github.com/llvm/

[clang] [clang-format] Stop crashing when the input contains `??/\n` (PR #147156)

2025-07-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: None (sstwcw) Changes In the debug build, this kind of input caused the assertion in the function `countLeadingWhitespace` to fail. The release build without assertions outputted `?` `?` `/` separated by spaces. ```C #define A ??

[clang] [clang-format] Stop crashing when the input contains `??/\n` (PR #147156)

2025-07-05 Thread via cfe-commits
https://github.com/sstwcw created https://github.com/llvm/llvm-project/pull/147156 In the debug build, this kind of input caused the assertion in the function `countLeadingWhitespace` to fail. The release build without assertions outputted `?` `?` `/` separated by spaces. ```C #define A ??/

[clang] [Sema] Remove an unnecessary cast (NFC) (PR #147154)

2025-07-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes BitWidth is already of Expr *. --- Full diff: https://github.com/llvm/llvm-project/pull/147154.diff 1 Files Affected: - (modified) clang/lib/Sema/SemaDecl.cpp (+1-2) ``diff diff --git a/c

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

2025-07-05 Thread Marco Vitale via cfe-commits
mrcvtl wrote: > I think we should revert to the previous approach, what do you think? > > ```c++ > if (IsGslPtrValueFromGslTempOwner && DiagLoc.isValid()) { > if (const auto *VD = > dyn_cast_if_present(ExtendingEntity->getDecl()); > SemaRef.getLangOpts()

[clang] [Sema] Remove an unnecessary cast (NFC) (PR #147154)

2025-07-05 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/147154 BitWidth is already of Expr *. >From 5c55d621391595a2066c4d675b153d637483c79a Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 4 Jul 2025 18:42:46 -0700 Subject: [PATCH] [Sema] Remove an unnecessar

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

2025-07-05 Thread Marco Vitale via cfe-commits
mrcvtl wrote: > I have debug the issue, seems we cannot move the `__range` variable check to > the start of `checkExprLifetimeImpl`, we may missing extending lifetime of > temporaries. Eg. > > ```c++ > template > struct ListWrapper { > ListWrapper() {} > ~ListWrapper() {} > const T *beg

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

2025-07-05 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,138 @@ +// RUN: %check_clang_tidy -std=c++98 -check-suffixes=,CXX %s readability-use-concise-preprocessor-directives %t +// RUN: %check_clang_tidy -std=c++11 -check-suffixes=,CXX %s readability-use-concise-preprocessor-directives %t +// RUN: %check_clang_tidy -std=c++

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

2025-07-05 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,40 @@ +//===--- UseConcisePreprocessorDirectivesCheck.h - clang-tidy ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

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

2025-07-05 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,138 @@ +// RUN: %check_clang_tidy -std=c++98 -check-suffixes=,CXX %s readability-use-concise-preprocessor-directives %t +// RUN: %check_clang_tidy -std=c++11 -check-suffixes=,CXX %s readability-use-concise-preprocessor-directives %t +// RUN: %check_clang_tidy -std=c++

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

2025-07-05 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,138 @@ +// RUN: %check_clang_tidy -std=c++98 -check-suffixes=,CXX %s readability-use-concise-preprocessor-directives %t +// RUN: %check_clang_tidy -std=c++11 -check-suffixes=,CXX %s readability-use-concise-preprocessor-directives %t +// RUN: %check_clang_tidy -std=c++

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

2025-07-05 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,108 @@ +//===--- UseConcisePreprocessorDirectivesCheck.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 new check: `readability-use-concise-preprocessor-directives` (PR #146830)

2025-07-05 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,108 @@ +//===--- UseConcisePreprocessorDirectivesCheck.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 new check: `readability-use-concise-preprocessor-directives` (PR #146830)

2025-07-05 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,40 @@ +//===--- UseConcisePreprocessorDirectivesCheck.h - clang-tidy ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [clang][bytecode] Misc union fixes (PR #146824)

2025-07-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/146824 >From 26b5446d582e1dade9aea0091be36cf813effb4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 3 Jul 2025 09:07:08 +0200 Subject: [PATCH] [clang][bytecode] Misc union fixes First, don't

[clang] [clang][bytecode] Misc union fixes (PR #146824)

2025-07-05 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/146824 >From df7c4f770e726efacf3a70328b31936add017eea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 5 Jul 2025 18:10:38 +0200 Subject: [PATC

[clang] [clang][bytecode] Misc union fixes (PR #146824)

2025-07-05 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/146824 >From e84fcfaecf9ed2352bb18592d47e57e53ab3729f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 5 Jul 2025 18:10:38 +0200 Subject: [PATC

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

2025-07-05 Thread Denis Mikhailov via cfe-commits
denzor200 wrote: ping https://github.com/llvm/llvm-project/pull/142324 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix a typo in documentation (PR #147128)

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

[clang] 15f07db - [clang] Fix a typo in documentation (#147128)

2025-07-05 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-07-05T08:42:10-07:00 New Revision: 15f07db6a541b77fe07114abb3ab79a4a77a4c57 URL: https://github.com/llvm/llvm-project/commit/15f07db6a541b77fe07114abb3ab79a4a77a4c57 DIFF: https://github.com/llvm/llvm-project/commit/15f07db6a541b77fe07114abb3ab79a4a77a4c57.diff L

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

2025-07-05 Thread Matheus Izvekov via cfe-commits
@@ -3454,9 +3454,11 @@ void Sema::DeclareGlobalAllocationFunction(DeclarationName Name, if (Func->getNumParams() == Params.size()) { llvm::SmallVector FuncParams; for (auto *P : Func->parameters()) - FuncParams.push_back( - Context.g

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

2025-07-05 Thread Matheus Izvekov via cfe-commits
@@ -3454,9 +3454,11 @@ void Sema::DeclareGlobalAllocationFunction(DeclarationName Name, if (Func->getNumParams() == Params.size()) { llvm::SmallVector FuncParams; for (auto *P : Func->parameters()) - FuncParams.push_back( - Context.g

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

2025-07-05 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. https://github.com/llvm/llvm-project/pull/143653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add tweak to override pure virtuals (PR #139348)

2025-07-05 Thread Marco Maia via cfe-commits
marcogmaia wrote: Ping https://github.com/llvm/llvm-project/pull/139348 ___ 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
@@ -0,0 +1,40 @@ +//===--- UseConcisePreprocessorDirectivesCheck.h - clang-tidy ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [clang-tools-extra] [clang][Sema] Unify getPrototypeLoc helpers in SemaCodeComplete and clangd (PR #143345)

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

[clang] e64289b - [clang][Sema] Unify getPrototypeLoc helpers in SemaCodeComplete and clangd (#143345)

2025-07-05 Thread via cfe-commits
Author: Nathan Ridge Date: 2025-07-05T10:59:16-04:00 New Revision: e64289baa00f822746a7051687c5c5002368880f URL: https://github.com/llvm/llvm-project/commit/e64289baa00f822746a7051687c5c5002368880f DIFF: https://github.com/llvm/llvm-project/commit/e64289baa00f822746a7051687c5c5002368880f.diff

[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] [clang-format] Propagate `LeadingEmptyLinesAffected` when joining lines (PR #146761)

2025-07-05 Thread Eric Li via cfe-commits
https://github.com/tJener updated https://github.com/llvm/llvm-project/pull/146761 >From 4878d44fbcdb58ecadc5ca66e2843a18c8fd5b49 Mon Sep 17 00:00:00 2001 From: Eric Li Date: Wed, 2 Jul 2025 14:46:45 -0400 Subject: [PATCH] [clang-format] Propagate `LeadingEmptyLinesAffected` when joining lines

[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 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/9] [clang-tidy] Add new check: `modernize-use-concise-pr

[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-tools-extra] [clang-tidy] Add new check: `readability-use-concise-preprocessor-directives` (PR #146830)

2025-07-05 Thread Victor Chernyakin via cfe-commits
@@ -0,0 +1,40 @@ +//===--- UseConcisePreprocessorDirectivesCheck.h - clang-tidy ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [clang-tools-extra] [clang][Sema] Unify getPrototypeLoc helpers in SemaCodeComplete and clangd (PR #143345)

2025-07-05 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/143345 >From ccb46000da10ec57f0aec4f35d123f0bee03a151 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Mon, 9 Jun 2025 00:58:47 -0400 Subject: [PATCH] [clang][Sema] Unify getPrototypeLoc helpers in SemaCodeCom

[clang] [CIR] Implement functional cast to ComplexType (PR #147147)

2025-07-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Amr Hesham (AmrDeveloper) Changes Implement functional cast to ComplexType https://github.com/llvm/llvm-project/issues/141365 --- Full diff: https://github.com/llvm/llvm-project/pull/147147.diff 2 Files Affected: - (modified) clang/l

[clang] [CIR] Implement functional cast to ComplexType (PR #147147)

2025-07-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Amr Hesham (AmrDeveloper) Changes Implement functional cast to ComplexType https://github.com/llvm/llvm-project/issues/141365 --- Full diff: https://github.com/llvm/llvm-project/pull/147147.diff 2 Files Affected: - (modified) clang/lib

[clang] [CIR] Implement functional cast to ComplexType (PR #147147)

2025-07-05 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/147147 Implement functional cast to ComplexType https://github.com/llvm/llvm-project/issues/141365 >From bb6602546c35f6a25a4a64141ec9d1edff65dd95 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 5 Jul 2025

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

2025-07-05 Thread via cfe-commits
@@ -0,0 +1,40 @@ +//===--- UseConcisePreprocessorDirectivesCheck.h - clang-tidy ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

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

2025-07-05 Thread via cfe-commits
@@ -0,0 +1,30 @@ +.. title:: clang-tidy - readability-use-concise-preprocessor-directives + +readability-use-concise-preprocessor-directives += EugeneZelenko wrote: Please make same length as check name. https://github

[clang] [clang][analyzer] Fix the false positive ArgInitializedness warning on unnamed bit-field (PR #145066)

2025-07-05 Thread via cfe-commits
@@ -2122,8 +2122,21 @@ SVal RegionStoreManager::getBindingForField(RegionBindingsConstRef B, if (const std::optional &V = B.getDirectBinding(R)) return *V; - // If the containing record was initialized, try to get its constant value. + // UnnamedBitField is always Und

[clang] [clang-tools-extra] [clang][Sema] Unify getPrototypeLoc helpers in SemaCodeComplete and clangd (PR #143345)

2025-07-05 Thread Nathan Ridge via cfe-commits
@@ -93,6 +94,12 @@ class HeuristicResolver { // during simplification, and the operation fails if no pointer type is found. QualType simplifyType(QualType Type, const Expr *E, bool UnwrapPointer); + // Given an expression `Fn` representing the callee in a function call,

[clang] [clang-tools-extra] [clang][Sema] Unify getPrototypeLoc helpers in SemaCodeComplete and clangd (PR #143345)

2025-07-05 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/143345 >From 8884279a3cff027db08eb6d801227cb21e3de220 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Mon, 9 Jun 2025 00:58:47 -0400 Subject: [PATCH] [clang][Sema] Unify getPrototypeLoc helpers in SemaCodeCom

  1   2   >