[clang] [NFC][clang] No sharedlibs for UEFI (PR #137872)

2025-05-01 Thread Prabhu Rajasekaran via cfe-commits
https://github.com/Prabhuk closed https://github.com/llvm/llvm-project/pull/137872 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1b1e360 - [NFC][clang] No sharedlibs for UEFI (#137872)

2025-05-01 Thread via cfe-commits
Author: Prabhu Rajasekaran Date: 2025-05-01T15:49:32-07:00 New Revision: 1b1e360b76d31fcd09b93b8c05be8a93dfea432b URL: https://github.com/llvm/llvm-project/commit/1b1e360b76d31fcd09b93b8c05be8a93dfea432b DIFF: https://github.com/llvm/llvm-project/commit/1b1e360b76d31fcd09b93b8c05be8a93dfea432b.

[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2025-05-01 Thread Gedare Bloom via cfe-commits
gedare wrote: > Why would `AlignAfterControlStatement` have anything to do with > `AlignAfterOpenBracket`, which is for arguments of function/macro calls? > Unfortunately, `AlignAfterOpenBracket` is not just for arguments of function/macro calls. It affects parentheses of control statements a

[clang] [CIR] Upstream lowering of conditional operators to TernaryOp (PR #138156)

2025-05-01 Thread Andy Kaylor via cfe-commits
@@ -948,6 +950,165 @@ void CIRGenFunction::emitIgnoredExpr(const Expr *e) { emitLValue(e); } +// Handle the case where the condition is a constant evaluatable simple integer, +// which means we don't have to separately handle the true/false blocks. +static std::optional han

[clang] [CIR] Upstream lowering of conditional operators to TernaryOp (PR #138156)

2025-05-01 Thread Andy Kaylor via cfe-commits
@@ -875,6 +877,174 @@ class ScalarExprEmitter : public StmtVisitor { // NOTE: We don't need to EnsureInsertPoint() like LLVM codegen. return Visit(e->getRHS()); } + + mlir::Value VisitBinLAnd(const clang::BinaryOperator *e) { +if (e->getType()->isVectorType()) {

[clang] [CIR] Upstream lowering of conditional operators to TernaryOp (PR #138156)

2025-05-01 Thread Andy Kaylor via cfe-commits
@@ -1658,6 +1828,170 @@ mlir::Value ScalarExprEmitter::VisitUnaryExprOrTypeTraitExpr( cgf.cgm.UInt64Ty, e->EvaluateKnownConstInt(cgf.getContext(; } +/// Return true if the specified expression is cheap enough and side-effect-free +/// enough to evaluate un

[clang] [CIR] Upstream lowering of conditional operators to TernaryOp (PR #138156)

2025-05-01 Thread Andy Kaylor via cfe-commits
@@ -948,6 +950,165 @@ void CIRGenFunction::emitIgnoredExpr(const Expr *e) { emitLValue(e); } +// Handle the case where the condition is a constant evaluatable simple integer, +// which means we don't have to separately handle the true/false blocks. +static std::optional han

[clang] [CIR] Upstream lowering of conditional operators to TernaryOp (PR #138156)

2025-05-01 Thread Andy Kaylor via cfe-commits
@@ -272,6 +272,22 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { return createCast(loc, cir::CastKind::bitcast, src, newTy); } + // TODO(cir): the following function was introduced to keep in sync with LLVM andykaylor wrote: This probably made se

[clang] [CIR] Upstream lowering of conditional operators to TernaryOp (PR #138156)

2025-05-01 Thread Andy Kaylor via cfe-commits
@@ -948,6 +950,165 @@ void CIRGenFunction::emitIgnoredExpr(const Expr *e) { emitLValue(e); } +// Handle the case where the condition is a constant evaluatable simple integer, +// which means we don't have to separately handle the true/false blocks. +static std::optional han

[clang] [CIR] Upstream lowering of conditional operators to TernaryOp (PR #138156)

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

[clang] [CIR] Upstream lowering of conditional operators to TernaryOp (PR #138156)

2025-05-01 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor commented: Could you break this up a bit more? Maybe cut it back to just the code needed for the logical operators? https://github.com/llvm/llvm-project/pull/138156 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [CIR] Upstream lowering of conditional operators to TernaryOp (PR #138156)

2025-05-01 Thread Andy Kaylor via cfe-commits
@@ -948,6 +950,165 @@ void CIRGenFunction::emitIgnoredExpr(const Expr *e) { emitLValue(e); } +// Handle the case where the condition is a constant evaluatable simple integer, +// which means we don't have to separately handle the true/false blocks. +static std::optional han

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

2025-05-01 Thread Reid Kleckner via cfe-commits
rnk wrote: Are the `CodeGenTest.TestNonAlterTest` failures still an issue? I don't see that failure on any bots. I haven't gotten any reports. https://github.com/llvm/llvm-project/pull/134196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

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

2025-05-01 Thread John McCall via cfe-commits
rjmccall wrote: > For what it's worth, the existing "keyword from language you're not using" > warnings [already fire for analogous Objective-C++ > cases](https://godbolt.org/z/3K6835PPK)... which in those cases is correct, > since Clang does _not_ accept C++11-onwards keywords as selector nam

[clang] [Clang][SYCL] Add initial set of Intel OffloadArch values (PR #138158)

2025-05-01 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `fuchsia-x86_64-linux` running on `fuchsia-debian-64-us-central1-a-1` while building `clang` at step 4 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/11/builds/14237 Here is the relevant

[clang-tools-extra] [clang-tidy] Return error code on config parse error (PR #136167)

2025-05-01 Thread Galen Elias via cfe-commits
https://github.com/galenelias updated https://github.com/llvm/llvm-project/pull/136167 >From b8faa7bb02fb4aa0504978dad1a28493fc745786 Mon Sep 17 00:00:00 2001 From: Galen Elias Date: Wed, 16 Apr 2025 12:48:18 -0700 Subject: [PATCH 1/6] [clang-tidy] Return error code on config parse error This

[clang] [HLSL][SPIRV] Add CLI option `-fspv-extension` (PR #137985)

2025-05-01 Thread Cassandra Beckley via cfe-commits
@@ -9213,6 +9213,11 @@ def metal : DXCFlag<"metal">, HelpText<"Generate Metal library">; def fspv_target_env_EQ : Joined<["-"], "fspv-target-env=">, Group, HelpText<"Specify the target environment">, Values<"vulkan1.2, vulkan1.3">; +def fspv_extension_EQ +: Joined<["-"

[clang] [HLSL][SPIRV] Add CLI option `-fspv-extension` (PR #137985)

2025-05-01 Thread Cassandra Beckley via cfe-commits
https://github.com/cassiebeckley approved this pull request. https://github.com/llvm/llvm-project/pull/137985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Don't warn for implicit uses of builtins in system headers (PR #138205)

2025-05-01 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex created https://github.com/llvm/llvm-project/pull/138205 Running CI >From c66ec11d8170a0e4c0b2fc50bdae039fd9c208fb Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Thu, 1 May 2025 14:47:45 -0700 Subject: [PATCH] [clang][Sema] Don't warn for implicit uses of builtin

[clang] [CIR] Upstream support for range-based for loops (PR #138176)

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

[clang] a76936f - [CIR] Upstream support for range-based for loops (#138176)

2025-05-01 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-05-01T14:47:20-07:00 New Revision: a76936f1c01c7cadbce8ea6553af758d0f614b6a URL: https://github.com/llvm/llvm-project/commit/a76936f1c01c7cadbce8ea6553af758d0f614b6a DIFF: https://github.com/llvm/llvm-project/commit/a76936f1c01c7cadbce8ea6553af758d0f614b6a.diff L

[clang] [CIR] Upstream local initialization for VectorType (PR #138107)

2025-05-01 Thread Andy Kaylor via cfe-commits
@@ -1584,6 +1586,47 @@ mlir::Value ScalarExprEmitter::VisitMemberExpr(MemberExpr *e) { return emitLoadOfLValue(e); } +mlir::Value ScalarExprEmitter::VisitInitListExpr(InitListExpr *e) { + const unsigned numInitElements = e->getNumInits(); + + if (e->hadArrayRangeDesignato

[clang] [lldb] [llvm] [mlir] [NFC][Support] Add llvm::uninitialized_copy (PR #138174)

2025-05-01 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/138174 >From de1b49fc6b8819b591e48b81634567ceeffe5089 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Wed, 30 Apr 2025 23:47:37 -0700 Subject: [PATCH] [NFC][Support] Add llvm::uninitialized_copy Add `llvm::uninitiali

[clang] [clang] Remove FEM_Indeterminable (PR #137661)

2025-05-01 Thread Oliver Hunt via cfe-commits
ojhunt wrote: > > I think this is a reasonable way forward for right now; we can bring back > > the enumerator once we're actually using it. WDYT @zahiraam ? > > I tend to think so too. But I am waiting for a response from the math library > people internally to make sure that we don't loose c

[clang] [mlir] [OpenACC][CIR] Implement Loop lowering of seq/auto/independent (PR #138164)

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

[clang] 4efcc52 - [OpenACC][CIR] Implement Loop lowering of seq/auto/independent (#138164)

2025-05-01 Thread via cfe-commits
Author: Erich Keane Date: 2025-05-01T14:30:11-07:00 New Revision: 4efcc52ed839c4348c69a01538c7ecd399e4b113 URL: https://github.com/llvm/llvm-project/commit/4efcc52ed839c4348c69a01538c7ecd399e4b113 DIFF: https://github.com/llvm/llvm-project/commit/4efcc52ed839c4348c69a01538c7ecd399e4b113.diff L

[clang] [Clang][SYCL] Add initial set of Intel OffloadArch values (PR #138158)

2025-05-01 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/138158 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] faf4e8a - [Clang][SYCL] Add initial set of Intel OffloadArch values (#138158)

2025-05-01 Thread via cfe-commits
Author: Justin Cai Date: 2025-05-01T16:29:48-05:00 New Revision: faf4e8af74eec8dac4c7e55702227d7d9a82f93c URL: https://github.com/llvm/llvm-project/commit/faf4e8af74eec8dac4c7e55702227d7d9a82f93c DIFF: https://github.com/llvm/llvm-project/commit/faf4e8af74eec8dac4c7e55702227d7d9a82f93c.diff LO

[clang] [CIR] Upstream support for range-based for loops (PR #138176)

2025-05-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/138176 ___ 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 VectorType (PR #138107)

2025-05-01 Thread Amr Hesham via cfe-commits
@@ -1584,6 +1586,47 @@ mlir::Value ScalarExprEmitter::VisitMemberExpr(MemberExpr *e) { return emitLoadOfLValue(e); } +mlir::Value ScalarExprEmitter::VisitInitListExpr(InitListExpr *e) { + const unsigned numInitElements = e->getNumInits(); + + if (e->hadArrayRangeDesignato

[clang] [CIR] Upstream local initialization for VectorType (PR #138107)

2025-05-01 Thread Andy Kaylor via cfe-commits
@@ -1584,6 +1586,47 @@ mlir::Value ScalarExprEmitter::VisitMemberExpr(MemberExpr *e) { return emitLoadOfLValue(e); } +mlir::Value ScalarExprEmitter::VisitInitListExpr(InitListExpr *e) { + const unsigned numInitElements = e->getNumInits(); + + if (e->hadArrayRangeDesignato

[clang] [CIR] Upstream local initialization for VectorType (PR #138107)

2025-05-01 Thread Andy Kaylor via cfe-commits
@@ -39,23 +39,43 @@ vi4 d = { 1, 2, 3, 4 }; // OGCG: @[[VEC_D:.*]] = global <4 x i32> -void vec_int_test() { +int x = 5; + +void foo() { vi4 a; vd2 b; vll2 c; + + vi4 d = { 1, 2, 3, 4 }; + + vi4 e = { x, 5, 6, x + 1 }; andykaylor wrote: Can you a

[clang] [lldb] [clang] Add `__ptrauth_restricted_intptr` qualifier (PR #137580)

2025-05-01 Thread Oliver Hunt via cfe-commits
ojhunt wrote: > I realize you've got downstream users making use of this additional > qualifier. Can you mention how prevalent the use is? it's used a bunch in libcxx, libcxxabi, libunwind, compiler-rt and a few other places. We can obviously use a macro to wrap this, but we need to have a wa

[clang] Change all CHECK lines in test to include DAG to work when the compiler emits debug info in a different order. (PR #67503)

2025-05-01 Thread via cfe-commits
https://github.com/dyung closed https://github.com/llvm/llvm-project/pull/67503 ___ 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 VectorType (PR #138107)

2025-05-01 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper edited https://github.com/llvm/llvm-project/pull/138107 ___ 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 VectorType (PR #138107)

2025-05-01 Thread Amr Hesham via cfe-commits
@@ -1584,6 +1586,47 @@ mlir::Value ScalarExprEmitter::VisitMemberExpr(MemberExpr *e) { return emitLoadOfLValue(e); } +mlir::Value ScalarExprEmitter::VisitInitListExpr(InitListExpr *e) { + const unsigned numInitElements = e->getNumInits(); + + if (e->hadArrayRangeDesignato

[clang] [CIR] Upstream local initialization for VectorType (PR #138107)

2025-05-01 Thread Amr Hesham via cfe-commits
@@ -1584,6 +1586,47 @@ mlir::Value ScalarExprEmitter::VisitMemberExpr(MemberExpr *e) { return emitLoadOfLValue(e); } +mlir::Value ScalarExprEmitter::VisitInitListExpr(InitListExpr *e) { + const unsigned numInitElements = e->getNumInits(); + + if (e->hadArrayRangeDesignato

[clang] [HLSL] Implement the `ldexp` intrinsic (PR #138182)

2025-05-01 Thread Deric C. via cfe-commits
@@ -0,0 +1,49 @@ +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm -o - | FileCheck %s Icohedron wrote: Add `-disable-llvm-passes`? https://github.com/llvm/llvm-project/pull/138182

[clang-tools-extra] [clang-tidy] Return error code on config parse error (PR #136167)

2025-05-01 Thread Galen Elias via cfe-commits
https://github.com/galenelias updated https://github.com/llvm/llvm-project/pull/136167 >From f54d980bafd76863ab63e68f0568dcfc3329fd9f Mon Sep 17 00:00:00 2001 From: Galen Elias Date: Wed, 16 Apr 2025 12:48:18 -0700 Subject: [PATCH 1/6] [clang-tidy] Return error code on config parse error This

[libunwind] [libunwind] [SEH] Set NonVolatileRegisters before calling a personality function (PR #137951)

2025-05-01 Thread Martin Storsjö via cfe-commits
@@ -212,6 +212,11 @@ __libunwind_seh_personality(int version, _Unwind_Action state, ms_exc.ExceptionInformation[2] = state; DISPATCHER_CONTEXT *disp_ctx = __unw_seh_get_disp_ctx((unw_cursor_t *)context); +#if defined(__aarch64__) + disp_ctx->NonVolatileRegisters = (

[clang] [CIR] Upstream local initialization for VectorType (PR #138107)

2025-05-01 Thread Andy Kaylor via cfe-commits
@@ -1584,6 +1586,47 @@ mlir::Value ScalarExprEmitter::VisitMemberExpr(MemberExpr *e) { return emitLoadOfLValue(e); } +mlir::Value ScalarExprEmitter::VisitInitListExpr(InitListExpr *e) { + const unsigned numInitElements = e->getNumInits(); + + if (e->hadArrayRangeDesignato

[clang] [CIR] Upstream local initialization for VectorType (PR #138107)

2025-05-01 Thread Andy Kaylor via cfe-commits
@@ -1685,6 +1686,29 @@ mlir::LogicalResult CIRToLLVMStackRestoreOpLowering::matchAndRewrite( return mlir::success(); } +mlir::LogicalResult CIRToLLVMVecCreateOpLowering::matchAndRewrite( +cir::VecCreateOp op, OpAdaptor adaptor, +mlir::ConversionPatternRewriter &rewr

[clang] [CIR] Upstream local initialization for VectorType (PR #138107)

2025-05-01 Thread Andy Kaylor via cfe-commits
@@ -1584,6 +1586,47 @@ mlir::Value ScalarExprEmitter::VisitMemberExpr(MemberExpr *e) { return emitLoadOfLValue(e); } +mlir::Value ScalarExprEmitter::VisitInitListExpr(InitListExpr *e) { + const unsigned numInitElements = e->getNumInits(); + + if (e->hadArrayRangeDesignato

[libunwind] [libunwind] [SEH] Implement parsing of ARM pdata/xdata (PR #137950)

2025-05-01 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo updated https://github.com/llvm/llvm-project/pull/137950 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-

[libunwind] [libunwind] [SEH] Implement parsing of aarch64 pdata/xdata (PR #137949)

2025-05-01 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo updated https://github.com/llvm/llvm-project/pull/137949 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-

[clang] [OpenACC] Implement better dupe catching for device_type clauses (PR #138196)

2025-05-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Erich Keane (erichkeane) Changes Previously we just checked duplicates for a handful of clauses between active device_type clauses. However, after looking into the implementation for 'collapse', I discovered that duplicate device_type id

[clang] [OpenACC] Implement better dupe catching for device_type clauses (PR #138196)

2025-05-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/138196 Previously we just checked duplicates for a handful of clauses between active device_type clauses. However, after looking into the implementation for 'collapse', I discovered that duplicate device_type iden

[clang] [llvm] [HLSL][RootSignature] Add parsing for empty RootConstants (PR #137999)

2025-05-01 Thread Finn Plummer via cfe-commits
@@ -252,6 +252,32 @@ TEST_F(ParseHLSLRootSignatureTest, ValidSamplerFlagsTest) { ASSERT_TRUE(Consumer->isSatisfied()); } +TEST_F(ParseHLSLRootSignatureTest, ValidParseRootConsantsTest) { inbelic wrote: Once we add the mandatory parameters then having an emp

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2025-05-01 Thread Richard Smith via cfe-commits
zygoloid wrote: Looks like a bug to me. This warning presumably ought to be checking whether it's valid to read / write to the given location using something like [`isUserWritingOffTheEnd`](https://github.com/llvm/llvm-project/blob/b2e2ae8702e9fbbe0ef0eb5929aa2d5dc867b1c5/clang/lib/AST/ExprCons

[clang] [C] Allow __attribute__((nonstring)) on multidimensional arrays (PR #138133)

2025-05-01 Thread Nathan Chancellor via cfe-commits
https://github.com/nathanchance approved this pull request. Thanks, this appears to resolve the warning in the one place that I know needs it. https://github.com/llvm/llvm-project/pull/138133 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [CIR] Upstream cir.call with scalar arguments (PR #136810)

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

[libunwind] [libunwind] [SEH] Implement parsing of aarch64 pdata/xdata (PR #137949)

2025-05-01 Thread Martin Storsjö via cfe-commits
@@ -2018,6 +2018,52 @@ bool UnwindCursor::getInfoFromSEH(pint_t pc) { _info.handler = 0; } } +#elif defined(_LIBUNWIND_TARGET_AARCH64) + if (unwindEntry->Flag != 0) { // Packed unwind info +_info.end_ip = _info.start_ip + unwindEntry->FunctionLength * 4; +/

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

2025-05-01 Thread Krzysztof Drewniak via cfe-commits
https://github.com/krzysz00 updated https://github.com/llvm/llvm-project/pull/137425 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-

[clang] [CIR] Upstream support for range-based for loops (PR #138176)

2025-05-01 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/138176 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,san

[libunwind] [libunwind] [SEH] Set NonVolatileRegisters before calling a personality function (PR #137951)

2025-05-01 Thread Jacek Caban via cfe-commits
@@ -212,6 +212,11 @@ __libunwind_seh_personality(int version, _Unwind_Action state, ms_exc.ExceptionInformation[2] = state; DISPATCHER_CONTEXT *disp_ctx = __unw_seh_get_disp_ctx((unw_cursor_t *)context); +#if defined(__aarch64__) + disp_ctx->NonVolatileRegisters = (

[clang] [HLSL][RootSignature] Define and integrate rootsig clang attr and decl (PR #137690)

2025-05-01 Thread Finn Plummer via cfe-commits
@@ -3037,6 +3037,11 @@ void TextNodeDumper::VisitHLSLBufferDecl(const HLSLBufferDecl *D) { dumpName(D); } +void TextNodeDumper::VisitHLSLRootSignatureDecl( +const HLSLRootSignatureDecl *D) { + dumpName(D); inbelic wrote: >From design we will block on

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2025-05-01 Thread Akira Hatanaka via cfe-commits
ahatanak wrote: Is passing `-fstrict-flex-arrays=1` supposed to silence the warning? I still see the warning: https://godbolt.org/z/YEKhW19nK https://github.com/llvm/llvm-project/pull/95474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang-tools-extra] [clang-tidy] Return error code on config parse error (PR #136167)

2025-05-01 Thread Galen Elias via cfe-commits
@@ -266,7 +266,7 @@ ClangTidyOptions ClangTidyContext::getOptionsForFile(StringRef File) const { // Merge options on top of getDefaults() as a safeguard against options with // unset values. return ClangTidyOptions::getDefaults().merge( - OptionsProvider->getOptions

[libunwind] [libunwind] [SEH] Implement parsing of aarch64 pdata/xdata (PR #137949)

2025-05-01 Thread Jacek Caban via cfe-commits
@@ -2018,6 +2018,52 @@ bool UnwindCursor::getInfoFromSEH(pint_t pc) { _info.handler = 0; } } +#elif defined(_LIBUNWIND_TARGET_AARCH64) + if (unwindEntry->Flag != 0) { // Packed unwind info +_info.end_ip = _info.start_ip + unwindEntry->FunctionLength * 4; +/

[clang] clang-format: Add IncludeSortKey option (PR #137840)

2025-05-01 Thread Björn Schäpers via cfe-commits
@@ -166,6 +166,16 @@ struct IncludeStyle { /// directives that use the specified character are considered. /// \version 19 MainIncludeCharDiscriminator MainIncludeChar; + + enum IncludeSortKeyDiscriminator : int8_t { +/// Includes are sorted alphabetically by their f

[clang] clang-format: Add IncludeSortKey option (PR #137840)

2025-05-01 Thread Björn Schäpers via cfe-commits
@@ -4226,6 +4226,19 @@ the configuration (without a prefix: ``Auto``). ``ClassImpl.hpp`` would not have the main include file put on top before any other include. +.. _IncludeSortKey: + +**IncludeSortKey** (``IncludeSortKeyDiscriminator``) :versionbadge:`clang-format 20`

[clang] clang-format: Add IncludeSortKey option (PR #137840)

2025-05-01 Thread Björn Schäpers via cfe-commits
@@ -4226,6 +4226,19 @@ the configuration (without a prefix: ``Auto``). ``ClassImpl.hpp`` would not have the main include file put on top before any other include. +.. _IncludeSortKey: HazardyKnusperkeks wrote: Did you write this on your own? You need to d

[clang] clang-format: Add IncludeSortKey option (PR #137840)

2025-05-01 Thread Björn Schäpers via cfe-commits
@@ -166,6 +166,16 @@ struct IncludeStyle { /// directives that use the specified character are considered. /// \version 19 MainIncludeCharDiscriminator MainIncludeChar; + + enum IncludeSortKeyDiscriminator : int8_t { HazardyKnusperkeks wrote: Can you so

[clang] clang-format: Add IncludeSortKey option (PR #137840)

2025-05-01 Thread Björn Schäpers via cfe-commits
@@ -4226,6 +4226,19 @@ the configuration (without a prefix: ``Auto``). ``ClassImpl.hpp`` would not have the main include file put on top before any other include. +.. _IncludeSortKey: + +**IncludeSortKey** (``IncludeSortKeyDiscriminator``) :versionbadge:`clang-format 20`

[clang] [HLSL] Implement the `ldexp` intrinsic (PR #138182)

2025-05-01 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng updated https://github.com/llvm/llvm-project/pull/138182 >From d5187a940fc0a16325eedb0c67bcf647deb95d8f Mon Sep 17 00:00:00 2001 From: kmpeng Date: Thu, 1 May 2025 11:48:47 -0700 Subject: [PATCH 1/2] ldexp implementation and tests --- .../lib/Headers/hlsl/hlsl_intrin

[clang] [HLSL][RootSignature] Define and integrate rootsig clang attr and decl (PR #137690)

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

[clang] [HLSL][RootSignature] Define and integrate rootsig clang attr and decl (PR #137690)

2025-05-01 Thread Finn Plummer via cfe-commits
@@ -5209,6 +5211,97 @@ void Parser::ParseMicrosoftUuidAttributeArgs(ParsedAttributes &Attrs) { } } +void Parser::ParseMicrosoftRootSignatureAttributeArgs(ParsedAttributes &Attrs) { + assert(Tok.is(tok::identifier) && + "Expected an identifier to denote which MS at

[clang] [Clang][SYCL] Add initial set of Intel OffloadArch values (PR #138158)

2025-05-01 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. https://github.com/llvm/llvm-project/pull/138158 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream support for range-based for loops (PR #138176)

2025-05-01 Thread Andy Kaylor via cfe-commits
@@ -190,6 +190,117 @@ void l3() { // OGCG: store i32 0, ptr %[[I]], align 4 // OGCG: br label %[[FOR_COND]] +void l4() { + int a[10]; + for (int n : a) andykaylor wrote: No, I don't think iterators will work yet. https://github.com/llvm/llvm-project/pu

[clang] [CIR] Upstream support for range-based for loops (PR #138176)

2025-05-01 Thread Andy Kaylor via cfe-commits
@@ -190,6 +190,117 @@ void l3() { // OGCG: store i32 0, ptr %[[I]], align 4 // OGCG: br label %[[FOR_COND]] +void l4() { + int a[10]; + for (int n : a) +; +} + +// CIR: cir.func @_Z2l4v +// CIR: %[[A_ADDR:.*]] = cir.alloca !cir.array, !cir.ptr>, ["a"] {alignment =

[clang] [Clang][NFC] Use std::move to avoid copy (PR #138073)

2025-05-01 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik closed https://github.com/llvm/llvm-project/pull/138073 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d7f98a4 - [Clang][NFC] Use std::move to avoid copy (#138073)

2025-05-01 Thread via cfe-commits
Author: Shafik Yaghmour Date: 2025-05-01T12:06:49-07:00 New Revision: d7f98a4ef9992936a92c2a71fec743ea6f3493d0 URL: https://github.com/llvm/llvm-project/commit/d7f98a4ef9992936a92c2a71fec743ea6f3493d0 DIFF: https://github.com/llvm/llvm-project/commit/d7f98a4ef9992936a92c2a71fec743ea6f3493d0.dif

[clang] [HLSL] Implement the `ldexp` intrinsic (PR #138182)

2025-05-01 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/hlsl/hlsl_intrinsic_helpers.h clang/

[clang] [HLSL] Implement the `ldexp` intrinsic (PR #138182)

2025-05-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Kaitlin Peng (kmpeng) Changes Closes #99133. Implemented `ldexp` entirely in `hlsl_intrinsics.h` and `hlsl_intrinsic_helpers.h`, added coresponding tests in `clang/test/CodeGenHLSL/builtins/ldexp.hlsl` and `clang/test/SemaHLSL/Bui

[clang] [HLSL] Implement the `ldexp` intrinsic (PR #138182)

2025-05-01 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng created https://github.com/llvm/llvm-project/pull/138182 Closes #99133. Implemented `ldexp` entirely in `hlsl_intrinsics.h` and `hlsl_intrinsic_helpers.h`, added coresponding tests in `clang/test/CodeGenHLSL/builtins/ldexp.hlsl` and `clang/test/SemaHLSL/BuiltIns/lde

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2025-05-01 Thread Richard Smith via cfe-commits
zygoloid wrote: > Is the warning valid? Is the change in clang's behavior intentional? What do you have `-fstrict-flex-arrays` set to? Per [the documentation](https://releases.llvm.org/15.0.0/tools/clang/docs/ClangCommandLineReference.html#cmdoption-clang-fstrict-flex-arrays) (which weirdly se

[clang] [CIR] Upstream support for range-based for loops (PR #138176)

2025-05-01 Thread Erich Keane via cfe-commits
@@ -547,6 +548,83 @@ mlir::LogicalResult CIRGenFunction::emitSwitchCase(const SwitchCase &s, llvm_unreachable("expect case or default stmt"); } +mlir::LogicalResult +CIRGenFunction::emitCXXForRangeStmt(const CXXForRangeStmt &s, +ArrayRef

[clang] [CIR] Upstream support for range-based for loops (PR #138176)

2025-05-01 Thread Erich Keane via cfe-commits
@@ -190,6 +190,117 @@ void l3() { // OGCG: store i32 0, ptr %[[I]], align 4 // OGCG: br label %[[FOR_COND]] +void l4() { + int a[10]; + for (int n : a) erichkeane wrote: Can we do a test with a type with `begin` and `end` as well? Or cant we support g

[clang] [CIR] Upstream support for range-based for loops (PR #138176)

2025-05-01 Thread Erich Keane via cfe-commits
@@ -190,6 +190,117 @@ void l3() { // OGCG: store i32 0, ptr %[[I]], align 4 // OGCG: br label %[[FOR_COND]] +void l4() { + int a[10]; + for (int n : a) +; +} + +// CIR: cir.func @_Z2l4v +// CIR: %[[A_ADDR:.*]] = cir.alloca !cir.array, !cir.ptr>, ["a"] {alignment =

[clang] [llvm] [OpenMP] Remove "alternativeName" from Clause and Directive classes (PR #138179)

2025-05-01 Thread Valentin Clement バレンタイン クレメン via cfe-commits
https://github.com/clementval approved this pull request. https://github.com/llvm/llvm-project/pull/138179 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP] Remove "alternativeName" from Clause and Directive classes (PR #138179)

2025-05-01 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz updated https://github.com/llvm/llvm-project/pull/138179 >From d991e966f12229fc4a9cc1114e3fa4651bc9d59d Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Thu, 1 May 2025 11:42:12 -0500 Subject: [PATCH 1/2] [OpenMP] Remove "alternativeName" from Clause and Dir

[clang] [llvm] [OpenMP] Remove "alternativeName" from Clause and Directive classes (PR #138179)

2025-05-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-tablegen Author: Krzysztof Parzyszek (kparzysz) Changes The "alternativeName" was introduced ~5 years ago in D82405, and at the moment it has only one use, the one that the original change introduced. OpenMP 6.0 spec has introduced different spellings

[clang] [llvm] [OpenMP] Remove "alternativeName" from Clause and Directive classes (PR #138179)

2025-05-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-openmp Author: Krzysztof Parzyszek (kparzysz) Changes The "alternativeName" was introduced ~5 years ago in D82405, and at the moment it has only one use, the one that the original change introduced. OpenMP 6.0 spec has introduced different spelli

[clang] [llvm] [OpenMP] Remove "alternativeName" from Clause and Directive classes (PR #138179)

2025-05-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Krzysztof Parzyszek (kparzysz) Changes The "alternativeName" was introduced ~5 years ago in D82405, and at the moment it has only one use, the one that the original change introduced. OpenMP 6.0 spec has introduced different spellings of

[clang] [llvm] [OpenMP] Remove "alternativeName" from Clause and Directive classes (PR #138179)

2025-05-01 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz created https://github.com/llvm/llvm-project/pull/138179 The "alternativeName" was introduced ~5 years ago in D82405, and at the moment it has only one use, the one that the original change introduced. OpenMP 6.0 spec has introduced different spellings of some direc

[clang] [CIR] Upstream support for range-based for loops (PR #138176)

2025-05-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes This upstreams the code needed to handle CXXForRangeStmt. --- Full diff: https://github.com/llvm/llvm-project/pull/138176.diff 5 Files Affected: - (modified) clang/lib/CIR/CodeGen/CIRGenExpr.cpp (+35) -

[clang] [CIR] Upstream support for range-based for loops (PR #138176)

2025-05-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes This upstreams the code needed to handle CXXForRangeStmt. --- Full diff: https://github.com/llvm/llvm-project/pull/138176.diff 5 Files Affected: - (modified) clang/lib/CIR/CodeGen/CIRGenExpr.cpp (+35)

[clang] [CIR] Upstream support for range-based for loops (PR #138176)

2025-05-01 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/138176 This upstreams the code needed to handle CXXForRangeStmt. >From 7d5d27ea5d2afbb70c3aae958a6f87d94e826aae Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Wed, 30 Apr 2025 09:59:15 -0700 Subject: [PATCH] [CIR

[clang] [ARM, AArch64] Fix ABI bugs with over-sized bitfields (PR #126774)

2025-05-01 Thread Florian Mayer via cfe-commits
fmayer wrote: Could we make sure this gets called out in the Release Notes? Even if it's a fix, this is a change of ABI which could break stuff. https://github.com/llvm/llvm-project/pull/126774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] [lldb] [llvm] [mlir] [NFC][Support] Add llvm::uninitialized_copy (PR #138174)

2025-05-01 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/138174 >From b34e9b6c708dfbe097504804a0a85e1169518911 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Wed, 30 Apr 2025 23:47:37 -0700 Subject: [PATCH] [NFC][Support] Add llvm::uninitialized_copy --- clang/include/cl

[clang] [lldb] [llvm] [mlir] [NFC][Support] Add llvm::uninitialized_copy (PR #138174)

2025-05-01 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/138174 None >From d6f69414e3ac5c1a22f6509149609258ef980c13 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Wed, 30 Apr 2025 23:47:37 -0700 Subject: [PATCH] [NFC][Support] Add llvm::uninitialized_copy --- clang/incl

[clang] [CUDA][HIP] Fix implicit attribute of builtin (PR #138162)

2025-05-01 Thread Artem Belevich via cfe-commits
@@ -0,0 +1,23 @@ +// expected-no-diagnostics + +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -aux-triple amdgcn-amd-amdhsa -fsyntax-only -verify -xhip %s +// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -fsyntax-only -fcuda-is-device -verify -xhip %s + +#include "Inputs/cuda

[clang] [CIR] Upstream support for switch statements case kinds (PR #138003)

2025-05-01 Thread Andy Kaylor via cfe-commits
@@ -428,6 +429,52 @@ mlir::LogicalResult CIRGenFunction::emitBreakStmt(const clang::BreakStmt &s) { return mlir::success(); } +const CaseStmt *CIRGenFunction::foldCaseStmt(const clang::CaseStmt &s, + mlir::Type condType, +

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

2025-05-01 Thread Dan Liew via cfe-commits
@@ -8197,6 +8197,16 @@ def err_address_space_qualified_new : Error< def err_address_space_qualified_delete : Error< "'delete' cannot delete objects of type %0 in address space '%1'">; +def note_default_init_const_member : Note< + "member %0 declared 'const' here">; +def war

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

2025-05-01 Thread Eli Friedman via cfe-commits
@@ -4238,7 +4238,8 @@ static Value *emitPointerArithmetic(CodeGenFunction &CGF, else elemTy = CGF.ConvertTypeForMem(elementType); - if (CGF.getLangOpts().PointerOverflowDefined) + if (CGF.getLangOpts().PointerOverflowDefined || + CGF.isUnderlyingBasePointerConstan

[clang] [Clang][AArch64] Add pessimistic vscale_range when sve is in target-f… (PR #137624)

2025-05-01 Thread Eli Friedman via cfe-commits
@@ -794,12 +794,14 @@ AArch64TargetInfo::getTargetBuiltins() const { std::optional> AArch64TargetInfo::getVScaleRange(const LangOptions &LangOpts, - bool IsArmStreamingFunction) const { + bool IsArmStreamingFunc

[clang] [llvm] Reland: [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #136046)

2025-05-01 Thread Alan Phipps via cfe-commits
evodius96 wrote: Hello, I'm seeing ProgramStackTest fail when running on our downstream toolchain on Linux: ``` 2 |   | FAIL: llvm_regressions :: LLVM-Unit/Support/SupportTests/ProgramStackTest/runOnNewStack 3 |   | --

[clang] [CIR] Upstream pointer arithmetic support (PR #138041)

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

[clang] 5209668 - [CIR] Upstream pointer arithmetic support (#138041)

2025-05-01 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-05-01T11:11:02-07:00 New Revision: 5209668e357e0a1d295d9e9aa9dbca8f41132c0c URL: https://github.com/llvm/llvm-project/commit/5209668e357e0a1d295d9e9aa9dbca8f41132c0c DIFF: https://github.com/llvm/llvm-project/commit/5209668e357e0a1d295d9e9aa9dbca8f41132c0c.diff L

[clang] [CIR] Upstream support for switch statements case kinds (PR #138003)

2025-05-01 Thread Andy Kaylor via cfe-commits
@@ -428,6 +429,52 @@ mlir::LogicalResult CIRGenFunction::emitBreakStmt(const clang::BreakStmt &s) { return mlir::success(); } +const CaseStmt *CIRGenFunction::foldCaseStmt(const clang::CaseStmt &s, + mlir::Type condType, +

  1   2   3   4   5   >