[clang] [X86] Add constexpr handling for XOP/AVX512 rotate by immediate intrinsics (PR #156047)

2025-08-29 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon auto_merge_enabled https://github.com/llvm/llvm-project/pull/156047 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86] Add constexpr handling for XOP/AVX512 rotate by immediate intrinsics (PR #156047)

2025-08-29 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon updated https://github.com/llvm/llvm-project/pull/156047 >From 417527220c18d18ab894a032895d6f1872c878ee Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Fri, 29 Aug 2025 13:29:00 +0100 Subject: [PATCH 1/2] [X86] Add constexpr handling for XOP/AVX512 rotate by immed

[clang] [clang][analyzer] Add plist macro formatting (PR #156046)

2025-08-29 Thread Balazs Benics via cfe-commits
steakhal wrote: Speaking of testing, we should probably not overdo it. Clang format is a different component. They likely want to remain flexible. If we pin their output too hard, they would become unhappy long term. Consequently, having a couple is desired, but other than that if we want to pi

[clang] [clang][analyzer] Add plist macro formatting (PR #156046)

2025-08-29 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: Looks great. This should be tested in the unittests, somehwere the sibling APIs are tested. https://github.com/llvm/llvm-project/pull/156046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [clang-format] Add option AllowShortRecordOnASingleLine (PR #154580)

2025-08-29 Thread via cfe-commits
=?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina Message-ID: In-Reply-To: @@ -1553,6 +1563,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) {

[clang] [libunwind] [llvm] [wasm] Toolchain support for `wasm32-wali-linux-musl` target (PR #156087)

2025-08-29 Thread Arjun Ramesh via cfe-commits
@@ -249,6 +249,9 @@ aliasname: \ #define WEAK_ALIAS(name, aliasname) #define NO_EXEC_STACK_DIRECTIVE +#elif defined(__wasm__) +#define NO_EXEC_STACK_DIRECTIVE arjunr2 wrote: Moved the header

[clang] [Driver] Enable outline atomics for NetBSD/aarch64 (PR #156143)

2025-08-29 Thread Brad Smith via cfe-commits
brad0 wrote: cc @0-wiz-0 https://github.com/llvm/llvm-project/pull/156143 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libunwind] [llvm] [wasm] Toolchain support for `wasm32-wali-linux-musl` target (PR #156087)

2025-08-29 Thread Arjun Ramesh via cfe-commits
https://github.com/arjunr2 updated https://github.com/llvm/llvm-project/pull/156087 >From cb996a12aa20c65980f620381731fad1622e0417 Mon Sep 17 00:00:00 2001 From: Arjun Ramesh Date: Sat, 30 Aug 2025 01:01:02 -0400 Subject: [PATCH] Support for `wasm32-wali-linux-musl target` in `clang`, `lld`, a

[clang-tools-extra] [clang-tidy] support query based custom check (PR #131804)

2025-08-29 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. https://github.com/llvm/llvm-project/pull/131804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libunwind] [llvm] [wasm] Toolchain support for `wasm32-wali-linux-musl` target (PR #156087)

2025-08-29 Thread Arjun Ramesh via cfe-commits
arjunr2 wrote: Removing changes from the linker to a separate RT leaves pretty much primarily front-end changes. WALI, as per the research paper and Rust, (currently) virtualizes the 64-bit Linux syscall interfaces across many ISAs. It requires 64-bit long to adhere to the Host-ABIs (i.e. x86

[clang] [libunwind] [llvm] [wasm] Toolchain support for `wasm32-wali-linux-musl` target (PR #156087)

2025-08-29 Thread Arjun Ramesh via cfe-commits
@@ -1200,6 +1225,36 @@ void Writer::createSyntheticInitFunctions() { } } +void Writer::createMemoryGrowFunction() { + LLVM_DEBUG(dbgs() << "createMemoryGrowFunction\n"); + assert(ctx.sym.memoryGrow); + std::string bodyContent; + { +raw_string_ostream os(bodyContent);

[clang] [Driver] Enable outline atomics for NetBSD/aarch64 (PR #156143)

2025-08-29 Thread Brad Smith via cfe-commits
https://github.com/brad0 edited https://github.com/llvm/llvm-project/pull/156143 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Enable outline atomics for NetBSD/aarch64 (PR #156143)

2025-08-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Brad Smith (brad0) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/156143.diff 2 Files Affected: - (modified) clang/lib/Driver/ToolChains/NetBSD.h (+5) - (modified) clang/test/Driver/aarch64-features.c (+3) ```

[clang] [Driver] Enable outline atomics for NetBSD/aarch64 (PR #156143)

2025-08-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Brad Smith (brad0) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/156143.diff 2 Files Affected: - (modified) clang/lib/Driver/ToolChains/NetBSD.h (+5) - (modified) clang/test/Driver/aarch64-features.c (+3)

[clang] [Driver] Enable outline atomics for NetBSD/aarch64 (PR #156143)

2025-08-29 Thread Brad Smith via cfe-commits
https://github.com/brad0 created https://github.com/llvm/llvm-project/pull/156143 None >From 04b59149880ab6ae7a086f17f7a2771abb0dd3ea Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sat, 30 Aug 2025 00:34:30 -0400 Subject: [PATCH] [Driver] Enable outline atomics for NetBSD/aarch64 --- clang/

[clang] [clang-tools-extra] [llvm] [ADT] Refactor StringMap iterators (NFC) (PR #156137)

2025-08-29 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/156137 StringMap has four iterator classes: - StringMapIterBase - StringMapIterator - StringMapConstIterator - StringMapKeyIterator This patch consolidates the first three into one class, namely StringMapIterBa

[clang] [clang-tools-extra] [llvm] [ADT] Refactor StringMap iterators (NFC) (PR #156137)

2025-08-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Kazu Hirata (kazutakahirata) Changes StringMap has four iterator classes: - StringMapIterBase - StringMapIterator - StringMapConstIterator - StringMapKeyIterator This patch consolidates the first three into one class, namely S

[clang] [clang-tools-extra] [llvm] [ADT] Refactor StringMap iterators (NFC) (PR #156137)

2025-08-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-adt Author: Kazu Hirata (kazutakahirata) Changes StringMap has four iterator classes: - StringMapIterBase - StringMapIterator - StringMapConstIterator - StringMapKeyIterator This patch consolidates the first three into one class, namely StringMapI

[clang] [X86] Add constexpr handling for XOP/AVX512 rotate by immediate intrinsics (PR #156047)

2025-08-29 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/156047 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Allow short function body on a single line (PR #151428)

2025-08-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-s390x-linux` running on `systemz-1` while building `clang` at step 6 "test-openmp". Full details are available at: https://lab.llvm.org/buildbot/#/builders/88/builds/15564 Here is the relevant piece of the build log f

[clang] [clang-format] Allow short function body on a single line (PR #151428)

2025-08-29 Thread via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/151428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 81035c3 - [clang-format] Allow short function body on a single line (#151428)

2025-08-29 Thread via cfe-commits
Author: 闫立栋 Date: 2025-08-29T18:51:33-07:00 New Revision: 81035c31cd7d0f65ef650474c0d585131f958bda URL: https://github.com/llvm/llvm-project/commit/81035c31cd7d0f65ef650474c0d585131f958bda DIFF: https://github.com/llvm/llvm-project/commit/81035c31cd7d0f65ef650474c0d585131f958bda.diff LOG: [cla

[clang-tools-extra] [clang-tidy] performance-unnecessary-copy-initialization: Enhance the check for the scenario with MemberExpr initialization. (PR #151936)

2025-08-29 Thread Congcong Cai via cfe-commits
@@ -273,6 +273,18 @@ void UnnecessaryCopyInitialization::registerMatchers(MatchFinder *Finder) { Finder->addMatcher(LocalVarCopiedFrom(declRefExpr( to(varDecl(hasLocalStorage()).bind(OldVarDeclId, this); + + auto DeclRefToCo

[clang] [clang] fix obtaining EnumDecl for UsingEnumDecl (PR #156127)

2025-08-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-s390x-linux` running on `systemz-1` while building `clang` at step 6 "test-openmp". Full details are available at: https://lab.llvm.org/buildbot/#/builders/88/builds/15562 Here is the relevant piece of the build log f

[clang] [X86] Add -fexperimental-new-constant-interpreter test coverage to the BSWAP constexpr test files (PR #156061)

2025-08-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `flang-aarch64-release` running on `linaro-flang-aarch64-release` while building `clang` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/172/builds/14815 Here is the re

[clang] [clang-format] Add an option to format integer and float literal case (PR #151590)

2025-08-29 Thread via cfe-commits
@@ -0,0 +1,176 @@ +//===--- NumericLiteralCaseFixer.cpp *- 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] [llvm] [DirectX] Removing dxbc DescriptorRange from mcbxdc (PR #154629)

2025-08-29 Thread via cfe-commits
@@ -568,12 +568,7 @@ Error MetadataParser::validateRootSignature( case dxbc::RootParameterType::DescriptorTable: { const mcdxbc::DescriptorTable &Table = RSD.ParametersContainer.getDescriptorTable(Info.Location); - for (const dxbc::RTS0::v2::DescriptorR

[clang] [llvm] [DirectX] Removing dxbc DescriptorRange from mcbxdc (PR #154629)

2025-08-29 Thread via cfe-commits
https://github.com/joaosaffran ready_for_review https://github.com/llvm/llvm-project/pull/154629 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix obtaining EnumDecl for UsingEnumDecl (PR #156127)

2025-08-29 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-5` 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/26434 Here is th

[clang] [llvm] [DirectX] Removing dxbc DescriptorRange from mcbxdc (PR #154629)

2025-08-29 Thread via cfe-commits
@@ -313,9 +313,10 @@ Error DXContainerWriter::writeParts(raw_ostream &OS) { P.RootSignature->Parameters.getOrInsertTable(L); mcdxbc::DescriptorTable Table; for (const auto &R : TableYaml.Ranges) { - -dxbc::RTS0::v2::DescriptorRange

[clang] [clang-format] Add an option to format integer and float literal case (PR #151590)

2025-08-29 Thread via cfe-commits
@@ -0,0 +1,176 @@ +//===--- NumericLiteralCaseFixer.cpp *- 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] [llvm] [DirectX] Removing dxbc DescriptorRange from mcbxdc (PR #154629)

2025-08-29 Thread via cfe-commits
@@ -124,6 +122,11 @@ bool verifyDescriptorRangeFlag(uint32_t Version, uint32_t Type, } return (Flags & ~Mask) == FlagT::None; } +bool verifyDescriptorRangeFlag(uint32_t Version, dxbc::DescriptorRangeType Type, + uint32_t Flags) { + return ve

[clang] [clang][initlist] handle incomplete array type in Constant Expr Calculation (PR #155080)

2025-08-29 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/155080 >From 00a2038a85eec59d263f756b85b8e0527266c500 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 23 Aug 2025 14:05:04 +0800 Subject: [PATCH 1/3] [clang][initlist] handle incomplete array type in Consta

[clang] [llvm] [DirectX] Removing dxbc DescriptorRange from mcbxdc (PR #154629)

2025-08-29 Thread via cfe-commits
https://github.com/joaosaffran edited https://github.com/llvm/llvm-project/pull/154629 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX] Removing dxbc DescriptorRange from mcbxdc (PR #154629)

2025-08-29 Thread via cfe-commits
@@ -31,6 +31,15 @@ struct RootDescriptor { uint32_t Flags; }; +struct DescriptorRange { + dxbc::DescriptorRangeType RangeType; + uint32_t NumDescriptors; + uint32_t BaseShaderRegister; + uint32_t RegisterSpace; + uint32_t Flags; joaosaffran wrote: I de

[clang] [llvm] [DirectX] Removing dxbc DescriptorRange from mcbxdc (PR #154629)

2025-08-29 Thread via cfe-commits
@@ -1241,6 +1241,20 @@ bool SemaHLSL::handleRootSignatureElements( << /*version minor*/ VersionEnum; }; + auto toDescriptorRangeType = [](llvm::dxil::ResourceClass Type) { +switch (Type) { +case llvm::dxil::ResourceClass::SRV: + return llvm::dxbc::Descr

[clang] [llvm] [DirectX] Removing dxbc DescriptorRange from mcbxdc (PR #154629)

2025-08-29 Thread via cfe-commits
@@ -149,6 +149,16 @@ ArrayRef> dxbc::getRootParameterTypes() { return ArrayRef(RootParameterTypes); } +#define DESCRIPTOR_RANGE(Val, Enum) {#Enum, DescriptorRangeType::Enum}, + +static const EnumEntry DescriptorRangeTypes[] = { +#include "llvm/BinaryFormat/DXContainerConsta

[clang] 38832a8 - [clang] fix obtaining EnumDecl for UsingEnumDecl (#156127)

2025-08-29 Thread via cfe-commits
Author: Matheus Izvekov Date: 2025-08-30T01:06:48Z New Revision: 38832a8443d76ce96b7e893a80538b9c3515a22a URL: https://github.com/llvm/llvm-project/commit/38832a8443d76ce96b7e893a80538b9c3515a22a DIFF: https://github.com/llvm/llvm-project/commit/38832a8443d76ce96b7e893a80538b9c3515a22a.diff LO

[clang] [clang] fix obtaining EnumDecl for UsingEnumDecl (PR #156127)

2025-08-29 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/156127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX] Removing dxbc DescriptorRange from mcbxdc (PR #154629)

2025-08-29 Thread via cfe-commits
@@ -30,7 +30,11 @@ LLVM_ABI bool verifyRegisterValue(uint32_t RegisterValue); LLVM_ABI bool verifyRegisterSpace(uint32_t RegisterSpace); LLVM_ABI bool verifyRootDescriptorFlag(uint32_t Version, uint32_t FlagsVal); LLVM_ABI bool verifyRangeType(uint32_t Type); -LLVM_ABI bool ver

[clang] Add error check for HeuristicResolver (PR #155561)

2025-08-29 Thread Mythreya Kuricheti via cfe-commits
https://github.com/MythreyaK updated https://github.com/llvm/llvm-project/pull/155561 >From b0c182fc416a5fa1cd64ef3a95cd4fd05b0c8eef Mon Sep 17 00:00:00 2001 From: Mythreya Kuricheti Date: Thu, 28 Aug 2025 01:27:22 -0700 Subject: [PATCH 1/3] Add `CaptureDiagsKind` to `buildASTFromCodeWithArgs`

[clang] Canonicalize clang-scan-deps input-file/file-deps paths for Windows (PR #155908)

2025-08-29 Thread Hiroshi Yamauchi via cfe-commits
hjyamauchi wrote: @jansvoboda11 Do you have further thoughts? https://github.com/llvm/llvm-project/pull/155908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix obtaining EnumDecl for UsingEnumDecl (PR #156127)

2025-08-29 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov auto_merge_enabled https://github.com/llvm/llvm-project/pull/156127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix obtaining EnumDecl for UsingEnumDecl (PR #156127)

2025-08-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes Use the castAs acessor for the type for a UsingEnumDecl, as it can be sugar for an EnumType. Fixes a regression reported here: https://github.com/llvm/llvm-project/pull/155313#issuecomment-3238482327 S

[clang] [clang] fix obtaining EnumDecl for UsingEnumDecl (PR #156127)

2025-08-29 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/156127 Use the castAs acessor for the type for a UsingEnumDecl, as it can be sugar for an EnumType. Fixes a regression reported here: https://github.com/llvm/llvm-project/pull/155313#issuecomment-3238482327 Since t

[clang] Add error check for HeuristicResolver (PR #155561)

2025-08-29 Thread Mythreya Kuricheti via cfe-commits
@@ -692,10 +694,13 @@ std::unique_ptr buildASTFromCodeWithArgs( StringRef Code, const std::vector &Args, StringRef FileName, StringRef ToolName, std::shared_ptr PCHContainerOps, ArgumentsAdjuster Adjuster, const FileContentMappings &VirtualMappedFiles, -Diagnos

[clang] Add error check for HeuristicResolver (PR #155561)

2025-08-29 Thread Mythreya Kuricheti via cfe-commits
https://github.com/MythreyaK edited https://github.com/llvm/llvm-project/pull/155561 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add error check for HeuristicResolver (PR #155561)

2025-08-29 Thread Mythreya Kuricheti via cfe-commits
@@ -41,7 +61,16 @@ template void expectResolution(llvm::StringRef Code, ResolveFnT ResolveFn, const InputMatcher &IM, const OutputMatchers &...OMS) { + llvm::SmallSet IgnoredDiagnostics{}; auto TU = tooling::buildASTFromCodeWithArgs(Code, {"-std=c++23"

[clang] [CIR] Add support for discrete bit-field (PR #156085)

2025-08-29 Thread Andy Kaylor via cfe-commits
@@ -306,7 +316,45 @@ void CIRRecordLowering::fillOutputFields() { RecordDecl::field_iterator CIRRecordLowering::accumulateBitFields(RecordDecl::field_iterator field, RecordDecl::field_iterator fieldEnd) { - assert(!cir::MissingFeatures::i

[clang] [CIR] Add support for discrete bit-field (PR #156085)

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

[clang] [CIR] Add support for discrete bit-field (PR #156085)

2025-08-29 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor commented: Looks good, with just a couple of test requests. https://github.com/llvm/llvm-project/pull/156085 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [CIR] Add support for discrete bit-field (PR #156085)

2025-08-29 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,65 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mms-bitfields -fclangir -emit-cir %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mms-bitfields -fclangir -emit-llvm %s -o %t-ci

[clang] Add error check for HeuristicResolver (PR #155561)

2025-08-29 Thread Mythreya Kuricheti via cfe-commits
@@ -41,7 +61,16 @@ template void expectResolution(llvm::StringRef Code, ResolveFnT ResolveFn, const InputMatcher &IM, const OutputMatchers &...OMS) { + llvm::SmallSet IgnoredDiagnostics{}; auto TU = tooling::buildASTFromCodeWithArgs(Code, {"-std=c++23"

[clang] Add error check for HeuristicResolver (PR #155561)

2025-08-29 Thread Mythreya Kuricheti via cfe-commits
@@ -238,6 +239,7 @@ std::unique_ptr buildASTFromCodeWithArgs( ArgumentsAdjuster Adjuster = getClangStripDependencyFileAdjuster(), const FileContentMappings &VirtualMappedFiles = FileContentMappings(), DiagnosticConsumer *DiagConsumer = nullptr, +CaptureDiagsKind

[clang] [clang] Frontend: Destroy compiling compiler instance before read (PR #154455)

2025-08-29 Thread via cfe-commits
github-actions[bot] wrote: @AnthonyLatsis Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a

[clang] 1532116 - [clang] Frontend: Destroy compiling compiler instance before read (#154455)

2025-08-29 Thread via cfe-commits
Author: Anthony Latsis Date: 2025-08-29T16:59:29-07:00 New Revision: 1532116a25573bfc12a43894928974cddb8660e1 URL: https://github.com/llvm/llvm-project/commit/1532116a25573bfc12a43894928974cddb8660e1 DIFF: https://github.com/llvm/llvm-project/commit/1532116a25573bfc12a43894928974cddb8660e1.diff

[clang] [clang] Frontend: Destroy compiling compiler instance before read (PR #154455)

2025-08-29 Thread Ben Barham via cfe-commits
https://github.com/bnbarham closed https://github.com/llvm/llvm-project/pull/154455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] load umbrella dir headers in sorted order (PR #156108)

2025-08-29 Thread Daniel Rodríguez Troitiño via cfe-commits
https://github.com/drodriguez approved this pull request. https://github.com/llvm/llvm-project/pull/156108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix crash 'Cannot get layout of forward declarations' during CTU static analysis (PR #156056)

2025-08-29 Thread via cfe-commits
=?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: @@ -0,0 +1,43 @@ +// RUN: rm -rf %t +// RUN: mkdir -p %t +// RUN: split-file %s %t + +// RUN: %clang_cc1 -emit-pch -o %t/import.c.ast %t/import.c + +// RUN: %clang_extdef_map -- -x c %t/import.c >> %t/ex

[clang] [OpenACC] 'reduction' 'one-init' lowering, */&& operators. (PR #156122)

2025-08-29 Thread Andy Kaylor via cfe-commits
@@ -2589,6 +2589,59 @@ SemaOpenACC::ActOnOpenACCAsteriskSizeExpr(SourceLocation AsteriskLoc) { return BuildOpenACCAsteriskSizeExpr(AsteriskLoc); } +/// Loops through a type and generates an appropriate InitListExpr to generate +/// type initialization. +static Expr *Generat

[clang] [OpenACC] 'reduction' 'one-init' lowering, */&& operators. (PR #156122)

2025-08-29 Thread Andy Kaylor via cfe-commits
@@ -2589,6 +2589,59 @@ SemaOpenACC::ActOnOpenACCAsteriskSizeExpr(SourceLocation AsteriskLoc) { return BuildOpenACCAsteriskSizeExpr(AsteriskLoc); } +/// Loops through a type and generates an appropriate InitListExpr to generate +/// type initialization. +static Expr *Generat

[clang] [OpenACC] 'reduction' 'one-init' lowering, */&& operators. (PR #156122)

2025-08-29 Thread Andy Kaylor via cfe-commits
@@ -2589,6 +2589,59 @@ SemaOpenACC::ActOnOpenACCAsteriskSizeExpr(SourceLocation AsteriskLoc) { return BuildOpenACCAsteriskSizeExpr(AsteriskLoc); } +/// Loops through a type and generates an appropriate InitListExpr to generate +/// type initialization. +static Expr *Generat

[clang] [OpenACC] 'reduction' 'one-init' lowering, */&& operators. (PR #156122)

2025-08-29 Thread Andy Kaylor via cfe-commits
@@ -2589,6 +2589,59 @@ SemaOpenACC::ActOnOpenACCAsteriskSizeExpr(SourceLocation AsteriskLoc) { return BuildOpenACCAsteriskSizeExpr(AsteriskLoc); } +/// Loops through a type and generates an appropriate InitListExpr to generate +/// type initialization. +static Expr *Generat

[clang] [OpenACC] 'reduction' 'one-init' lowering, */&& operators. (PR #156122)

2025-08-29 Thread Andy Kaylor via cfe-commits
@@ -2733,14 +2786,33 @@ SemaOpenACC::CreateInitRecipe(OpenACCClauseKind CK, // are used for code generation, we can just ignore/not bother doing any // initialization here. break; - case OpenACCReductionOperator::Multiplication: case OpenACC

[clang] [OpenACC] 'reduction' 'one-init' lowering, */&& operators. (PR #156122)

2025-08-29 Thread Andy Kaylor via cfe-commits
@@ -2589,6 +2589,59 @@ SemaOpenACC::ActOnOpenACCAsteriskSizeExpr(SourceLocation AsteriskLoc) { return BuildOpenACCAsteriskSizeExpr(AsteriskLoc); } +/// Loops through a type and generates an appropriate InitListExpr to generate +/// type initialization. +static Expr *Generat

[clang] [OpenACC] 'reduction' 'one-init' lowering, */&& operators. (PR #156122)

2025-08-29 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor commented: This looks good, but I have some questions and a couple of suggestions. https://github.com/llvm/llvm-project/pull/156122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [OpenACC] 'reduction' 'one-init' lowering, */&& operators. (PR #156122)

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

[clang] [CIR] Add handling for volatile loads and stores (PR #156124)

2025-08-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes This fills in the missing pieces to handle volatile loads and stores in CIR. This addresses https://github.com/llvm/llvm-project/issues/153280 --- Full diff: https://github.com/llvm/llvm-project/pull/15612

[clang] [CIR] Add handling for volatile loads and stores (PR #156124)

2025-08-29 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/156124 This fills in the missing pieces to handle volatile loads and stores in CIR. This addresses https://github.com/llvm/llvm-project/issues/153280 >From 99df40768de131846d6b58ac876cafd6dcddc2c0 Mon Sep 17 00:00:

[clang] [OpenACC] 'reduction' 'one-init' lowering, */&& operators. (PR #156122)

2025-08-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir @llvm/pr-subscribers-clang Author: Erich Keane (erichkeane) Changes The * and && operators of a reduction require a starting value of '1'. This patch implements that by looping through every type and creating an init-list that puts a 1 in place

[clang] [X86] Add -fexperimental-new-constant-interpreter test coverage to the BSWAP constexpr test files (PR #156061)

2025-08-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-fast` running on `sanitizer-buildbot4` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/169/builds/14533 Here is the relevant piece

[clang] [llvm] Singleton hack of fixing static initialisation order fiasco (PR #154541)

2025-08-29 Thread Mircea Trofin via cfe-commits
mtrofin wrote: > That's broken: modifying global variables like that isn't threadsafe (e.g. if > you're doing LTO). But I guess it's equally broken with or without your patch. [...] > For FeatureMap, I'm not sure if it's supposed to be a plugin mechanism, or it > can just be a member variable M

[clang] [llvm] [UBSan] make ubsantrap `inaccessiblemem: write` (PR #156100)

2025-08-29 Thread Florian Mayer via cfe-commits
https://github.com/fmayer edited https://github.com/llvm/llvm-project/pull/156100 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] 'reduction' init lowering for +, |, ^, || (PR #155924)

2025-08-29 Thread Erich Keane via cfe-commits
https://github.com/erichkeane closed https://github.com/llvm/llvm-project/pull/155924 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix crash 'Cannot get layout of forward declarations' during CTU static analysis (PR #156056)

2025-08-29 Thread via cfe-commits
=?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: dyung wrote: This is still failing on my MacOS bot: ``` -- Testing: 1 tests, 1 workers -- FAIL: Clang :: Analysis/ctu-import-type-decl-definition.c (1 of 1) TEST 'Clang :: Analysis/ctu-import-type-d

[clang] [OpenACC] 'reduction' init lowering for +, |, ^, || (PR #155924)

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

[clang] [clang-tools-extra] [clang] NFC: change more places to use Type::getAsTagDecl and friends (PR #155313)

2025-08-29 Thread Wei Wang via cfe-commits
apolloww wrote: This pr caused an assertion failure in our internal codebase. A minimal repro: https://godbolt.org/z/vTWWfE3no https://github.com/llvm/llvm-project/pull/155313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [CIR] Implement VAArgExpr for ComplexType (PR #156092)

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

[clang] [llvm] [UBSan] make ubsantrap `inaccessiblemem: write` (PR #156100)

2025-08-29 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/156100 >From 6348ea5e1ea6497f46a003959c429ad3038152d8 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Fri, 29 Aug 2025 13:29:37 -0700 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UT

[clang] [clang] `__builtin_expect_with_probability` accepts value depenent parameter (PR #156113)

2025-08-29 Thread via cfe-commits
https://github.com/Mr-Anyone created https://github.com/llvm/llvm-project/pull/156113 Defer the `CheckBuiltinFunctionCall` to template instantiation. fixes #153082 >From 151ba2e45b4317d9d01eb1613186772704a3dcb7 Mon Sep 17 00:00:00 2001 From: Vincent Date: Thu, 14 Aug 2025 22:26:28 +0800 Subje

[clang] [clang] `__builtin_expect_with_probability` accepts value depenent parameter (PR #156113)

2025-08-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vincent (Mr-Anyone) Changes Defer the `CheckBuiltinFunctionCall` to template instantiation. fixes #153082 --- Full diff: https://github.com/llvm/llvm-project/pull/156113.diff 3 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (

[clang] [OpenACC] 'reduction' init lowering for +, |, ^, || (PR #155924)

2025-08-29 Thread Erich Keane via cfe-commits
erichkeane wrote: This has been rebased/etc on Morris' patch, so is ready for review! I've incorporated the changes that Andy suggested as well. https://github.com/llvm/llvm-project/pull/155924 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)

2025-08-29 Thread Shafik Yaghmour via cfe-commits
@@ -986,6 +989,10 @@ def warn_module_conflict : Warning< InGroup; // C++20 modules +def err_module_decl_in_header +: Error<"module declaration must not come from an #include directive">; shafik wrote: I don't see a test that covers this or the next diag

[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)

2025-08-29 Thread Shafik Yaghmour via cfe-commits
@@ -1775,10 +1775,18 @@ def ext_bit_int : Extension< } // end of Parse Issue category. let CategoryName = "Modules Issue" in { -def err_unexpected_module_decl : Error< - "module declaration can only appear at the top level">; +def err_invalid_module_or_import_directive : Erro

[clang] [llvm] [DirectX] Removing dxbc DescriptorRange from mcbxdc (PR #154629)

2025-08-29 Thread via cfe-commits
@@ -1282,11 +1282,34 @@ bool SemaHLSL::handleRootSignatureElements( // value ReportError(Loc, 1, 0xfffe); } + switch (Clause->Type) { - if (!llvm::hlsl::rootsig::verifyDescriptorRangeFlag( - Version, llvm::to_underlying(Clause-

[clang] [clang] load umbrella dir headers in sorted order (PR #156108)

2025-08-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Richard Howell (rmaz) Changes Clang modules sort the umbrella dir headers by name before adding to the module's includes to ensure deterministic output across different file systems. This is insufficient however, as the header searc

[clang] [clang] load umbrella dir headers in sorted order (PR #156108)

2025-08-29 Thread Richard Howell via cfe-commits
https://github.com/rmaz created https://github.com/llvm/llvm-project/pull/156108 Clang modules sort the umbrella dir headers by name before adding to the module's includes to ensure deterministic output across different file systems. This is insufficient however, as the header search table is als

[clang] [clang][x86] Ensure we use the shifted value bit width to check for out of bounds per-element shift amounts (PR #156019)

2025-08-29 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: Out of range tests are already in place, and there was no difference for this as per-element shifts have the same types for both operands. The shift by immediate code that used it later had their own tests for out of bounds as well. https://github.com/llvm/llvm-project/pull/15

[clang] [CIR] Implement VAArgExpr for ComplexType (PR #156092)

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

[clang] [CIR] Implement VAArgExpr for ComplexType (PR #156092)

2025-08-29 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor commented: Looks good, but without calling convention lowering it's not very useful. https://github.com/llvm/llvm-project/pull/156092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [CIR] Implement VAArgExpr for ComplexType (PR #156092)

2025-08-29 Thread Andy Kaylor via cfe-commits
@@ -853,3 +853,56 @@ void foo32() { // OGCG: %[[REAL_ADDR:.*]] = alloca i32, align 4 // OGCG: %[[REAL:.*]] = load i32, ptr @_ZN9Container1cE, align 4 // OGCG: store i32 %[[REAL]], ptr %[[REAL_ADDR]], align 4 + +void foo33(__builtin_va_list a) { + float _Complex b = __builtin_v

[clang] [HLSL][SPIRV] Add -fspv-use-unknown-image-format option (PR #155664)

2025-08-29 Thread Shafik Yaghmour via cfe-commits
@@ -513,14 +513,65 @@ llvm::Type *CommonSPIRTargetCodeGenInfo::getHLSLType( return nullptr; } +static unsigned +getImageFormat(const LangOptions &LangOpts, + const HLSLAttributedResourceType::Attributes &attributes, + llvm::Type *SampledType, Qual

[clang] [llvm] [x86][AVX-VNNI] Fix VPDPBUSD Argument Types (PR #155194)

2025-08-29 Thread via cfe-commits
BaiXilin wrote: > we usually include basic upgrade tests in CodeGen/X86 as well - but there > should be an entry for every intrinsics we've changed - nothing as complex as > msan - and it looks like we're missing avx_vnni-intrinsics-upgrade.ll entirely Phoebe pointed out the same problem. Work

[clang] [clang][x86] Ensure we use the shifted value bit width to check for out of bounds per-element shift amounts (PR #156019)

2025-08-29 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: I would have expected additional test coverage since this looks like it would change behavior for out of bound shift amounts. https://github.com/llvm/llvm-project/pull/156019 ___ cfe-commits mailing list cfe-commit

[clang-tools-extra] [clang-doc] add Markdown parser (PR #155887)

2025-08-29 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,229 @@ +#include "MDParser.h" +#include "clang/Basic/CharInfo.h" +#include "llvm/ADT/AllocatorList.h" + +namespace clang { +namespace doc { +namespace { +bool isEmphasisDelimiter(char &Token) { + // TODO: support '_' + if (Token == '*') +return true; + return fal

[clang-tools-extra] [clang-doc] add Markdown parser (PR #155887)

2025-08-29 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,99 @@ +#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_DOC_MD_PARSER_H +#define LLVM_CLANG_TOOLS_EXTRA_CLANG_DOC_MD_PARSER_H +#include "llvm/ADT/SmallString.h" +#include "llvm/Support/Allocator.h" +#include "llvm/Support/StringSaver.h" +#include + +using namespace llvm; + +namesp

[clang-tools-extra] [clang-doc] add Markdown parser (PR #155887)

2025-08-29 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,229 @@ +#include "MDParser.h" +#include "clang/Basic/CharInfo.h" +#include "llvm/ADT/AllocatorList.h" + +namespace clang { +namespace doc { +namespace { +bool isEmphasisDelimiter(char &Token) { + // TODO: support '_' + if (Token == '*') +return true; + return fal

[clang-tools-extra] [clang-doc] add Markdown parser (PR #155887)

2025-08-29 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,99 @@ +#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_DOC_MD_PARSER_H +#define LLVM_CLANG_TOOLS_EXTRA_CLANG_DOC_MD_PARSER_H +#include "llvm/ADT/SmallString.h" +#include "llvm/Support/Allocator.h" +#include "llvm/Support/StringSaver.h" +#include + +using namespace llvm; + +namesp

[clang-tools-extra] [clang-doc] add Markdown parser (PR #155887)

2025-08-29 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,229 @@ +#include "MDParser.h" +#include "clang/Basic/CharInfo.h" +#include "llvm/ADT/AllocatorList.h" + +namespace clang { +namespace doc { +namespace { +bool isEmphasisDelimiter(char &Token) { + // TODO: support '_' + if (Token == '*') +return true; + return fal

[clang-tools-extra] [clang-doc] add Markdown parser (PR #155887)

2025-08-29 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,229 @@ +#include "MDParser.h" +#include "clang/Basic/CharInfo.h" +#include "llvm/ADT/AllocatorList.h" + +namespace clang { +namespace doc { +namespace { +bool isEmphasisDelimiter(char &Token) { + // TODO: support '_' + if (Token == '*') +return true; + return fal

  1   2   3   4   5   6   >