[clang] [clang][SPIRV] Add builtin for OpGenericCastToPtrExplicit and its SPIR-V friendly binding (PR #137805)

2025-04-29 Thread Farzon Lotfi via cfe-commits
@@ -35,8 +35,10 @@ static constexpr Builtin::Info BuiltinInfos[] = { static_assert(std::size(BuiltinInfos) == NumBuiltins); llvm::SmallVector -SPIRVTargetInfo::getTargetBuiltins() const { - return {{&BuiltinStrings, BuiltinInfos}}; +BaseSPIRTargetInfo::getTargetBuiltins() con

[clang] [clang][Modules] Diagnose mismatching pcm dependencies in explicit buiilds (PR #137068)

2025-04-29 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/137068 >From bb548cb398714ae77b6fd2f782b172d8b9032a2f Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Wed, 23 Apr 2025 14:47:17 -0700 Subject: [PATCH 1/3] [clang][Modules] Diagnose mismatching pcm dependencies in

[libclc] [libclc] Move fdim to CLC library; simplify (PR #137811)

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

[clang] [Clang][AArch64] Add fp8 variants for untyped NEON intrinsics (PR #128019)

2025-04-29 Thread via cfe-commits
https://github.com/Lukacma updated https://github.com/llvm/llvm-project/pull/128019 >From c331c4c260b6432b6ae96723f78c16b189e9297a Mon Sep 17 00:00:00 2001 From: Marian Lukac Date: Thu, 20 Feb 2025 15:35:45 + Subject: [PATCH] [Clang][AArch64] Add fp8 variants for untyped NEON intrinsics Th

[clang] [clang][SPIRV] Add builtin for OpGenericCastToPtrExplicit and its SPIR-V friendly binding (PR #137805)

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

[clang] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)

2025-04-29 Thread Nikita Popov via cfe-commits
@@ -26,11 +26,15 @@ typedef vbool64_t fixed_bool64_t __attribute__((riscv_rvv_vector_bits(__riscv_v_ // // CHECK-128-LABEL: @call_bool32_ff( // CHECK-128-NEXT: entry: +// CHECK-128-NEXT:[[SAVED_VALUE:%.*]] = alloca <1 x i8>, align 1 nikic wrote: Looks li

[libclc] [libclc] Avoid casting NANs & literals to 'gentype' (PR #137824)

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

[clang] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)

2025-04-29 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm edited https://github.com/llvm/llvm-project/pull/130973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-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/10964 Here is the relevant piece

[libclc] ea688c0 - [libclc] Move fdim to CLC library; simplify (#137811)

2025-04-29 Thread via cfe-commits
Author: Fraser Cormack Date: 2025-04-29T16:41:07+01:00 New Revision: ea688c031e99c48a35e0c764d0224c7eed559b12 URL: https://github.com/llvm/llvm-project/commit/ea688c031e99c48a35e0c764d0224c7eed559b12 DIFF: https://github.com/llvm/llvm-project/commit/ea688c031e99c48a35e0c764d0224c7eed559b12.diff

[libclc] [libclc] Move fdim to CLC library; simplify (PR #137811)

2025-04-29 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/137811 ___ 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][frontend] Require invocation to construct `CompilerInstance` (PR #137668)

2025-04-29 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/137668 >From 692779413664a17287a1f34d4e3225ae8bc96ae0 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Mon, 21 Apr 2025 11:55:43 -0700 Subject: [PATCH 1/2] [clang][frontend] Require invocation for `CompilerInstan

[clang] [llvm] [RISCV] Add processor definition for SiFive P870 (PR #137725)

2025-04-29 Thread Min-Yih Hsu via cfe-commits
https://github.com/mshockwave updated https://github.com/llvm/llvm-project/pull/137725 >From c8584c12408bcf8739558b3d9e0c2190f1d95bea Mon Sep 17 00:00:00 2001 From: Min-Yih Hsu Date: Mon, 28 Apr 2025 14:12:13 -0700 Subject: [PATCH 1/2] [RISCV] Add processor definition for SiFive P870 --- .../

[clang] [llvm] [RISCV] Add processor definition for SiFive P870 (PR #137725)

2025-04-29 Thread Min-Yih Hsu via cfe-commits
@@ -365,6 +365,32 @@ def SIFIVE_P670 : RISCVProcessorModel<"sifive-p670", SiFiveP600Model, TuneVXRMPipelineFlush, TunePostRAScheduler]>; +def SIFIVE_P870 : RISCVProcessorModel<"sifive-p870", NoSched

[clang] [clang] Hide the `LangOptions` pointer from `CompilerInvocation` (PR #137675)

2025-04-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime-2` running on `rocm-worker-hw-02` while building `clang` at step 6 "test-openmp". Full details are available at: https://lab.llvm.org/buildbot/#/builders/10/builds/4385 Here is the relevant pie

[clang] [Clang][CodeGen] Add workaround for old glibc `__PTR_ALIGN` macro (PR #137851)

2025-04-29 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw created https://github.com/llvm/llvm-project/pull/137851 Closes https://github.com/llvm/llvm-project/issues/137833. This patch is stacked on https://github.com/llvm/llvm-project/pull/137849. >From f1db3a540ec1383451955efab62b64ed8d180349 Mon Sep 17 00:00:00 2001 From

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

2025-04-29 Thread Reid Kleckner via cfe-commits
rnk wrote: I attempted to repro on my macbook, but it doesn't reproduce. This test doesn't seem high value, and I thin kthe right next step is to disable it to green the bots before debugging it. https://github.com/llvm/llvm-project/pull/134196 ___ c

[clang] [Clang][CodeGen] Add workaround for old glibc `__PTR_ALIGN` macro (PR #137851)

2025-04-29 Thread Yingwei Zheng via cfe-commits
@@ -4820,6 +4820,9 @@ bool CodeGenFunction::isUnderlyingBasePointerConstantNull(const Expr *E) { const Expr *UnderlyingBaseExpr = E->IgnoreParens(); while (auto *BaseMemberExpr = dyn_cast(UnderlyingBaseExpr)) UnderlyingBaseExpr = BaseMemberExpr->getBase()->IgnoreParens

[clang] [Clang][CodeGen] Add workaround for old glibc `__PTR_ALIGN` macro (PR #137851)

2025-04-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Yingwei Zheng (dtcxzyw) Changes Closes https://github.com/llvm/llvm-project/issues/137833. This patch is stacked on https://github.com/llvm/llvm-project/pull/137849. --- Full diff: https://github.com/llvm/llvm-project/pull/137851.

[clang] [Clang][CodeGen] Add workaround for old glibc `__PTR_ALIGN` macro (PR #137851)

2025-04-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yingwei Zheng (dtcxzyw) Changes Closes https://github.com/llvm/llvm-project/issues/137833. This patch is stacked on https://github.com/llvm/llvm-project/pull/137849. --- Full diff: https://github.com/llvm/llvm-project/pull/137851.diff 4

[clang] [flang] [llvm] [TargetVerifier][AMDGPU] Add TargetVerifier. (PR #123609)

2025-04-29 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,84 @@ +//===-- llvm/Target/TargetVerifier.h - LLVM IR Target Verifier ---*- C++ -*-===// shiltian wrote: What's the value of this interface class instead of just making those target verifier a module/function pass? https://github.com/llvm/llvm-proje

[clang] [flang] [llvm] [TargetVerifier][AMDGPU] Add TargetVerifier. (PR #123609)

2025-04-29 Thread Shilei Tian via cfe-commits
@@ -841,6 +857,11 @@ class PassBuilder { // Callbacks to parse `filter` parameter in register allocation passes SmallVector, 2> RegClassFilterParsingCallbacks; + // Verifier callbacks + SmallVector, 2> + VerifierCallbacks; + SmallVector, 2> + FnVerifierCa

[clang] [flang] [llvm] [TargetVerifier][AMDGPU] Add TargetVerifier. (PR #123609)

2025-04-29 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,34 @@ +set(LLVM_LINK_COMPONENTS shiltian wrote: I don't know why we want a dedicated tool for this https://github.com/llvm/llvm-project/pull/123609 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [flang] [llvm] [TargetVerifier][AMDGPU] Add TargetVerifier. (PR #123609)

2025-04-29 Thread Shilei Tian via cfe-commits
@@ -172,6 +172,13 @@ class PassBuilder { /// additional analyses. void registerLoopAnalyses(LoopAnalysisManager &LAM); + /// Registers all available verifier passes. + /// + /// This is an interface that can be used to populate a + /// \c ModuleAnalysisManager with all

[clang] [flang] [llvm] [TargetVerifier][AMDGPU] Add TargetVerifier. (PR #123609)

2025-04-29 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,144 @@ +//===-- TargetVerifier.cpp - LLVM IR Target Verifier *- 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

[clang] [llvm] [HLSL][DXIL] Implement `refract` intrinsic (PR #136026)

2025-04-29 Thread Farzon Lotfi via cfe-commits
@@ -3087,6 +3087,8 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register ResVReg, return selectExtInst(ResVReg, ResType, I, CL::fract, GL::Fract); case Intrinsic::spv_normalize: return selectExtInst(ResVReg, ResType, I, CL::normalize, GL::Normalize); + case Int

[clang] [llvm] [HLSL][DXIL] Implement `refract` intrinsic (PR #136026)

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

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

2025-04-29 Thread Qiongsi Wu via cfe-commits
@@ -0,0 +1,164 @@ +// Test correctly reporting what a module exports during dependency scanning. +// Module A depends on modules B, C and D, but only exports B and C. +// Module E depends on modules B, C and D, and exports all of them. + +// RUN: rm -rf %t +// RUN: split-file %s %

[clang] [llvm] [RISCV] Remove duplicate extensions from tt-ascalon-d8 CPU (PR #137865)

2025-04-29 Thread Sam Elliott via cfe-commits
lenary wrote: If the `"-target-feature" "+sscofpmf"` was already present in the test output, just not looked for, then I think you should just mark this as `[NFC]`. https://github.com/llvm/llvm-project/pull/137865 ___ cfe-commits mailing list cfe-comm

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

2025-04-29 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/137421 >From 0093c2f13aad26b49ff6584ac56184549dcaca84 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Fri, 25 Apr 2025 15:51:07 -0700 Subject: [PATCH 1/4] Adding an API to report exported modules and update existing

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

2025-04-29 Thread Qiongsi Wu via cfe-commits
@@ -115,6 +115,15 @@ struct ModuleID { } }; +struct ExtendedModuleID { qiongsiwu wrote: The structure is renamed and its definition is moved into `struct ModuleDeps` for better context. > why not use a std::pair? It comes with operator overloads. What i

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

2025-04-29 Thread Qiongsi Wu via cfe-commits
@@ -183,7 +192,7 @@ struct ModuleDeps { /// /// This may include modules with a different context hash when it can be /// determined that the differences are benign for this compilation. - std::vector ClangModuleDeps; + std::vector ClangModuleDeps; qion

[clang] [clang][modules][deps] Optimize in-process timestamping of PCMs (PR #137363)

2025-04-29 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/137363 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

2025-04-29 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/137421 >From 0093c2f13aad26b49ff6584ac56184549dcaca84 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Fri, 25 Apr 2025 15:51:07 -0700 Subject: [PATCH 1/5] Adding an API to report exported modules and update existing

[clang] [C2y] Correctly handle 0 in the preprocessor (PR #137844)

2025-04-29 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/137844 We do not diagnose 0 as a deprecated octal literal outside of the preprocessor. This fixes a bug where we were accidentally diagnosing 0 from a preprocessor conditional, however. No release note because t

[clang] [C2y] Correctly handle 0 in the preprocessor (PR #137844)

2025-04-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes We do not diagnose 0 as a deprecated octal literal outside of the preprocessor. This fixes a bug where we were accidentally diagnosing 0 from a preprocessor conditional, however. No release note becau

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-s390x-linux` running on `systemz-1` while building `llvm` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/42/builds/4349 Here is the relevant piece of the build log fo

[clang] [C2y] Correctly handle 0 in the preprocessor (PR #137844)

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

[clang] [C2y] Correctly handle 0 in the preprocessor (PR #137844)

2025-04-29 Thread Erich Keane via cfe-commits
@@ -1420,7 +1420,7 @@ void NumericLiteralParser::ParseNumberStartingWithZero(SourceLocation TokLoc) { } // Parse a potential octal literal prefix. - bool SawOctalPrefix = false; + bool SawOctalPrefix = false, IsNakedZero = false; erichkeane wrote: ```s

[clang] [C2y] Correctly handle 0 in the preprocessor (PR #137844)

2025-04-29 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: 2 suggestions, else LGTM. https://github.com/llvm/llvm-project/pull/137844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C2y] Correctly handle 0 in the preprocessor (PR #137844)

2025-04-29 Thread Erich Keane via cfe-commits
@@ -1453,6 +1454,8 @@ void NumericLiteralParser::ParseNumberStartingWithZero(SourceLocation TokLoc) { // anything, we leave the digit start where it was. if (s != PossibleNewDigitStart) DigitsBegin = PossibleNewDigitStart; + else +IsNakedZero = s == ThisTokEnd; //

[clang] [AMDGPU][clang] provide device implementation for __builtin_logb and … (PR #129347)

2025-04-29 Thread via cfe-commits
choikwa wrote: Created https://github.com/llvm/llvm-test-suite/pull/240 https://github.com/llvm/llvm-project/pull/129347 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C2y] Correctly handle 0 in the preprocessor (PR #137844)

2025-04-29 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/137844 504 Gateway Time-out The server didn't respond in time. ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [C2y] Correctly handle 0 in the preprocessor (PR #137844)

2025-04-29 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Good suggestions, I've applied them https://github.com/llvm/llvm-project/pull/137844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Hide the `LangOptions` pointer from `CompilerInvocation` (PR #137675)

2025-04-29 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: > The `unique_ptr` in `ASTUnit` always stores a **copy** of the `shared_ptr` in > `CompilerInvocation`. And we need `unique_ptr` in `ASTUnit` instead of a direct value so we can change LangOpts in `ASTUnit::Parse`? https://github.com/llvm/llvm-project/pull/137675 __

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

2025-04-29 Thread via cfe-commits
dyung 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/19202 >

[clang] [llvm] [mlir] [AMDGPU] Add a new amdgcn.load.to.lds intrinsic (PR #137425)

2025-04-29 Thread Alan Li via cfe-commits
lialan wrote: > > I still think we need an intrinsic here because a load + an addtid store > > can be scheduled much different from the asynchronous "gather to LDS" - and > > because we don't want this load/store to not be optimized > > IMO the intrinsic should only be added as a last resort i

[clang] [clang] Hide the `LangOptions` pointer from `CompilerInvocation` (PR #137675)

2025-04-29 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai commented: Also looks like [this assert](https://github.com/llvm/llvm-project/blob/14469a8726fc1d038f41c7e3e29a84ec8f52d013/clang/include/clang/Frontend/ASTUnit.h#L472) doesn't serve its value anymore ```c++ const LangOptions &getLangOpts() const { assert(LangOp

[libclc] [libclc] Support the generic address space (PR #137183)

2025-04-29 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/137183 >From 253bbc8cf673dd1d0ca606058dbd26e15cee651a Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Thu, 24 Apr 2025 11:24:30 +0100 Subject: [PATCH 1/2] [libclc] Support the generic address space This commit

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lld-x86_64-win` running on `as-worker-93` while building `llvm` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/146/builds/2810 Here is the relevant pie

[clang] [C] Diagnose use of C++ keywords in C (PR #137234)

2025-04-29 Thread Richard Smith via cfe-commits
@@ -258,8 +283,13 @@ static void AddKeyword(StringRef Keyword, const LangOptions &LangOpts, IdentifierTable &Table) { KeywordStatus AddResult = getKeywordStatus(LangOpts, Flags); - // Don't add this keyword if disabled in this language. - if (AddResu

[clang] [C] Diagnose use of C++ keywords in C (PR #137234)

2025-04-29 Thread Richard Smith via cfe-commits
@@ -6118,6 +6120,10 @@ void Sema::warnOnReservedIdentifier(const NamedDecl *D) { Diag(D->getLocation(), diag::warn_reserved_extern_symbol) << D << static_cast(Status); } + // Diagnose use of C++ keywords in C as being incompatible with C++. + if (const Identifie

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-04-29 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/135169 From 705372a8a2f6e87f5fdf6b0e99bfa6a13408c5d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Thu, 3 Apr 2025 20:13:04 +0200 Subject: [PATCH 1/5] [NFC][analyzer] Document configuration optio

[clang] [C] Add diagnostic + attr for unterminated strings (PR #137829)

2025-04-29 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/137829 >From 7ed11d01dfda559f16ee823d6274ada321621466 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Tue, 29 Apr 2025 11:43:53 -0400 Subject: [PATCH 1/4] [C] Add diagnostic + attr for unterminated strings Thi

[clang] [C2y] Correctly handle 0 in the preprocessor (PR #137844)

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

[clang] [clang] Fix UEFI Target info (PR #127290)

2025-04-29 Thread Prabhu Rajasekaran via cfe-commits
https://github.com/Prabhuk updated https://github.com/llvm/llvm-project/pull/127290 >From 3e6122744f355954edb6a5450ae4220ba39bc9c1 Mon Sep 17 00:00:00 2001 From: prabhukr Date: Fri, 14 Feb 2025 16:53:33 -0800 Subject: [PATCH 01/15] [clang] Fix UEFI Target info For X64 UEFI targets, making the

[clang] [clang] Fix UEFI Target info (PR #127290)

2025-04-29 Thread Prabhu Rajasekaran via cfe-commits
@@ -3038,8 +3038,30 @@ static Address EmitX86_64VAArgFromMemory(CodeGenFunction &CGF, return Address(Res, LTy, Align); } +static RValue EmitMSABIVAArg(CodeGenFunction &CGF, Address VAListAddr, + QualType Ty, AggValueSlot Slot, +

[clang] [C] Diagnose use of C++ keywords in C (PR #137234)

2025-04-29 Thread Aaron Ballman via cfe-commits
@@ -6118,6 +6120,10 @@ void Sema::warnOnReservedIdentifier(const NamedDecl *D) { Diag(D->getLocation(), diag::warn_reserved_extern_symbol) << D << static_cast(Status); } + // Diagnose use of C++ keywords in C as being incompatible with C++. + if (const Identifie

[clang] [clang] Hide the `LangOptions` pointer from `CompilerInvocation` (PR #137675)

2025-04-29 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: > > The `unique_ptr` in `ASTUnit` always stores a **copy** of the `shared_ptr` > > in `CompilerInvocation`. > > And we need `unique_ptr` in `ASTUnit` instead of a direct value so we can > change LangOpts in `ASTUnit::Parse`? Not really, using `LangOptions` directly instead

[clang] [clang] Enable making the `CompilerInstance` module dependency collector thread-safe (PR #137227)

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

[clang] [clang] Hide the `LangOptions` pointer from `CompilerInvocation` (PR #137675)

2025-04-29 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: > Also looks like [this > assert](https://github.com/llvm/llvm-project/blob/14469a8726fc1d038f41c7e3e29a84ec8f52d013/clang/include/clang/Frontend/ASTUnit.h#L472) > doesn't serve its value anymore > > ```c++ > const LangOptions &getLangOpts() const { > assert(LangOpts

[clang] [Clang] raise extension warning for unknown namespaced attributes (PR #120925)

2025-04-29 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > @erichkeane @AaronBallman @cor3ntin, just checking if there are any updates > on this, as the `Clang 20` release was landed. Erich and I discussed this more offline and our thinking is: * It's useful for `-Wunknown-attributes` to print the attribute namespace * We think t

[clang] [clang] Enable making the `CompilerInstance` module dependency collector thread-safe (PR #137227)

2025-04-29 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/137227 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0f90a7b - [clang] Enable making the `CompilerInstance` module dependency collector thread-safe (#137227)

2025-04-29 Thread via cfe-commits
Author: Jan Svoboda Date: 2025-04-29T10:24:38-07:00 New Revision: 0f90a7b323bcaa087be31aa135b71694db2d5ff9 URL: https://github.com/llvm/llvm-project/commit/0f90a7b323bcaa087be31aa135b71694db2d5ff9 DIFF: https://github.com/llvm/llvm-project/commit/0f90a7b323bcaa087be31aa135b71694db2d5ff9.diff L

[clang] [clang][NFC] Avoid a duplicate variable in SemaExprCXX.cpp (PR #137464)

2025-04-29 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/137464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Check `isUnderlyingBasePointerConstantNull` in `emitPointerArithmetic` (PR #137849)

2025-04-29 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw created https://github.com/llvm/llvm-project/pull/137849 Do not set inbounds on GEP when the pointer operand is a constant null. Note: This patch is fragile :( For a more complex case `(int*)0 + offset1 + offset2`, we still set inbounds for the second addition. Rela

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

2025-04-29 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/137421 >From 0093c2f13aad26b49ff6584ac56184549dcaca84 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Fri, 25 Apr 2025 15:51:07 -0700 Subject: [PATCH 1/3] Adding an API to report exported modules and update existing

[clang] [Clang][CodeGen] Check `isUnderlyingBasePointerConstantNull` in `emitPointerArithmetic` (PR #137849)

2025-04-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Yingwei Zheng (dtcxzyw) Changes Do not set inbounds on GEP when the pointer operand is a constant null. Note: This patch is fragile :( For a more complex case `(int*)0 + offset1 + offset2`, we still set inbounds for the second add

[clang] [clang] Hide the `LangOptions` pointer from `CompilerInvocation` (PR #137675)

2025-04-29 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: > Not really, using `LangOptions` directly instead of > `std::unique_ptr` allows reassignment too. I chose > `std::unique_ptr` to: > > * prevent increase of `ASTUnit` size, > * avoid unconditional initialization of `ASTUnit::LangOpts` in the > constructor (which would be an unn

[clang] [C] Diagnose use of C++ keywords in C (PR #137234)

2025-04-29 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/137234 >From 56a3f3cd282e9bd5ef9014e4125380e0d9685121 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 24 Apr 2025 14:17:42 -0400 Subject: [PATCH 01/16] [C] Diagnose use of C++ keywords in C This adds a ne

[clang] [clang] Hide the `LangOptions` pointer from `CompilerInvocation` (PR #137675)

2025-04-29 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai approved this pull request. Ok to merge after fixing the formatting. https://github.com/llvm/llvm-project/pull/137675 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [clang-tools-extra] [lldb] Reland: [clang] preserve class type sugar when taking pointer to member (PR #132401)

2025-04-29 Thread via cfe-commits
gulfemsavrun wrote: We started seeing the following issue, and bisected to this commit. ``` test.cpp:8:12: error: no matching function for call to 'GetFieldChecked' 8 | return GetFieldChecked(b, &std::remove_reference::type::has_total); |^~~ test.cpp:6:5: no

[clang] [clang] Hide the `LangOptions` pointer from `CompilerInvocation` (PR #137675)

2025-04-29 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/137675 >From 14469a8726fc1d038f41c7e3e29a84ec8f52d013 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 22 Aug 2024 08:45:08 -0700 Subject: [PATCH 1/2] [clang] Hide the `LangOptions` pointer from `CompilerInv

[clang] [clang] Hide the `LangOptions` pointer from `CompilerInvocation` (PR #137675)

2025-04-29 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/137675 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c85e43b - [clang] Hide the `LangOptions` pointer from `CompilerInvocation` (#137675)

2025-04-29 Thread via cfe-commits
Author: Jan Svoboda Date: 2025-04-29T10:37:37-07:00 New Revision: c85e43bd45fee5de106d79965db484339b5cc46f URL: https://github.com/llvm/llvm-project/commit/c85e43bd45fee5de106d79965db484339b5cc46f DIFF: https://github.com/llvm/llvm-project/commit/c85e43bd45fee5de106d79965db484339b5cc46f.diff L

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

2025-04-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-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/19202 Here is th

[clang] fix emiision of nested unused enum types with -fno-eliminate-unused-d… (PR #137818)

2025-04-29 Thread via cfe-commits
https://github.com/ykhatav created https://github.com/llvm/llvm-project/pull/137818 …ebug-types >From 0c5885d927031f5b8f1b650badb237154d3cb878 Mon Sep 17 00:00:00 2001 From: "Khatavkar, Yashasvi" Date: Tue, 29 Apr 2025 07:19:31 -0700 Subject: [PATCH] fix emiision of nested unused enum types wi

[clang] [flang] [driver] return immediately in `addArchSpecificRPath` and `getArchSpecificLibPaths` on AIX (PR #134520)

2025-04-29 Thread Daniel Chen via cfe-commits
https://github.com/DanielCChen closed https://github.com/llvm/llvm-project/pull/134520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SPIRV] Add builtin for OpGenericCastToPtrExplicit and its SPIR-V friendly binding (PR #137805)

2025-04-29 Thread Victor Lomuller via cfe-commits
@@ -35,8 +35,10 @@ static constexpr Builtin::Info BuiltinInfos[] = { static_assert(std::size(BuiltinInfos) == NumBuiltins); llvm::SmallVector -SPIRVTargetInfo::getTargetBuiltins() const { - return {{&BuiltinStrings, BuiltinInfos}}; +BaseSPIRTargetInfo::getTargetBuiltins() con

[libclc] 6ffccea - [libclc][NFC] Remove binary_decl_tt.inc

2025-04-29 Thread Fraser Cormack via cfe-commits
Author: Fraser Cormack Date: 2025-04-29T15:48:46+01:00 New Revision: 6ffccea1c2b804d530c0f7bf3cc92db42b4432c5 URL: https://github.com/llvm/llvm-project/commit/6ffccea1c2b804d530c0f7bf3cc92db42b4432c5 DIFF: https://github.com/llvm/llvm-project/commit/6ffccea1c2b804d530c0f7bf3cc92db42b4432c5.diff

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

2025-04-29 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 -- clang/lib/Headers/cuda_wrappers/bits/c++config.h ``

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ppc64-aix` running on `aix-ppc64` while building `llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/64/builds/3275 Here is the relevant piece

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

2025-04-29 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez updated https://github.com/llvm/llvm-project/pull/136133 From a602d4f56993c2fc2825997a367b4551fcd54817 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Martinez=20Caama=C3=B1o?= Date: Thu, 17 Apr 2025 13:41:55 +0200 Subject: [PATCH] [CUDA][HIP] Add a __devi

[clang] [C] Warn on uninitialized const objects (PR #137166)

2025-04-29 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > W? `__unqual_scalar_typeof(*p)` seems to result in a > > `const`-qualified type. I'm surprised something named `unqual` would do > > that. Can you confirm I'm getting that correct? > > It looks like this is > > ```c > /* > * __unqual_scalar_typeof(x) - Declare

[libclc] [libclc] Avoid casting NANs & literals to 'gentype' (PR #137824)

2025-04-29 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/137824 By having these already defined as type 'gentype' we can avoid unnecessary casting. >From 662f8881d3da88714231b9a232a6006ae834b3b7 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Tue, 29 Apr 2025 16:05

[clang] [C] Add diagnostic + attr for unterminated strings (PR #137829)

2025-04-29 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/137829 >From 7ed11d01dfda559f16ee823d6274ada321621466 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Tue, 29 Apr 2025 11:43:53 -0400 Subject: [PATCH 1/3] [C] Add diagnostic + attr for unterminated strings Thi

[clang] [C] Add diagnostic + attr for unterminated strings (PR #137829)

2025-04-29 Thread Erich Keane via cfe-commits
@@ -4907,6 +4907,20 @@ void Sema::AddModeAttr(Decl *D, const AttributeCommonInfo &CI, D->addAttr(::new (Context) ModeAttr(Context, CI, Name)); } +static void handleNonStringAttr(Sema &S, Decl *D, const ParsedAttr &AL) { + // This only applies to fields and variable declara

[clang] [C] Add diagnostic + attr for unterminated strings (PR #137829)

2025-04-29 Thread Aaron Ballman via cfe-commits
@@ -9294,3 +9294,18 @@ Declares that a function potentially allocates heap memory, and prevents any pot of ``nonallocating`` by the compiler. }]; } + +def NonStringDocs : Documentation { + let Category = DocCatDecl; + let Content = [{ +The ``nonstring`` attribute can be ap

[clang] [Clang][Sema] Handle invalid variable template specialization whose type depends on itself (PR #134522)

2025-04-29 Thread Younan Zhang via cfe-commits
@@ -7594,6 +7594,54 @@ ASTContext::getCanonicalTemplateArgument(const TemplateArgument &Arg) const { llvm_unreachable("Unhandled template argument kind"); } +bool ASTContext::isSameTemplateArgument(const TemplateArgument &Arg1, +const

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

2025-04-29 Thread Cyndy Ishida via cfe-commits
@@ -115,6 +115,15 @@ struct ModuleID { } }; +struct ExtendedModuleID { cyndyishida wrote: nit: why not use a `std::pair`? It comes with operator overloads. Also, assuming this field is only intended for representing objects in `ClangModuleDeps`, maybe the

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

2025-04-29 Thread Cyndy Ishida via cfe-commits
@@ -0,0 +1,164 @@ +// Test correctly reporting what a module exports during dependency scanning. +// Module A depends on modules B, C and D, but only exports B and C. +// Module E depends on modules B, C and D, and exports all of them. + +// RUN: rm -rf %t +// RUN: split-file %s %

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

2025-04-29 Thread Cyndy Ishida via cfe-commits
@@ -183,7 +192,7 @@ struct ModuleDeps { /// /// This may include modules with a different context hash when it can be /// determined that the differences are benign for this compilation. - std::vector ClangModuleDeps; + std::vector ClangModuleDeps; cynd

[clang] [clang][modules][deps] Optimize in-process timestamping of PCMs (PR #137363)

2025-04-29 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/137363 >From 5b72c421030761d432af4e7d1d87120192ffa475 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 24 Apr 2025 14:35:59 -0700 Subject: [PATCH 1/5] [clang][deps] Optimize in-process timestamping of PCMs -

[clang] [llvm] [clang][amdgpu] Add builtins for raw/struct buffer lds load (PR #137678)

2025-04-29 Thread Krzysztof Drewniak via cfe-commits
@@ -163,7 +163,10 @@ BUILTIN(__builtin_amdgcn_raw_buffer_load_b64, "V2UiQbiiIi", "n") BUILTIN(__builtin_amdgcn_raw_buffer_load_b96, "V3UiQbiiIi", "n") BUILTIN(__builtin_amdgcn_raw_buffer_load_b128, "V4UiQbiiIi", "n") +TARGET_BUILTIN(__builtin_amdgcn_raw_buffer_load_lds, "vV4U

[clang] [llvm] [clang][amdgpu] Add builtins for raw/struct buffer lds load (PR #137678)

2025-04-29 Thread Krzysztof Drewniak via cfe-commits
@@ -163,7 +163,10 @@ BUILTIN(__builtin_amdgcn_raw_buffer_load_b64, "V2UiQbiiIi", "n") BUILTIN(__builtin_amdgcn_raw_buffer_load_b96, "V3UiQbiiIi", "n") BUILTIN(__builtin_amdgcn_raw_buffer_load_b128, "V4UiQbiiIi", "n") +TARGET_BUILTIN(__builtin_amdgcn_raw_buffer_load_lds, "vV4U

[clang] [clang] Hide the `LangOptions` pointer from `CompilerInvocation` (PR #137675)

2025-04-29 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: The `unique_ptr` in `ASTUnit` always stores a **copy** of the `shared_ptr` in `CompilerInvocation`. https://github.com/llvm/llvm-project/pull/137675 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-29 Thread Fangrui Song via cfe-commits
MaskRay wrote: We should avoid introducing a new cmake config for changes like this. You could utilize clang config file to specify the option. lld change should have been separated https://github.com/llvm/llvm-project/pull/136660 ___ cfe-commits ma

[clang] [llvm] [mlir] [mlir][OpenMP] Convert omp.cancel sections to LLVMIR (PR #137193)

2025-04-29 Thread Tom Eccles via cfe-commits
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/137193 >From fac4240f2c217a9e48ab2eb8eeffb818f5c3a9ff Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Thu, 10 Apr 2025 11:43:18 + Subject: [PATCH 1/3] [mlir][OpenMP] Convert omp.cancel sections to LLVMIR This is qui

[clang] 7b70fc7 - [mlir][OpenMP] Convert omp.cancel sections to LLVMIR (#137193)

2025-04-29 Thread via cfe-commits
Author: Tom Eccles Date: 2025-04-29T17:19:40+01:00 New Revision: 7b70fc74d039dbb0c3c67feb1741bb5c446d55f7 URL: https://github.com/llvm/llvm-project/commit/7b70fc74d039dbb0c3c67feb1741bb5c446d55f7 DIFF: https://github.com/llvm/llvm-project/commit/7b70fc74d039dbb0c3c67feb1741bb5c446d55f7.diff LO

[clang] [llvm] [mlir] [mlir][OpenMP] Convert omp.cancel sections to LLVMIR (PR #137193)

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

<    1   2   3   4   5   6   >