[clang] [clang] Fix a crash when dynamic_cast-ing to a `final` class (PR #148088)

2025-07-11 Thread Eli Friedman via cfe-commits
@@ -2341,8 +2341,15 @@ llvm::Value *CodeGenFunction::EmitDynamicCast(Address ThisAddr, } else if (IsExact) { // If the destination type is effectively final, this pointer points to the // right type if and only if its vptr has the right value. -Value = CGM.getCXX

[clang] [CIR] Use ZeroAttr as zeroinitializer for ComplexType (PR #148033)

2025-07-11 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/148033 >From 0f584ac188b3c6eb9cc61ffc44464741360ff9c0 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Thu, 10 Jul 2025 20:52:04 +0200 Subject: [PATCH 1/2] [CIR] Use ZeroAttr as zeroinitializer for ComplexType -

[clang-tools-extra] [clang-doc] Serialize record files with mangled name (PR #148021)

2025-07-11 Thread Erick Velez via cfe-commits
https://github.com/evelez7 updated https://github.com/llvm/llvm-project/pull/148021 >From 47b9bdc3fb479e023c7f298532dc28e89f844678 Mon Sep 17 00:00:00 2001 From: Erick Velez Date: Thu, 10 Jul 2025 11:16:20 -0700 Subject: [PATCH] address review feedback --- clang-tools-extra/clang-doc/BitcodeR

[clang] 13c8970 - [CIR] Add support for non-virtual base class initialization (#148080)

2025-07-11 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-07-11T09:57:15-07:00 New Revision: 13c897093fd8d40ee3a5b13ff9c0b38c89e72bf1 URL: https://github.com/llvm/llvm-project/commit/13c897093fd8d40ee3a5b13ff9c0b38c89e72bf1 DIFF: https://github.com/llvm/llvm-project/commit/13c897093fd8d40ee3a5b13ff9c0b38c89e72bf1.diff L

[clang] [CIR] Add support for non-virtual base class initialization (PR #148080)

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

[clang] [clang-tools-extra] [lldb] [Clang][AST][NFC] (`RecordDecl` -> `CXXRecordDecl`)`::isInjectedClassName` (PR #148195)

2025-07-11 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM For reference, this takes this change out of https://github.com/llvm/llvm-project/pull/147835, which reduces the size of that PR a little bit. https://github.com/llvm/llvm-project/pull/148195

[clang] [clang-tools-extra] [lldb] [Clang][AST][NFC] (`RecordDecl` -> `CXXRecordDecl`)`::isInjectedClassName` (PR #148195)

2025-07-11 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > These files test demangling `RecordDecl::isInjectedClassName`, which will be > out-of-date (I think) after merging this PR. This file uses these symbols as test cases, but they are just examples and aren't coupled to the clang implementation at all, the tests are still valid,

[clang-tools-extra] [clang-doc] Serialize record files with mangled name (PR #148021)

2025-07-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Erick Velez (evelez7) Changes This patch changes JSON file serialization. Now, files are serialized to a single directory instead of nesting them based on namespaces. The global namespace retains the "index.json" name. This sol

[clang-tools-extra] [clang-doc] Serialize record files with mangled name (PR #148021)

2025-07-11 Thread Erick Velez via cfe-commits
https://github.com/evelez7 ready_for_review https://github.com/llvm/llvm-project/pull/148021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Fix Windows EH IP2State tables (remove +1 bias) (PR #144745)

2025-07-11 Thread via cfe-commits
namazso wrote: Not sure how relevant this is, but EDK2 by default will strip all exception data: https://github.com/tianocore/edk2/blob/a1b509c1a453815acbc6c8b0fc5882fd03a6f2c0/BaseTools/Source/C/GenFw/GenFw.c#L2447 Although there is an option to GenFw to keep them. Performance impact of the

[clang] [CIR] Upstream ComplexImagPtrOp for ComplexType (PR #144236)

2025-07-11 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper edited https://github.com/llvm/llvm-project/pull/144236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-07-11 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed 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] ed85487 - [CIR] Upstream ComplexRealPtrOp for ComplexType (#144235)

2025-07-11 Thread via cfe-commits
Author: Amr Hesham Date: 2025-07-11T21:06:05+02:00 New Revision: ed8548796f8538df420eccc6fa57d06d238996ed URL: https://github.com/llvm/llvm-project/commit/ed8548796f8538df420eccc6fa57d06d238996ed DIFF: https://github.com/llvm/llvm-project/commit/ed8548796f8538df420eccc6fa57d06d238996ed.diff LO

[clang] [Clang][CodeGen] Emit “trap reasons” on UBSan traps (PR #145967)

2025-07-11 Thread Anthony Tran via cfe-commits
@@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -triple arm64-apple-macosx14.0.0 -O0 -debug-info-kind=standalone -dwarf-version=5 \ +// RUN: -fsanitize=return -fsanitize-trap=return -emit-llvm %s -o - | FileCheck %s + +int missing_return(int x) +{ +if (x > 0) +return x; +}

[clang] [HLSL] Disallow writing to readonly resources (PR #147806)

2025-07-11 Thread Justin Bogner via cfe-commits
@@ -697,7 +699,9 @@ BuiltinTypeDeclBuilder &BuiltinTypeDeclBuilder::addArraySubscriptOperators() { AST.DeclarationNames.getCXXOperatorName(OO_Subscript); addHandleAccessFunction(Subscript, /*IsConst=*/true, /*IsRef=*/true); - addHandleAccessFunction(Subscript, /*IsCo

[clang] [WIP][DO NOT MERGE][Clang][Driver] Emit warning when -fsanitize-trap=<...> is passed without associated -fsanitize=<...> (PR #147997)

2025-07-11 Thread Anthony Tran via cfe-commits
@@ -730,6 +754,18 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, options::OPT_fno_sanitize_recover_EQ); RecoverableKinds &= Kinds; + // Parse any -fsanitize-trap=<...> flags the user provided, then + // diagnose any which do not have a matching -fsanitize=<...>

[clang-tools-extra] Add clang tidy check performance constexpr non static in scope (PR #147809)

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

[clang] [HLSL] Disallow writing to readonly resources (PR #147806)

2025-07-11 Thread Ashley Coleman via cfe-commits
https://github.com/V-FEXrt updated https://github.com/llvm/llvm-project/pull/147806 >From 9abd7ddf395cb612ff2bca833a70394ffb241885 Mon Sep 17 00:00:00 2001 From: Ashley Coleman Date: Wed, 9 Jul 2025 12:48:51 -0600 Subject: [PATCH 1/5] [HLSL] Disallow writing to readonly resources --- clang/li

[clang] [llvm] [libclang][Cygwin] Provide unversioned DLL file alongside versioned one (PR #147132)

2025-07-11 Thread via cfe-commits
jeremyd2019 wrote: I tested this and it broke things for me. This turns cygLLVM-20.dll into a symlink, this doesn't work with existing binaries because DLLs in the import table can't follow the Cygwin symlinks (they're loaded by the Windows loader). Also, I may have screwed something up, but

[clang] [HLSL] Disallow writing to readonly resources (PR #147806)

2025-07-11 Thread Ashley Coleman via cfe-commits
@@ -697,7 +699,9 @@ BuiltinTypeDeclBuilder &BuiltinTypeDeclBuilder::addArraySubscriptOperators() { AST.DeclarationNames.getCXXOperatorName(OO_Subscript); addHandleAccessFunction(Subscript, /*IsConst=*/true, /*IsRef=*/true); - addHandleAccessFunction(Subscript, /*IsCo

[clang] [llvm] [RISCV] Support resumable non-maskable interrupt handlers (PR #148134)

2025-07-11 Thread Sam Elliott via cfe-commits
lenary wrote: This needs a proposal against the specification here: https://github.com/riscv-non-isa/riscv-c-api-doc/blob/main/src/c-api.adoc#__attribute__interrupt-__attribute__interruptsupervisor-__attribute__interruptmachine https://github.com/llvm/llvm-project/pull/148134 __

[clang] [HLSL] Disallow writing to readonly resources (PR #147806)

2025-07-11 Thread Ashley Coleman via cfe-commits
@@ -697,7 +699,9 @@ BuiltinTypeDeclBuilder &BuiltinTypeDeclBuilder::addArraySubscriptOperators() { AST.DeclarationNames.getCXXOperatorName(OO_Subscript); addHandleAccessFunction(Subscript, /*IsConst=*/true, /*IsRef=*/true); - addHandleAccessFunction(Subscript, /*IsCo

[clang] [HLSL] Disallow writing to readonly resources (PR #147806)

2025-07-11 Thread Ashley Coleman via cfe-commits
https://github.com/V-FEXrt updated https://github.com/llvm/llvm-project/pull/147806 >From 9abd7ddf395cb612ff2bca833a70394ffb241885 Mon Sep 17 00:00:00 2001 From: Ashley Coleman Date: Wed, 9 Jul 2025 12:48:51 -0600 Subject: [PATCH 1/6] [HLSL] Disallow writing to readonly resources --- clang/li

[clang] [llvm] [RISCV] Support resumable non-maskable interrupt handlers (PR #148134)

2025-07-11 Thread Sam Elliott via cfe-commits
https://github.com/lenary commented: The implementation here is good, and can be landed once there's a PR against the riscv-c-api with some consensus. I don't think the chosen name will be controversial. https://github.com/llvm/llvm-project/pull/148134 _

[clang] [HLSL] Disallow writing to readonly resources (PR #147806)

2025-07-11 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/147806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Add `__builtin_stack_address` (PR #148281)

2025-07-11 Thread via cfe-commits
https://github.com/moorabbit created https://github.com/llvm/llvm-project/pull/148281 Add support for `__builtin_stack_address` builtin. The semantics match those of GCC's builtin with the same name. `__builtin_stack_address` returns the starting address of the stack region that may be used b

[clang] [llvm] [Clang] Add `__builtin_stack_address` (PR #148281)

2025-07-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-llvm-selectiondag Author: None (moorabbit) Changes Add support for `__builtin_stack_address` builtin. The semantics match those of GCC's builtin with the same name. `__builtin_stack_address` returns the starting addre

[clang] [clang][CodeGen] Set `dead_on_return` on indirect pointer arguments (PR #148159)

2025-07-11 Thread Antonio Frighetto via cfe-commits
antoniofrighetto wrote: Experiencing some ASan failures, I suspect we are adding the attribute on arguments where we shouldn't (possibly C++ destructors). https://github.com/llvm/llvm-project/pull/148159 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [clang][scan-deps] Report a scanned TU's visible modules (PR #147969)

2025-07-11 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida edited https://github.com/llvm/llvm-project/pull/147969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PATCH 1/4] [clang] Improve nested name specifier AST representation (PR #147835)

2025-07-11 Thread Matheus Izvekov via cfe-commits
@@ -2068,7 +2080,9 @@ class ASTContext : public RefCountedBase { /// if it hasn't yet been built. QualType getRawCFConstantStringType() const { if (CFConstantStringTypeDecl) - return getTypedefType(CFConstantStringTypeDecl); + return getTypedefType(ElaboratedT

[clang] [Clang] fix crash in codegen caused by deferred asm diagnostics under -fopenmp (PR #147163)

2025-07-11 Thread Oleksandr T. via cfe-commits
@@ -2092,18 +2092,36 @@ Sema::SemaDiagnosticBuilder::~SemaDiagnosticBuilder() { } Sema::SemaDiagnosticBuilder -Sema::targetDiag(SourceLocation Loc, unsigned DiagID, const FunctionDecl *FD) { +Sema::targetDiag(SourceLocation Loc, unsigned DiagID, FunctionDecl *FD) { FD = FD

[clang] [clang][scan-deps] Report a scanned TU's visible modules (PR #147969)

2025-07-11 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/147969 >From 87900ca81b552c9d7718c8a38a21f53260534c6e Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Wed, 9 Jul 2025 21:50:44 -0700 Subject: [PATCH 1/2] [clang][scan-deps] Report a scanned TU's visible modules

[clang] [Clang] Partial implementation of support for P3074 (trivial unions) (PR #146815)

2025-07-11 Thread via cfe-commits
@@ -9543,6 +9543,48 @@ bool SpecialMemberDeletionInfo::shouldDeleteForSubobjectCall( if (DiagKind == -1) return false; + if (this->S.Context.getLangOpts().CPlusPlus26 && inUnion() && + CSM == CXXSpecialMemberKind::Destructor) { +// [class.dtor]/7 In C++26, a d

[clang] [PATCH 1/4] [clang] Improve nested name specifier AST representation (PR #147835)

2025-07-11 Thread Matheus Izvekov via cfe-commits
@@ -0,0 +1,585 @@ +//===- NestedNameSpecifier.h - C++ nested name specifiers ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [PATCH 1/4] [clang] Improve nested name specifier AST representation (PR #147835)

2025-07-11 Thread Matheus Izvekov via cfe-commits
@@ -6,534 +6,266 @@ // //===--===// // -// This file defines the NestedNameSpecifier class, which represents -// a C++ nested-name-specifier. +// This file completes the definition of the NestedNameSpecifie

[clang] [PATCH 1/4] [clang] Improve nested name specifier AST representation (PR #147835)

2025-07-11 Thread Matheus Izvekov via cfe-commits
@@ -0,0 +1,585 @@ +//===- NestedNameSpecifier.h - C++ nested name specifiers ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [Clang] Consider default template arguments when synthesizing CTAD guides (PR #147675)

2025-07-11 Thread Matheus Izvekov via cfe-commits
@@ -1061,15 +1061,36 @@ BuildDeductionGuideForTypeAlias(Sema &SemaRef, SmallVector DeduceResults( F->getTemplateParameters()->size()); + // We don't have to deduce against the alias template specialization, + // if the source template is a synthesized alias deduction

[clang] [clang][Dependency Scanning] Report only Regular File Size Changes When Computing Out-of-Date File System Cache Entries (PR #148082)

2025-07-11 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu closed https://github.com/llvm/llvm-project/pull/148082 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5c08bfa - [clang][Dependency Scanning] Report only Regular File Size Changes When Computing Out-of-Date File System Cache Entries (#148082)

2025-07-11 Thread via cfe-commits
Author: Qiongsi Wu Date: 2025-07-11T09:46:46-07:00 New Revision: 5c08bfa23a437f6041bd43ee4dc09f532ab7ed77 URL: https://github.com/llvm/llvm-project/commit/5c08bfa23a437f6041bd43ee4dc09f532ab7ed77 DIFF: https://github.com/llvm/llvm-project/commit/5c08bfa23a437f6041bd43ee4dc09f532ab7ed77.diff LO

[clang] [Clang] Consider default template arguments when synthesizing CTAD guides (PR #147675)

2025-07-11 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM, but it would be good leaving a FIXME. https://github.com/llvm/llvm-project/pull/147675 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [llvm] [Clang] Add `__builtin_stack_address` (PR #148281)

2025-07-11 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [CIR] Implement SubOp for ComplexType (PR #148025)

2025-07-11 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. https://github.com/llvm/llvm-project/pull/148025 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DTLTO][Clang] Add support for Integrated Distributed ThinLTO (PR #147265)

2025-07-11 Thread via cfe-commits
@@ -0,0 +1,43 @@ +// REQUIRES: lld + +/// Check DTLTO options are forwarded to the linker. + +// RUN: echo "--target=x86_64-linux-gnu \ +// RUN: -Xthinlto-distributor=distarg1 \ +// RUN: -Xthinlto-distributor=distarg2,distarg3 \ +// RUN: -fuse-ld=lld" > %t.rsp --

[clang] [llvm] [DTLTO][Clang] Add support for Integrated Distributed ThinLTO (PR #147265)

2025-07-11 Thread via cfe-commits
https://github.com/bd1976bris edited https://github.com/llvm/llvm-project/pull/147265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DTLTO][Clang] Add support for Integrated Distributed ThinLTO (PR #147265)

2025-07-11 Thread via cfe-commits
https://github.com/bd1976bris edited https://github.com/llvm/llvm-project/pull/147265 ___ 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-07-11 Thread Ben Dunkin via cfe-commits
bdunkin wrote: Just a friendly bump on this change :) https://github.com/llvm/llvm-project/pull/143781 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix pointer comparisons between pointers to constexpr-unknown (PR #147663)

2025-07-11 Thread Richard Smith via cfe-commits
@@ -14544,6 +14538,23 @@ EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, (LHSValue.Base && isZeroSized(RHSValue))) return DiagComparison( diag::note_constexpr_pointer_comparison_zero_sized); + // A constexpr-unknown

[clang] [llvm] [HLSL][RootSignature] Add basic parameter validations of Root Elements (PR #145795)

2025-07-11 Thread via cfe-commits
https://github.com/joaosaffran approved this pull request. https://github.com/llvm/llvm-project/pull/145795 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7ecb37b - [HLSL][RootSignature] Retain `SourceLocation` of `RootElement` for `SemaHLSL` diagnostics (#147115)

2025-07-11 Thread via cfe-commits
Author: Finn Plummer Date: 2025-07-11T18:33:16-07:00 New Revision: 7ecb37b703b7c675d1be6c4194c50f6f8dd9ac9c URL: https://github.com/llvm/llvm-project/commit/7ecb37b703b7c675d1be6c4194c50f6f8dd9ac9c DIFF: https://github.com/llvm/llvm-project/commit/7ecb37b703b7c675d1be6c4194c50f6f8dd9ac9c.diff

[clang] [llvm] [HLSL][RootSignature] Retain `SourceLocation` of `RootElement` for `SemaHLSL` diagnostics (PR #147115)

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

[clang] Reapply "[clang] [ubsan] add __has_feature for UBSan checks" (#148322) (PR #148323)

2025-07-11 Thread Peter Collingbourne via cfe-commits
https://github.com/pcc approved this pull request. https://github.com/llvm/llvm-project/pull/148323 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format][NFC] Simplify some logic in BreakableLineCommentSection (PR #148324)

2025-07-11 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/148324 None >From 88f34fb41704bdd6f6de743a5b467cdc3c938cc4 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 11 Jul 2025 18:18:18 -0700 Subject: [PATCH] [clang-format][NFC] Simplify some logic in BreakableLineComment

[clang] [clang-format][NFC] Simplify some logic in BreakableLineCommentSection (PR #148324)

2025-07-11 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/148324.diff 1 Files Affected: - (modified) clang/lib/Format/BreakableToken.cpp (+4-6) ``diff diff --git a/clang/lib/Format/BreakableTo

[clang] [clang][ARM] Include arm_acle.h in intrin.h on supported platforms (PR #144172)

2025-07-11 Thread Nick Sarnie via cfe-commits
@@ -50,11 +50,11 @@ BUILTIN(__builtin_arm_wfi, "v", "") BUILTIN(__builtin_arm_sev, "v", "") BUILTIN(__builtin_arm_sevl, "v", "") BUILTIN(__builtin_arm_chkfeat, "WUiWUi", "") -TARGET_HEADER_BUILTIN(__yield, "v", "h", ARMACLE_H, ALL_LANGUAGES, "") -TARGET_HEADER_BUILTIN(__wfe,

[clang] [llvm] [HLSL][RootSignature] Audit `RootSignatureParser` diagnostic production (PR #147800)

2025-07-11 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/147800 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][RootSignature] Audit `RootSignatureParser` diagnostic production (PR #147800)

2025-07-11 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/147800 >From a510b930402cd4a6a00f253093d1a3ddfab918ac Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Wed, 9 Jul 2025 15:50:55 + Subject: [PATCH 01/11] remove confusing hlsl_unexpected_end_of_params diagnostic

[clang] [clang] Don't pass sanitizers' rtlibs to linker with `-r` (PR #147905)

2025-07-11 Thread Dmitry Chestnykh via cfe-commits
@@ -1159,7 +1159,8 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, LinkRuntimes = Args.hasFlag(options::OPT_fsanitize_link_runtime, - options::OPT_fno_sanitize_link_runtime, LinkRuntimes); + options::OPT_fno_sanitize_link_runtim

[clang] [clang] Don't pass sanitizers' rtlibs to linker with `-r` (PR #147905)

2025-07-11 Thread Dmitry Chestnykh via cfe-commits
https://github.com/chestnykh updated https://github.com/llvm/llvm-project/pull/147905 >From 86dc26e3947d2d53e9b86d700946e7f381f71a7a Mon Sep 17 00:00:00 2001 From: Dmitry Chestnykh Date: Thu, 10 Jul 2025 10:19:31 +0300 Subject: [PATCH 1/4] [clang] Don't pass sanitizers' rtlibs to linker with `-

[clang] [clang] Don't pass sanitizers' rtlibs to linker with `-r` (PR #147905)

2025-07-11 Thread Dmitry Chestnykh via cfe-commits
@@ -1159,7 +1159,8 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, LinkRuntimes = Args.hasFlag(options::OPT_fsanitize_link_runtime, - options::OPT_fno_sanitize_link_runtime, LinkRuntimes); + options::OPT_fno_sanitize_link_runtim

[clang] [clang] Don't pass sanitizers' rtlibs to linker with `-r` (PR #147905)

2025-07-11 Thread Dmitry Chestnykh via cfe-commits
https://github.com/chestnykh updated https://github.com/llvm/llvm-project/pull/147905 >From 86dc26e3947d2d53e9b86d700946e7f381f71a7a Mon Sep 17 00:00:00 2001 From: Dmitry Chestnykh Date: Thu, 10 Jul 2025 10:19:31 +0300 Subject: [PATCH 1/5] [clang] Don't pass sanitizers' rtlibs to linker with `-

[clang-tools-extra] [clang-tidy] Teach `cppcoreguidelines-interfaces-global-init` about `constinit` (PR #148334)

2025-07-11 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor requested changes to this pull request. https://github.com/llvm/llvm-project/pull/148334 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Teach `cppcoreguidelines-interfaces-global-init` about `constinit` (PR #148334)

2025-07-11 Thread Baranov Victor via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %check_clang_tidy %s cppcoreguidelines-interfaces-global-init %t +// RUN: %check_clang_tidy -std=c++20 %s cppcoreguidelines-interfaces-global-init %t vbvictor wrote: We shouldn't increase standard here because we still want to check that

[clang] [clang] Don't pass sanitizers' rtlibs to linker with `-r` (PR #147905)

2025-07-11 Thread Peter Collingbourne via cfe-commits
@@ -1159,7 +1159,8 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, LinkRuntimes = Args.hasFlag(options::OPT_fsanitize_link_runtime, - options::OPT_fno_sanitize_link_runtime, LinkRuntimes); + options::OPT_fno_sanitize_link_runtim

[clang] [clang] Don't pass sanitizers' rtlibs to linker with `-r` (PR #147905)

2025-07-11 Thread Peter Collingbourne via cfe-commits
https://github.com/pcc approved this pull request. https://github.com/llvm/llvm-project/pull/147905 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Teach `cppcoreguidelines-interfaces-global-init` about `constinit` (PR #148334)

2025-07-11 Thread Victor Chernyakin via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %check_clang_tidy %s cppcoreguidelines-interfaces-global-init %t +// RUN: %check_clang_tidy -std=c++20 %s cppcoreguidelines-interfaces-global-init %t localspook wrote: Would you be fine with some `#if __cplusplus >= 202002L` guards inste

[clang-tools-extra] [clang-tidy] Teach `cppcoreguidelines-interfaces-global-init` about `constinit` (PR #148334)

2025-07-11 Thread Baranov Victor via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %check_clang_tidy %s cppcoreguidelines-interfaces-global-init %t +// RUN: %check_clang_tidy -std=c++20 %s cppcoreguidelines-interfaces-global-init %t vbvictor wrote: Yes, we could do guards https://github.com/llvm/llvm-project/pull/1483

[clang] [llvm] [WPD]: Apply speculative WPD in non-lto mode. (PR #145031)

2025-07-11 Thread Hassnaa Hamdi via cfe-commits
https://github.com/hassnaaHamdi updated https://github.com/llvm/llvm-project/pull/145031 >From 54296ceadcdf59136f68c1e3132a2528396361d4 Mon Sep 17 00:00:00 2001 From: Hassnaa Hamdi Date: Fri, 20 Jun 2025 01:35:38 + Subject: [PATCH 1/2] [WPD]: Apply speculative WPD in non-lto mode. - This p

[clang] [CIR] Add bit reverse and byte reverse operations (PR #147200)

2025-07-11 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-aarch64-darwin` running on `doug-worker-4` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/23350 Here is th

[clang] [clang] Don't pass sanitizers' rtlibs to linker with `-r` (PR #147905)

2025-07-11 Thread Dmitry Chestnykh via cfe-commits
https://github.com/chestnykh updated https://github.com/llvm/llvm-project/pull/147905 >From 86dc26e3947d2d53e9b86d700946e7f381f71a7a Mon Sep 17 00:00:00 2001 From: Dmitry Chestnykh Date: Thu, 10 Jul 2025 10:19:31 +0300 Subject: [PATCH 1/2] [clang] Don't pass sanitizers' rtlibs to linker with `-

[clang] [clang] Don't pass sanitizers' rtlibs to linker with `-r` (PR #147905)

2025-07-11 Thread Dmitry Chestnykh via cfe-commits
@@ -1159,7 +1159,8 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, LinkRuntimes = Args.hasFlag(options::OPT_fsanitize_link_runtime, - options::OPT_fno_sanitize_link_runtime, LinkRuntimes); + options::OPT_fno_sanitize_link_runtim

[clang] [libcxx] [clang] Add -Wuninitialized-const-pointer (PR #148337)

2025-07-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Igor Kudrin (igorkudrin) Changes This option is similar to -Wuninitialized-const-reference, but diagnoses the passing of an uninitialized value via a const pointer, like in the following code: ``` void foo(const int *); void test() { in

[clang] [libcxx] [clang] Add -Wuninitialized-const-pointer (PR #148337)

2025-07-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: Igor Kudrin (igorkudrin) Changes This option is similar to -Wuninitialized-const-reference, but diagnoses the passing of an uninitialized value via a const pointer, like in the following code: ``` void foo(const int *); void test

[clang] [libcxx] [clang] Add -Wuninitialized-const-pointer (PR #148337)

2025-07-11 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,c -- clang/test/SemaCXX/warn-uninitialized-const-point

[clang] [HLSL][RootSignature] Add basic parameter validations of Root Elements (PR #145795)

2025-07-11 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/145795 >From 43991791409d376e682c6a482941fcc4cd43b0bc Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Wed, 9 Jul 2025 19:25:19 + Subject: [PATCH 1/9] add basic integer range validations --- .../clang/Basic/Diag

[clang] [llvm] [HIPSTDPAR] Add support for globals (PR #146813)

2025-07-11 Thread Alex Voicu via cfe-commits
AlexVlx wrote: This is the run time part needed to make things work: https://github.com/llvm/llvm-project/pull/146813 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [RISCV] Add -march=unset to cancel and ignore a previous -march. (PR #148321)

2025-07-11 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay commented: Thanks for implementing -mcpu=unset. This looks good. I'm glad to see -mcpu=unset gaining support, especially after feeling like the lone voice in the GCC thread: https://gcc.gnu.org/pipermail/gcc-patches/2025-June/685537.html https://github.com/llvm/llvm-

[clang] [RISCV] Add -march=unset to cancel and ignore a previous -march. (PR #148321)

2025-07-11 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/148321 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Add -march=unset to cancel and ignore a previous -march. (PR #148321)

2025-07-11 Thread Fangrui Song via cfe-commits
@@ -403,6 +403,11 @@ // MCPU-MARCH: "-nostdsysteminc" "-target-cpu" "sifive-e31" "-target-feature" "+m" "-target-feature" "+c" // MCPU-MARCH: "-target-abi" "ilp32" +// march=unset erases previous march +// RUN: %clang --target=riscv32 -### -c %s 2>&1 -march=rv32imc -march=uns

[clang] [LTO] Add unified LTO tests for the PS targets. (PR #148229)

2025-07-11 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,33 @@ +// RUN: %clang -flto=thin --target=x86_64-scei-ps4 -O2 -c %s -o %t.ps4.tu -Xclang -fdebug-pass-manager 2>%t.ps4.tu.txt MaskRay wrote: unified-lto-pipeline.c is present and serves the purpose. For target-generic codegen features, we usually tes

[clang] [clang] Don't pass sanitizers' rtlibs to linker with `-r` (PR #147905)

2025-07-11 Thread Peter Collingbourne via cfe-commits
@@ -1159,7 +1159,8 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, LinkRuntimes = Args.hasFlag(options::OPT_fsanitize_link_runtime, - options::OPT_fno_sanitize_link_runtime, LinkRuntimes); + options::OPT_fno_sanitize_link_runtim

[clang] f03bcb7 - [HLSL][RootSignature] Audit `RootSignatureParser` diagnostic production (#147800)

2025-07-11 Thread via cfe-commits
Author: Finn Plummer Date: 2025-07-11T19:40:10-07:00 New Revision: f03bcb7594254b91098f16a339dd6ba4c55a0c8e URL: https://github.com/llvm/llvm-project/commit/f03bcb7594254b91098f16a339dd6ba4c55a0c8e DIFF: https://github.com/llvm/llvm-project/commit/f03bcb7594254b91098f16a339dd6ba4c55a0c8e.diff

[clang] [HLSL][RootSignature] Audit `RootSignatureParser` diagnostic production (PR #147800)

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

[clang] [HLSL][RootSignature] Add basic parameter validations of Root Elements (PR #145795)

2025-07-11 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/145795 >From 43991791409d376e682c6a482941fcc4cd43b0bc Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Wed, 9 Jul 2025 19:25:19 + Subject: [PATCH 1/8] add basic integer range validations --- .../clang/Basic/Diag

[clang-tools-extra] [clangd] Improve Markup Rendering (PR #140498)

2025-07-11 Thread Maksim Ivanov via cfe-commits
@@ -151,16 +151,91 @@ bool needsLeadingEscape(char C, llvm::StringRef Before, llvm::StringRef After, } } +/// \brief Tests whether \p C should be backslash-escaped in markdown. +/// +/// The MarkupContent LSP specification defines that `markdown` content needs to +/// foll

[clang-tools-extra] [clangd] Improve Markup Rendering (PR #140498)

2025-07-11 Thread Maksim Ivanov via cfe-commits
@@ -151,16 +151,91 @@ bool needsLeadingEscape(char C, llvm::StringRef Before, llvm::StringRef After, } } +/// \brief Tests whether \p C should be backslash-escaped in markdown. +/// +/// The MarkupContent LSP specification defines that `markdown` content needs to +/// foll

[clang-tools-extra] [clangd] Improve Markup Rendering (PR #140498)

2025-07-11 Thread Maksim Ivanov via cfe-commits
@@ -316,6 +399,12 @@ std::string indentLines(llvm::StringRef Input) { class Heading : public Paragraph { public: Heading(size_t Level) : Level(Level) {} + + void renderEscapedMarkdown(llvm::raw_ostream &OS) const override { +OS << std::string(Level, '#') << ' ';

[clang-tools-extra] [clangd] Improve Markup Rendering (PR #140498)

2025-07-11 Thread Maksim Ivanov via cfe-commits
@@ -151,16 +151,91 @@ bool needsLeadingEscape(char C, llvm::StringRef Before, llvm::StringRef After, } } +/// \brief Tests whether \p C should be backslash-escaped in markdown. +/// +/// The MarkupContent LSP specification defines that `markdown` content needs to +/// foll

[clang-tools-extra] [clangd] Improve Markup Rendering (PR #140498)

2025-07-11 Thread Maksim Ivanov via cfe-commits
@@ -370,40 +497,128 @@ std::unique_ptr Paragraph::clone() const { /// Choose a marker to delimit `Text` from a prioritized list of options. /// This is more readable than escaping for plain-text. -llvm::StringRef chooseMarker(llvm::ArrayRef Options, -

[clang-tools-extra] [clangd] Improve Markup Rendering (PR #140498)

2025-07-11 Thread Maksim Ivanov via cfe-commits
@@ -420,29 +636,44 @@ Paragraph &Paragraph::appendSpace() { return *this; } -Paragraph &Paragraph::appendText(llvm::StringRef Text) { - std::string Norm = canonicalizeSpaces(Text); - if (Norm.empty()) +Paragraph &Paragraph::appendChunk(llvm::StringRef Contents, ChunkKind K

[clang-tools-extra] [clangd] Improve Markup Rendering (PR #140498)

2025-07-11 Thread Maksim Ivanov via cfe-commits
@@ -73,6 +80,20 @@ class Paragraph : public Block { bool SpaceAfter = false; }; std::vector Chunks; + + Paragraph &appendChunk(llvm::StringRef Contents, ChunkKind K); + + llvm::StringRef chooseMarker(llvm::ArrayRef Options, + llvm::String

[clang-tools-extra] [clangd] Improve Markup Rendering (PR #140498)

2025-07-11 Thread Maksim Ivanov via cfe-commits
@@ -341,27 +437,58 @@ std::string Block::asPlainText() const { return llvm::StringRef(OS.str()).trim().str(); } +void Paragraph::renderEscapedMarkdown(llvm::raw_ostream &OS) const { + bool NeedsSpace = false; + bool HasChunks = false; + for (auto &C : Chunks) { +if (C

[clang-tools-extra] [clangd] Improve Markup Rendering (PR #140498)

2025-07-11 Thread Maksim Ivanov via cfe-commits
@@ -370,40 +497,128 @@ std::unique_ptr Paragraph::clone() const { /// Choose a marker to delimit `Text` from a prioritized list of options. /// This is more readable than escaping for plain-text. -llvm::StringRef chooseMarker(llvm::ArrayRef Options, -

[clang-tools-extra] [clangd] Improve Markup Rendering (PR #140498)

2025-07-11 Thread Maksim Ivanov via cfe-commits
@@ -58,11 +67,9 @@ class Paragraph : public Block { Paragraph &appendSpace(); private: + typedef enum { PlainText, InlineCode, Bold, Emphasized } ChunkKind; emaxx-google wrote: nit: Just do `enum ChunkKind { ... }`. https://github.com/llvm/llvm-project/pu

[clang-tools-extra] [clangd] Improve Markup Rendering (PR #140498)

2025-07-11 Thread Maksim Ivanov via cfe-commits
@@ -352,40 +606,59 @@ TEST(BulletList, Render) { DeepDoc.addParagraph().appendText("baz"); StringRef ExpectedMarkdown = R"md(- foo - bar -- foo - baz - - foo -- baz +- foo + emaxx-google wrote: Related to the comment in the code - these addit

[clang-tools-extra] [clangd] Improve Markup Rendering (PR #140498)

2025-07-11 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google edited https://github.com/llvm/llvm-project/pull/140498 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Improve Markup Rendering (PR #140498)

2025-07-11 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google requested changes to this pull request. Thanks! A couple of questions about newline handling, and a few minor nits. https://github.com/llvm/llvm-project/pull/140498 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clangd] Improve Markup Rendering (PR #140498)

2025-07-11 Thread Maksim Ivanov via cfe-commits
@@ -151,16 +151,91 @@ bool needsLeadingEscape(char C, llvm::StringRef Before, llvm::StringRef After, } } +/// \brief Tests whether \p C should be backslash-escaped in markdown. +/// +/// The MarkupContent LSP specification defines that `markdown` content needs to +/// foll

[clang-tools-extra] [clangd] Improve Markup Rendering (PR #140498)

2025-07-11 Thread Maksim Ivanov via cfe-commits
@@ -1601,51 +1591,32 @@ std::optional getBacktickQuoteRange(llvm::StringRef Line, return Line.slice(Offset, Next + 1); } -void parseDocumentationLine(llvm::StringRef Line, markup::Paragraph &Out) { +void parseDocumentationParagraph(llvm::StringRef Text, markup::Paragraph &O

[clang-tools-extra] [clangd] Improve Markup Rendering (PR #140498)

2025-07-11 Thread Maksim Ivanov via cfe-commits
@@ -151,16 +151,91 @@ bool needsLeadingEscape(char C, llvm::StringRef Before, llvm::StringRef After, } } +/// \brief Tests whether \p C should be backslash-escaped in markdown. +/// +/// The MarkupContent LSP specification defines that `markdown` content needs to +/// foll

[clang-tools-extra] [clangd] Improve Markup Rendering (PR #140498)

2025-07-11 Thread Maksim Ivanov via cfe-commits
@@ -370,40 +497,128 @@ std::unique_ptr Paragraph::clone() const { /// Choose a marker to delimit `Text` from a prioritized list of options. /// This is more readable than escaping for plain-text. -llvm::StringRef chooseMarker(llvm::ArrayRef Options, -

<    1   2   3   4   5   >