[clang] [llvm] [AARCH64] Add FEAT_SSVE_FEXPA and fix unsupported features list (PR #134368)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: None (Lukacma) Changes This patch adds new feature introduced in [2025-03 release](https://developer.arm.com/documentation/ddi0602/2025-03/SVE-Instructions/FEXPA--Floating-point-exponential-accelerator-) and changes feature require

[clang] [llvm] [AARCH64] Add FEAT_SSVE_FEXPA and fix unsupported features list (PR #134368)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: None (Lukacma) Changes This patch adds new feature introduced in [2025-03 release](https://developer.arm.com/documentation/ddi0602/2025-03/SVE-Instructions/FEXPA--Floating-point-exponential-accelerator-) and changes feature requ

[clang] Mark CXX module initializer with PACBTI attributes (PR #133716)

2025-04-04 Thread Victor Campos via cfe-commits
https://github.com/vhscampos updated https://github.com/llvm/llvm-project/pull/133716 >From bb649666995a2642c5eea944e55c0a38503ed7bf Mon Sep 17 00:00:00 2001 From: Victor Campos Date: Fri, 28 Mar 2025 15:55:07 + Subject: [PATCH 1/2] Mark CXX module initializer with PACBTI attributes The CX

[clang] [NFC] [ASTMatchers] Share code of `forEachArgumentWithParamType` with UnsafeBufferUsage (PR #132387)

2025-04-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/132387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add `__bf16` Type Support Macros With Literal Suffix Support (PR #134214)

2025-04-04 Thread Muhammad Bassiouni via cfe-commits
bassiounix wrote: Looks like that `BFloat16Format` for `amdgcn-amd-amdhsa` target is not properly initialized and the `hasBFloat16Type` method at [`clang/lib/Basic/Targets/AMDGPU.h`](https://github.com/llvm/llvm-project/blob/92923e517c2926eb94b7b6e403433ecf62953186/clang/lib/Basic/Targets/AMDGP

[clang] [clang][CGObjC] Prefer PointerType::get with LLVMContext over Type (NFC) (PR #133871)

2025-04-04 Thread Mats Jun Larsen via cfe-commits
https://github.com/junlarsen closed https://github.com/llvm/llvm-project/pull/133871 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [ASan] Add metadata to renamed instructions so ASan doesn't use the i… (PR #119387)

2025-04-04 Thread Rainer Orth via cfe-commits
rorth wrote: The patch also breaks both the [Solaris/sparcv9](https://lab.llvm.org/buildbot/#/builders/13/builds/6362) and [Solaris/amd64](https://lab.llvm.org/staging/#/builders/120/builds/7512) bots. https://github.com/llvm/llvm-project/pull/119387 ___

[clang] 22130ca - [MS][clang] Fix crash on deletion of array of pointers (#134088)

2025-04-04 Thread via cfe-commits
Author: Mariya Podchishchaeva Date: 2025-04-04T09:37:28+02:00 New Revision: 22130ca486b2fb43198453a53eb048cd8a97e9a8 URL: https://github.com/llvm/llvm-project/commit/22130ca486b2fb43198453a53eb048cd8a97e9a8 DIFF: https://github.com/llvm/llvm-project/commit/22130ca486b2fb43198453a53eb048cd8a97e9

[clang] [clang] Add `__bf16` Type Support Macros With Literal Suffix Support (PR #134214)

2025-04-04 Thread via cfe-commits
@@ -978,6 +979,28 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling, // we break out of the loop. for (; s != ThisTokEnd; ++s) { switch (*s) { +case 'b': +case 'B': + if (!isFPConstant) +break; // Error for integer constant. +

[clang] [clang] Add `__bf16` Type Support Macros With Literal Suffix Support (PR #134214)

2025-04-04 Thread via cfe-commits
overmighty wrote: We could also add the following test cases: - `bf16` suffix on integer literal. - `bf16` suffix after another suffix. - `bf16` suffix but no target support for bfloat16. https://github.com/llvm/llvm-project/pull/134214

[clang] [clang] Add `__bf16` Type Support Macros With Literal Suffix Support (PR #134214)

2025-04-04 Thread via cfe-commits
@@ -978,6 +979,28 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling, // we break out of the loop. for (; s != ThisTokEnd; ++s) { switch (*s) { +case 'b': +case 'B': + if (!isFPConstant) +break; // Error for integer constant. +

[clang] [compiler-rt] [llvm] [ASan] Add metadata to renamed instructions so ASan doesn't use the i… (PR #119387)

2025-04-04 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > Maybe the test needs to be relaxed a bit because of stack layout differences > in other OS targets? Although I'm not sure why they're different. See > https://lab.llvm.org/buildbot/#/builders/186/builds/7896: > > ``` > TEST 'AddressSanitizer-arm-android :

[clang] [clang] Add `__bf16` Type Support Macros With Literal Suffix Support (PR #134214)

2025-04-04 Thread via cfe-commits
@@ -978,6 +979,28 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling, // we break out of the loop. for (; s != ThisTokEnd; ++s) { switch (*s) { +case 'b': overmighty wrote: ```suggestion case 'b': // FP Suffix for "__bf16" ```

[clang] [llvm] Define pointer layout for AVR program address space (PR #134254)

2025-04-04 Thread Ben Shi via cfe-commits
benshi001 wrote: > CC @benshi001 > > To be 100% honest I haven't tested this on AVR silicon yet. My motivation for > the change is to allow for non-zero data address spaces in Rust which parses > these LLVM data format specs, but would then use both 64-bit and 16-bit > pointers for AVR. Apolo

[clang] [clang] Add `__bf16` Type Support Macros With Literal Suffix Support (PR #134214)

2025-04-04 Thread Muhammad Bassiouni via cfe-commits
https://github.com/bassiounix updated https://github.com/llvm/llvm-project/pull/134214 >From 620bdbed2b372b97b66147684d4ded5b666c7786 Mon Sep 17 00:00:00 2001 From: bassiounix Date: Thu, 3 Apr 2025 10:08:59 +0200 Subject: [PATCH 01/13] add `bf16`/`BF16` suffix support --- clang/include/clang/

[clang] [clang] Add `__bf16` Type Support Macros With Literal Suffix Support (PR #134214)

2025-04-04 Thread Muhammad Bassiouni via cfe-commits
https://github.com/bassiounix updated https://github.com/llvm/llvm-project/pull/134214 >From 620bdbed2b372b97b66147684d4ded5b666c7786 Mon Sep 17 00:00:00 2001 From: bassiounix Date: Thu, 3 Apr 2025 10:08:59 +0200 Subject: [PATCH 01/14] add `bf16`/`BF16` suffix support --- clang/include/clang/

[clang] [compiler-rt] [llvm] [ASan] Add metadata to renamed instructions so ASan doesn't use the i… (PR #119387)

2025-04-04 Thread via cfe-commits
gbMattN wrote: You're right, I don't think there is a reason to check the stack location in this test, just how it was serialized. I'll push a change and hopefully this'll be fixed. Thanks for the notes! https://github.com/llvm/llvm-project/pull/119387 _

[clang] [WIP] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-04 Thread Viktoriia Bakalova via cfe-commits
https://github.com/VitaNuo updated https://github.com/llvm/llvm-project/pull/133910 >From 6d61256a73c64ef4351266d6ef76067f5a2568db Mon Sep 17 00:00:00 2001 From: Viktoriia Bakalova Date: Fri, 4 Apr 2025 13:40:55 +0200 Subject: [PATCH] [WIP] Implement -dump-deserialized-declaration-ranges flag t

[clang] [WIP] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Viktoriia Bakalova (VitaNuo) Changes This PR implements a CC1 flag `-dump-deserialized-declaration-ranges`. The flag allows to specify a file path to dump ranges of deserialized declarations in `ASTReader`. Example usage: ``` clang -Xcla

[clang] [libcxxabi] [lldb] [llvm] [WIP][lldb] Alternative implementation of more reliable function call infrastructure (PR #115245)

2025-04-04 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 h,cpp -- clang/lib/AST/Mangle.cpp clang/lib/Sema/SemaDeclAtt

[clang] [WIP] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-04 Thread Viktoriia Bakalova via cfe-commits
@@ -139,16 +283,17 @@ FrontendAction::CreateWrappedASTConsumer(CompilerInstance &CI, return nullptr; // If there are no registered plugins we don't need to wrap the consumer - if (FrontendPluginRegistry::begin() == FrontendPluginRegistry::end()) -return Consumer; +

[clang] [WIP] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-04 Thread Viktoriia Bakalova via cfe-commits
@@ -49,6 +51,135 @@ LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry) namespace { +/// Dumps deserialized declarations. VitaNuo wrote: Yes, sorry, I responded to the comment before pushing the actual change. https://github.com/llvm/llvm-project/pull/133910

[clang-tools-extra] [NFC] Fixes proposed by code sanitizer. (PR #134138)

2025-04-04 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: > In general, I don't fully understand the scope of this patch. Surely, there's > thousands of things that could be improved in the codebase. Which of those > belong to this patch? Reviewers can always point out things that could be > improved ad infinitum, leading to a patch w

[clang] [clang] Do not diagnose unused deleted operator delete[] (PR #134357)

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

[clang] [llvm] [NVPTX] Add intrinsics for cvt .f6x2 and .ue8m0x2 variants (PR #134345)

2025-04-04 Thread Durgadoss R via cfe-commits
@@ -1548,6 +1548,45 @@ let TargetPrefix = "nvvm" in { Intrinsic<[llvm_v2f16_ty], [llvm_i16_ty], [IntrNoMem, IntrNoCallback]>; def int_nvvm_e5m2x2_to_f16x2_rn_relu : ClangBuiltin<"__nvvm_e5m2x2_to_f16x2_rn_relu">, Intrinsic<[llvm_v2f16_ty], [llvm_i16_ty], [IntrNoM

[clang] [Sema] Handle AttributedType in template deduction with derived-to-base conversions (PR #134361)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ilya Biryukov (ilya-biryukov) Changes Fix #134356. We accidentally skipped checking derived-to-base conversions because deduction did not strip sugar in the relevant code. This caused deduction failures when a parameter type had an attri

[clang] [compiler-rt] [llvm] [ASan] Add metadata to renamed instructions so ASan doesn't use the i… (PR #119387)

2025-04-04 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > You're right, I don't think there is a reason to check the stack location in > this test, just how it was serialized. I'll push a change and hopefully > this'll be fixed. Thanks for the notes! Thanks for the fix in 4da5e9dd320e9d48be0fa05ba1a8faf50fb53834, that does seem to

[clang] [flang] [driver] Generalize the code that adds the path of libflang_rt.runtime.a. (PR #134362)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Daniel Chen (DanielCChen) Changes The PR is to generalize the re-use of the `compilerRT` code of adding the path of `libflang_rt.runtime.a (so)` from AIX and LoP only to all platforms via a new function `addFlangRTLibPath`. Also,

[clang] [flang] [driver] Generalize the code that adds the path of libflang_rt.runtime.a. (PR #134362)

2025-04-04 Thread Daniel Chen via cfe-commits
https://github.com/DanielCChen created https://github.com/llvm/llvm-project/pull/134362 The PR is to generalize the re-use of the `compilerRT` code of adding the path of `libflang_rt.runtime.a (so)` from AIX and LoP only to all platforms via a new function `addFlangRTLibPath`. Also, PR #1343

[clang] d579622 - [clang][CGObjC] Prefer PointerType::get with LLVMContext over Type (NFC) (#133871)

2025-04-04 Thread via cfe-commits
Author: Mats Jun Larsen Date: 2025-04-04T07:18:01Z New Revision: d579622b1e1a6bc59fbe0135ab30fc0fd9849882 URL: https://github.com/llvm/llvm-project/commit/d579622b1e1a6bc59fbe0135ab30fc0fd9849882 DIFF: https://github.com/llvm/llvm-project/commit/d579622b1e1a6bc59fbe0135ab30fc0fd9849882.diff LO

[clang] [clang][CGObjC] Prefer PointerType::get with LLVMContext over Type (NFC) (PR #133871)

2025-04-04 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/133871 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ARM][Clang] Make `+nosimd` functional for AArch32 Targets (PR #130623)

2025-04-04 Thread Jack Styles via cfe-commits
https://github.com/Stylie777 updated https://github.com/llvm/llvm-project/pull/130623 >From 8b2ad7c1475ff4aee065e9feb21469d184320472 Mon Sep 17 00:00:00 2001 From: Jack Styles Date: Fri, 7 Mar 2025 15:51:34 + Subject: [PATCH 01/10] [NFC][ARM] Split SIMD identifier away from MVE Previously,

[clang] [llvm] [ARM][Clang] Make `+nosimd` functional for AArch32 Targets (PR #130623)

2025-04-04 Thread Jack Styles via cfe-commits
@@ -0,0 +1,31 @@ +// Ensures that when targeting an ARM target with an Asm file, clang +// collects the features from the FPU. This is critical in the +// activation of NEON for supported targets. The Cortex-R52 will be +// used and tested for VFP and NEON Support + +// RUN: %clan

[clang] [ARM][NFC] Remove lines unnecessary for test (PR #134359)

2025-04-04 Thread Vladi Krapp via cfe-commits
https://github.com/VladiKrapp-Arm created https://github.com/llvm/llvm-project/pull/134359 None >From 4518846c9cbaf2c76249cb16729861740ab3c292 Mon Sep 17 00:00:00 2001 From: Vladi Krapp Date: Fri, 4 Apr 2025 10:41:44 +0100 Subject: [PATCH] [ARM][NFC] Remove lines unnecessary for test --- cla

[clang] [clang] Add `__bf16` Type Support Macros With Literal Suffix Support (PR #134214)

2025-04-04 Thread Muhammad Bassiouni via cfe-commits
https://github.com/bassiounix updated https://github.com/llvm/llvm-project/pull/134214 >From 620bdbed2b372b97b66147684d4ded5b666c7786 Mon Sep 17 00:00:00 2001 From: bassiounix Date: Thu, 3 Apr 2025 10:08:59 +0200 Subject: [PATCH 01/16] add `bf16`/`BF16` suffix support --- clang/include/clang/

[clang] [clang] Add `__bf16` Type Support Macros With Literal Suffix Support (PR #134214)

2025-04-04 Thread Muhammad Bassiouni via cfe-commits
https://github.com/bassiounix updated https://github.com/llvm/llvm-project/pull/134214 >From 620bdbed2b372b97b66147684d4ded5b666c7786 Mon Sep 17 00:00:00 2001 From: bassiounix Date: Thu, 3 Apr 2025 10:08:59 +0200 Subject: [PATCH 01/17] add `bf16`/`BF16` suffix support --- clang/include/clang/

[clang] [clang] Add `__bf16` Type Support Macros With Literal Suffix Support (PR #134214)

2025-04-04 Thread Muhammad Bassiouni via cfe-commits
https://github.com/bassiounix updated https://github.com/llvm/llvm-project/pull/134214 >From 620bdbed2b372b97b66147684d4ded5b666c7786 Mon Sep 17 00:00:00 2001 From: bassiounix Date: Thu, 3 Apr 2025 10:08:59 +0200 Subject: [PATCH 01/17] add `bf16`/`BF16` suffix support --- clang/include/clang/

[clang] [CLANG] Enable alignas after GNU attributes (PR #133107)

2025-04-04 Thread via cfe-commits
https://github.com/DenisGZM updated https://github.com/llvm/llvm-project/pull/133107 >From c46eda67cd7434dcce5c1f29125a940dc4ff64ba Mon Sep 17 00:00:00 2001 From: Denis Gerasimov Date: Wed, 26 Mar 2025 18:29:38 +0300 Subject: [PATCH 1/3] [CLANG] Enable alignas after GNU attributes --- clang/l

[clang] [clang] Add `__bf16` Type Support Macros With Literal Suffix Support (PR #134214)

2025-04-04 Thread Muhammad Bassiouni via cfe-commits
https://github.com/bassiounix updated https://github.com/llvm/llvm-project/pull/134214 >From 620bdbed2b372b97b66147684d4ded5b666c7786 Mon Sep 17 00:00:00 2001 From: bassiounix Date: Thu, 3 Apr 2025 10:08:59 +0200 Subject: [PATCH 01/17] add `bf16`/`BF16` suffix support --- clang/include/clang/

[clang] [ARM][NFC] Remove lines unnecessary for test (PR #134359)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vladi Krapp (VladiKrapp-Arm) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/134359.diff 1 Files Affected: - (modified) clang/test/Driver/arm-thread-pointer.c (-3) ``diff diff --git a/clang/test/Driver/arm-t

[clang] [MS][clang] Fix crash on deletion of array of pointers (PR #134088)

2025-04-04 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon closed https://github.com/llvm/llvm-project/pull/134088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WIP] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-04 Thread Viktoriia Bakalova via cfe-commits
https://github.com/VitaNuo updated https://github.com/llvm/llvm-project/pull/133910 >From 6d61256a73c64ef4351266d6ef76067f5a2568db Mon Sep 17 00:00:00 2001 From: Viktoriia Bakalova Date: Fri, 4 Apr 2025 13:40:55 +0200 Subject: [PATCH 1/2] [WIP] Implement -dump-deserialized-declaration-ranges f

[clang] [clang] [ARM] Explicitly enable NEON for Windows/Darwin targets (PR #122095)

2025-04-04 Thread Jack Styles via cfe-commits
@@ -659,13 +659,21 @@ llvm::ARM::FPUKind arm::getARMTargetFeatures(const Driver &D, CPUArgFPUKind != llvm::ARM::FK_INVALID ? CPUArgFPUKind : ArchArgFPUKind; (void)llvm::ARM::getFPUFeatures(FPUKind, Features); } else { +bool Generic = true; if (!ForAS) {

[clang] Fix the signature for __builtin___clear_cache (PR #134376)

2025-04-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/134376 The signature was changed from void(char *, char *) to void(void *, void *) to match GCC's signature for the same builtin. Fixes #47833 >From e37b125713c436d88b49516a1adbbff7c78154c3 Mon Sep 17 00:00:00 2

[clang] [WIP] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-04 Thread Ilya Biryukov via cfe-commits
@@ -49,6 +51,150 @@ LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry) namespace { +/// DeserializedDeclsLineRangePrinter dumps ranges of deserialized declarations +/// to aid debugging and bug minimization. It implements ASTConsumer and +/// ASTDeserializationListener, so tha

[clang] [WIP] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-04 Thread Ilya Biryukov via cfe-commits
@@ -49,6 +51,150 @@ LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry) namespace { +/// DeserializedDeclsLineRangePrinter dumps ranges of deserialized declarations +/// to aid debugging and bug minimization. It implements ASTConsumer and +/// ASTDeserializationListener, so tha

[clang] [WIP] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-04 Thread Ilya Biryukov via cfe-commits
@@ -49,6 +51,150 @@ LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry) namespace { +/// DeserializedDeclsLineRangePrinter dumps ranges of deserialized declarations +/// to aid debugging and bug minimization. It implements ASTConsumer and +/// ASTDeserializationListener, so tha

[clang] [WIP] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-04 Thread Ilya Biryukov via cfe-commits
@@ -49,6 +51,150 @@ LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry) namespace { +/// DeserializedDeclsLineRangePrinter dumps ranges of deserialized declarations +/// to aid debugging and bug minimization. It implements ASTConsumer and +/// ASTDeserializationListener, so tha

[clang] [WIP] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-04 Thread Ilya Biryukov via cfe-commits
@@ -49,6 +51,150 @@ LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry) namespace { +/// DeserializedDeclsLineRangePrinter dumps ranges of deserialized declarations +/// to aid debugging and bug minimization. It implements ASTConsumer and +/// ASTDeserializationListener, so tha

[clang] [WIP] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-04 Thread Ilya Biryukov via cfe-commits
@@ -49,6 +51,150 @@ LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry) namespace { +/// DeserializedDeclsLineRangePrinter dumps ranges of deserialized declarations +/// to aid debugging and bug minimization. It implements ASTConsumer and +/// ASTDeserializationListener, so tha

[clang] [WIP] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-04 Thread Ilya Biryukov via cfe-commits
@@ -49,6 +51,150 @@ LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry) namespace { +/// DeserializedDeclsLineRangePrinter dumps ranges of deserialized declarations +/// to aid debugging and bug minimization. It implements ASTConsumer and +/// ASTDeserializationListener, so tha

[clang] [WIP] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-04 Thread Ilya Biryukov via cfe-commits
@@ -121,6 +267,26 @@ FrontendAction::CreateWrappedASTConsumer(CompilerInstance &CI, if (!Consumer) return nullptr; + std::vector> Consumers; + llvm::StringRef DumpDeserializedDeclarationRangesPath = + CI.getFrontendOpts().DumpDeserializedDeclarationRangesPath; +

[clang] [WIP] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-04 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: Could you also update the PR description and change `[WIP]` to `[Clang]` in the title so that we don't accidentally forget this before comitting? https://github.com/llvm/llvm-project/pull/133910 ___ cfe-commits mailing list cfe-co

[clang] [WIP] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-04 Thread Ilya Biryukov via cfe-commits
@@ -49,6 +51,150 @@ LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry) namespace { +/// DeserializedDeclsLineRangePrinter dumps ranges of deserialized declarations +/// to aid debugging and bug minimization. It implements ASTConsumer and +/// ASTDeserializationListener, so tha

[clang] [WIP] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-04 Thread Ilya Biryukov via cfe-commits
@@ -121,6 +267,26 @@ FrontendAction::CreateWrappedASTConsumer(CompilerInstance &CI, if (!Consumer) return nullptr; + std::vector> Consumers; ilya-biryukov wrote: NIT: `llvm::SmallVector, 1> Consumers` is a good choice here since we have 1 consumer m

[clang] [Driver] Teach Barmetal toolchain about GCC installation (PR #121829)

2025-04-04 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt edited https://github.com/llvm/llvm-project/pull/121829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][Upstream] Local initialization for ArrayType (PR #132974)

2025-04-04 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/132974 >From 4dc1e77299c71b8f01fb73f7fba5f14e0fbe3edd Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 21 Mar 2025 21:07:11 +0100 Subject: [PATCH 01/10] [CIR] [Upstream local initialization for ArrayType --

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

2025-04-04 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 -- clang-tools-extra/clang-tidy/modernize/UseIntegerSign

[clang] [Clang,debuginfo] added vtt parameter in destructor DISubroutineType (PR #130674)

2025-04-04 Thread Reid Kleckner via cfe-commits
Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= Message-ID: In-Reply-To: @@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -triple x86_64-none-linux-gnu -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s rnk wrote: Thanks, I looked at the files, and

[clang] [WebKit checkers] Treat Objective-C message send return value as safe (PR #133605)

2025-04-04 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/133605 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-04-04 Thread via cfe-commits
@@ -16147,6 +16169,108 @@ bool Sema::CompleteConstructorCall(CXXConstructorDecl *Constructor, return Invalid; } +bool Sema::isTypeAwareOperatorNewOrDelete(const NamedDecl *ND) const { + const FunctionDecl *FnDecl = nullptr; + if (auto *FTD = dyn_cast(ND)) +FnDecl = FT

[clang] [clang][CodeGen][AVR] Fix a crash in AVRABIInfo (PR #131976)

2025-04-04 Thread Ben Shi via cfe-commits
https://github.com/benshi001 updated https://github.com/llvm/llvm-project/pull/131976 >From 163c73d21af736c94f1bb8f8c63caf96e127aba5 Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Wed, 19 Mar 2025 13:21:48 +0800 Subject: [PATCH 1/3] [clang][CodeGen][AVR] Fix a crash in AVRABIInfo fixes https://g

[clang] [alpha.webkit.UnretainedLambdaCapturesChecker] Add the support for protectedSelf (PR #132363)

2025-04-04 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 fe6bced9e40f7d4c35550c51ef9cdc7be2a055e7 cf415a9cf9933bc4e55d3c8da9b27551b09061fe --e

[clang] bf1d278 - [WebKit checkers] Treat Objective-C message send return value as safe (#133605)

2025-04-04 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2025-04-04T11:25:24-07:00 New Revision: bf1d27889b5831ed3e072a9223bdac098bf71af3 URL: https://github.com/llvm/llvm-project/commit/bf1d27889b5831ed3e072a9223bdac098bf71af3 DIFF: https://github.com/llvm/llvm-project/commit/bf1d27889b5831ed3e072a9223bdac098bf71af3.diff

[clang] da69eb7 - [NFC] [ASTMatchers] Share code of `forEachArgumentWithParamType` with UnsafeBufferUsage (#132387)

2025-04-04 Thread via cfe-commits
Author: Ilya Biryukov Date: 2025-04-04T14:35:15+02:00 New Revision: da69eb75cbc634a56886e94de3e546c63c17567e URL: https://github.com/llvm/llvm-project/commit/da69eb75cbc634a56886e94de3e546c63c17567e DIFF: https://github.com/llvm/llvm-project/commit/da69eb75cbc634a56886e94de3e546c63c17567e.diff

[clang] [WebKit checkers] Treat Objective-C message send return value as safe (PR #133605)

2025-04-04 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/133605 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)

2025-04-04 Thread Sergei Barannikov via cfe-commits
@@ -0,0 +1,107 @@ +//===-- CGBuiltin.h - Emit LLVM Code for builtins -===// +// +// 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] [WebKit checkers] Treat Objective-C message send return value as safe (PR #133605)

2025-04-04 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: Thanks for the review! https://github.com/llvm/llvm-project/pull/133605 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Do not share ownership of `PreprocessorOptions` (PR #133467)

2025-04-04 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-x86_64-debian-dylib` running on `gribozavr4` while building `clang-tools-extra,clang` at step 6 "test-build-unified-tree-check-clang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/60/builds/239

[clang] [clang] Handle Binary StingLiteral kind in one more place (PR #132201)

2025-04-04 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/132201 The bots are upset by https://github.com/llvm/llvm-project/pull/127629 . Fix that. >From 9e2314fc9f0514abc230e97c06f6866b91fd4871 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Thu, 20 Mar 202

[clang] [HLSL] Implement the `lit` intrinsic (PR #134171)

2025-04-04 Thread Deric C. via cfe-commits
https://github.com/Icohedron edited https://github.com/llvm/llvm-project/pull/134171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Hlsl asint16 intrinsic (PR #131900)

2025-04-04 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/131900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][OpenMP] Bump default OpenMP version to 3.1 (PR #133745)

2025-04-04 Thread Tom Eccles via cfe-commits
https://github.com/tblah closed https://github.com/llvm/llvm-project/pull/133745 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland [MS][clang] Add support for vector deleting destructors (PR #133451)

2025-04-04 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: The original patch has been reviewed before, so I'll proceed with the merge. Feel free to do any post commit comments that I'll be happy to apply. https://github.com/llvm/llvm-project/pull/133451 ___ cfe-commits mailing list cfe-commi

[clang] [clang][test] Improve unit tests for Fixed point AST matchers. (PR #134398)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (earnol) Changes We have AST matchers for fixed point float numbers since commits 789215dc0db174c9fdd273436fdd60d8289a9fc0 and ff9120636e9c890b4db735d252d16b92091dde55. However in those commits the unit tests were not added. Amending

[clang] f01b56f - [Clang] [NFC] Introduce helpers for defining compatibilty warnings (#132129)

2025-04-04 Thread via cfe-commits
Author: Sirraide Date: 2025-03-21T03:55:42+01:00 New Revision: f01b56ffb3bee6606063ab4e6e8883eb2e4a48ea URL: https://github.com/llvm/llvm-project/commit/f01b56ffb3bee6606063ab4e6e8883eb2e4a48ea DIFF: https://github.com/llvm/llvm-project/commit/f01b56ffb3bee6606063ab4e6e8883eb2e4a48ea.diff LOG:

[clang] [CIR] Upstream initial for-loop support (PR #132266)

2025-04-04 Thread Andy Kaylor via cfe-commits
@@ -280,3 +313,77 @@ mlir::LogicalResult CIRGenFunction::emitReturnStmt(const ReturnStmt &s) { return mlir::success(); } + +mlir::LogicalResult CIRGenFunction::emitForStmt(const ForStmt &s) { + cir::ForOp forOp; + + // TODO: pass in an array of attributes. + auto forStmt

[clang] [alpha.webkit.RetainPtrCtorAdoptChecker] Support adopt(cast(copy(~)) (PR #132316)

2025-04-04 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/132316 >From 642057c409b1c3b98ee4ecb16e95b5fb5be47a01 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Thu, 20 Mar 2025 17:54:22 -0700 Subject: [PATCH 1/3] [alpha.webkit.RetainPtrCtorAdoptChecker] Support adopt(cast(co

[clang] [CLANG] Enable alignas after GNU attributes (PR #133107)

2025-04-04 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. I think this looks reasonable? I would like @aaronballman to stop by though, he might think of some reason why this isn't right per-grammar. https://github.com/llvm/llvm-project/pull/133107 __

[clang] [clang] [ARM] Explicitly enable NEON for Windows/Darwin targets (PR #122095)

2025-04-04 Thread Jack Styles via cfe-commits
@@ -659,13 +659,21 @@ llvm::ARM::FPUKind arm::getARMTargetFeatures(const Driver &D, CPUArgFPUKind != llvm::ARM::FK_INVALID ? CPUArgFPUKind : ArchArgFPUKind; (void)llvm::ARM::getFPUFeatures(FPUKind, Features); } else { +bool Generic = true; if (!ForAS) {

[clang] [C23] Allow casting from a null pointer constant to nullptr_t (PR #133742)

2025-04-04 Thread Aaron Ballman via cfe-commits
@@ -93,6 +91,9 @@ void test() { (int *)null_val;// ok (int *)nullptr; // ok (nullptr_t)nullptr; // ok + (nullptr_t)0; // ok AaronBallman wrote: I added that test coverage in fb9deab74e5dc9a9227732fcd95c1aadacf86d44, thanks for the suggest

[clang] [compiler-rt] [llvm] [ASan] Add metadata to renamed instructions so ASan doesn't use the i… (PR #119387)

2025-04-04 Thread Rainer Orth via cfe-commits
rorth wrote: Both Solaris bots are back green again. Thanks. https://github.com/llvm/llvm-project/pull/119387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix the signature for __builtin___clear_cache (PR #134376)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes The signature was changed from void(char *, char *) to void(void *, void *) to match GCC's signature for the same builtin. Fixes #47833 --- Full diff: https://github.com/llvm/llvm-project/pull/134376.

[clang] [clang] [ARM] Explicitly enable NEON for Windows/Darwin targets (PR #122095)

2025-04-04 Thread Martin Storsjö via cfe-commits
@@ -659,13 +659,21 @@ llvm::ARM::FPUKind arm::getARMTargetFeatures(const Driver &D, CPUArgFPUKind != llvm::ARM::FK_INVALID ? CPUArgFPUKind : ArchArgFPUKind; (void)llvm::ARM::getFPUFeatures(FPUKind, Features); } else { +bool Generic = true; if (!ForAS) {

[clang-tools-extra] [NFC] Remove dead code detected by code sanitizer. (PR #134385)

2025-04-04 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/134385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix the signature for __builtin___clear_cache (PR #134376)

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

[clang] [WIP] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-04 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov commented: Thanks, the implementation mostly looks good. I've left a lot of comments, but they are mostly NITs. One major thing that we need to change is the way we test this, see the comment about relying on `jq`. Another thought that crossed my mind is that w

[clang] [clang][deps] Respect `Lexer::cutOffLexing()` (PR #134404)

2025-04-04 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/134404 This is crucial when recovering from fatal loader errors. Without it, the `Lexer` keeps yielding more tokens and the compiler may access invalid `ASTReader` state. rdar://133388373 >From 62a5616b139c5bfc

[clang] [clang][test] Improve unit tests for Fixed point AST matchers. (PR #134398)

2025-04-04 Thread via cfe-commits
https://github.com/earnol converted_to_draft https://github.com/llvm/llvm-project/pull/134398 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WIP] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-04 Thread Ilya Biryukov via cfe-commits
@@ -49,6 +51,150 @@ LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry) namespace { +/// DeserializedDeclsLineRangePrinter dumps ranges of deserialized declarations +/// to aid debugging and bug minimization. It implements ASTConsumer and +/// ASTDeserializationListener, so tha

[clang] [WIP] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-04 Thread Viktoriia Bakalova via cfe-commits
VitaNuo wrote: > Thanks, the implementation mostly looks good. I've left a lot of comments, > but they are mostly NITs. One major thing that we need to change is the way > we test this, see the comment about relying on jq. Sure, changed to `FileCheck`. > Another thought that crossed my mind i

[clang] [clang][deps] Respect `Lexer::cutOffLexing()` (PR #134404)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jan Svoboda (jansvoboda11) Changes This is crucial when recovering from fatal loader errors. Without it, the `Lexer` keeps yielding more tokens and the compiler may access invalid `ASTReader` state. rdar://133388373 --- Full diff: https

[clang] [WIP] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-04 Thread Viktoriia Bakalova via cfe-commits
@@ -121,6 +267,26 @@ FrontendAction::CreateWrappedASTConsumer(CompilerInstance &CI, if (!Consumer) return nullptr; + std::vector> Consumers; VitaNuo wrote: The constructor of `MultiplexConsumer` won't take a `SmallVector`. https://github.com/llvm/llv

[clang] [clang][doc]: Merge the contents of identical entries. (PR #134089)

2025-04-04 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Hi @AaronBallman, bothering you again. I have a doubt about the merge of the > following case: ![屏幕截图 2025-04-04 > 081652](https://private-user-images.githubusercontent.com/170909871/430177806-ce592ae1-b02a-45bf-aece-55e3a175a01f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ

[clang-tools-extra] babbc6f - [NFC] Fixes proposed by code sanitizer. (#134138)

2025-04-04 Thread via cfe-commits
Author: Zahira Ammarguellat Date: 2025-04-04T08:04:16-04:00 New Revision: babbc6f8429ca07cdf2f5b6ff5e9516c383079b7 URL: https://github.com/llvm/llvm-project/commit/babbc6f8429ca07cdf2f5b6ff5e9516c383079b7 DIFF: https://github.com/llvm/llvm-project/commit/babbc6f8429ca07cdf2f5b6ff5e9516c383079b7

[clang] [WIP] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-04 Thread Viktoriia Bakalova via cfe-commits
@@ -49,6 +51,150 @@ LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry) namespace { +/// DeserializedDeclsLineRangePrinter dumps ranges of deserialized declarations +/// to aid debugging and bug minimization. It implements ASTConsumer and +/// ASTDeserializationListener, so tha

[clang] [WIP] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-04 Thread Viktoriia Bakalova via cfe-commits
@@ -49,6 +51,150 @@ LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry) namespace { +/// DeserializedDeclsLineRangePrinter dumps ranges of deserialized declarations +/// to aid debugging and bug minimization. It implements ASTConsumer and +/// ASTDeserializationListener, so tha

[clang] [WIP] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-04 Thread Viktoriia Bakalova via cfe-commits
@@ -49,6 +51,150 @@ LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry) namespace { +/// DeserializedDeclsLineRangePrinter dumps ranges of deserialized declarations +/// to aid debugging and bug minimization. It implements ASTConsumer and +/// ASTDeserializationListener, so tha

[clang] [WIP] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-04 Thread Viktoriia Bakalova via cfe-commits
@@ -121,6 +267,26 @@ FrontendAction::CreateWrappedASTConsumer(CompilerInstance &CI, if (!Consumer) return nullptr; + std::vector> Consumers; VitaNuo wrote: Done. https://github.com/llvm/llvm-project/pull/133910 ___

[clang] [clang][analyzer] Fix a possible crash in CastSizeChecker (PR #134387)

2025-04-04 Thread Balázs Kéri via cfe-commits
https://github.com/balazske updated https://github.com/llvm/llvm-project/pull/134387 From 8936d300045d96d8719ecee04c36b2b0cb5d96d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Fri, 4 Apr 2025 16:05:28 +0200 Subject: [PATCH 1/2] [clang][analyzer] Fix a possible crash

<    1   2   3   4   5   6   7   8   9   >