[clang] [llvm] [AArch64] Add support for -mlong-calls code generation (PR #142982)

2025-06-05 Thread Peter Smith via cfe-commits
smithp35 wrote: My understanding is that this will make all calls to global functions into long calls. In AArch64 static linkes are required to insert range extension thunks for out of range BLs. In the best case this is just another direct branch, at worst case for `--pic-veneer` this is ju

[clang-tools-extra] added option `google-readability-namespace-comments.AllowNoNamespaceComments` (PR #124265)

2025-06-05 Thread Thorsten Klein via cfe-commits
https://github.com/thorsten-klein updated https://github.com/llvm/llvm-project/pull/124265 >From 0c0f9a860e060eecb23a541f478772a3f7b2731c Mon Sep 17 00:00:00 2001 From: "Klein, Thorsten (GDE-EDSI1)" Date: Fri, 24 Jan 2025 13:46:24 +0100 Subject: [PATCH] added option AllowNoNamespaceComments for

[clang] [C2y] Handle FP-suffixes on prefixed octals (#141230) (PR #141695)

2025-06-05 Thread Naveen Seth Hanig via cfe-commits
naveen-seth wrote: Thanks for the review. In case the changes get approved, please also merge it on my behalf since I don't have commit access yet. Thank you! https://github.com/llvm/llvm-project/pull/141695 ___ cfe-commits mailing list cfe-commits@l

[clang-tools-extra] added option `google-readability-namespace-comments.AllowNoNamespaceComments` (PR #124265)

2025-06-05 Thread via cfe-commits
@@ -39,3 +39,10 @@ Options An unsigned integer specifying the number of spaces before the comment closing a namespace definition. Default is `1U`. + +.. option:: AllowOmittingNamespaceComments + + When `true`, the check will accept if no namespace comment is present. +

[clang] [Clang] Preserve CXXParenListInitExpr in TreeTransform. (PR #138518)

2025-06-05 Thread Alexander Kornienko via cfe-commits
alexfh wrote: Okay, I think, I have a fix. https://github.com/llvm/llvm-project/pull/138518 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [clang] Simplify device kernel attributes (PR #137882)

2025-06-05 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex closed https://github.com/llvm/llvm-project/pull/137882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [clang] Simplify device kernel attributes (PR #137882)

2025-06-05 Thread Nick Sarnie via cfe-commits
sarnex wrote: Thanks for the reviews/feedback, going to merge this. Hopefully there isn't any fallout :) https://github.com/llvm/llvm-project/pull/137882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [flang] [llvm] Fix and reapply IR PGO support for Flang (PR #142892)

2025-06-05 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: Thanks for the fix and the explanation. I will try this PR out, but it might take me a day or two. Do you have merge access? If not, I will merge it if everything passes for me. https://github.com/llvm/llvm-project/pull/142892 ___

[clang] [llvm] Add -funique-source-file-identifier flag. (PR #142901)

2025-06-05 Thread Teresa Johnson via cfe-commits
@@ -4204,13 +4204,15 @@ def ftrigraphs : Flag<["-"], "ftrigraphs">, Group, def fno_trigraphs : Flag<["-"], "fno-trigraphs">, Group, HelpText<"Do not process trigraph sequences">, Visibility<[ClangOption, CC1Option]>; -defm unique_source_file_names: BoolOption<"f", "unique-

[clang] [Clang] Implement CWG2496 (PR #142975)

2025-06-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Can you test full 3x3 matrix of combinations of ref-qualifiers between overriding and overridden functions? https://github.com/llvm/llvm-project/pull/142975 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang] Implement CWG2496 (PR #142975)

2025-06-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/142975 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement CWG2496 (PR #142975)

2025-06-05 Thread Vlad Serebrennikov via cfe-commits
@@ -215,3 +215,23 @@ void (*q)() throw() = S(); // since-cxx17-error@-1 {{no viable conversion from 'S' to 'void (*)() throw()'}} // since-cxx17-note@#cwg2486-conv {{candidate function}} } // namespace cwg2486 + + +namespace cwg2496 { // cwg2496: 21 +#if __cplusplus >= 20110

[clang] [llvm] [CodeGen][COFF] Always emit CodeView compiler info when hotpatch option is enabled (PR #142970)

2025-06-05 Thread Alexandre Ganea via cfe-commits
aganea wrote: > In this version, Clang emits a full debug IR, but if we're going to do this > by default, it probably makes more sense to emit just a minimal `llvm.dbg.cu` > when debug info isn’t otherwise enabled. I’ve already experimented with that > approach. Yes, I think one of my worry re

[clang] [CIR] Upstream global initialization for ComplexType (PR #141369)

2025-06-05 Thread Henrich Lauko via cfe-commits
@@ -0,0 +1,41 @@ + +//===--===// +// +// 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] 680463b - Fix error that reference to PointerType is ambiguous in clang/lib/Analysis/UnsafeBufferUsage.cpp (#142966)

2025-06-05 Thread via cfe-commits
Author: Abhina Sree Date: 2025-06-05T11:51:12-04:00 New Revision: 680463bab1e0f95fb5982b90bce46e743ae9e235 URL: https://github.com/llvm/llvm-project/commit/680463bab1e0f95fb5982b90bce46e743ae9e235 DIFF: https://github.com/llvm/llvm-project/commit/680463bab1e0f95fb5982b90bce46e743ae9e235.diff L

[clang] Fix error that reference to PointerType is ambiguous in clang/lib/Analysis/UnsafeBufferUsage.cpp (PR #142966)

2025-06-05 Thread Abhina Sree via cfe-commits
https://github.com/abhina-sree closed https://github.com/llvm/llvm-project/pull/142966 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFC] Use actual operand name in adaptor-obtained operands (PR #143028)

2025-06-05 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko created https://github.com/llvm/llvm-project/pull/143028 This mirrors incubator changes from https://github.com/llvm/clangir/pull/1661 >From 99a25aa458ee70e88bdf23cfe3ebab3828d4d16a Mon Sep 17 00:00:00 2001 From: xlauko Date: Thu, 5 Jun 2025 21:59:58 +0200 Subject: [P

[clang] [CIR][NFC] Use actual operand name in adaptor-obtained operands (PR #143028)

2025-06-05 Thread Henrich Lauko via cfe-commits
xlauko wrote: * **#143028** https://app.graphite.dev/github/pr/llvm/llvm-project/143028?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/14302

[clang] [CIR][NFC] Use actual operand name in adaptor-obtained operands (PR #143028)

2025-06-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir @llvm/pr-subscribers-clang Author: Henrich Lauko (xlauko) Changes This mirrors incubator changes from https://github.com/llvm/clangir/pull/1661 --- Full diff: https://github.com/llvm/llvm-project/pull/143028.diff 1 Files Affected: - (modified

[clang] [CIR][NFC] Use actual operand name in adaptor-obtained operands (PR #143028)

2025-06-05 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko ready_for_review https://github.com/llvm/llvm-project/pull/143028 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream minimal builtin function call support (PR #142981)

2025-06-05 Thread Andy Kaylor via cfe-commits
@@ -1858,6 +1858,40 @@ def FuncOp : CIR_Op<"func", [ let hasVerifier = 1; } +//===--===// +// LLVMIntrinsicCallOp +//===--===// + +def LLVM

[clang] [CIR] Upstream minimal builtin function call support (PR #142981)

2025-06-05 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,453 @@ +//===--===// +// +// 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] [CIR] Upstream minimal builtin function call support (PR #142981)

2025-06-05 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor commented: This PR needs to either remove a lot of code or add a lot more test cases. https://github.com/llvm/llvm-project/pull/142981 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [CIR] Upstream minimal builtin function call support (PR #142981)

2025-06-05 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,453 @@ +//===--===// +// +// 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] [CIR] Upstream minimal builtin function call support (PR #142981)

2025-06-05 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,453 @@ +//===--===// +// +// 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] [CIR] Upstream minimal builtin function call support (PR #142981)

2025-06-05 Thread Andy Kaylor via cfe-commits
@@ -1004,8 +1004,48 @@ static cir::FuncOp emitFunctionDeclPointer(CIRGenModule &cgm, GlobalDecl gd) { return cgm.getAddrOfFunction(gd); } -static CIRGenCallee emitDirectCallee(CIRGenModule &cgm, GlobalDecl gd) { - assert(!cir::MissingFeatures::opCallBuiltinFunc()); +// Det

[clang] [CIR] Upstream minimal builtin function call support (PR #142981)

2025-06-05 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,453 @@ +//===--===// +// +// 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] [CIR] Upstream minimal builtin function call support (PR #142981)

2025-06-05 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,453 @@ +//===--===// +// +// 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] [CIR] Upstream minimal builtin function call support (PR #142981)

2025-06-05 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,453 @@ +//===--===// +// +// 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] [CIR] Upstream minimal builtin function call support (PR #142981)

2025-06-05 Thread Andy Kaylor via cfe-commits
@@ -1004,8 +1004,48 @@ static cir::FuncOp emitFunctionDeclPointer(CIRGenModule &cgm, GlobalDecl gd) { return cgm.getAddrOfFunction(gd); } -static CIRGenCallee emitDirectCallee(CIRGenModule &cgm, GlobalDecl gd) { - assert(!cir::MissingFeatures::opCallBuiltinFunc()); +// Det

[clang] [CIR] Upstream minimal builtin function call support (PR #142981)

2025-06-05 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/142981 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream minimal builtin function call support (PR #142981)

2025-06-05 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,453 @@ +//===--===// +// +// 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] [CIR] Upstream global initialization for ComplexType (PR #141369)

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

[clang] [clang] Remove separate evaluation step for static class member init. (PR #142713)

2025-06-05 Thread Shafik Yaghmour via cfe-commits
@@ -143,3 +143,8 @@ namespace fold_initializer { const float A::f = __builtin_is_constant_evaluated(); static_assert(fold(A::f == 1.0f)); } + +struct GH99680 { + static const int x = 1/(1-__builtin_is_constant_evaluated()); // expected-error {{in-class initializer for sta

[clang] [CIR] Upstream minimal builtin function call support (PR #142981)

2025-06-05 Thread Andy Kaylor via cfe-commits
@@ -201,6 +201,19 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy { cir::IntType getUInt32Ty() { return typeCache.UInt32Ty; } cir::IntType getUInt64Ty() { return typeCache.UInt64Ty; } + cir::ConstantOp getConstInt(mlir::Location loc, llvm::APSInt intVal); + + cir

[clang] af54790 - [CIR] Defer emitting function definitions (#142862)

2025-06-05 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-06-05T13:08:29-07:00 New Revision: af54790ca0a3d55d58c2cd7c07d3c4e16c689c72 URL: https://github.com/llvm/llvm-project/commit/af54790ca0a3d55d58c2cd7c07d3c4e16c689c72 DIFF: https://github.com/llvm/llvm-project/commit/af54790ca0a3d55d58c2cd7c07d3c4e16c689c72.diff L

[clang] [flang] [Driver] Move CommonArgs to a location visible by the Frontend Drivers (PR #142800)

2025-06-05 Thread Shafik Yaghmour via cfe-commits
@@ -3167,3 +3167,29 @@ void tools::handleInterchangeLoopsArgs(const ArgList &Args, options::OPT_fno_loop_interchange, EnableInterchange)) CmdArgs.push_back("-floop-interchange"); } + +std::optional tools::ParseMPreferVectorWidthOption( +clang::Diagno

[clang] [flang] [Driver] Move CommonArgs to a location visible by the Frontend Drivers (PR #142800)

2025-06-05 Thread Shafik Yaghmour via cfe-commits
@@ -3167,3 +3167,29 @@ void tools::handleInterchangeLoopsArgs(const ArgList &Args, options::OPT_fno_loop_interchange, EnableInterchange)) CmdArgs.push_back("-floop-interchange"); } + +std::optional tools::ParseMPreferVectorWidthOption( +clang::Diagno

[clang] [CIR] Defer emitting function definitions (PR #142862)

2025-06-05 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/142862 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 36dd199 - [CIR] Upstream global initialization for ComplexType (#141369)

2025-06-05 Thread via cfe-commits
Author: Amr Hesham Date: 2025-06-05T22:06:43+02:00 New Revision: 36dd1993a8d06c4ddd5732f926bcffacbb513649 URL: https://github.com/llvm/llvm-project/commit/36dd1993a8d06c4ddd5732f926bcffacbb513649 DIFF: https://github.com/llvm/llvm-project/commit/36dd1993a8d06c4ddd5732f926bcffacbb513649.diff LO

[clang] [CIR] Add decl case for template specialization (PR #143029)

2025-06-05 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/143029 This change adds the switch case to allow template specialization to pass through emitTopLevelDecl without issuing an error. >From be47b607dca53dce1904cdf1a6316f97454ede7a Mon Sep 17 00:00:00 2001 From: Andy

[clang] [CIR] Add decl case for template specialization (PR #143029)

2025-06-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes This change adds the switch case to allow template specialization to pass through emitTopLevelDecl without issuing an error. --- Full diff: https://github.com/llvm/llvm-project

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-05 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/142273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] Fix and reapply IR PGO support for Flang (PR #142892)

2025-06-05 Thread via cfe-commits
fanju110 wrote: > Thanks for the fix and the explanation. I will try this PR out, but it might > take me a day or two. Do you have merge access? If not, I will merge it if > everything passes for me. I don’t have merge access. I’ve run `check-clang`, `check-flang`, and `check-llvm` locally,

[clang] [llvm] [LoongArch][BF16] Add support for the __bf16 type (PR #142548)

2025-06-05 Thread via cfe-commits
@@ -0,0 +1,19 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2 +// RUN: %clang_cc1 -triple loongarch64 -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK-LA64 +// RUN: %clang_cc1 -triple loongarch32 -emit-llvm -o - %s

[clang] [llvm][RISCV] Handle required features of intrinsic correctly (PR #143062)

2025-06-05 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat created https://github.com/llvm/llvm-project/pull/143062 Current approach generates intrinsic records when users specify corresponding required features by using command line option. However it's not able to handle features passed by using target attributes correctly w

[clang] [clang][ptrauth] Add support for querying the ptrauth schema of a type (PR #138482)

2025-06-05 Thread Oliver Hunt via cfe-commits
@@ -605,6 +605,11 @@ KEYWORD(__private_extern__ , KEYALL) KEYWORD(__module_private__ , KEYALL) UNARY_EXPR_OR_TYPE_TRAIT(__builtin_ptrauth_type_discriminator, PtrAuthTypeDiscriminator, KEYALL) +UNARY_EXPR_OR_TYPE_TRAIT(__builtin_ptrauth_has_authentication, P

[clang] [clang-format] More consumeToken() cleanup similar to #142104 (PR #143063)

2025-06-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/143063.diff 1 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+15-20) ``diff diff --git a/clang/lib/Format/TokenAnno

[clang] [clang-format] More consumeToken() cleanup similar to #142104 (PR #143063)

2025-06-05 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/143063 None >From af43a40d33dd7af17b852cfd60df3c9cd1594935 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 5 Jun 2025 21:39:49 -0700 Subject: [PATCH] [clang-format] More consumeToken() cleanup similar to #142104 --

[clang] [llvm] [LoongArch][BF16] Add support for the __bf16 type (PR #142548)

2025-06-05 Thread via cfe-commits
https://github.com/heiher approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/142548 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add support for -mtune=andes-45-series (PR #142900)

2025-06-05 Thread Jim Lin via cfe-commits
tclin914 wrote: > LLVM Buildbot has detected a new failure on builder `arc-builder` running on > `arc-worker` while building `clang,llvm` at step 6 > "test-build-unified-tree-check-all". > > Full details are available at: > https://lab.llvm.org/buildbot/#/builders/3/builds/17084 > > Here is

[clang] [clang-format] Handle requires clause following a pointer type (PR #142893)

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

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-05 Thread Paul Kirth via cfe-commits
ilovepi wrote: Oh, lets updated the PR description with a more complete description of the change. It can also be marked as `Fixes #NNN` since this basically implements everything outlined in the issues, unless I'm forgetting something. https://github.com/llvm/llvm-project/pull/142273

[clang] [llvm] [LoongArch][BF16] Add support for the __bf16 type (PR #142548)

2025-06-05 Thread via cfe-commits
https://github.com/Ami-zhang updated https://github.com/llvm/llvm-project/pull/142548 >From fef9547a6f55debadbba0b893c017a21ed5d1886 Mon Sep 17 00:00:00 2001 From: Ami-zhang Date: Mon, 28 Apr 2025 14:48:58 +0800 Subject: [PATCH] [LoongArch][BF16] Add support for the __bf16 type The LoongArch p

[clang] [llvm] [LoongArch][BF16] Add support for the __bf16 type (PR #142548)

2025-06-05 Thread via cfe-commits
@@ -0,0 +1,611 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2 +// RUN: %clang_cc1 -triple loongarch64 -emit-llvm %s -o - | FileCheck %s --check-prefixes=CHECK-LA64 +// RUN: %clang_cc1 -triple loongarch32 -emit-llvm %s -o -

[clang] [llvm] [llvm][RISCV] Make zvknhb imply zvknha (PR #142896)

2025-06-05 Thread Brandon Wu via cfe-commits
4vtomat wrote: > @4vtomat you did the opposite of this in > [65dc96c](https://github.com/llvm/llvm-project/commit/65dc96c2cfa480b070c7913ac5e313c98ca96520). > What changed now? > > It was explicitly stated by one of the crypto authors here that Zvknhb does > not imply Zvknha [riscv/riscv-cryp

[clang] [llvm] [llvm][RISCV] Make zvknhb imply zvknha (PR #142896)

2025-06-05 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat closed https://github.com/llvm/llvm-project/pull/142896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2a8c7d3 - [RISCV] Add support for -mtune=andes-45-series (#142900)

2025-06-05 Thread via cfe-commits
Author: Jim Lin Date: 2025-06-06T11:34:19+08:00 New Revision: 2a8c7d3c693b2e54bee89ee98b3e844cbb97ff6a URL: https://github.com/llvm/llvm-project/commit/2a8c7d3c693b2e54bee89ee98b3e844cbb97ff6a DIFF: https://github.com/llvm/llvm-project/commit/2a8c7d3c693b2e54bee89ee98b3e844cbb97ff6a.diff LOG:

[clang] [llvm] [RISCV] Add support for -mtune=andes-45-series (PR #142900)

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

[clang] [clang] Diagnose [[nodiscard]] return types in Objective-C++ (PR #142541)

2025-06-05 Thread via cfe-commits
https://github.com/halbi2 updated https://github.com/llvm/llvm-project/pull/142541 >From c683b2aa84cba1b7057592e50c542cd5645adde5 Mon Sep 17 00:00:00 2001 From: halbi2 Date: Mon, 26 May 2025 15:35:13 -0400 Subject: [PATCH 1/3] [clang] [test] More coverage of [[nodiscard]] --- clang/test/SemaC

[clang] [PAuth] Use different discriminators for __int128_t / __uint128_t / _BitInt(n) (PR #140276)

2025-06-05 Thread Oliver Hunt via cfe-commits
@@ -1883,6 +1883,9 @@ void Clang::AddAArch64TargetArgs(const ArgList &Args, Args.addOptInFlag( CmdArgs, options::OPT_fptrauth_function_pointer_type_discrimination, options::OPT_fno_ptrauth_function_pointer_type_discrimination); + Args.addOptInFlag( --

[clang-tools-extra] [clang-tidy] Add support for lambda-expression in `use-trailing-return-type` check (PR #135383)

2025-06-05 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/135383 >From cd0c0aba2d5da7c24fb64dd1a0ed25760ba57c4d Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Thu, 5 Jun 2025 21:51:41 +0300 Subject: [PATCH] [clang-tidy] add support for lambdas in use-trailing-return-ty

[clang] [clang-format] Handle function decls with MS calling conventions (PR #143083)

2025-06-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/143083.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+9-1) - (modified) clang/unittests/Format/TokenAnnotatorTest.cpp

[clang] [clang-format] Handle function decls with MS calling conventions (PR #143083)

2025-06-05 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/143083 None >From 6f319be22826718c82b027c605885d6b95ed5689 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 5 Jun 2025 23:48:47 -0700 Subject: [PATCH] [clang-format] Handle function decls with MS calling conventions

[clang] [clang-format] Handle function decls with MS calling conventions (PR #143083)

2025-06-05 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/143083 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Global string alignment (PR #142346)

2025-06-05 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: The clang patch was written the way it was because it was necessary to comply with the ABI rules. Strings passed to printf don't have any sort of alignment requirement, so you can't really appeal to the ABI rules here, I think? The problem with copying the alignment is th

[clang] [Clang] Reapply CWG2369 "Ordering between constraints and substitution" (PR #122423)

2025-06-05 Thread Jordan Rupprecht via cfe-commits
rupprecht wrote: I bisected a build failure to this commit. I can't figure out if it's expected or not. I minimized it to this: ```c++ #include enum class KindEnum { Unknown = 0, Foo = 1, }; template concept KnownKind = T::kind() != KindEnum::Unknown; template struct KnownType; s

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-05 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi commented: Getting pretty close. I think once the remaining comments are addressed it will probably be ready to land. https://github.com/llvm/llvm-project/pull/142273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-05 Thread Paul Kirth via cfe-commits
@@ -208,37 +208,107 @@ static json::Value extractValue(const TypedefInfo &I) { } static json::Value extractValue(const CommentInfo &I) { - assert((I.Kind == "BlockCommandComment" || I.Kind == "FullComment" || - I.Kind == "ParagraphComment" || I.Kind == "TextComment")

[clang] [clang] Diagnose [[nodiscard]] return types in Objective-C++ (PR #142541)

2025-06-05 Thread via cfe-commits
@@ -272,6 +273,26 @@ QualType ObjCMessageExpr::getCallReturnType(ASTContext &Ctx) const { return Ctx.getReferenceQualifiedType(this); } +std::pair +ObjCMessageExpr::getUnusedResultAttr(ASTContext &Ctx) const { + // If the callee is marked nodiscard, return that attribute +

[clang-tools-extra] 93b0bf6 - [clangd] [Modules] Fix to correctly handle module dependencies (#142828)

2025-06-05 Thread via cfe-commits
Author: fleeting-xx Date: 2025-06-06T09:33:11+08:00 New Revision: 93b0bf635a287aac55f6da39f38c1cf257efa824 URL: https://github.com/llvm/llvm-project/commit/93b0bf635a287aac55f6da39f38c1cf257efa824 DIFF: https://github.com/llvm/llvm-project/commit/93b0bf635a287aac55f6da39f38c1cf257efa824.diff L

[clang-tools-extra] [clangd] [Modules] Fix to correctly handle module dependencies (PR #142828)

2025-06-05 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/142828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [Modules] Fix to correctly handle module dependencies (PR #142828)

2025-06-05 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM then. Thanks. BTW, clangd prefer unittests than lit test. So you'd better to use unittests next time. https://github.com/llvm/llvm-project/pull/142828 ___ cfe-commits mailing list cfe-com

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-05 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 edited https://github.com/llvm/llvm-project/pull/142273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Diagnose [[nodiscard]] return types in Objective-C++ (PR #142541)

2025-06-05 Thread via cfe-commits
@@ -272,6 +273,26 @@ QualType ObjCMessageExpr::getCallReturnType(ASTContext &Ctx) const { return Ctx.getReferenceQualifiedType(this); } +std::pair halbi2 wrote: It is this way in CallExpr::getUnusedResultAttr too. I would change it in both places? Maybe i

[clang-tools-extra] Refactor clang doc comment structure (PR #142273)

2025-06-05 Thread Samarth Narang via cfe-commits
snarang181 wrote: > Oh, lets updated the PR description with a more complete description of the > change. It can also be marked as `Fixes #NNN` since this basically implements > everything outlined in the issues, unless I'm forgetting something. Done. https://github.com/llvm/llvm-project/pull

[clang] 05c12b2 - [clang-format] Handle requires clause following a pointer type (#142893)

2025-06-05 Thread via cfe-commits
Author: Owen Pan Date: 2025-06-05T19:55:37-07:00 New Revision: 05c12b228434fea560e6edb25289095b5aa5e10a URL: https://github.com/llvm/llvm-project/commit/05c12b228434fea560e6edb25289095b5aa5e10a DIFF: https://github.com/llvm/llvm-project/commit/05c12b228434fea560e6edb25289095b5aa5e10a.diff LOG:

[clang] [WebKit checkers] Add an annotation for pointer conversion. (PR #141277)

2025-06-05 Thread Ziqing Luo via cfe-commits
@@ -44,6 +43,12 @@ inline Target* uncheckedDowncast(Source* source) return static_cast(source); } +template +Target* [[clang::annotate_type("webkit.pointerconversion")]] newCastFunction(Source*); ziqingluo-90 wrote: If this function is a member function,

[clang] b5e84ca - [Clang] Remap paths in OpenMP runtime calls (#82541) (#141250)

2025-06-05 Thread via cfe-commits
Author: Dan McGregor Date: 2025-06-05T08:24:57-04:00 New Revision: b5e84ca7407138ec475409a2fad944045178b18a URL: https://github.com/llvm/llvm-project/commit/b5e84ca7407138ec475409a2fad944045178b18a DIFF: https://github.com/llvm/llvm-project/commit/b5e84ca7407138ec475409a2fad944045178b18a.diff

[clang-tools-extra] [clang-tidy] Improve integer comparison by matching valid expressions outside implicitCastExpr (PR #134188)

2025-06-05 Thread David Rivera via cfe-commits
@@ -39,21 +39,28 @@ intCastExpression(bool IsSigned, // std::cmp_{} functions trigger a compile-time error if either LHS or RHS // is a non-integer type, char, enum or bool // (unsigned char/ signed char are Ok and can be used). - auto IntTypeExpr = expr(hasType(hasCanon

[clang] [clang-tools-extra] Fix cross-references in Clang attribute reference (PR #142967)

2025-06-05 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert created https://github.com/llvm/llvm-project/pull/142967 Anchors are automatically generated, but adding another anchor with the same name hides the anchor that we actually want. Simply removing the unnecessary self-referential anchor `lifetimebound` fixes the l

[clang] [clang] Reduce LateInstantiatedAttrVec vector default size. (PR #142840)

2025-06-05 Thread Haojian Wu via cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/142840 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix error that reference to PointerType is ambiguous in clang/lib/Analysis/UnsafeBufferUsage.cpp (PR #142966)

2025-06-05 Thread Abhina Sree via cfe-commits
https://github.com/abhina-sree edited https://github.com/llvm/llvm-project/pull/142966 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream splat op for VectorType (PR #139827)

2025-06-05 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/139827 >From f43a15892c7f6217be8bb468d4aef15195d8bc74 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 13 May 2025 21:35:06 +0200 Subject: [PATCH 1/5] [CIR] Upstream splat op for VectorType --- clang/inclu

[clang] [flang] [Driver] Move CommonArgs to a location visible by the Frontend Drivers (PR #142800)

2025-06-05 Thread Cameron McInally via cfe-commits
@@ -3167,3 +3167,30 @@ void tools::handleInterchangeLoopsArgs(const ArgList &Args, options::OPT_fno_loop_interchange, EnableInterchange)) CmdArgs.push_back("-floop-interchange"); } + +void tools::ParseMPreferVectorWidthOption(clang::DiagnosticsEngine &Di

[clang] Fix error that reference to PointerType is ambiguous in clang/lib/Analysis/UnsafeBufferUsage.cpp (PR #142966)

2025-06-05 Thread Abhina Sree via cfe-commits
abhina-sree wrote: > LGTM, but I would also consider dropping the "using namespace llvm" instead. > This seems a bit unusual for a file in clang/lib/Analysis. Thanks! I've implemented your suggested solution instead https://github.com/llvm/llvm-project/pull/142966 _

[clang] [Clang] Preserve CXXParenListInitExpr in TreeTransform. (PR #138518)

2025-06-05 Thread Alexander Kornienko via cfe-commits
alexfh wrote: Before this change the cast was added here: ``` * thread #1, name = 'clang', stop reason = step over frame #0: 0x667e8ff2 clang`clang::Sema::BuildCXXNew(this=0x5092ffd24000, Range=SourceRange @ 0x7ffef4f8, UseGlobal=false, PlacementLParen=(ID = 94), Placem

[clang] [CIR] Upstream global initialization for ComplexType (PR #141369)

2025-06-05 Thread Henrich Lauko via cfe-commits
@@ -0,0 +1,41 @@ + +//===--===// +// +// 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] [CIR] Add support for derived class declarations (PR #142823)

2025-06-05 Thread Erich Keane via cfe-commits
@@ -415,3 +456,38 @@ void CIRRecordLowering::lowerUnion() { if (layoutSize % getAlignment(storageType)) packed = true; } + +void CIRRecordLowering::accumulateBases(const CXXRecordDecl *cxxRecordDecl) { + // If we've got a primary virtual base, we need to add it with the

[clang] Fix an error introduced in #138518 (PR #142988)

2025-06-05 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh created https://github.com/llvm/llvm-project/pull/142988 CXXParenListInitExpr arguments would lose casts leading to incorrect types being used (e.g. only 32 bits of a 64 bit value being initialized). See https://github.com/llvm/llvm-project/pull/138518#issuecomment-2906

[clang] Fix an error introduced in #138518 (PR #142988)

2025-06-05 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh edited https://github.com/llvm/llvm-project/pull/142988 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix an error introduced in #138518 (PR #142988)

2025-06-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alexander Kornienko (alexfh) Changes CXXParenListInitExpr arguments would lose casts leading to incorrect types being used (e.g. only 32 bits of a 64 bit value being initialized). See https://github.com/llvm/llvm-project/pull/138518#issueco

[clang] Fix an error introduced in #138518 (PR #142988)

2025-06-05 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh edited https://github.com/llvm/llvm-project/pull/142988 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add support for -mtune=andes-45-series (PR #142900)

2025-06-05 Thread Min-Yih Hsu via cfe-commits
https://github.com/mshockwave approved this pull request. https://github.com/llvm/llvm-project/pull/142900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFC] Use `getType()` instead of more verbose `getResult().getType()` (PR #143024)

2025-06-05 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko created https://github.com/llvm/llvm-project/pull/143024 This mirrors incubator changes from https://github.com/llvm/clangir/pull/1662 >From 38c7e537b64329bdb8595653bc97e006d7846bfb Mon Sep 17 00:00:00 2001 From: xlauko Date: Thu, 5 Jun 2025 21:39:49 +0200 Subject: [P

[clang] [CIR][NFC] Use `getType()` instead of more verbose `getResult().getType()` (PR #143024)

2025-06-05 Thread Henrich Lauko via cfe-commits
xlauko wrote: * **#143024** https://app.graphite.dev/github/pr/llvm/llvm-project/143024?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/14302

[clang] [CIR][NFC] Use `getType()` instead of more verbose `getResult().getType()` (PR #143024)

2025-06-05 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko ready_for_review https://github.com/llvm/llvm-project/pull/143024 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Remap paths in OpenMP runtime calls (#82541) (PR #141250)

2025-06-05 Thread Dan McGregor via cfe-commits
dankm wrote: Thank you, @alexey-bataev for your review and your merge! https://github.com/llvm/llvm-project/pull/141250 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFC] Use `getType()` instead of more verbose `getResult().getType()` (PR #143024)

2025-06-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Henrich Lauko (xlauko) Changes This mirrors incubator changes from https://github.com/llvm/clangir/pull/1662 --- Full diff: https://github.com/llvm/llvm-project/pull/143024.diff 4 Files Affected: - (modified) clang/include/clang/CIR/Dia

[clang] [CIR][NFC] Use `getType()` instead of more verbose `getResult().getType()` (PR #143024)

2025-06-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Henrich Lauko (xlauko) Changes This mirrors incubator changes from https://github.com/llvm/clangir/pull/1662 --- Full diff: https://github.com/llvm/llvm-project/pull/143024.diff 4 Files Affected: - (modified) clang/include/clang/CIR/D

<    1   2   3   4   5   6   >