[clang] [BoundsSafety] build TypeLoc for CountAttributedType (PR #167287)

2025-11-09 Thread Henrik G. Olsson via cfe-commits
https://github.com/hnrklssn updated https://github.com/llvm/llvm-project/pull/167287 >From 8804ce91e34c60bea50c8adaf516204fb8680a00 Mon Sep 17 00:00:00 2001 From: "Henrik G. Olsson" Date: Sun, 9 Nov 2025 19:01:09 -0800 Subject: [PATCH 1/3] [BoundsSafety] build TypeLoc for CountAttributedType T

[clang] [BoundsSafety] build TypeLoc for CountAttributedType (PR #167287)

2025-11-09 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff origin/main HEAD --extensions cpp,h -- clang/include/clang/AST/TypeLoc.h clang/lib/AS

[clang] [BoundsSafety] build TypeLoc for CountAttributedType (PR #167287)

2025-11-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Henrik G. Olsson (hnrklssn) Changes This adds attribute SourceRange to CountAttributedTypeLoc and populates it, then uses it to replace a not-quite-correct source location fetched from the count expression. --- Full diff: https://github.

[clang] [compiler-rt] [llvm] [SPARC] Properly handle CC for long double on sparc32 (PR #162226)

2025-11-09 Thread Sergei Barannikov via cfe-commits
@@ -24,8 +24,8 @@ def CC_Sparc32 : CallingConv<[ // As are v2i32 arguments (this would be the default behavior for // v2i32 if it wasn't allocated to the IntPair register-class) CCIfType<[v2i32], CCCustom<"CC_Sparc_Assign_Split_64">>, - - + // f128 arguments are passed i

[clang] [BoundsSafety] build TypeLoc for CountAttributedType (PR #167287)

2025-11-09 Thread Henrik G. Olsson via cfe-commits
https://github.com/hnrklssn created https://github.com/llvm/llvm-project/pull/167287 This adds attribute SourceRange to CountAttributedTypeLoc and populates it, then uses it to replace a not-quite-correct source location fetched from the count expression. >From 8804ce91e34c60bea50c8adaf516204

[clang] [compiler-rt] [llvm] [SPARC] Properly handle CC for long double on sparc32 (PR #162226)

2025-11-09 Thread Sergei Barannikov via cfe-commits
https://github.com/s-barannikov edited https://github.com/llvm/llvm-project/pull/162226 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [SPARC] Properly handle CC for long double on sparc32 (PR #162226)

2025-11-09 Thread Sergei Barannikov via cfe-commits
https://github.com/s-barannikov edited https://github.com/llvm/llvm-project/pull/162226 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [SPARC] Properly handle CC for long double on sparc32 (PR #162226)

2025-11-09 Thread Sergei Barannikov via cfe-commits
@@ -26,19 +26,29 @@ class SparcV8ABIInfo : public DefaultABIInfo { private: ABIArgInfo classifyReturnType(QualType RetTy) const; + ABIArgInfo classifyArgumentType(QualType Ty) const; void computeInfo(CGFunctionInfo &FI) const override; }; } // end anonymous namespace

[clang] [compiler-rt] [llvm] [SPARC] Properly handle CC for long double on sparc32 (PR #162226)

2025-11-09 Thread Sergei Barannikov via cfe-commits
@@ -20,3 +20,17 @@ r (long long __complex__ a, long long __complex__ b) { return 0; } + +// CHECK-LABEL: define{{.*}} void @s(ptr dead_on_unwind noalias writable sret(fp128) align 8 %agg.result, ptr noundef byval(fp128) align 8 %0) #0 +long double +s(long double a) +{ +

[clang] [compiler-rt] [llvm] [SPARC] Properly handle CC for long double on sparc32 (PR #162226)

2025-11-09 Thread Sergei Barannikov via cfe-commits
s-barannikov wrote: > > > > ``` > > > > declare fp128 @fmul(fp128 %a, fp128 %b) > > > > > > > > define fp128 @square(fp128 %num) { > > > > %ret = call fp128 @fmul(fp128 %num, fp128 %num) > > > > ret fp128 %ret > > > > } > > > > ``` > > > > > > > > > I think the main issue here is that

[clang] Worked on the issue #147324 (PR #167228)

2025-11-09 Thread via cfe-commits
https://github.com/Sandeep2265 closed https://github.com/llvm/llvm-project/pull/167228 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Switch warning suppression multi-match rule to "last match takes precedence" (PR #162237)

2025-11-09 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/162237 >From b0aa1c4f6462bba4700a7b72804370bd9fddc453 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Tue, 7 Oct 2025 00:56:26 -0700 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20ch?= =?U

[clang] a8a0ffb - [clang][bytecode] Check source pointer for bitcast validity (#166907)

2025-11-09 Thread via cfe-commits
Author: Timm Baeder Date: 2025-11-10T08:17:08+01:00 New Revision: a8a0ffba739d247e24faaf612ac8f2d8faf1de3c URL: https://github.com/llvm/llvm-project/commit/a8a0ffba739d247e24faaf612ac8f2d8faf1de3c DIFF: https://github.com/llvm/llvm-project/commit/a8a0ffba739d247e24faaf612ac8f2d8faf1de3c.diff L

[clang] [clang][bytecode] Check source pointer for bitcast validity (PR #166907)

2025-11-09 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/166907 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers][X86] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - allow PALIGNR byte shift intrinsics to be used in constexpr (PR #162005)

2025-11-09 Thread Ye Tian via cfe-commits
TianYe717 wrote: Hi @RKSimon , Apologies for missing the issue’s suggestions earlier. I’ve now addressed them and would greatly appreciate it if you could review the changes again. Thanks again for your patience and feedback! https://github.com/llvm/llvm-project/pull/162005 __

[clang] [compiler-rt] [llvm] [SPARC] Properly handle CC for long double on sparc32 (PR #162226)

2025-11-09 Thread Sergei Barannikov via cfe-commits
@@ -960,9 +960,9 @@ else () list(APPEND BUILTIN_CFLAGS_${arch} -fomit-frame-pointer -DCOMPILER_RT_ARMHF_TARGET) endif() - # For RISCV32, we must force enable int128 for compiling long + # For RISCV32 and 32-bit SPARC, we must force enable int128 for c

[clang] [compiler-rt] [llvm] [SPARC] Properly handle CC for long double on sparc32 (PR #162226)

2025-11-09 Thread Sergei Barannikov via cfe-commits
s-barannikov wrote: > > > > ``` > > > > declare fp128 @fmul(fp128 %a, fp128 %b) > > > > > > > > define fp128 @square(fp128 %num) { > > > > %ret = call fp128 @fmul(fp128 %num, fp128 %num) > > > > ret fp128 %ret > > > > } > > > > ``` > > > > > > > > > I think the main issue here is that

[clang-tools-extra] [clang-tidy] Add readability-constant-operand-order check (PR #167158)

2025-11-09 Thread Yanzuo Liu via cfe-commits
@@ -0,0 +1,197 @@ +//===--===// +// +// 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 readability-constant-operand-order check (PR #167158)

2025-11-09 Thread Yanzuo Liu via cfe-commits
zwuis wrote: Missing tests with parenthesized expressions. https://github.com/llvm/llvm-project/pull/167158 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang-tools-extra] [clang-tidy] Add readability-constant-operand-order check (PR #167158)

2025-11-09 Thread Yanzuo Liu via cfe-commits
@@ -0,0 +1,197 @@ +//===--===// +// +// 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 readability-constant-operand-order check (PR #167158)

2025-11-09 Thread Yanzuo Liu via cfe-commits
@@ -0,0 +1,31 @@ +// RUN: %check_clang_tidy %s readability-constant-operand-order %t -- -- -std=c++17 +// RUN: %check_clang_tidy %s readability-constant-operand-order %t -- -check-suffixes=LEFT -- -config="{CheckOptions:[{key: readability-constant-operand-order.PreferredConstan

[clang] [lldb] [llvm] [cmake] Add support for statically linking libxml2 (PR #166867)

2025-11-09 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek requested changes to this pull request. I'm supportive of the idea but not the implementation. I think the implementation should do exactly what the description says, that is follow the model we used for zstd: it should provide a custom `FindLibXml2` which finds (b

[clang] [lldb] [llvm] [cmake] Add support for statically linking libxml2 (PR #166867)

2025-11-09 Thread Petr Hosek via cfe-commits
@@ -0,0 +1,31 @@ +include(ExternalProject) + +if (NOT LIBXML2_PREFIX) + set (LIBXML2_PREFIX libxml2) +endif() + +set(LIBXML2_PATH ${CMAKE_CURRENT_BINARY_DIR}/${LIBXML2_PREFIX}/src/${LIBXML2_PREFIX}) +set(LIBXML2_LIB_PATH ${LIBXML2_PATH}-build/libxml2.a) + +ExternalProject_Add(${

[clang] [lldb] [llvm] [cmake] Add support for statically linking libxml2 (PR #166867)

2025-11-09 Thread Petr Hosek via cfe-commits
@@ -190,3 +190,8 @@ add_lldb_library(lldbHost NO_PLUGIN_DEPENDENCIES ${LLDB_LIBEDIT_LIBS} ) +if (LLDB_ENABLE_LIBXML2 AND LLVM_USE_STATIC_LIBXML2) + target_link_libraries(lldbHost PRIVATE ${LIBXML2_LIBRARIES}) + target_include_directories(lldbHost PUBLIC ${LIBXML2_INCLU

[clang-tools-extra] [clang-tidy][NFC] Add `.editorconfig` for `.rst` files (PR #167269)

2025-11-09 Thread via cfe-commits
https://github.com/zeyi2 edited https://github.com/llvm/llvm-project/pull/167269 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC] Add `.editorconfig` for `.rst` files (PR #167269)

2025-11-09 Thread via cfe-commits
@@ -0,0 +1,8 @@ +[clang-tidy/checks/**/*.rst] +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +end_of_line = lf +indent_style = space +indent_size = 2 zeyi2 wrote: I'm not sure this is necessary. The clang-tidy docs currently mix si

[clang] [llvm] [AMDGPU] Apply alignment attr for make.buffer.rsrc (PR #166914)

2025-11-09 Thread via cfe-commits
https://github.com/Shoreshen updated https://github.com/llvm/llvm-project/pull/166914 >From 4d3d6e41cb347572b69cd84705218786a01a7b4e Mon Sep 17 00:00:00 2001 From: shore <[email protected]> Date: Fri, 7 Nov 2025 17:52:32 +0800 Subject: [PATCH 1/3] Apply alignment attr for make.buffer.rsrc --- l

[clang-tools-extra] [clang-tidy][NFC] Add `.editorconfig` for `.rst` files (PR #167269)

2025-11-09 Thread via cfe-commits
https://github.com/zeyi2 created https://github.com/llvm/llvm-project/pull/167269 Add an `.editorconfig` file, this helps contributors’ editors auto‑apply these conventions and reduces regressions. This is part of the documentation improvement discussed in #167098 >From 85c41652d2256af9861d6

[clang] [llvm] [RISCV][llvm] Support Smpmpmt version 0.6 (PR #166322)

2025-11-09 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/166322 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 0d786b9 - [clang-tidy][NFC] Enable `performance-unnecessary-value-param` in the codebase (#163686)

2025-11-09 Thread via cfe-commits
Author: Victor Chernyakin Date: 2025-11-09T20:24:29-08:00 New Revision: 0d786b9a207aa0e6d88dde7fd9ffe0b364db69a4 URL: https://github.com/llvm/llvm-project/commit/0d786b9a207aa0e6d88dde7fd9ffe0b364db69a4 DIFF: https://github.com/llvm/llvm-project/commit/0d786b9a207aa0e6d88dde7fd9ffe0b364db69a4.d

[clang-tools-extra] [clang-tidy][NFC] Enable `performance-unnecessary-value-param` in the codebase (PR #163686)

2025-11-09 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook closed https://github.com/llvm/llvm-project/pull/163686 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [SPARC] Properly handle CC for long double on sparc32 (PR #162226)

2025-11-09 Thread via cfe-commits
https://github.com/koachan updated https://github.com/llvm/llvm-project/pull/162226 >From 0c5c263bf23f0b102b829a9d95cf4adfdc49630f Mon Sep 17 00:00:00 2001 From: Koakuma Date: Tue, 7 Oct 2025 12:55:39 +0700 Subject: [PATCH 1/7] [WIP][SPARC] Properly handle CC for long double on sparc32 Pass a

[clang] [llvm] [RISCV][llvm] Support Smpmpmt version 0.6 (PR #166322)

2025-11-09 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat updated https://github.com/llvm/llvm-project/pull/166322 >From 1b8cf63b901f2ccca150fa239661f60022bf51e9 Mon Sep 17 00:00:00 2001 From: Brandon Wu Date: Mon, 3 Nov 2025 23:09:12 -0800 Subject: [PATCH 1/3] [RISCV][llvm] Support Smpmpmt version 0.6 spec: https://github.

[clang] [compiler-rt] [llvm] [SPARC] Properly handle CC for long double on sparc32 (PR #162226)

2025-11-09 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff origin/main HEAD --extensions h,cpp,c -- clang/lib/Basic/Targets/Sparc.h clang/lib/Co

[clang] [Headers][X86] Allow AVX512 masked arithmetic intrinsics to be used in constexpr (PR #162816)

2025-11-09 Thread via cfe-commits
@@ -11705,6 +11705,23 @@ bool VectorExprEvaluator::VisitCallExpr(const CallExpr *E) { return Success(APValue(ResultElements.data(), SourceLen), E); }; + auto EvalSelectScalar = [&](unsigned Len) -> std::optional { +APSInt Mask; +APValue AVal, WVal; +

[clang] [compiler-rt] [llvm] [SPARC] Properly handle CC for long double on sparc32 (PR #162226)

2025-11-09 Thread via cfe-commits
https://github.com/koachan updated https://github.com/llvm/llvm-project/pull/162226 >From 0c5c263bf23f0b102b829a9d95cf4adfdc49630f Mon Sep 17 00:00:00 2001 From: Koakuma Date: Tue, 7 Oct 2025 12:55:39 +0700 Subject: [PATCH 1/7] [WIP][SPARC] Properly handle CC for long double on sparc32 Pass a

[clang] [compiler-rt] [llvm] [SPARC] Properly handle CC for long double on sparc32 (PR #162226)

2025-11-09 Thread via cfe-commits
koachan wrote: > > > ``` > > > declare fp128 @fmul(fp128 %a, fp128 %b) > > > > > > define fp128 @square(fp128 %num) { > > > %ret = call fp128 @fmul(fp128 %num, fp128 %num) > > > ret fp128 %ret > > > } > > > ``` > > > > > > I think the main issue here is that the fp128s need to be passe

[clang] [clang] [Serialization] No transitive change for MacroID and PreprocessedEntityID (PR #166346)

2025-11-09 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > > Also, can you please compile real-world modules (e.g. libc++) and show > > > how this affects the PCM size? > > > > > > In my simple test, it didn't affect the PCM size. > > That's why I'm specifically asking for a real-world workload. > > > It makes sense in the theo

[clang] [Headers][X86] Allow AVX512 masked arithmetic intrinsics to be used in constexpr (PR #162816)

2025-11-09 Thread via cfe-commits
@@ -3598,6 +3598,27 @@ bool InterpretBuiltin(InterpState &S, CodePtr OpPC, const CallExpr *Call, return APInt::getAllOnes(DstBits); }); + case clang::X86::BI__builtin_ia32_selectss_128: + case clang::X86::BI__builtin_ia32_selectsd_128: { +const unsigned N = +

[clang] [Headers][X86] Allow AVX512 masked arithmetic intrinsics to be used in constexpr (PR #162816)

2025-11-09 Thread via cfe-commits
@@ -3598,6 +3598,27 @@ bool InterpretBuiltin(InterpState &S, CodePtr OpPC, const CallExpr *Call, return APInt::getAllOnes(DstBits); }); + case clang::X86::BI__builtin_ia32_selectss_128: + case clang::X86::BI__builtin_ia32_selectsd_128: { +const unsigned N = --

[clang] [Headers][X86] Allow AVX512 masked arithmetic intrinsics to be used in constexpr (PR #162816)

2025-11-09 Thread via cfe-commits
@@ -3598,6 +3598,27 @@ bool InterpretBuiltin(InterpState &S, CodePtr OpPC, const CallExpr *Call, return APInt::getAllOnes(DstBits); }); + case clang::X86::BI__builtin_ia32_selectss_128: + case clang::X86::BI__builtin_ia32_selectsd_128: { +const unsigned N = +

[clang] [clang] [Serialization] No transitive change for MacroID and PreprocessedEntityID (PR #166346)

2025-11-09 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/166346 >From 5c491d055d679981141787d9a8401f30608305b3 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 4 Nov 2025 17:41:04 +0800 Subject: [PATCH] [clang] [Serialization] No transitive change for MacroID and Pre

[clang] [Sema] Improve diagnostic for 'auto' in local-class member params (PR #167201)

2025-11-09 Thread Sai Deepak Sana via cfe-commits
https://github.com/saideepaksana closed https://github.com/llvm/llvm-project/pull/167201 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy] Add `IgnoreValueCalls` option to bugprone-unchecked-optional-access (PR #167209)

2025-11-09 Thread via cfe-commits
https://github.com/zeyi2 updated https://github.com/llvm/llvm-project/pull/167209 >From a33d0c02f8a31fdabf2a678fd02c7e6b4ca4a274 Mon Sep 17 00:00:00 2001 From: mtx Date: Sun, 9 Nov 2025 17:01:11 +0800 Subject: [PATCH 1/2] [clang-tidy] Add `IgnoreValueCalls` option to bugprone-unchecked-optiona

[clang] [clang-tools-extra] [clang-tidy] Add `IgnoreValueCalls` option to bugprone-unchecked-optional-access (PR #167209)

2025-11-09 Thread via cfe-commits
zeyi2 wrote: Not quite sure why `Labelling new pull requests` failed. I'm trying to figure it out. https://github.com/llvm/llvm-project/pull/167209 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [clang-tools-extra] [clang-tidy] Add `IgnoreValueCalls` option to bugprone-unchecked-optional-access (PR #167209)

2025-11-09 Thread via cfe-commits
https://github.com/zeyi2 updated https://github.com/llvm/llvm-project/pull/167209 >From a33d0c02f8a31fdabf2a678fd02c7e6b4ca4a274 Mon Sep 17 00:00:00 2001 From: mtx Date: Sun, 9 Nov 2025 17:01:11 +0800 Subject: [PATCH 1/2] [clang-tidy] Add `IgnoreValueCalls` option to bugprone-unchecked-optiona

[clang] [clang-tools-extra] [clang-tidy] Add `IgnoreValueCalls` option to bugprone-unchecked-optional-access (PR #167209)

2025-11-09 Thread via cfe-commits
https://github.com/zeyi2 updated https://github.com/llvm/llvm-project/pull/167209 >From a33d0c02f8a31fdabf2a678fd02c7e6b4ca4a274 Mon Sep 17 00:00:00 2001 From: mtx Date: Sun, 9 Nov 2025 17:01:11 +0800 Subject: [PATCH 1/2] [clang-tidy] Add `IgnoreValueCalls` option to bugprone-unchecked-optiona

[clang] [CIR] X86 vector fcmp-sse vector builtins (PR #167125)

2025-11-09 Thread via cfe-commits
@@ -0,0 +1,102 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -O2 -fclangir -emit-cir %s -o - | FileCheck %s --check-prefix=CIR +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -O2 -fclangir -emit-llvm %s -o - | FileCheck %s -check-prefix=LLVM +// RUN: %clang_cc1 -

[clang] [clang-tools-extra] [clang-tidy] Add `IgnoreValueCalls` option to bugprone-unchecked-optional-access (PR #167209)

2025-11-09 Thread via cfe-commits
@@ -351,7 +351,10 @@ Changes in existing checks - Improved :doc:`bugprone-unchecked-optional-access ` check by supporting ``NullableValue::makeValue`` and ``NullableValue::makeValueInplace`` to - prevent false-positives for ``BloombergLP::bdlb::NullableValue`` type. + pre

[clang] [NFC][Clang][Test] Drop calling convention check from address-space-conversions.cpp (PR #167261)

2025-11-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Wenju He (wenju-he) Changes Calling convention is irrelevant to address space verification and adds complixity for other target triples. --- Full diff: https://github.com/llvm/llvm-project/pull/167261.diff 1 Files Affected: - (modified

[clang] [clang-tools-extra] [clang-tidy] Add `IgnoreValueCalls` option to bugprone-unchecked-optional-access (PR #167209)

2025-11-09 Thread via cfe-commits
@@ -351,7 +351,10 @@ Changes in existing checks - Improved :doc:`bugprone-unchecked-optional-access ` check by supporting ``NullableValue::makeValue`` and ``NullableValue::makeValueInplace`` to - prevent false-positives for ``BloombergLP::bdlb::NullableValue`` type. + pre

[clang] [NFC][Clang][Test] Drop calling convention check from address-space-conversions.cpp (PR #167261)

2025-11-09 Thread Wenju He via cfe-commits
https://github.com/wenju-he created https://github.com/llvm/llvm-project/pull/167261 Calling convention is irrelevant to address space verification and adds complixity for other target triples. >From 9cc80f12877cd755d3bd379aeced1c360a005669 Mon Sep 17 00:00:00 2001 From: Wenju He Date: Mon, 1

[clang-tools-extra] New check for static_cast of an enum class type (PR #167212)

2025-11-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 commented: please use `clang-tools-extra/clang-tidy/add_new_check.py` to create new check https://github.com/llvm/llvm-project/pull/167212 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi

[clang-tools-extra] [clang-tidy] Rename 'cert-err60-cpp' to 'bugprone-exception-copy-constructor-throws' (PR #164061)

2025-11-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/164061 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a crash in AlignArrayOfStructures (PR #167099)

2025-11-09 Thread via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/167099 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 836919b - [clang-format] Fix a crash in AlignArrayOfStructures (#167099)

2025-11-09 Thread via cfe-commits
Author: owenca Date: 2025-11-09T17:35:54-08:00 New Revision: 836919bb3449767fc1734e402d3ebf989acb URL: https://github.com/llvm/llvm-project/commit/836919bb3449767fc1734e402d3ebf989acb DIFF: https://github.com/llvm/llvm-project/commit/836919bb3449767fc1734e402d3ebf989acb.diff LOG: [

[clang] [clang-format] Fix a crash in AlignArrayOfStructures (PR #167099)

2025-11-09 Thread via cfe-commits
owenca wrote: > What about other pp directives? I wouldn't bother as brace tokens can only exist in macro bodies in practice. https://github.com/llvm/llvm-project/pull/167099 ___ cfe-commits mailing list [email protected] https://lists.llvm.o

[clang-tools-extra] [clang-tidy][NFC] Enable `performance-unnecessary-value-param` in the codebase (PR #163686)

2025-11-09 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook updated https://github.com/llvm/llvm-project/pull/163686 >From 6cd0c193838287a1dcb431768da12091b816d9dc Mon Sep 17 00:00:00 2001 From: Victor Chernyakin Date: Wed, 15 Oct 2025 19:37:52 -0700 Subject: [PATCH 1/3] [clang-tidy][NFC] Enable `performance-unnecessary-va

[clang-tools-extra] [clang-tidy][NFC] Enable `performance-unnecessary-value-param` in the codebase (PR #163686)

2025-11-09 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff origin/main HEAD --extensions h,cpp -- clang-tools-extra/clang-tidy/ClangTidy.cpp cl

[clang-tools-extra] [clang-tidy][NFC] Enable `performance-unnecessary-value-param` in the codebase (PR #163686)

2025-11-09 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook updated https://github.com/llvm/llvm-project/pull/163686 >From 6cd0c193838287a1dcb431768da12091b816d9dc Mon Sep 17 00:00:00 2001 From: Victor Chernyakin Date: Wed, 15 Oct 2025 19:37:52 -0700 Subject: [PATCH 1/2] [clang-tidy][NFC] Enable `performance-unnecessary-va

[clang-tools-extra] [clang-tidy][NFC] Enable `performance-unnecessary-value-param` in the codebase (PR #163686)

2025-11-09 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook updated https://github.com/llvm/llvm-project/pull/163686 >From 6cd0c193838287a1dcb431768da12091b816d9dc Mon Sep 17 00:00:00 2001 From: Victor Chernyakin Date: Wed, 15 Oct 2025 19:37:52 -0700 Subject: [PATCH 1/2] [clang-tidy][NFC] Enable `performance-unnecessary-va

[clang-tools-extra] [clang-tidy][NFC] Enable `performance-unnecessary-value-param` in the codebase (PR #163686)

2025-11-09 Thread Victor Chernyakin via cfe-commits
@@ -76,7 +77,7 @@ void NonTrivialTypesLibcMemoryCallsCheck::registerMatchers( auto IsRecordSizeOf = expr(sizeOfExpr(hasArgumentOfType(equalsBoundNode("Record"; auto ArgChecker = [&](Matcher RecordConstraint, localspook wrote: ```suggestion auto

[clang-tools-extra] [clang-tidy][NFC] Enable `performance-unnecessary-value-param` in the codebase (PR #163686)

2025-11-09 Thread Victor Chernyakin via cfe-commits
@@ -76,7 +77,7 @@ void NonTrivialTypesLibcMemoryCallsCheck::registerMatchers( auto IsRecordSizeOf = expr(sizeOfExpr(hasArgumentOfType(equalsBoundNode("Record"; auto ArgChecker = [&](Matcher RecordConstraint, localspook wrote: Hmm, that's indeed s

[clang-tools-extra] [clang-tidy] Add readability-constant-operand-order check (PR #167158)

2025-11-09 Thread Victor Chernyakin via cfe-commits
@@ -0,0 +1,197 @@ +//===--===// +// +// 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 readability-constant-operand-order check (PR #167158)

2025-11-09 Thread Victor Chernyakin via cfe-commits
@@ -0,0 +1,197 @@ +//===--===// +// +// 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 readability-constant-operand-order check (PR #167158)

2025-11-09 Thread Victor Chernyakin via cfe-commits
@@ -0,0 +1,197 @@ +//===--===// +// +// 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 readability-constant-operand-order check (PR #167158)

2025-11-09 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook commented: I did an initial round of review, but this will probably require several more; right now this PR is in pretty rough shape. I don't say that to be discouraging, but I do want to warn about that. https://github.com/llvm/llvm-project/pull/167158 __

[clang-tools-extra] [clang-tidy] Add readability-constant-operand-order check (PR #167158)

2025-11-09 Thread Victor Chernyakin via cfe-commits
@@ -0,0 +1,197 @@ +//===--===// +// +// 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 readability-constant-operand-order check (PR #167158)

2025-11-09 Thread Victor Chernyakin via cfe-commits
@@ -0,0 +1,56 @@ +//===--===// +// +// 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: Apac

[clang-tools-extra] [clang-tidy] Add readability-constant-operand-order check (PR #167158)

2025-11-09 Thread Victor Chernyakin via cfe-commits
@@ -0,0 +1,197 @@ +//===--===// +// +// 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 readability-constant-operand-order check (PR #167158)

2025-11-09 Thread Victor Chernyakin via cfe-commits
@@ -0,0 +1,31 @@ +// RUN: %check_clang_tidy %s readability-constant-operand-order %t -- -- -std=c++17 +// RUN: %check_clang_tidy %s readability-constant-operand-order %t -- -check-suffixes=LEFT -- -config="{CheckOptions:[{key: readability-constant-operand-order.PreferredConstan

[clang-tools-extra] [clang-tidy] Add readability-constant-operand-order check (PR #167158)

2025-11-09 Thread Victor Chernyakin via cfe-commits
@@ -0,0 +1,56 @@ +//===--===// +// +// 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: Apac

[clang-tools-extra] [clang-tidy] Add readability-constant-operand-order check (PR #167158)

2025-11-09 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook edited https://github.com/llvm/llvm-project/pull/167158 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Add regalloc PBQP for all targets in clang (PR #166645)

2025-11-09 Thread Lang Hames via cfe-commits
lhames wrote: @Zararest -- seems reasonable to me. I believe that we used to offer it on all platforms. Out of interest: Did you check what this does to the size of the clang binary? https://github.com/llvm/llvm-project/pull/166645 ___ cfe-commits ma

[clang] [clang-format] Don't swap `(const override)` with QAS_Right (PR #167191)

2025-11-09 Thread via cfe-commits
@@ -177,13 +177,16 @@ static bool isQualifier(const FormatToken *const Tok) { const FormatToken *LeftRightQualifierAlignmentFixer::analyzeRight( const SourceManager &SourceMgr, const AdditionalKeywords &Keywords, -tooling::Replacements &Fixes, const FormatToken *const

[clang] [clang-format] Don't swap `(const override)` with QAS_Right (PR #167191)

2025-11-09 Thread Björn Schäpers via cfe-commits
@@ -177,13 +177,16 @@ static bool isQualifier(const FormatToken *const Tok) { const FormatToken *LeftRightQualifierAlignmentFixer::analyzeRight( const SourceManager &SourceMgr, const AdditionalKeywords &Keywords, -tooling::Replacements &Fixes, const FormatToken *const

[clang] clang-format: Add splitting for strings with user-defined suffixes (PR #167150)

2025-11-09 Thread Björn Schäpers via cfe-commits
@@ -274,15 +276,21 @@ class BreakableStringLiteral : public BreakableToken { protected: // The column in which the token starts. unsigned StartColumn; - // The prefix a line needs after a break in the token. + // The prefix a line needs at the start Hazar

[clang] clang-format: Add splitting for strings with user-defined suffixes (PR #167150)

2025-11-09 Thread Björn Schäpers via cfe-commits
@@ -15838,6 +15838,10 @@ TEST_F(FormatTest, BreaksWideAndNSStringLiterals) { "@\"NSString literal\";", getGoogleStyleWithColumns(19)); verifyFormat(R"(NSString *s = @"";)", getLLVMStyleWithColumns(26)); + EXPECT_EQ("L\"suffixed \"\n" +"L\"stri

[clang] clang-format: Add splitting for strings with user-defined suffixes (PR #167150)

2025-11-09 Thread Björn Schäpers via cfe-commits
@@ -2540,22 +2540,46 @@ ContinuationIndenter::createBreakableToken(const FormatToken &Current, StringRef Prefix; StringRef Postfix; + // FIXME: Handle whitespace between '_T', '(', '"..."', and ')'. // FIXME: Store Prefix and Suffix (or PrefixLength and Suff

[clang] clang-format: Add splitting for strings with user-defined suffixes (PR #167150)

2025-11-09 Thread Björn Schäpers via cfe-commits
@@ -274,9 +277,14 @@ void BreakableStringLiteral::insertBreak(unsigned LineIndex, unsigned TailOffset, Split Split, unsigned ContentIndent, WhitespaceMana

[clang] clang-format: Add splitting for strings with user-defined suffixes (PR #167150)

2025-11-09 Thread Björn Schäpers via cfe-commits
@@ -2540,22 +2540,46 @@ ContinuationIndenter::createBreakableToken(const FormatToken &Current, StringRef Prefix; StringRef Postfix; + // FIXME: Handle whitespace between '_T', '(', '"..."', and ')'. // FIXME: Store Prefix and Suffix (or PrefixLength and Suff

[clang] clang-format: Add splitting for strings with user-defined suffixes (PR #167150)

2025-11-09 Thread Björn Schäpers via cfe-commits
@@ -274,15 +276,21 @@ class BreakableStringLiteral : public BreakableToken { protected: // The column in which the token starts. unsigned StartColumn; - // The prefix a line needs after a break in the token. + // The prefix a line needs at the start StringRef Prefix; -

[clang] clang-format: Add splitting for strings with user-defined suffixes (PR #167150)

2025-11-09 Thread Björn Schäpers via cfe-commits
@@ -2540,22 +2540,46 @@ ContinuationIndenter::createBreakableToken(const FormatToken &Current, StringRef Prefix; StringRef Postfix; + // FIXME: Handle whitespace between '_T', '(', '"..."', and ')'. // FIXME: Store Prefix and Suffix (or PrefixLength and Suff

[clang] clang-format: Add splitting for strings with user-defined suffixes (PR #167150)

2025-11-09 Thread Björn Schäpers via cfe-commits
@@ -2540,22 +2540,46 @@ ContinuationIndenter::createBreakableToken(const FormatToken &Current, StringRef Prefix; StringRef Postfix; + // FIXME: Handle whitespace between '_T', '(', '"..."', and ')'. // FIXME: Store Prefix and Suffix (or PrefixLength and Suff

[clang-tools-extra] [clang-tidy] Add fine-graded configuration for 'bugprone-exception-escape' (PR #164081)

2025-11-09 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/164081 >From 9dbd3608577c7ec4887a612c633b3121f3306f62 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 18 Oct 2025 15:52:12 +0300 Subject: [PATCH 1/4] [clang-tidy] Add fine-graded configuration for 'bugprone-

[clang-tools-extra] [clang-tidy] Add readability-constant-operand-order check (PR #167158)

2025-11-09 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook edited https://github.com/llvm/llvm-project/pull/167158 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [SPARC] Properly handle CC for long double on sparc32 (PR #162226)

2025-11-09 Thread via cfe-commits
@@ -24,8 +24,8 @@ def CC_Sparc32 : CallingConv<[ // As are v2i32 arguments (this would be the default behavior for // v2i32 if it wasn't allocated to the IntPair register-class) CCIfType<[v2i32], CCCustom<"CC_Sparc_Assign_Split_64">>, - - + // f128 arguments are passed i

[clang-tools-extra] [clang-tidy] Add fine-graded configuration for 'bugprone-exception-escape' (PR #164081)

2025-11-09 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook approved this pull request. https://github.com/llvm/llvm-project/pull/164081 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add fine-graded configuration for 'bugprone-exception-escape' (PR #164081)

2025-11-09 Thread Victor Chernyakin via cfe-commits
@@ -0,0 +1,49 @@ +// RUN: %check_clang_tidy -std=c++11-or-later %s bugprone-exception-escape %t -- \ +// RUN: -config="{CheckOptions: { \ +// RUN: bugprone-exception-escape.CheckDestructors: false, \ +// RUN: bugprone-exception-escape.CheckMoveMemberFunctions:

[clang] [compiler-rt] [llvm] [SPARC] Properly handle CC for long double on sparc32 (PR #162226)

2025-11-09 Thread via cfe-commits
@@ -1057,85 +1051,67 @@ define void @test_sincos_f128(ptr sret({ fp128, fp128 }) %ret, ptr %in) #0 { define void @test_sincos_v2f128(ptr sret({ <2 x fp128>, <2 x fp128> }) %ret, ptr %in) #0 { ; SPARC32-LABEL: test_sincos_v2f128: ; SPARC32: ! %bb.0: -; SPARC32-NEXT:s

[clang] [llvm] clang-format reflow comments disable star: Fixes #58710 (PR #167146)

2025-11-09 Thread Björn Schäpers via cfe-commits
@@ -1,2 +1,5 @@ BasedOnStyle: LLVM LineEnding: LF +ColumnLimit: 80 HazardyKnusperkeks wrote: Don't touch this. https://github.com/llvm/llvm-project/pull/167146 ___ cfe-commits mailing list [email protected]

[clang] [llvm] clang-format reflow comments disable star: Fixes #58710 (PR #167146)

2025-11-09 Thread Björn Schäpers via cfe-commits
@@ -4250,6 +4250,19 @@ struct FormatStyle { /// \version 3.8 ReflowCommentsStyle ReflowComments; + /// If reflow comments is enabled, dont include * in the formatted block comment. +/// \code +///// veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongComment with

[clang] [llvm] clang-format reflow comments disable star: Fixes #58710 (PR #167146)

2025-11-09 Thread Björn Schäpers via cfe-commits
@@ -0,0 +1,2 @@ +// RUN: clang-format -style="{ColumnLimit: 80, ReflowComments: true, ReflowCommentsNoStar: true}" %S/ReflowCommentsNoStarInput.cpp > %t HazardyKnusperkeks wrote: Drop these, we have our tests in `clang/unittests/Format`. https://github.com/llvm

[clang] [llvm] clang-format reflow comments disable star: Fixes #58710 (PR #167146)

2025-11-09 Thread Björn Schäpers via cfe-commits
@@ -506,6 +506,8 @@ BreakableBlockComment::BreakableBlockComment( } Decoration = "* "; + if (Style.ReflowCommentsNoStar) +Decoration = ""; HazardyKnusperkeks wrote: ```suggestion Decoration = Style.ReflowCommentsNoStar ? "" : "* "; ``` https://githu

[clang] [llvm] [CodeGen][KCFI] Switch type hash from xxHash64 to FNV-1a (PR #167254)

2025-11-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms Author: Kees Cook (kees) Changes Switch from xxHash64 to FNV-1a (to match the coming GCC KCFI implementation) and to remove the last user of xxHash64. --- Full diff: https://github.com/llvm/llvm-project/pull/167254.diff 9 Files Affect

[clang] [llvm] [CodeGen][KCFI] Switch type hash from xxHash64 to FNV-1a (PR #167254)

2025-11-09 Thread Kees Cook via cfe-commits
https://github.com/kees created https://github.com/llvm/llvm-project/pull/167254 Switch from xxHash64 to FNV-1a (to match the coming GCC KCFI implementation) and to remove the last user of xxHash64. >From e6257e667e5d3697f51af8ba42edf12ee1c0657e Mon Sep 17 00:00:00 2001 From: Kees Cook Date: S

[clang] [compiler-rt] [llvm] [SPARC] Properly handle CC for long double on sparc32 (PR #162226)

2025-11-09 Thread via cfe-commits
@@ -26,19 +26,29 @@ class SparcV8ABIInfo : public DefaultABIInfo { private: ABIArgInfo classifyReturnType(QualType RetTy) const; + ABIArgInfo classifyArgumentType(QualType Ty) const; void computeInfo(CGFunctionInfo &FI) const override; }; } // end anonymous namespace

[clang] [clang-format] Fix a crash in AlignArrayOfStructures (PR #167099)

2025-11-09 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. What about other pp directives? https://github.com/llvm/llvm-project/pull/167099 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [clang-format] Add xxxMaxDigitsNoSeparator (PR #164286)

2025-11-09 Thread Björn Schäpers via cfe-commits
HazardyKnusperkeks wrote: > Instead of adding `MaxDigitsNoSeparator` suboptions, how about extending > `Decimal`, etc.? For example, `Decimal: -4` would set an upper bound of 4 > digits for removing the separators whereas `Decimal: -1` would still remove > all separators as before. I'll take

[clang-tools-extra] [clang-tidy] Move 'cert-msc51-cpp', 'cert-msc32-c' checks outside of 'cert' module and give a proper name (PR #167143)

2025-11-09 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook approved this pull request. https://github.com/llvm/llvm-project/pull/167143 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   >