[clang] [llvm] [HLSL][SPIR-V] Implement vk::ext_builtin_input attribute (PR #138530)

2025-05-06 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts updated https://github.com/llvm/llvm-project/pull/138530 From 04cabdd5cb1400ea6fe4e92cf99a44e3004f04c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nathan=20Gau=C3=ABr?= Date: Wed, 30 Apr 2025 11:06:55 +0200 Subject: [PATCH 1/7] [HLSL] Implement vk::ext_builtin_input attr

[clang] [llvm] [HLSL][SPIR-V] Implement vk::ext_builtin_input attribute (PR #138530)

2025-05-06 Thread Nathan Gauër via cfe-commits
Keenuts wrote: Regarding the HLSL tests: I cannot reproduce the broken test on my branch (the file was not in main yet), so seems like the HLSL test is pulling main and doing something different. Rebased on main and the test passes locally, weird. https://github.com/llvm/llvm-project/pull/13853

[clang] [Clang] Ignore -fchar8_t in C (PR #138716)

2025-05-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes In C, `char8_t` is an alias to unsigned char, and should never be a keyword. Fixes #55373 --- Full diff: https://github.com/llvm/llvm-project/pull/138716.diff 3 Files Affected: - (modified) clang/docs/Releas

[clang] [clang] Remove "unknown" from availability diags (PR #138610)

2025-05-06 Thread Steven Wu via cfe-commits
@@ -709,7 +711,7 @@ static AvailabilityResult CheckAvailability(ASTContext &Context, << EnvName << HintMessage; cachemeifyoucan wrote: Do you want to avoid the extra space here? https://github.com/llvm/llvm-project/pull/138610 _

[clang] [Clang] Ignore -fchar8_t in C (PR #138716)

2025-05-06 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/138716 In C, `char8_t` is an alias to unsigned char, and should never be a keyword. Fixes #55373 >From cb8c80432affae6182e995a546c941b3b6afb8b0 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Tue, 6 May 2025 18:

[clang] [Clang][SYCL] Add AOT compilation support for Intel GPUs in clang-sycl-linker (PR #133194)

2025-05-06 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. Seems like a lot of the linker wrapper utilities copied and applied to Intel binaries, harmless enough. I'm wondering though, is there a reason we can't just use the backend right now? What do these tools do that running `llc` can't. http

[clang] [llvm] [VectorCombine] Shrink loads used in shufflevector rebroadcasts (PR #128938)

2025-05-06 Thread Simon Pilgrim via cfe-commits
@@ -3483,6 +3487,131 @@ bool VectorCombine::foldInterleaveIntrinsics(Instruction &I) { return true; } +// Attempt to shrink loads that are only used by shufflevector instructions. +bool VectorCombine::shrinkLoadForShuffles(Instruction &I) { + auto *OldLoad = dyn_cast(&I);

[clang] [llvm] [VectorCombine] Shrink loads used in shufflevector rebroadcasts (PR #128938)

2025-05-06 Thread Simon Pilgrim via cfe-commits
@@ -3483,6 +3487,131 @@ bool VectorCombine::foldInterleaveIntrinsics(Instruction &I) { return true; } +// Attempt to shrink loads that are only used by shufflevector instructions. +bool VectorCombine::shrinkLoadForShuffles(Instruction &I) { + auto *OldLoad = dyn_cast(&I);

[clang] [StaticAnalyzer] Make it a noop when initializing a field of empty record (PR #138594)

2025-05-06 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/138594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [StaticAnalyzer] Make it a noop when initializing a field of empty record (PR #138594)

2025-05-06 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. Thank you for your contribution, and debugging the case. Left a couple of comments inline. https://github.com/llvm/llvm-project/pull/138594 ___ cfe-commits mailing list cfe-commits@lis

[clang] [StaticAnalyzer] Make it a noop when initializing a field of empty record (PR #138594)

2025-05-06 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,45 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=cplusplus -verify %s +// RUN: %clang_analyze_cc1 -analyzer-checker=cplusplus -verify %s -DEMPTY_CLASS + +// expected-no-diagnostics + +// This test reproduces the issue that previously the static analyzer +// initializ

[clang] [StaticAnalyzer] Make it a noop when initializing a field of empty record (PR #138594)

2025-05-06 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,45 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=cplusplus -verify %s +// RUN: %clang_analyze_cc1 -analyzer-checker=cplusplus -verify %s -DEMPTY_CLASS + +// expected-no-diagnostics + +// This test reproduces the issue that previously the static analyzer +// initializ

[clang] [StaticAnalyzer] Make it a noop when initializing a field of empty record (PR #138594)

2025-05-06 Thread Balazs Benics via cfe-commits
@@ -715,7 +717,11 @@ void ExprEngine::handleConstructor(const Expr *E, // actually make things worse. Placement new makes this tricky as well, // since it's then possible to be initializing one part of a multi- // dimensional array. -State = Stat

[clang] [StaticAnalyzer] Make it a noop when initializing a field of empty record (PR #138594)

2025-05-06 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,45 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=cplusplus -verify %s +// RUN: %clang_analyze_cc1 -analyzer-checker=cplusplus -verify %s -DEMPTY_CLASS + +// expected-no-diagnostics + +// This test reproduces the issue that previously the static analyzer +// initializ

[clang] [clang-repl] Fix destructor for interpreter for the cuda negation case (PR #138091)

2025-05-06 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#138680 https://github.com/llvm/llvm-project/pull/138091 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add support for Debian 14 Forky and Debian 15 Duke (PR #138460)

2025-05-06 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: > Seems like the cherry-pick only works if the branch of the PR still exists. 🤔 Thanks for pointing this out. I faced a similar issue when I deleted the branch and tried cherry picking ! Now that I've restored the branch, should I try cherry picking again ? https://github.co

[clang-tools-extra] [Clang-Tidy][NFC] Simplify check cppcoreguidelines-missing-std-forward (PR #138504)

2025-05-06 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis commented: > Strange, can you explain why that's the case? `CaptureInCopy` matches lambda expressions whose default capture kind is copy and which have an explicit capture referencing function parameter. `CaptureByRefExplicit` matches lambda expressions which have an e

[clang-tools-extra] [Clang-Tidy][NFC] Simplify check cppcoreguidelines-missing-std-forward (PR #138504)

2025-05-06 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/138504 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add support for Debian 14 Forky and Debian 15 Duke (PR #138460)

2025-05-06 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > Seems like the cherry-pick only works if the branch of the PR still exists. 🤔 That's not my experience with it. It looks like the cherry-pick command yesterday just hit an unrelated issue: https://github.com/llvm/llvm-project/actions/runs/14837157160/job/41650945562 https://

[clang] [ObjC] Also enable ARC attachedcall operand bundle for arm64_32. (PR #138677)

2025-05-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Marina Taylor (citymarina) Changes It was enabled for "aarch64", which covers arm64e but not arm64_32. --- Full diff: https://github.com/llvm/llvm-project/pull/138677.diff 2 Files Affected: - (modified) clang/lib/CodeGen/CGObjC.cpp (+2

[libcxx] [libunwind] [llvm] [libc++] Upgrade to GCC 15 (PR #138293)

2025-05-06 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/138293 >From 205744331346ec8fbfc5fc5cfea178c3eb446da2 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 2 May 2025 17:24:13 +0200 Subject: [PATCH] [libc++] Upgrade to GCC 15 --- .github/workflows/libcxx-bu

[clang] Fixed issue #128882: don't warn if 1st argument to 'getcwd' is NULL (PR #135720)

2025-05-06 Thread Balazs Benics via cfe-commits
@@ -105,9 +105,6 @@ void errno_getcwd(char *Buf, size_t Sz) { clang_analyzer_eval(errno != 0); // expected-warning{{TRUE}} clang_analyzer_eval(Path == NULL); // expected-warning{{TRUE}} if (errno) {} // no warning - } else if (Path == NULL) {

[clang] [clang] Deflake the TimeProfile support tests (PR #138613)

2025-05-06 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 approved this pull request. https://github.com/llvm/llvm-project/pull/138613 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C] Add new -Wimplicit-int-enum-cast to -Wc++-compat (PR #137658)

2025-05-06 Thread via cfe-commits
asmok-g wrote: @AaronBallman If you try to compile the following program after this patch ``` void free (); typedef enum {REG_EESCAPE} reg_errcode_t; typedef struct {int *stack;} compile_stack_type; reg_errcode_t byte_regex_compile () { compile_stack_type compile_stack; return (free (compile_

[clang-tools-extra] [clang-tidy] Add check bugprone-misleading-setter-of-reference (PR #132242)

2025-05-06 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,58 @@ +//===--- MisleadingSetterOfReferenceCheck.cpp - clang-tidy-===// +// +// 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: Apa

[clang] [mlir] [OpenACC] Implement tile/collapse lowering (PR #138576)

2025-05-06 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/138576 >From 57c9faf4a0bc4a589f56fee528df8b06bdec7e54 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Mon, 5 May 2025 10:16:35 -0700 Subject: [PATCH 1/3] [OpenACC] Implement tile/collapse lowering These two ended u

[clang] [C] Add new -Wimplicit-int-enum-cast to -Wc++-compat (PR #137658)

2025-05-06 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Ooof, this may not be easy to work around. In C, we're in a context where we know we have an implicit conversion. But we have no way of knowing that we would not have the implicit conversion in C++. We could probably handle comma expressions as a special case, but I suspect

[clang-tools-extra] [clang-tidy] Add check bugprone-misleading-setter-of-reference (PR #132242)

2025-05-06 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/132242 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [mlir] [OpenACC] Implement tile/collapse lowering (PR #138576)

2025-05-06 Thread Erich Keane via cfe-commits
@@ -82,6 +83,17 @@ class OpenACCClauseCIREmitter final return conversionOp.getResult(0); } + mlir::Value createConstantInt(mlir::Location loc, unsigned width, +int64_t value) { +mlir::IntegerType ty = mlir::IntegerType::get( +

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

2025-05-06 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/137851 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-s

[clang] [analyzer] Workaround for slowdown spikes (unintended scope increase) (PR #136720)

2025-05-06 Thread Balázs Benics via cfe-commits
@@ -2523,6 +2523,20 @@ bool ExprEngine::replayWithoutInlining(ExplodedNode *N, return true; } +/// Return the innermost location context which is inlined at `Node`, unless +/// it's the top-level (entry point) location context. +static const LocationContext *getInlinedLocati

[clang] [analyzer] Workaround for slowdown spikes (unintended scope increase) (PR #136720)

2025-05-06 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/136720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add new check: modernize-use-scoped-lock (PR #126434)

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

[clang] [analyzer] Workaround for slowdown spikes (unintended scope increase) (PR #136720)

2025-05-06 Thread Donát Nagy via cfe-commits
NagyDonat wrote: I discussed the name with Endre (@gamesh411) in person and our best idea is `inline-functions-with-ambiguous-loops` which would be the opposite of the currently implemented `legacy-inlining-prevention` (i.e. the default would be `inline-functions-with-ambiguous-loops=false` wh

[clang-tools-extra] [clang-tidy] add new check: modernize-use-scoped-lock (PR #126434)

2025-05-06 Thread Baranov Victor via cfe-commits
vbvictor wrote: Rebased+Ping https://github.com/llvm/llvm-project/pull/126434 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add check bugprone-misleading-setter-of-reference (PR #132242)

2025-05-06 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,58 @@ +//===--- MisleadingSetterOfReferenceCheck.cpp - clang-tidy-===// +// +// 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: Apa

[clang] [mlir] [OpenACC] Implement tile/collapse lowering (PR #138576)

2025-05-06 Thread Erich Keane via cfe-commits
@@ -336,6 +348,52 @@ class OpenACCClauseCIREmitter final return clauseNotImplemented(clause); } } + + void VisitCollapseClause(const OpenACCCollapseClause &clause) { +if constexpr (isOneOfTypes) { + llvm::APInt value = + clause.getIntExpr()->Evalu

[clang] [mlir] [OpenACC] Implement tile/collapse lowering (PR #138576)

2025-05-06 Thread Erich Keane via cfe-commits
@@ -82,6 +83,17 @@ class OpenACCClauseCIREmitter final return conversionOp.getResult(0); } + mlir::Value createConstantInt(mlir::Location loc, unsigned width, +int64_t value) { +mlir::IntegerType ty = mlir::IntegerType::get( +

[clang-tools-extra] [clang-tidy] Add check bugprone-misleading-setter-of-reference (PR #132242)

2025-05-06 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,47 @@ +.. title:: clang-tidy - bugprone-misleading-setter-of-reference + +bugprone-misleading-setter-of-reference +=== + +Finds setter-like member functions that take a pointer parameter and set a +(non-const) reference member of the

[clang-tools-extra] [clang-tidy] Add check bugprone-misleading-setter-of-reference (PR #132242)

2025-05-06 Thread Donát Nagy via cfe-commits
@@ -6,42 +6,42 @@ bugprone-misleading-setter-of-reference Finds setter-like member functions that take a pointer parameter and set a (non-const) reference member of the same class with the pointed value. +The checker detects public member functions that have a single parameter

[clang-tools-extra] [clang-tidy] Add check bugprone-misleading-setter-of-reference (PR #132242)

2025-05-06 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,47 @@ +.. title:: clang-tidy - bugprone-misleading-setter-of-reference + +bugprone-misleading-setter-of-reference +=== + +Finds setter-like member functions that take a pointer parameter and set a +(non-const) reference member of the

[clang-tools-extra] [clang-tidy] Add check bugprone-misleading-setter-of-reference (PR #132242)

2025-05-06 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,42 @@ +.. title:: clang-tidy - bugprone-misleading-setter-of-reference + +bugprone-misleading-setter-of-reference +=== + +Finds setter-like functions that take a pointer parameter and set a (non-const) NagyDonat wrote

[clang-tools-extra] [clang-tidy] Add check bugprone-misleading-setter-of-reference (PR #132242)

2025-05-06 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,58 @@ +//===--- MisleadingSetterOfReferenceCheck.cpp - clang-tidy-===// +// +// 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: Apa

[clang] [llvm] [clang][OpenMP] New OpenMP 6.0 threadset clause (PR #135807)

2025-05-06 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev commented: Update OpenMPSupport.rst and release notes documents https://github.com/llvm/llvm-project/pull/135807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang-tools-extra] [clang-tidy] Add check bugprone-misleading-setter-of-reference (PR #132242)

2025-05-06 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,61 @@ +//===--- MisleadingSetterOfReferenceCheck.cpp - clang-tidy-===// +// +// 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: Apa

[clang] [llvm] [clang][OpenMP] New OpenMP 6.0 threadset clause (PR #135807)

2025-05-06 Thread Alexey Bataev via cfe-commits
@@ -101,9 +103,11 @@ T tmain(T argc, T *argv) { a = 2; #pragma omp task default(none), private(argc, b) firstprivate(argv) shared(d) if (argc > 0) final(S::TS > 0) priority(argc) affinity(argc, argv[b:argc], arr[:], ([argc][sizeof(T)])argv) foo(); +#ifndef OMP60 -

[clang-tools-extra] [clang-tidy] Add check bugprone-misleading-setter-of-reference (PR #132242)

2025-05-06 Thread Baranov Victor via cfe-commits
=?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: https://github.com/vbvictor deleted https://github.com/llvm/llvm-project/pull/132242 ___ cfe-commits mailing list cfe-commi

[clang] [llvm] [clang][OpenMP] New OpenMP 6.0 threadset clause (PR #135807)

2025-05-06 Thread Alexey Bataev via cfe-commits
@@ -3691,6 +3691,7 @@ CGOpenMPRuntime::emitTaskInit(CodeGenFunction &CGF, SourceLocation Loc, DestructorsFlag = 0x8, PriorityFlag = 0x20, DetachableFlag = 0x40, +PoolFlag = 0x80, alexey-bataev wrote: Still the runtime library should be updated

[clang-tools-extra] [clang-tidy] Add check bugprone-misleading-setter-of-reference (PR #132242)

2025-05-06 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,58 @@ +//===--- MisleadingSetterOfReferenceCheck.cpp - clang-tidy-===// +// +// 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: Apa

[clang-tools-extra] [clang-tidy] Add check bugprone-misleading-setter-of-reference (PR #132242)

2025-05-06 Thread Donát Nagy via cfe-commits
NagyDonat wrote: Also @vbvictor thanks for your helpful remarks. As far as I see they were all addressed by @balazske -- do you have anything to add? https://github.com/llvm/llvm-project/pull/132242 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang-tools-extra] [clang-tidy] Add check bugprone-misleading-setter-of-reference (PR #132242)

2025-05-06 Thread Baranov Victor via cfe-commits
=?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: vbvictor wrote: Please add entry to `clang-tools-extra/docs/ReleaseNotes.rst`. It should be the first sentence in checks docs. https://github.com/llvm/llvm-project/p

[clang] [mlir] [OpenACC] Implement tile/collapse lowering (PR #138576)

2025-05-06 Thread Henrich Lauko via cfe-commits
@@ -82,6 +83,17 @@ class OpenACCClauseCIREmitter final return conversionOp.getResult(0); } + mlir::Value createConstantInt(mlir::Location loc, unsigned width, +int64_t value) { +mlir::IntegerType ty = mlir::IntegerType::get( +

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-06 Thread CHANDRA GHALE via cfe-commits
@@ -4899,6 +4899,150 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, ArrayRef Privates, +ArrayRef LHSExprs, ArrayRef RHSExprs, +ArrayRef Reduct

[clang] [ObjC] Also enable ARC attachedcall operand bundle for arm64_32. (PR #138677)

2025-05-06 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/138677 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Warn about deprecated volatile-qualified return types (PR #137899)

2025-05-06 Thread via cfe-commits
cor3ntin wrote: @halbi2 Do you need us to merge that for you? https://github.com/llvm/llvm-project/pull/137899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Workaround for slowdown spikes (unintended scope increase) (PR #136720)

2025-05-06 Thread Balázs Benics via cfe-commits
balazs-benics-sonarsource wrote: @Xazax-hun WDYT of the proposed alternative flag name? https://github.com/llvm/llvm-project/pull/136720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream enum support (PR #136807)

2025-05-06 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/136807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [mlir] [OpenACC] Implement tile/collapse lowering (PR #138576)

2025-05-06 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. https://github.com/llvm/llvm-project/pull/138576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [mlir] [OpenACC] Implement tile/collapse lowering (PR #138576)

2025-05-06 Thread Bruno Cardoso Lopes via cfe-commits
@@ -82,6 +83,17 @@ class OpenACCClauseCIREmitter final return conversionOp.getResult(0); } + mlir::Value createConstantInt(mlir::Location loc, unsigned width, +int64_t value) { +mlir::IntegerType ty = mlir::IntegerType::get( +

[clang] [Clang][SYCL] Add AOT compilation support for Intel GPUs in clang-sycl-linker (PR #133194)

2025-05-06 Thread Arvind Sudarsanam via cfe-commits
@@ -46,3 +46,11 @@ def spirv_dump_device_code_EQ : Joined<["--", "-"], "spirv-dump-device-code=">, def print_linked_module : Flag<["--"], "print-linked-module">, Flags<[LinkerOnlyOption]>, HelpText<"Print the linked module's

[clang] [mlir] [OpenACC] Implement tile/collapse lowering (PR #138576)

2025-05-06 Thread Erich Keane via cfe-commits
@@ -82,6 +83,17 @@ class OpenACCClauseCIREmitter final return conversionOp.getResult(0); } + mlir::Value createConstantInt(mlir::Location loc, unsigned width, +int64_t value) { +mlir::IntegerType ty = mlir::IntegerType::get( +

[clang] [mlir] [OpenACC] Implement tile/collapse lowering (PR #138576)

2025-05-06 Thread Bruno Cardoso Lopes via cfe-commits
@@ -82,6 +83,17 @@ class OpenACCClauseCIREmitter final return conversionOp.getResult(0); } + mlir::Value createConstantInt(mlir::Location loc, unsigned width, +int64_t value) { +mlir::IntegerType ty = mlir::IntegerType::get( +

[clang] [Clang][SYCL] Add AOT compilation support for Intel GPUs in clang-sycl-linker (PR #133194)

2025-05-06 Thread Arvind Sudarsanam via cfe-commits
@@ -338,6 +382,87 @@ static Error runSPIRVCodeGen(StringRef File, const ArgList &Args, return Error::success(); } +/// Run AOT compilation for Intel CPU. +/// Calls opencl-aot tool to generate device code for Intel CPU backend. +/// 'InputFile' is the input SPIR-V file. +//

[clang] [APINotes] Add support for SWIFT_RETURED_AS_UNRETAINED_BY_DEFAULT (PR #138699)

2025-05-06 Thread via cfe-commits
https://github.com/fahadnayyar edited https://github.com/llvm/llvm-project/pull/138699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Cygwin] Enable TLS on Cygwin target (PR #138618)

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

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

2025-05-06 Thread Eli Friedman via cfe-commits
@@ -2247,6 +2247,15 @@ bool BinaryOperator::isNullPointerArithmeticExtension(ASTContext &Ctx, return false; } + // Workaround for old glibc's __PTR_ALIGN macro + if (auto *Select = dyn_cast(PExp->IgnoreParenCasts())) { efriedma-quic wrote: IgnorePare

[clang] [CIR] Add cir-simplify pass (PR #138317)

2025-05-06 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes commented: LGTM with minor tip: can you also add a source to CIR test that guarantee this kicks in from the driver? https://github.com/llvm/llvm-project/pull/138317 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [Cygwin] Enable TLS on Cygwin target (PR #138618)

2025-05-06 Thread via cfe-commits
jeremyd2019 wrote: I don't know the "proper" procedure here, but I have been explicitly tagging @mstorsjo on cygwin pull requests, nobody else has yet merged any for me (the one adding a cygwin toolchain driver is still waiting for review from someone else) https://github.com/llvm/llvm-projec

[clang] [clang][Index] Add comment about out-of-line defaulted destructor (PR #138640)

2025-05-06 Thread Shafik Yaghmour via cfe-commits
@@ -44,6 +44,8 @@ class IndexingContext { public: IndexingContext(IndexingOptions IndexOpts, IndexDataConsumer &DataConsumer); + // Defaulted, but defined out of line to avoid a dependency on + // HeuristicResolver.h. shafik wrote: ```suggestion // Heur

[clang] [Clang] Diagnose invalid function types in dependent contexts (PR #138731)

2025-05-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes When forming an invalid function type, we were not diagnosing it if the call was dependent. However, we later rely on the function type to be sensible during argument deduction. We now diagnose anything that

[clang] [Clang] Diagnose invalid function types in dependent contexts (PR #138731)

2025-05-06 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/138731 When forming an invalid function type, we were not diagnosing it if the call was dependent. However, we later rely on the function type to be sensible during argument deduction. We now diagnose anything that

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

2025-05-06 Thread via cfe-commits
cor3ntin wrote: @zwuis Do you need me to merge that for you? https://github.com/llvm/llvm-project/pull/134522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [mlir] [OpenACC] Implement tile/collapse lowering (PR #138576)

2025-05-06 Thread Erich Keane via cfe-commits
@@ -82,6 +83,17 @@ class OpenACCClauseCIREmitter final return conversionOp.getResult(0); } + mlir::Value createConstantInt(mlir::Location loc, unsigned width, +int64_t value) { +mlir::IntegerType ty = mlir::IntegerType::get( +

[clang] [Clang][SYCL] Add AOT compilation support for Intel GPUs in clang-sycl-linker (PR #133194)

2025-05-06 Thread Arvind Sudarsanam via cfe-commits
@@ -358,15 +483,20 @@ Error runSYCLLink(ArrayRef Files, const ArgList &Args) { SmallVector SplitModules; SplitModules.emplace_back(*LinkedFile); - // SPIR-V code generation step. + // SPIR-V code generation step and AOT compilation step. asudarsa wrote:

[clang] [Clang][SYCL] Add AOT compilation support for Intel GPUs in clang-sycl-linker (PR #133194)

2025-05-06 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: @bader Can you please take a look when convenient? Thanks https://github.com/llvm/llvm-project/pull/133194 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Unblock simple C++ structure support (PR #138368)

2025-05-06 Thread Bruno Cardoso Lopes via cfe-commits
@@ -365,10 +365,15 @@ mlir::Attribute ConstantEmitter::tryEmitPrivateForVarInit(const VarDecl &d) { if (!d.hasLocalStorage()) { QualType ty = cgm.getASTContext().getBaseElementType(d.getType()); if (ty->isRecordType()) - if (d.getInit() && isa(d.getInit())) { -

[clang] [CIR] Unblock simple C++ structure support (PR #138368)

2025-05-06 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/138368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][SYCL] Add AOT compilation support for Intel GPUs in clang-sycl-linker (PR #133194)

2025-05-06 Thread Arvind Sudarsanam via cfe-commits
@@ -440,9 +570,15 @@ int main(int argc, char **argv) { DryRun = Args.hasArg(OPT_dry_run); SaveTemps = Args.hasArg(OPT_save_temps); - OutputFile = "a.out"; - if (Args.hasArg(OPT_o)) -OutputFile = Args.getLastArgValue(OPT_o); + IsAOTCompileNeeded = IsIntelOffloadArch(

[clang] [Clang][SYCL] Add AOT compilation support for Intel GPUs in clang-sycl-linker (PR #133194)

2025-05-06 Thread Arvind Sudarsanam via cfe-commits
@@ -440,9 +570,15 @@ int main(int argc, char **argv) { DryRun = Args.hasArg(OPT_dry_run); SaveTemps = Args.hasArg(OPT_save_temps); - OutputFile = "a.out"; - if (Args.hasArg(OPT_o)) -OutputFile = Args.getLastArgValue(OPT_o); + IsAOTCompileNeeded = IsIntelOffloadArch(

[clang] [Clang][SYCL] Add AOT compilation support for Intel GPUs in clang-sycl-linker (PR #133194)

2025-05-06 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa approved this pull request. LGTM. Minor nits. Thanks https://github.com/llvm/llvm-project/pull/133194 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream extract op for VectorType (PR #138413)

2025-05-06 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes commented: Overall looks good. While here, can you please implement a folder for this operation? It should kick-in if both idx and input vector are constants. https://github.com/llvm/llvm-project/pull/138413 ___ cfe-co

[clang] [clang][OpenMP] Add error for large expr in SIMD collapse (PR #138592)

2025-05-06 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/138592 >From d39464b6a17dd1a2569ba8a899f59f2c577c7e82 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Mon, 5 May 2025 23:01:02 +0200 Subject: [PATCH] [clang][OpenMP] Add error for large expr in collapse --- cl

[clang] [clang][OpenMP] Add error for large expr in collapse clause (PR #138592)

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

[clang] [clang][OpenMP] Add error for large expr in collapse clause (PR #138592)

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

[clang] [CIR] Add cir-simplify pass (PR #138317)

2025-05-06 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,184 @@ +//===--===// +// +// 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: Apa

[clang] [CIR] Add cir-simplify pass (PR #138317)

2025-05-06 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/138317 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Index] Add comment about out-of-line defaulted destructor (PR #138640)

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

[clang] [Clang] Diagnose invalid function types in dependent contexts (PR #138731)

2025-05-06 Thread Erich Keane via cfe-commits
@@ -6594,6 +6603,16 @@ ExprResult Sema::BuildCallExpr(Scope *Scope, Expr *Fn, SourceLocation LParenLoc, *this, dyn_cast(Fn->IgnoreParens()), Fn->getBeginLoc()); +if (!Fn->getType()->isDependentType()) { + // If the type of the function

[clang] [Clang] Diagnose invalid function types in dependent contexts (PR #138731)

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

[clang] [Clang][SYCL] Add AOT compilation support for Intel GPUs in clang-sycl-linker (PR #133194)

2025-05-06 Thread Alexey Bader via cfe-commits
bader wrote: I suggest adjusting the PR title: "[Clang][SYCL] Add AOT compilation support for Intel GPUs in clang-sycl-linker" -> "[clang-sycl-linker] Add AOT compilation support for Intel GPUs" https://github.com/llvm/llvm-project/pull/133194 ___ cfe-

[clang] [APINotes] Add support for SWIFT_RETURED_AS_UNRETAINED_BY_DEFAULT (PR #138699)

2025-05-06 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan approved this pull request. https://github.com/llvm/llvm-project/pull/138699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [StaticAnalyzer] Make it a noop when initializing a field of empty record (PR #138594)

2025-05-06 Thread Ziqing Luo via cfe-commits
@@ -715,7 +717,11 @@ void ExprEngine::handleConstructor(const Expr *E, // actually make things worse. Placement new makes this tricky as well, // since it's then possible to be initializing one part of a multi- // dimensional array. -State = Stat

[clang] [Clang][SYCL] Add AOT compilation support for Intel GPUs in clang-sycl-linker (PR #133194)

2025-05-06 Thread Alexey Bader via cfe-commits
bader wrote: > I'm wondering though, is there a reason we can't just use the backend right > now? What do these tools do that running `llc` can't. These tools compile programs in SPIR-V to the format that can be consumed by Intel's OpenCL/Level Zero drivers. `llc` can't do that because there a

[clang] Reset CodeGenOptions fields for clean module/PCH builds (PR #138256)

2025-05-06 Thread Michael Spencer via cfe-commits
@@ -209,20 +209,21 @@ void ModuleDepCollector::addOutputPaths(CowCompilerInvocation &CI, void dependencies::resetBenignCodeGenOptions(frontend::ActionKind ProgramAction, const LangOptions &LangOpts,

[clang] [mlir] [OpenACC] Implement tile/collapse lowering (PR #138576)

2025-05-06 Thread Henrich Lauko via cfe-commits
@@ -82,6 +83,17 @@ class OpenACCClauseCIREmitter final return conversionOp.getResult(0); } + mlir::Value createConstantInt(mlir::Location loc, unsigned width, +int64_t value) { +mlir::IntegerType ty = mlir::IntegerType::get( +

[clang] [APINotes] Add support for SWIFT_RETURED_AS_UNRETAINED_BY_DEFAULT (PR #138699)

2025-05-06 Thread Saleem Abdulrasool via cfe-commits
@@ -624,6 +624,13 @@ class TagTableInfo ReleaseOpLength - 1); Data += ReleaseOpLength - 1; } +unsigned DefaultOwnershipLength = +endian::readNext(Data); +if (DefaultOwnershipLength > 0) { compner

[clang] [clang-format] Fix a bug in annotating binary operator && (PR #138633)

2025-05-06 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/138633 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't annotate enum colon as InheritanceColon (PR #138440)

2025-05-06 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/138440 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Correctly annotate C# nullable value type `?` (PR #138631)

2025-05-06 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/138631 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add unnecessary-virtual-specifier to -Wextra (PR #138741)

2025-05-06 Thread Devon Loehr via cfe-commits
https://github.com/DKLoehr created https://github.com/llvm/llvm-project/pull/138741 Effectively a reland of #133265, though due to discussion there we add the warning to -Wextra instead of turning it on by default. We still need to disable it for LLVM due to our unusual policy of using virtual

<    1   2   3   4   >