[clang] [Clang][Sema] Reject invalid member using-declaration whose nested-name-specifier doesn't refer to a base class of the current class in C++98 mode (PR #143492)

2025-06-16 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis updated https://github.com/llvm/llvm-project/pull/143492 >From 658f3d3cb72ff9fbdb2315f894f39956eeabf135 Mon Sep 17 00:00:00 2001 From: Yanzuo Liu Date: Tue, 10 Jun 2025 16:41:57 +0800 Subject: [PATCH 1/2] Apply CWG400 'Using-declarations and the "struct hack"' to C++98

[clang] [clang][bytecode] Allocate IntegralAP and Floating types using an allocator (PR #144246)

2025-06-16 Thread Aaron Ballman via cfe-commits
@@ -28,12 +28,19 @@ namespace interp { using APInt = llvm::APInt; using APSInt = llvm::APSInt; -template class Integral; +/// If an IntegralAP is constructed from Memory, it DOES NOT OWN THAT MEMORY. +/// It will NOT copy the memory (unless, of course, copy() is called) an

[clang] [clang][bytecode] Allocate IntegralAP and Floating types using an allocator (PR #144246)

2025-06-16 Thread Aaron Ballman via cfe-commits
@@ -17,63 +17,80 @@ #include "clang/AST/APValue.h" #include "llvm/ADT/APFloat.h" +// XXX This is just a debugging help. Setting this to 1 will heap-allocate ALL +// floating values. +#define ALLOCATE_ALL 0 + namespace clang { namespace interp { using APFloat = llvm::APFlo

[clang] [analyzer] Enforce not making overly complicated symbols (PR #144327)

2025-06-16 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: Unfortunately I'm not convinced that this is the right direction for improving the analyzer runtime. On the "risks" side I think that adding the corner case that "this may also return `UnknownVal` in rare situations" into many functions complicates the

[clang] [analyzer] Enforce not making overly complicated symbols (PR #144327)

2025-06-16 Thread Donát Nagy via cfe-commits
@@ -317,21 +317,21 @@ class SValBuilder { return nonloc::LocAsInteger(BasicVals.getPersistentSValWithData(loc, bits)); } - nonloc::SymbolVal makeNonLoc(const SymExpr *lhs, BinaryOperator::Opcode op, - APSIntPtr rhs, QualType type); + Defi

[clang] [analyzer] Enforce not making overly complicated symbols (PR #144327)

2025-06-16 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/144327 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Xqccmp v0.3 (PR #137854)

2025-06-16 Thread Sam Elliott via cfe-commits
https://github.com/lenary updated https://github.com/llvm/llvm-project/pull/137854 >From f156620203b61fbe48c80b4b45c451f9a6c6eed9 Mon Sep 17 00:00:00 2001 From: Sam Elliott Date: Tue, 29 Apr 2025 11:10:54 -0700 Subject: [PATCH 1/3] [RISCV] Xqccmp v0.3 --- clang/test/Driver/print-supported-ext

[clang] [CIR] Add initial support for bitfields in structs (PR #142041)

2025-06-16 Thread Bruno Cardoso Lopes via cfe-commits
bcardosolopes wrote: > To be clear, this is a matter of idealism. There's no doubt that I can write > code to handle both types, and all the information I want is available. A > program processing CIR probably won't have a problem with this. It's more of > an issue for a person reading the CIR

[clang] [analyzer] Fix a false memory leak reports involving placement new (PR #144341)

2025-06-16 Thread Pavel Skripkin via cfe-commits
https://github.com/pskrgag approved this pull request. https://github.com/llvm/llvm-project/pull/144341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [win][clang] Align scalar deleting destructors with MSABI (PR #139566)

2025-06-16 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/139566 >From 1b0b6242e5749e776f02581ba8600d853bfef322 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Mon, 12 May 2025 07:25:57 -0700 Subject: [PATCH 1/5] [win][clang] Align scalar deleting destructors

[clang] [llvm] Add support for Windows Secure Hot-Patching (PR #138972)

2025-06-16 Thread via cfe-commits
@@ -0,0 +1,596 @@ +//===-- WindowsHotPatch.cpp - Support for Windows hotpatching -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang][SYCL] Add sycl_external attribute and restrict emitting device code (PR #140282)

2025-06-16 Thread via cfe-commits
@@ -0,0 +1,38 @@ +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify %s + +// Semantic tests for sycl_external attribute + +[[clang::sycl_external(3)]] // expected-error {{'sycl_external' attribute takes no arguments}} +void bar() {} + +[[clang::sycl_external]] // expected

[clang] [CIR] Add side effect attribute to call operations (PR #144201)

2025-06-16 Thread Andy Kaylor via cfe-commits
@@ -1858,6 +1858,40 @@ def FuncOp : CIR_Op<"func", [ // CallOp //===--===// +def SE_All : I32EnumAttrCase<"All", 1, "all">; andykaylor wrote: Can you update this to reflect the changes @xlau

[clang] [CIR] Add side effect attribute to call operations (PR #144201)

2025-06-16 Thread Andy Kaylor via cfe-commits
@@ -1940,22 +1975,30 @@ def CallOp : CIR_CallOpBase<"call", [NoRegionArguments]> { let arguments = commonArgs; let builders = [ -// Build a call op for a direct call -OpBuilder<(ins "mlir::SymbolRefAttr":$callee, "mlir::Type":$resType, - "mlir::V

[clang] [CIR] Add side effect attribute to call operations (PR #144201)

2025-06-16 Thread Andy Kaylor via cfe-commits
@@ -24,16 +24,17 @@ let cppNamespace = "::cir" in { def CIRCallOpInterface : OpInterface<"CIRCallOpInterface", [CallOpInterface]> { // Currently we don't have any methods defined in CIRCallOpInterface. We'll // add more methods as the upstreaming proceeds. -let m

[clang] [llvm] Add support for Windows Secure Hot-Patching (PR #138972)

2025-06-16 Thread via cfe-commits
@@ -0,0 +1,596 @@ +//===-- WindowsHotPatch.cpp - Support for Windows hotpatching -===// +// +// 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 side effect attribute to call operations (PR #144201)

2025-06-16 Thread Andy Kaylor via cfe-commits
@@ -1858,6 +1858,40 @@ def FuncOp : CIR_Op<"func", [ // CallOp //===--===// +def SE_All : I32EnumAttrCase<"All", 1, "all">; +def SE_Pure : I32EnumAttrCase<"Pure", 2, "pure">; +def SE_Const : I32EnumAttrCase<"

[clang] [CIR] Add side effect attribute to call operations (PR #144201)

2025-06-16 Thread Andy Kaylor via cfe-commits
@@ -1858,6 +1858,40 @@ def FuncOp : CIR_Op<"func", [ // CallOp //===--===// +def SE_All : I32EnumAttrCase<"All", 1, "all">; +def SE_Pure : I32EnumAttrCase<"Pure", 2, "pure">; +def SE_Const : I32EnumAttrCase<"

[clang] [CIR] Add side effect attribute to call operations (PR #144201)

2025-06-16 Thread Andy Kaylor via cfe-commits
@@ -1858,6 +1858,40 @@ def FuncOp : CIR_Op<"func", [ // CallOp //===--===// +def SE_All : I32EnumAttrCase<"All", 1, "all">; +def SE_Pure : I32EnumAttrCase<"Pure", 2, "pure">; +def SE_Const : I32EnumAttrCase<"

[clang] [CIR] Add side effect attribute to call operations (PR #144201)

2025-06-16 Thread Andy Kaylor via cfe-commits
@@ -1940,22 +1975,30 @@ def CallOp : CIR_CallOpBase<"call", [NoRegionArguments]> { let arguments = commonArgs; let builders = [ -// Build a call op for a direct call -OpBuilder<(ins "mlir::SymbolRefAttr":$callee, "mlir::Type":$resType, - "mlir::V

[clang] [llvm] Add support for Windows Secure Hot-Patching (PR #138972)

2025-06-16 Thread via cfe-commits
https://github.com/sivadeilra updated https://github.com/llvm/llvm-project/pull/138972 >From a684405f4986e72d78dcfcf6accf4c3ae26b35f1 Mon Sep 17 00:00:00 2001 From: Arlie Davis Date: Thu, 3 Apr 2025 16:10:50 -0700 Subject: [PATCH 1/4] Windows hotpatching support --- clang/include/clang/Basic/

[clang] [analyzer] Enforce not making overly complicated symbols (PR #144327)

2025-06-16 Thread Donát Nagy via cfe-commits
NagyDonat wrote: > How I read this you have mainly 2 concerns: > > 1. The use of this strong-type makes it tedious the existing APIs to use > because one needs to unwrap the value and frequently make an early-return to > explicitly handle the case when a symbol-creation failed? Yes, this

[clang] [CUDA][HIP] Add a __device__ version of std::__glibcxx_assert_fail() (PR #136133)

2025-06-16 Thread Juan Manuel Martinez Caamaño via cfe-commits
jmmartinez wrote: We have now a test for std::array on llvm-test-suite. Is it ok if we land this now ? I have yet to update the buildbot to run with the latest gcc-toolchain. I've played with using spack to install it but it doesn't have gcc-15 toolchain available yet. https://github.com/llv

[clang] Implement diagnostics for why `std::is_standard_layout` is false (PR #144161)

2025-06-16 Thread Samarth Narang via cfe-commits
snarang181 wrote: Looks like all tests pass now. Requesting review now. https://github.com/llvm/llvm-project/pull/144161 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Declare workitem built-ins in clc, move ptx-nvidiacl workitem built-ins into clc (PR #144333)

2025-06-16 Thread Fraser Cormack via cfe-commits
@@ -0,0 +1,16 @@ +//===--===// +// +// 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] [llvm] [RISCV] Add Andes XAndesVBFHCvt (Andes Vector BFLOAT16 Conversion Product) extension (PR #144320)

2025-06-16 Thread Min-Yih Hsu via cfe-commits
https://github.com/mshockwave commented: nit: for a split second, I thought "Andes Vector BFLOAT16 Conversion Product" has something to do with some form of multiplication (product). Maybe you could change that into "Extension"? https://github.com/llvm/llvm-project/pull/144320

[clang] [CIR][NFCI] Update RValue class to reflect changes in classic CodeGen (PR #142779)

2025-06-16 Thread Andy Kaylor via cfe-commits
@@ -34,28 +32,85 @@ namespace clang::CIRGen { class RValue { enum Flavor { Scalar, Complex, Aggregate }; - // Stores first value and flavor. - llvm::PointerIntPair v1; - // Stores second value and volatility. - llvm::PointerIntPair, 1, bool> v2; - // Stores element type

[clang] [libc] [llvm] [DebugInfo][RemoveDIs] Suppress getNextNonDebugInfoInstruction (PR #144383)

2025-06-16 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse created https://github.com/llvm/llvm-project/pull/144383 There are no longer debug-info instructions, thus we don't need this skipping. Horray! CC @WenleiHe , `getNextNonDebugInfoInstruction` has a "skip pseudo-probes" argument that appears to be unused throughout al

[clang] [libc] [llvm] [DebugInfo][RemoveDIs] Suppress getNextNonDebugInfoInstruction (PR #144383)

2025-06-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: Jeremy Morse (jmorse) Changes There are no longer debug-info instructions, thus we don't need this skipping. Horray! CC @WenleiHe , `getNextNonDebugInfoInstruction` has a "skip pseudo-probes" argument that appears to be unused

[clang] [CIR][NFC] Refactor constant pointer l-value handling (PR #144165)

2025-06-16 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/144165 >From 92176c5b15f708afc0765dbd41e6a79c7023b700 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Fri, 13 Jun 2025 14:33:17 -0700 Subject: [PATCH 1/2] [CIR][NFC] Refactor constant pointer l-value handling This

[clang] [llvm] Pass TargetMachine from from Clang to `BitcodeWriter`and `ThinLTOBitcodeWriter` pass for thin and fat LTO respectively. (PR #143692)

2025-06-16 Thread Teresa Johnson via cfe-commits
@@ -1158,7 +1158,7 @@ void EmitAssemblyHelper::RunOptimizationPipeline( return; } MPM.addPass(ThinLTOBitcodeWriterPass( -*OS, ThinLinkOS ? &ThinLinkOS->os() : nullptr)); +*OS, ThinLinkOS ? &ThinLinkOS->os() : nullptr, false, T

[clang] [CIR] Upstream ComplexType ImaginaryLiteral (PR #144223)

2025-06-16 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/144223 >From 167ea0dd6d484389ed03ddfa43a0f6c0cf61cf2f Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 14 Jun 2025 15:12:13 +0200 Subject: [PATCH 1/2] [CIR] Upstream ComplexType ImaginaryLiteral --- clang/

[clang] [clang] Check constexpr int->enum conversions consistently. (PR #143034)

2025-06-16 Thread James Y Knight via cfe-commits
jyknight wrote: This same code in Boost was already implicated by the 2022 changes, and I reported a bug for it back then. It was fixed a couple years later in Boost 1.86. https://github.com/boostorg/mpl/issues/69#issuecomment-2301411819 mentions two commits that can be backported to older ver

[clang] [llvm] [AArch64TargetParser]Fix reconstructFromParsedFeatures ignoring negative features (PR #142236)

2025-06-16 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB closed https://github.com/llvm/llvm-project/pull/142236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][HLSL] Move Sema work from `ParseMicrosoftRootSignatureAttributeArgs` (PR #143184)

2025-06-16 Thread Chris B via cfe-commits
https://github.com/llvm-beanz commented: This looks good to me, but it would be good to get @AaronBallman's eyes on it too. https://github.com/llvm/llvm-project/pull/143184 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

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

2025-06-16 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/144274 >From 98fc81696400be2ea990d867375530ef3f544b82 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sun, 15 Jun 2025 22:20:54 +0300 Subject: [PATCH 1/2] [Clang] Fix '-Wformat-overflow' FP when floats had field-

[clang] [Sema][ObjC] Loosen restrictions on reinterpret_cast involving indirect ARC-managed pointers (PR #144458)

2025-06-16 Thread John McCall via cfe-commits
https://github.com/rjmccall requested changes to this pull request. This all looks good to me. Please add a release note saying that we fixed an issue where the implementation was stricter than the ARC specification said. Also, I know that you had some questions around `const` and other qualifi

[clang] [Sema][ObjC] Loosen restrictions on reinterpret_cast involving indirect ARC-managed pointers (PR #144458)

2025-06-16 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak updated https://github.com/llvm/llvm-project/pull/144458 >From 180213a360c7b25784f84ada7112b30ee0bd1212 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Fri, 13 Jun 2025 15:01:26 -0700 Subject: [PATCH 1/3] [Sema][ObjC] Loosen restrictions on reinterpret_cast invo

[clang] [llvm] [RISCV] Update Xqci to v0.13.0 (PR #144398)

2025-06-16 Thread Sudharsan Veeravalli via cfe-commits
https://github.com/svs-quic approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/144398 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e86740e - [clang] Add managarm support (#139271)

2025-06-16 Thread via cfe-commits
Author: no92 Date: 2025-06-17T01:51:46-04:00 New Revision: e86740e6003739a41139d94e1643a3207f8fd8f8 URL: https://github.com/llvm/llvm-project/commit/e86740e6003739a41139d94e1643a3207f8fd8f8 DIFF: https://github.com/llvm/llvm-project/commit/e86740e6003739a41139d94e1643a3207f8fd8f8.diff LOG: [cl

[clang] [clang] Add managarm support (PR #139271)

2025-06-16 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime-2` running on `rocm-worker-hw-02` while building `clang` at step 7 "Add check check-clang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/10/builds/7482 Here is the re

[clang] [Clang][Driver] Warn on complex number range incompatibility with GCC (PR #144468)

2025-06-16 Thread Shunsuke Watanabe via cfe-commits
https://github.com/s-watanabe314 created https://github.com/llvm/llvm-project/pull/144468 This patch adds a warning for incompatible complex number behavior compared to GCC due to Clang's "last-flag-wins" rule. Incompatibilities with GCC occur in the following seven cases. Clang uses the last

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-16 Thread via cfe-commits
https://github.com/vitor1001 updated https://github.com/llvm/llvm-project/pull/143664 >From 539e69459aaf59785e9e835aec4fb0c45bbe6afc Mon Sep 17 00:00:00 2001 From: Vitor Sessak Date: Wed, 11 Jun 2025 08:21:48 + Subject: [PATCH] Add missing intrinsics to cuda headers. LLVM prevents the sm_3

[clang] [Modules] Record whether VarDecl initializers contain side effects (PR #143739)

2025-06-16 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: The direction meets my expectation. I think you already have an existing test for swift. Maybe you can try to reduce a lit test from it. https://github.com/llvm/llvm-project/pull/143739 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [clang-tools-extra] [clang-tidy] `bugprone-unchecked-optional-access`: handle `BloombergLP::bdlb:NullableValue::makeValue` to prevent false-positives (PR #144313)

2025-06-16 Thread Congcong Cai via cfe-commits
@@ -985,6 +985,20 @@ auto buildTransferMatchSwitch() { isOptionalMemberCallWithNameMatcher(hasName("isNull")), transferOptionalIsNullCall) + // NullableValue::makeValue, NullableValue::makeValueInplace + // Only NullableValue has these methods, bu

[clang] [llvm] [LLVM][Coro] Add LifetimeMovePass (PR #144319)

2025-06-16 Thread Weibo He via cfe-commits
NewSigma wrote: cc @ChuanqiXu9 @nikic https://github.com/llvm/llvm-project/pull/144319 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Introduce intra-procedural lifetime analysis in Clang (PR #142313)

2025-06-16 Thread Gábor Horváth via cfe-commits
@@ -0,0 +1,753 @@ +#include "clang/Analysis/Analyses/LifetimeSafety.h" +#include "clang/AST/Decl.h" +#include "clang/AST/Expr.h" +#include "clang/AST/StmtVisitor.h" +#include "clang/AST/Type.h" +#include "clang/Analysis/AnalysisDeclContext.h" +#include "clang/Analysis/CFG.h" +#inc

[clang] Introduce intra-procedural lifetime analysis in Clang (PR #142313)

2025-06-16 Thread Gábor Horváth via cfe-commits
@@ -0,0 +1,728 @@ +#include "clang/Analysis/Analyses/LifetimeSafety.h" +#include "clang/AST/Decl.h" +#include "clang/AST/Expr.h" +#include "clang/AST/StmtVisitor.h" +#include "clang/AST/Type.h" +#include "clang/Analysis/AnalysisDeclContext.h" +#include "clang/Analysis/CFG.h" +#inc

[clang] Introduce intra-procedural lifetime analysis in Clang (PR #142313)

2025-06-16 Thread Gábor Horváth via cfe-commits
@@ -0,0 +1,753 @@ +#include "clang/Analysis/Analyses/LifetimeSafety.h" +#include "clang/AST/Decl.h" +#include "clang/AST/Expr.h" +#include "clang/AST/StmtVisitor.h" +#include "clang/AST/Type.h" +#include "clang/Analysis/AnalysisDeclContext.h" +#include "clang/Analysis/CFG.h" +#inc

[clang] Introduce intra-procedural lifetime analysis in Clang (PR #142313)

2025-06-16 Thread Gábor Horváth via cfe-commits
@@ -0,0 +1,753 @@ +#include "clang/Analysis/Analyses/LifetimeSafety.h" +#include "clang/AST/Decl.h" +#include "clang/AST/Expr.h" +#include "clang/AST/StmtVisitor.h" +#include "clang/AST/Type.h" +#include "clang/Analysis/AnalysisDeclContext.h" +#include "clang/Analysis/CFG.h" +#inc

[clang] Introduce intra-procedural lifetime analysis in Clang (PR #142313)

2025-06-16 Thread Gábor Horváth via cfe-commits
@@ -0,0 +1,728 @@ +#include "clang/Analysis/Analyses/LifetimeSafety.h" +#include "clang/AST/Decl.h" +#include "clang/AST/Expr.h" +#include "clang/AST/StmtVisitor.h" +#include "clang/AST/Type.h" +#include "clang/Analysis/AnalysisDeclContext.h" +#include "clang/Analysis/CFG.h" +#inc

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143969)

2025-06-16 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt closed https://github.com/llvm/llvm-project/pull/143969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] eddab9b - [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (#143969)

2025-06-16 Thread via cfe-commits
Author: Oliver Hunt Date: 2025-06-16T12:12:22+03:00 New Revision: eddab9b757722da7b908723a5a61d280540b48cf URL: https://github.com/llvm/llvm-project/commit/eddab9b757722da7b908723a5a61d280540b48cf DIFF: https://github.com/llvm/llvm-project/commit/eddab9b757722da7b908723a5a61d280540b48cf.diff L

[clang] [llvm] [clang] [OpenMP] New OpenMP 6.0 self_maps clause - CodeGen (PR #134131)

2025-06-16 Thread via cfe-commits
Ritanya-B-Bharadwaj wrote: ping https://github.com/llvm/llvm-project/pull/134131 ___ 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-16 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: The test added in this patch is failing since it cannot find llvm-profdata. https://github.com/llvm/llvm-project/actions/runs/15643574721/job/44076443329?pr=144143 Attempting a fix https://github.com/llvm/llvm-project/pull/144325 https://github.com/llvm/llvm-project/pu

[clang] [Draft] Summary Based Analysis Prototype (PR #144224)

2025-06-16 Thread Gábor Horváth via cfe-commits
@@ -0,0 +1,23 @@ +#include "clang/Summary/SummaryConsumer.h" +#include "clang/Summary/SummaryContext.h" + +namespace clang { +void JSONPrintingSummaryConsumer::ProcessFunctionSummary( +const FunctionSummary &Summary) { + JOS.object([&] { +JOS.attribute("id", llvm::json::V

[clang] [clang-tools-extra] [clang-tidy] `bugprone-unchecked-optional-access`: handle `BloombergLP::bdlb:NullableValue::makeValue` to prevent false-positives (PR #144313)

2025-06-16 Thread Valentyn Yukhymenko via cfe-commits
https://github.com/BaLiKfromUA edited https://github.com/llvm/llvm-project/pull/144313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][performance-unnecessary-value-param] Avoid in coroutines (PR #140912)

2025-06-16 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin updated https://github.com/llvm/llvm-project/pull/140912 >From f277796a98f81bc3f0c6949adff3ad43eda51d5f Mon Sep 17 00:00:00 2001 From: Dmitry Polukhin Date: Wed, 21 May 2025 07:54:02 -0700 Subject: [PATCH 1/8] [clang-tidy][performance-unnecessary-value-param] Avoid

[clang-tools-extra] [clang-tidy][performance-unnecessary-value-param] Avoid in coroutines (PR #140912)

2025-06-16 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin updated https://github.com/llvm/llvm-project/pull/140912 >From f277796a98f81bc3f0c6949adff3ad43eda51d5f Mon Sep 17 00:00:00 2001 From: Dmitry Polukhin Date: Wed, 21 May 2025 07:54:02 -0700 Subject: [PATCH 1/9] [clang-tidy][performance-unnecessary-value-param] Avoid

[clang] [analyzer] Enforce not making overly complicated symbols (PR #144327)

2025-06-16 Thread Balázs Benics via cfe-commits
https://github.com/balazs-benics-sonarsource created https://github.com/llvm/llvm-project/pull/144327 Out of the worst 500 entry points, 45 were improved by at least 10%. Out of these 45, 5 were improved by more than 50%. Out of these 45, 2 were improved by more than 80%. For example, for the

[clang] [analyzer] Enforce not making overly complicated symbols (PR #144327)

2025-06-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balázs Benics (balazs-benics-sonarsource) Changes Out of the worst 500 entry points, 45 were improved by at least 10%. Out of these 45, 5 were improved by more than 50%. Out of these 45, 2 were improved by more than 80%.

[clang] [clang] Merge gtest binaries into AllClangUnitTests (PR #134196)

2025-06-16 Thread kadir çetinkaya via cfe-commits
kadircet wrote: Do you or @petrhosek have some free cycles to follow up on that soon? Because as things stand, unit test execution is currently in a very fragile state. Anyone that adds a unittest to clang currently runs the risk of braking something completely unrelated (I do agree that it's

[clang] [clang][Parser] Fix crash on invalid attribute in constexpr function (PR #144286)

2025-06-16 Thread Oleksandr T. via cfe-commits
@@ -0,0 +1,8 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +// issue144264 +constexpr void test() +{ +using TT = struct T[deprecated{}; a-tarasyuk wrote: nit: The simplified example: ```cpp namespace GH144264 { constexpr void f() { using A = struc

[clang] [analyzer] Enforce not making overly complicated symbols (PR #144327)

2025-06-16 Thread Balázs Benics via cfe-commits
@@ -67,7 +67,7 @@ void ExprEngine::VisitBinaryOperator(const BinaryOperator* B, if (RightV.isUnknown()) { unsigned Count = currBldrCtx->blockCount(); RightV = svalBuilder.conjureSymbolVal(nullptr, getCFGElementRef(), LCtx, -

[clang] [llvm] Ast importer visitors (PR #138838)

2025-06-16 Thread via cfe-commits
https://github.com/ganenkokb-yandex updated https://github.com/llvm/llvm-project/pull/138838 >From 0a5beb71cb46ad5ef2df753098a6742ffeef3a71 Mon Sep 17 00:00:00 2001 From: Evianaive <153540...@qq.com> Date: Tue, 25 Mar 2025 01:54:06 +0800 Subject: [PATCH 01/13] Implement missing visit function -

[clang] [llvm] [LLVM][Coro] Add LifetimeMovePass (PR #144319)

2025-06-16 Thread Weibo He via cfe-commits
https://github.com/NewSigma updated https://github.com/llvm/llvm-project/pull/144319 >From 584d47295f7719f96ee77d32a6b4329f82be Mon Sep 17 00:00:00 2001 From: NewSigma Date: Mon, 16 Jun 2025 15:36:53 +0800 Subject: [PATCH 1/4] Add LifetimeMovePass --- clang/test/CodeGenCoroutines/pr56919.

[clang] [llvm] [LLVM][Coro] Add LifetimeMovePass (PR #144319)

2025-06-16 Thread Weibo He via cfe-commits
@@ -0,0 +1,223 @@ +//===- LifetimeMove.cpp - Narrowing lifetimes -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang][Parser] Fix crash on malformed using declaration in constexpr function (PR #144286)

2025-06-16 Thread Iris Shi via cfe-commits
https://github.com/el-ev updated https://github.com/llvm/llvm-project/pull/144286 >From 6e10acb31f5975aad222bf211bcd61976a1c5108 Mon Sep 17 00:00:00 2001 From: Iris Shi <0...@owo.li> Date: Mon, 16 Jun 2025 09:37:17 +0800 Subject: [PATCH 1/2] [clang][Parser] Fix crash on malformed using declarati

[clang] [Modules] Record whether VarDecl initializers contain side effects (PR #143739)

2025-06-16 Thread Henrik G. Olsson via cfe-commits
https://github.com/hnrklssn updated https://github.com/llvm/llvm-project/pull/143739 >From a8042b8412a5621e977af8d16d704bee2f64c0e7 Mon Sep 17 00:00:00 2001 From: "Henrik G. Olsson" Date: Wed, 11 Jun 2025 17:36:29 +0200 Subject: [PATCH] [Modules] Record whether VarDecl initializers contain side

[clang] [clang][bytecode] Allocate IntegralAP and Floating types using an allocator (PR #144246)

2025-06-16 Thread Timm Baeder via cfe-commits
@@ -4674,10 +4677,7 @@ VarCreationState Compiler::visitVarDecl(const VarDecl *VD, if (!visitInitializer(Init)) return false; - if (!this->emitFinishInit(Init)) -return false; - - return this->emitPopPtr(Init); + return this->emitFinishInit

[clang] [clang][bytecode] Allocate IntegralAP and Floating types using an allocator (PR #144246)

2025-06-16 Thread Timm Baeder via cfe-commits
@@ -17,63 +17,80 @@ #include "clang/AST/APValue.h" #include "llvm/ADT/APFloat.h" +// XXX This is just a debugging help. Setting this to 1 will heap-allocate ALL +// floating values. +#define ALLOCATE_ALL 0 + namespace clang { namespace interp { using APFloat = llvm::APFlo

[clang] [clang][bytecode] Allocate IntegralAP and Floating types using an allocator (PR #144246)

2025-06-16 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/144246 >From 9801280bab3f751995c6bc7838ccbadb09d8d208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 10 Jun 2025 14:45:39 +0200 Subject: [PAT

[clang] [clang][bytecode] Allocate IntegralAP and Floating types using an allocator (PR #144246)

2025-06-16 Thread Timm Baeder via cfe-commits
@@ -17,63 +17,80 @@ #include "clang/AST/APValue.h" #include "llvm/ADT/APFloat.h" +// XXX This is just a debugging help. Setting this to 1 will heap-allocate ALL +// floating values. +#define ALLOCATE_ALL 0 + tbaederr wrote: I didn't have any plan for it, I ju

[clang] [Modules] Record whether VarDecl initializers contain side effects (PR #143739)

2025-06-16 Thread Henrik G. Olsson via cfe-commits
hnrklssn wrote: @ChuanqiXu9 I pushed a new fix based on your feedback. Please let me know what you think. I don't really know how to test this, so if you think it needs testing I'm open for suggestions. https://github.com/llvm/llvm-project/pull/143739 __

[clang] [Modules] Record whether VarDecl initializers contain side effects (PR #143739)

2025-06-16 Thread Henrik G. Olsson via cfe-commits
https://github.com/hnrklssn updated https://github.com/llvm/llvm-project/pull/143739 >From 44e965edaf6338c46bae8fabbf06b3f4e9173703 Mon Sep 17 00:00:00 2001 From: "Henrik G. Olsson" Date: Wed, 11 Jun 2025 17:36:29 +0200 Subject: [PATCH] [Modules] Record whether VarDecl initializers contain side

[clang] [llvm] [InstCombine] remove dead loads, such as memcpy from undef (PR #143958)

2025-06-16 Thread Nikita Popov via cfe-commits
@@ -3382,6 +3422,17 @@ Instruction *InstCombinerImpl::visitAllocSite(Instruction &MI) { eraseInstFromFunction(*I); Users[i] = nullptr; // Skip examining in the next loop. } +if (auto *MTI = dyn_cast(I)) { + if (KnowInitZero && getUn

[clang] [analyzer] Fix a false memory leak reports involving placement new (PR #144341)

2025-06-16 Thread Arseniy Zaostrovnykh via cfe-commits
necto wrote: @balazs-benics-sonarsource https://github.com/llvm/llvm-project/pull/144341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunterminated-string-initialization] Handle C string literals ending with explicit '\0' (PR #143487)

2025-06-16 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,28 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wunterminated-string-initialization %s -x c +// RUN: %clang_cc1 -fsyntax-only -verify -Wunterminated-string-initialization %s -x c++ + + +// In C, the following examples are fine: +#if __cplusplus +char foo[3] = "fo\0";

[clang] [clang-c] introduce queries on GCC-style inline assembly statements (PR #143424)

2025-06-16 Thread Aaron Ballman via cfe-commits
@@ -4495,6 +4495,98 @@ CINDEX_LINKAGE CXStringSet *clang_Cursor_getCXXManglings(CXCursor); */ CINDEX_LINKAGE CXStringSet *clang_Cursor_getObjCManglings(CXCursor); +/** + * @} + */ + +/** + * \defgroup CINDEX_MODULE Inline Assembly introspection + * + * The functions in this

[clang] [clang-format] Stop moving lambda to new line only to indent it more. (PR #141576)

2025-06-16 Thread via cfe-commits
https://github.com/rmarker updated https://github.com/llvm/llvm-project/pull/141576 >From a25f8f96d82d3eaff6fec031bc7ba6f9917156b8 Mon Sep 17 00:00:00 2001 From: rmarker Date: Tue, 27 May 2025 19:54:00 +0930 Subject: [PATCH] [clang-format] Stop moving lambda to new line only to indent it more.

[clang] [clang-format] Stop moving lambda to new line only to indent it more. (PR #141576)

2025-06-16 Thread via cfe-commits
rmarker wrote: Updated to address merge conflict. https://github.com/llvm/llvm-project/pull/141576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] Record whether VarDecl initializers contain side effects (PR #143739)

2025-06-16 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 HEAD~1 HEAD --extensions cpp,h -- clang/include/clang/AST/Decl.h clang/include/clang/

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

2025-06-16 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,239 @@ +//===--- BoolBitwiseOperationCheck.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 performance-bool-bitwise-operation check (PR #142324)

2025-06-16 Thread Baranov Victor via cfe-commits
@@ -36,6 +37,8 @@ class PerformanceModule : public ClangTidyModule { public: void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override { CheckFactories.registerCheck("performance-avoid-endl"); +CheckFactories.registerCheck( +"performance-bool-bi

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

2025-06-16 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited 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] [analyzer] Conversion to CheckerFamily: NullabilityChecker (PR #143735)

2025-06-16 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/143735 From 2f0abfe5e306072fc56ca93a570c58f2b9a2c967 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Wed, 11 Jun 2025 17:31:43 +0200 Subject: [PATCH 1/2] [analyzer] Conversion to CheckerFamily: Nu

[clang] [clang][Parser] Fix crash on malformed using declaration in constexpr function (PR #144286)

2025-06-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: It looks like the test coverage was dropped in a recent commit. https://github.com/llvm/llvm-project/pull/144286 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

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

2025-06-16 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,239 @@ +//===--- BoolBitwiseOperationCheck.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] [analyzer] Conversion to CheckerFamily: NullabilityChecker (PR #143735)

2025-06-16 Thread Donát Nagy via cfe-commits
NagyDonat wrote: @steakhal Thanks for spotting these broken lines – these blocks were automatically reformatted by `git-clang-format` and I didn't notice that it misformats this kind of content. https://github.com/llvm/llvm-project/pull/143735 ___ cf

[clang] [CIR] Handle global string literals as char array initializer (PR #144384)

2025-06-16 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/144384 This change adds the line of code needed to handle a string literal as an initializer for a character array. >From 815c01f5041c83c1612f49ee8ccda23c8eca16c8 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: F

[clang] [libc] [llvm] [DebugInfo][RemoveDIs] Suppress getNextNonDebugInfoInstruction (PR #144383)

2025-06-16 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 HEAD~1 HEAD --extensions cpp,h,inc -- clang/lib/CodeGen/CGBlocks.cpp llvm/include/llv

[clang] [CIR] Handle global string literals as char array initializer (PR #144384)

2025-06-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes This change adds the line of code needed to handle a string literal as an initializer for a character array. --- Full diff: https://github.com/llvm/llvm-project/pull/144384.diff 2 Files Affected: - (mod

[clang] [llvm] [SROA] Vector promote some memsets (PR #133301)

2025-06-16 Thread via cfe-commits
macurtis-amd wrote: @nikic ping https://github.com/llvm/llvm-project/pull/133301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm] minor fixes for clang-cl Windows DLL build (PR #144386)

2025-06-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 @llvm/pr-subscribers-clang Author: Andrew Rogers (andrurogerz) Changes ## Purpose This patch makes a minor changes to LLVM and Clang so that LLVM can be built as a Windows DLL with `clang-cl`. These changes were not required for

[clang] [clang] Add release note for int->enum conversion change. (PR #144407)

2025-06-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Eli Friedman (efriedma-quic) Changes This seems to be having some practical impact, so we should let people know. --- Full diff: https://github.com/llvm/llvm-project/pull/144407.diff 1 Files Affected: - (modified) clang/docs/ReleaseNote

[clang] [lldb] [Clang][PowerPC] Add __dmr type and DMF integer calculation builtins (PR #142480)

2025-06-16 Thread Maryam Moghadas via cfe-commits
https://github.com/maryammo updated https://github.com/llvm/llvm-project/pull/142480 >From 5ef7a4ca7c2a838a6b2100968d5023e0797b2848 Mon Sep 17 00:00:00 2001 From: Maryam Moghadas Date: Mon, 2 Jun 2025 19:54:57 + Subject: [PATCH 1/3] [Clang][PowerPC] Add __dmr type and DMF integer calculati

[clang] [clang] Check constexpr int->enum conversions consistently. (PR #143034)

2025-06-16 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: That pattern look like basically the same thing as the neg_one_constexpr testcase I added. The diagnostic is expected. Posted #144407 to add a relnote. https://github.com/llvm/llvm-project/pull/143034 ___ cfe-commits mailing lis

[clang] [CIR] Upstream ComplexType ImaginaryLiteral (PR #144223)

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

[clang] Include [[clang::require_explicit_initialization]] warnings in system headers (PR #141133)

2025-06-16 Thread via cfe-commits
higher-performance wrote: Are folks still on the fence after the latest discussion? If anyone still has objections I can try to suggest some path forward, but I'm not sure what everyone is thinking right now (or what this is pending on in general), and it would be lovely to move forward someho

[clang] [Analysis] Avoid some warnings about exit from noreturn function (PR #144408)

2025-06-16 Thread Serge Pavlov via cfe-commits
https://github.com/spavloff created https://github.com/llvm/llvm-project/pull/144408 Compiler sometimes issues warnings on exit from 'noreturn' functions, in the code like: [[noreturn]] extern void nonreturnable(); void (*func_ptr)(); [[noreturn]] void foo() { func_ptr = nonr

  1   2   3   4   5   >