[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] [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] 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] [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?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -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_A

[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?= , 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:

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

2025-06-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Shunsuke Watanabe (s-watanabe314) Changes 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

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

2025-06-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Shunsuke Watanabe (s-watanabe314) Changes 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 t

[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] [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] 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 Brad Smith via cfe-commits
https://github.com/brad0 closed https://github.com/llvm/llvm-project/pull/139271 ___ 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 Sudharsan Veeravalli via cfe-commits
https://github.com/svs-quic approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/137854 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] Remove delayed typo expressions (PR #143423)

2025-06-16 Thread Aiden Grossman via cfe-commits
boomanaiden154 wrote: https://github.com/llvm/llvm-project/blob/b5dbf8210a57b986b9802304745f4c5c108cf37b/libcxx/test/libcxx/language.support/support.c.headers/support.c.headers.other/math.lerp.verify.cpp#L9 Looks like this has occurred before and is just handled by disabling the test on the lib

[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] [clang][Parser] Fix crash on malformed using declaration in constexpr function (PR #144286)

2025-06-16 Thread Iris Shi via cfe-commits
el-ev wrote: > Next time please add more details in the summary, this is key for reviewers > so that they can digest the PR without leaving for more context. Even in very > simple PRs it is good to do. > > For this one something along the lines of `Parser::ParseUsingDeclaration was > not that

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

2025-06-16 Thread Andrew Rogers via cfe-commits
https://github.com/andrurogerz ready_for_review https://github.com/llvm/llvm-project/pull/144386 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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] [Sema][ObjC] Loosen restrictions on reinterpret_cast involvin

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2025-06-16 Thread via cfe-commits
@@ -0,0 +1,137 @@ +//===--- MoveSharedPointerContentsCheck.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] a383b1a - Reland "[HLSL][RootSignature] Implement serialization of RootConstants and RootFlags" (#143019)

2025-06-16 Thread via cfe-commits
Author: Finn Plummer Date: 2025-06-16T14:52:59-07:00 New Revision: a383b1a95b63cf120b3dea554c2d66ccfaee066b URL: https://github.com/llvm/llvm-project/commit/a383b1a95b63cf120b3dea554c2d66ccfaee066b DIFF: https://github.com/llvm/llvm-project/commit/a383b1a95b63cf120b3dea554c2d66ccfaee066b.diff

[clang] [llvm] [Transforms] Add LifetimeMovePass (PR #144319)

2025-06-16 Thread Weibo He via cfe-commits
https://github.com/NewSigma edited 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] [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 edited https://github.com/llvm/llvm-project/pull/144458 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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/2] [Sema][ObjC] Loosen restrictions on reinterpret_cast invo

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

2025-06-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Akira Hatanaka (ahatanak) Changes Allow using reinterpret_cast for conversions between indirect ARC pointers and other pointer types. rdar://153049268 --- Full diff: https://github.com/llvm/llvm-project/pull/144458.diff 4 Files Affecte

[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 created https://github.com/llvm/llvm-project/pull/144458 Allow using reinterpret_cast for conversions between indirect ARC pointers and other pointer types. rdar://153049268 >From 7a042947bbedce4e9bbb31b599f8132013bf8f3b Mon Sep 17 00:00:00 2001 From: Akira Hatanak

[clang] [llvm] [openmp] [clang][OpenMP] New OpenMP 6.0 threadset clause (PR #135807)

2025-06-16 Thread via cfe-commits
https://github.com/Ritanya-B-Bharadwaj updated https://github.com/llvm/llvm-project/pull/135807 >From 9c56e59ba9984c14c15a8d5a95a02e7192a64e8f Mon Sep 17 00:00:00 2001 From: Ritanya B Bharadwaj Date: Sun, 6 Apr 2025 09:33:06 -0500 Subject: [PATCH 1/5] [OpenMP] Parsing Support of ThreadSets in T

[clang] [llvm] [RISCV] Add Andes XAndesVBFHCvt (Andes Vector BFLOAT16 Conversion) extension (PR #144320)

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

[clang] [Driver] Add options to control workaround for Cortex-A53 Erratum 843419 (PR #143915)

2025-06-16 Thread Bryan Chan via cfe-commits
https://github.com/bryanpkc closed https://github.com/llvm/llvm-project/pull/143915 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add warning for blocks capturing {'this', raw pointers, references} (PR #144388)

2025-06-16 Thread John McCall via cfe-commits
@@ -8243,8 +8259,7 @@ class Sema final : public SemaBase { /// List of SourceLocations where 'self' is implicitly retained inside a /// block. - llvm::SmallVector, 1> - ImplicitlyRetainedSelfLocs; + llvm::SmallVector DiagnosableBlockCaptures; rjmcca

[clang] d4e2c0b - [Driver] Add options to control workaround for Cortex-A53 Erratum 843419 (#143915)

2025-06-16 Thread via cfe-commits
Author: Bryan Chan Date: 2025-06-16T20:59:18-04:00 New Revision: d4e2c0b359ea90236fd1b62791a04fb845f5d9f3 URL: https://github.com/llvm/llvm-project/commit/d4e2c0b359ea90236fd1b62791a04fb845f5d9f3 DIFF: https://github.com/llvm/llvm-project/commit/d4e2c0b359ea90236fd1b62791a04fb845f5d9f3.diff LO

[clang] Add warning for blocks capturing {'this', raw pointers, references} (PR #144388)

2025-06-16 Thread John McCall via cfe-commits
@@ -16149,7 +16149,7 @@ class ExitFunctionBodyRAII { bool IsLambda = false; }; -static void diagnoseImplicitlyRetainedSelf(Sema &S) { +static void diagnoseBlockCaptures(Sema &S) { rjmccall wrote: Maybe `diagnoseEscapingBlockCaptures`? https://github.com/ll

[clang] Add warning for blocks capturing {'this', raw pointers, references} (PR #144388)

2025-06-16 Thread John McCall via cfe-commits
@@ -1641,6 +1641,17 @@ def warn_implicitly_retains_self : Warning < "block implicitly retains 'self'; explicitly mention 'self' to indicate " "this is intended behavior">, InGroup>, DefaultIgnore; +def warn_blocks_capturing_this : Warning<"block implicitly captures 'this'

[clang] Add warning for blocks capturing {'this', raw pointers, references} (PR #144388)

2025-06-16 Thread John McCall via cfe-commits
@@ -1641,6 +1641,17 @@ def warn_implicitly_retains_self : Warning < "block implicitly retains 'self'; explicitly mention 'self' to indicate " "this is intended behavior">, InGroup>, DefaultIgnore; +def warn_blocks_capturing_this : Warning<"block implicitly captures 'this'

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

2025-06-16 Thread via cfe-commits
@@ -0,0 +1,60 @@ +#ifndef LLVM_CLANG_SUMMARY_SUMMARYCONTEXT_H +#define LLVM_CLANG_SUMMARY_SUMMARYCONTEXT_H + +#include "clang/Summary/SummaryAttribute.h" +#include "clang/Summary/SummaryConsumer.h" +#include + +namespace clang { +class FunctionSummary { + SmallVector ID; ---

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

2025-06-16 Thread via cfe-commits
@@ -611,6 +623,29 @@ class CompilerInstance : public ModuleLoader { /// the compiler instance takes ownership of \p Value. void setCodeCompletionConsumer(CodeCompleteConsumer *Value); + /// @} + /// @name Summary + /// @{ + + bool hasSummaryContext() { return (bool)Sum

[clang] [libcxx] [clang] [libc++] fix _Atomic c11 compare exchange does not update expected results (PR #78707)

2025-06-16 Thread Eli Friedman via cfe-commits
@@ -411,7 +412,48 @@ static void emitAtomicCmpXchg(CodeGenFunction &CGF, AtomicExpr *E, bool IsWeak, CGF.Builder.SetInsertPoint(StoreExpectedBB); // Update the memory at Expected with Old's value. - CGF.Builder.CreateStore(Old, Val1); +llvm::Type *ExpectedType = Expected

[clang] [llvm] Revert "[RISCV] Remove B and Zbc extension from Andes series cpus." (PR #144402)

2025-06-16 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `ppc64le-flang-rhel-clang` running on `ppc64le-flang-rhel-test` while building `clang,llvm` at step 6 "test-build-unified-tree-check-flang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/157/builds/30

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-06-16 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu approved this pull request. LGTM. Thanks https://github.com/llvm/llvm-project/pull/134016 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-06-16 Thread Alex Voicu via cfe-commits
AlexVlx wrote: Gentle ping. https://github.com/llvm/llvm-project/pull/134016 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-06-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Serge Pavlov (spavloff) Changes 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 = n

[clang] [llvm] [openmp] [clang][OpenMP] New OpenMP 6.0 threadset clause (PR #135807)

2025-06-16 Thread via cfe-commits
https://github.com/Ritanya-B-Bharadwaj updated https://github.com/llvm/llvm-project/pull/135807 >From 9c56e59ba9984c14c15a8d5a95a02e7192a64e8f Mon Sep 17 00:00:00 2001 From: Ritanya B Bharadwaj Date: Sun, 6 Apr 2025 09:33:06 -0500 Subject: [PATCH 1/5] [OpenMP] Parsing Support of ThreadSets in T

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

2025-06-16 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. https://github.com/llvm/llvm-project/pull/144407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-06-16 Thread Pavel Skripkin via cfe-commits
@@ -1371,6 +1371,19 @@ void MallocChecker::checkIfFreeNameIndex(ProgramStateRef State, C.addTransition(State); } +const Expr *getPlacementNewBufferArg(const CallExpr *CE, + const FunctionDecl *FD) { + // Checking for signature: + // voi

[clang] [llvm] Reland "[HLSL][RootSignature] Implement serialization of RootConstants and RootFlags" (PR #143019)

2025-06-16 Thread Finn Plummer via cfe-commits
https://github.com/inbelic closed https://github.com/llvm/llvm-project/pull/143019 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Use hidden visibility for external linkage. (PR #140292)

2025-06-16 Thread Steven Perron via cfe-commits
@@ -1661,6 +1661,11 @@ void CodeGenModule::setGlobalVisibility(llvm::GlobalValue *GV, return; } + if (Context.getLangOpts().HLSL && !D->isInExportDeclContext()) { +GV->setVisibility(llvm::GlobalValue::HiddenVisibility); s-perron wrote: I'll look i

[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] [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] [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] b0378e7 - [AArch64TargetParser]Fix reconstructFromParsedFeatures ignoring negative features (#142236)

2025-06-16 Thread via cfe-commits
Author: Matthias Braun Date: 2025-06-16T12:55:12-07:00 New Revision: b0378e7ca953c2390168f352c5a88fd325cde894 URL: https://github.com/llvm/llvm-project/commit/b0378e7ca953c2390168f352c5a88fd325cde894 DIFF: https://github.com/llvm/llvm-project/commit/b0378e7ca953c2390168f352c5a88fd325cde894.diff

[clang] [clang][PAC] Support trivially_relocating polymorphic objects (PR #144420)

2025-06-16 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/144420 >From b43a7e9295dfdbe0a11fb7dff669b82d8ed0630c Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Mon, 16 Jun 2025 20:48:57 +0300 Subject: [PATCH 1/2] [clang][PAC] Support trivially_relocating polymorphic objects

[clang] [clang][PAC] Support trivially_relocating polymorphic objects (PR #144420)

2025-06-16 Thread Oliver Hunt via cfe-commits
@@ -420,6 +420,222 @@ void CodeGenFunction::EmitPointerAuthCopy(PointerAuthQualifier Qual, QualType T, Builder.CreateStore(Value, DestAddress); } +static const ConstantArrayType *tryGetTypeAsConstantArrayType(QualType T) { + if (!T->isConstantArrayType()) +return nullp

[clang] [clang][PAC] Support trivially_relocating polymorphic objects (PR #144420)

2025-06-16 Thread Oliver Hunt via cfe-commits
@@ -1727,6 +1727,11 @@ ASTContext::PointerAuthContent ASTContext::findPointerAuthContent(QualType T) { T = T.getCanonicalType(); if (T.hasAddressDiscriminatedPointerAuth()) return PointerAuthContent::AddressDiscriminatedData; + + T = getBaseElementType(T).getCanonical

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

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

[clang] [clang][PAC] Support trivially_relocating polymorphic objects (PR #144420)

2025-06-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oliver Hunt (ojhunt) Changes Adds support for trivial relocation of polymorphic objects with address discriminated vtable pointers. This is implemented as a post-memmove fixup pass over the impacted objects. We do this by traversing the

[clang] [clang][PAC] Support trivially_relocating polymorphic objects (PR #144420)

2025-06-16 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt created https://github.com/llvm/llvm-project/pull/144420 Adds support for trivial relocation of polymorphic objects with address discriminated vtable pointers. This is implemented as a post-memmove fixup pass over the impacted objects. We do this by traversing the ob

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

2025-06-16 Thread Ben Langmuir via cfe-commits
@@ -1442,6 +1442,10 @@ class ASTReader const StringRef &operator*() && = delete; }; + /// VarDecls with initializers containing side effects must be emitted, + /// but DeclMustBeEmitted is not allowed to deserialize the intializer. + llvm::SmallPtrSet InitSideEffectVa

[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

[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] [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] [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] [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] [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] [clang] Add release note for int->enum conversion change. (PR #144407)

2025-06-16 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic created https://github.com/llvm/llvm-project/pull/144407 This seems to be having some practical impact, so we should let people know. >From 72b5793a6b0df71ec78e691aaa1b0729273263e0 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Mon, 16 Jun 2025 11:04:04 -070

[clang] [CIR] Upstream ComplexRealPtrOp for ComplexType (PR #144235)

2025-06-16 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: > I have concerns about the CIR representation here. I think we should be > aligning our representation of complex operations with the MLIR complex > dialect. As such, we want `__real__` to be lowerable to `complex.re` but the > explicit representation of intermediate point

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

2025-06-16 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,107 @@ +// RUN: %clang_cc1 -fsyntax-only %s -verify + +[[noreturn]] extern void noret(); +[[noreturn]] extern void noret2(); +extern void ordinary(); + +typedef void (*func_type)(void); + +// Constant initialization. + +void (* const const_fptr)() = noret; +[[noreturn]]

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

2025-06-16 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,107 @@ +// RUN: %clang_cc1 -fsyntax-only %s -verify + +[[noreturn]] extern void noret(); +[[noreturn]] extern void noret2(); +extern void ordinary(); + +typedef void (*func_type)(void); + +// Constant initialization. + +void (* const const_fptr)() = noret; +[[noreturn]]

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

2025-06-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: This is an interesting proposed change, thank you for working on it! Please be sure to add a release note to `clang/docs/ReleaseNotes.rst` about the functionality. https://github.com/llvm/llvm-project/pull/144408 __

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

2025-06-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/144408 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-06-16 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,107 @@ +// RUN: %clang_cc1 -fsyntax-only %s -verify + +[[noreturn]] extern void noret(); +[[noreturn]] extern void noret2(); +extern void ordinary(); + +typedef void (*func_type)(void); + AaronBallman wrote: Another test case that would be good to add:

[clang] [CIR] Upstream ComplexRealPtrOp for ComplexType (PR #144235)

2025-06-16 Thread Andy Kaylor via cfe-commits
@@ -2385,4 +2385,33 @@ def ComplexCreateOp : CIR_Op<"complex.create", [Pure, SameTypeOperands]> { let hasFolder = 1; } +//===--===// +// ComplexRealPtrOp +//===--

[clang] [llvm] Non constant size and offset in DWARF (PR #141106)

2025-06-16 Thread David Blaikie via cfe-commits
@@ -834,8 +834,8 @@ llvm::DIType *CGDebugInfo::CreateType(const BuiltinType *BT) { auto *ISATy = DBuilder.createPointerType(ClassTy, Size); ObjTy = DBuilder.createStructType(TheCU, "objc_object", TheCU->getFile(), 0, - 0, 0, llvm:

[clang] [CIR] Upstream ComplexType builtin_complex (PR #144225)

2025-06-16 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/144225 >From d3e1d50ead7822771eb265293f9d0c42e5a74529 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 14 Jun 2025 16:21:20 +0200 Subject: [PATCH 1/2] [CIR] Upstream ComplexType builtin_complex --- clang/l

[clang] [llvm] Non constant size and offset in DWARF (PR #141106)

2025-06-16 Thread Tom Tromey via cfe-commits
@@ -834,8 +834,8 @@ llvm::DIType *CGDebugInfo::CreateType(const BuiltinType *BT) { auto *ISATy = DBuilder.createPointerType(ClassTy, Size); ObjTy = DBuilder.createStructType(TheCU, "objc_object", TheCU->getFile(), 0, - 0, 0, llvm:

[clang] [llvm] [openmp] [clang][OpenMP] New OpenMP 6.0 threadset clause (PR #135807)

2025-06-16 Thread via cfe-commits
Ritanya-B-Bharadwaj wrote: > 1. Need to rebase. > 2. I'd suggest to split the patch and land the runtime part separately Done! https://github.com/llvm/llvm-project/pull/135807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [CIR] Upstream ComplexRealPtrOp for ComplexType (PR #144235)

2025-06-16 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor commented: I have concerns about the CIR representation here. I think we should be aligning our representation of complex operations with the MLIR complex dialect. As such, we want `__real__` to be lowerable to `complex.re` but the explicit representation of inter

[clang] [CIR] Upstream ComplexRealPtrOp for ComplexType (PR #144235)

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

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

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

[clang] [clang-format] Allow array alignment on non-rectangular arrays (PR #143781)

2025-06-16 Thread Ben Dunkin via cfe-commits
bdunkin wrote: I will gladly add a new option, if that is deemed necessary. I just want to make sure that's the direction I should go. My experience has been it is very hard to take back an option once it has been released, so they should be added deliberately, and with careful consideration.

[clang] [llvm] [openmp] [clang][OpenMP] New OpenMP 6.0 threadset clause (PR #135807)

2025-06-16 Thread via cfe-commits
@@ -364,7 +364,7 @@ implementation. +=+===+===+==+ | free-agent threads

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2025-06-16 Thread via cfe-commits
https://github.com/pizzud updated https://github.com/llvm/llvm-project/pull/67467 >From 04a3e8d8cbd6943f44a81fddb0524902202a1a78 Mon Sep 17 00:00:00 2001 From: David Pizzuto Date: Tue, 26 Sep 2023 10:45:42 -0700 Subject: [PATCH 01/19] [clang-tidy] Add bugprone-move-shared-pointer-contents chec

[clang] f83d09a - Revert "[RISCV] Remove B and Zbc extension from Andes series cpus." (#144402)

2025-06-16 Thread via cfe-commits
Author: Aaron Ballman Date: 2025-06-16T14:53:15-04:00 New Revision: f83d09a1f60aee28a8ed9020cd72971ec2885f24 URL: https://github.com/llvm/llvm-project/commit/f83d09a1f60aee28a8ed9020cd72971ec2885f24 DIFF: https://github.com/llvm/llvm-project/commit/f83d09a1f60aee28a8ed9020cd72971ec2885f24.diff

[clang] [llvm] Revert "[RISCV] Remove B and Zbc extension from Andes series cpus." (PR #144402)

2025-06-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/144402 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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 a971e0f2df99bd701b4b2f73ee28ee9b36f8a73f Mon Sep 17 00:00:00 2001 From: Arlie Davis Date: Thu, 3 Apr 2025 16:10:50 -0700 Subject: [PATCH] Windows hotpatching support --- clang/include/clang/Basic/Code

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2025-06-16 Thread via cfe-commits
https://github.com/pizzud updated https://github.com/llvm/llvm-project/pull/67467 >From 04a3e8d8cbd6943f44a81fddb0524902202a1a78 Mon Sep 17 00:00:00 2001 From: David Pizzuto Date: Tue, 26 Sep 2023 10:45:42 -0700 Subject: [PATCH 01/18] [clang-tidy] Add bugprone-move-shared-pointer-contents chec

[clang] [CIR] Upstream ComplexType builtin_complex (PR #144225)

2025-06-16 Thread Amr Hesham via cfe-commits
@@ -176,3 +176,27 @@ void foo7() { // OGCG: store float %[[TMP_A]], ptr %[[C_REAL_PTR]], align 4 // OGCG: store float 2.00e+00, ptr %[[C_IMAG_PTR]], align 4 +void foo9(double r, double i) { + double _Complex c = __builtin_complex(r, i); AmrDeveloper wrote

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2025-06-16 Thread via cfe-commits
@@ -0,0 +1,137 @@ +//===--- MoveSharedPointerContentsCheck.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 bugprone-move-shared-pointer-contents check. (PR #67467)

2025-06-16 Thread via cfe-commits
@@ -148,6 +148,12 @@ New checks Finds potentially erroneous calls to ``reset`` method on smart pointers when the pointee type also has a ``reset`` method. +- New :doc:`bugprone-move-shared-pointer-contents pizzud wrote: Done. https://github.com/llvm/llvm

[clang] [llvm] [openmp] [clang][OpenMP] New OpenMP 6.0 threadset clause (PR #135807)

2025-06-16 Thread via cfe-commits
Ritanya-B-Bharadwaj wrote: Runtime PR - https://github.com/llvm/llvm-project/pull/144409 https://github.com/llvm/llvm-project/pull/135807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

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

2025-06-16 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir commented: I think this new function should be called from `ASTContext::DeclMustBeEmitted`, no? https://github.com/llvm/llvm-project/pull/143739 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

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

2025-06-16 Thread Ben Langmuir via cfe-commits
@@ -1632,6 +1632,10 @@ RedeclarableResult ASTDeclReader::VisitVarDeclImpl(VarDecl *VD) { VD->NonParmVarDeclBits.PreviousDeclInSameBlockScope = VarDeclBits.getNextBit(); +bool hasInitWithSideEffect = VarDeclBits.getNextBit(); benlangmuir wrote:

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2025-06-16 Thread via cfe-commits
https://github.com/pizzud updated https://github.com/llvm/llvm-project/pull/67467 >From 04a3e8d8cbd6943f44a81fddb0524902202a1a78 Mon Sep 17 00:00:00 2001 From: David Pizzuto Date: Tue, 26 Sep 2023 10:45:42 -0700 Subject: [PATCH 01/18] [clang-tidy] Add bugprone-move-shared-pointer-contents chec

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2025-06-16 Thread via cfe-commits
https://github.com/pizzud updated https://github.com/llvm/llvm-project/pull/67467 >From 04a3e8d8cbd6943f44a81fddb0524902202a1a78 Mon Sep 17 00:00:00 2001 From: David Pizzuto Date: Tue, 26 Sep 2023 10:45:42 -0700 Subject: [PATCH 01/17] [clang-tidy] Add bugprone-move-shared-pointer-contents chec

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

2025-06-16 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-06-16T11:26:23-07:00 New Revision: b5c6245cb46354923940b95a89213fa0924e5c5f URL: https://github.com/llvm/llvm-project/commit/b5c6245cb46354923940b95a89213fa0924e5c5f DIFF: https://github.com/llvm/llvm-project/commit/b5c6245cb46354923940b95a89213fa0924e5c5f.diff L

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

2025-06-16 Thread Aaron Ballman via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -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 {

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

2025-06-16 Thread Ben Langmuir via cfe-commits
@@ -8310,8 +8310,6 @@ Stmt *ASTReader::GetExternalDeclStmt(uint64_t Offset) { Error(std::move(Err)); return nullptr; } - assert(NumCurrentElementsDeserializing == 0 && benlangmuir wrote: Can this assert come back now? https://github.com/llvm/llvm-p

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

2025-06-16 Thread Aaron Ballman via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -4674,10 +4677,7 @@ VarCreationState Compiler::visitVarDecl(const VarDecl *VD, if (!visitInitializer(Init)) return false; - if (!this->emitFinishInit(Init)) -return false; - - return this->e

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

2025-06-16 Thread Ben Langmuir via cfe-commits
@@ -2434,6 +2434,22 @@ VarDecl *VarDecl::getInitializingDeclaration() { return Def; } +bool VarDecl::hasInitWithSideEffects() const { + if (!hasInit()) +return false; + + if (auto *S = dyn_cast(Init)) { benlangmuir wrote: The original code in `getInit

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

2025-06-16 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir edited https://github.com/llvm/llvm-project/pull/143739 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Allow array alignment on non-rectangular arrays (PR #143781)

2025-06-16 Thread Björn Schäpers via cfe-commits
HazardyKnusperkeks wrote: > > You can't change existing tests, you need an option if you want to pad with > > spaces > > It is unclear to me if this should be considered a bug fix, or a new feature. > Surely requiring new options are not required for every bug fix. > It boils down to the que

  1   2   3   4   5   >