[clang] [CMAKE][AMDGPU] fix build failure caused by PR #133619 (PR #133776)

2025-03-31 Thread Farzon Lotfi via cfe-commits
farzonl wrote: > @farzonl can you please revert the original commit? It seems to break just > any LLVM build, so I guess the CI testing of all new PRs should be affected. I don't see it breaking any build in LLVM, just the amd offload ones. Al the Premerge tests also passed. I suspect the `AM

[clang] [clang-sycl-linker] Replace llvm-link with API calls (PR #133797)

2025-03-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Arvind Sudarsanam (asudarsa) Changes This PR has the following changes: Replace llvm-link with calls to linkInModule to link device files Add -print-linked-module option to dump linked module for testing Added a test to verify that linki

[clang] [llvm] Remove Native Client support (PR #133661)

2025-03-31 Thread Derek Schuff via cfe-commits
dschuff wrote: Thanks for working on this! This will be the first time I'm not going to oppose an effort to remove Native Client support 🎉 Although I am going to ask you to wait a couple of months to land it, until we finally turn it off for good and start deleting the support code from Chromi

[clang] 6ff33ed - [alpha.webkit.NoUnretainedMemberChecker] Ignore system-header-defined ivar / property of a forward declared type (#133755)

2025-03-31 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2025-03-31T14:59:41-07:00 New Revision: 6ff33edcdc29be049829934399b2fb2585252439 URL: https://github.com/llvm/llvm-project/commit/6ff33edcdc29be049829934399b2fb2585252439 DIFF: https://github.com/llvm/llvm-project/commit/6ff33edcdc29be049829934399b2fb2585252439.diff

[clang] Add warning message for C++17 alias template CTAD (PR #133806)

2025-03-31 Thread via cfe-commits
@@ -8444,9 +8444,16 @@ let CategoryName = "Lambda Issue" in { "C++ standards before C++20">, InGroup, DefaultIgnore; // C++20 class template argument deduction for alias templates. - def warn_cxx17_compat_ctad_for_alias_templates : Warning< - "class template argument d

[clang] 0248d27 - Reland [HIP] fix host min/max in header (#133590)

2025-03-31 Thread via cfe-commits
Author: Yaxun (Sam) Liu Date: 2025-03-31T20:28:29-04:00 New Revision: 0248d277cabab370b48114cc62aff393b273971b URL: https://github.com/llvm/llvm-project/commit/0248d277cabab370b48114cc62aff393b273971b DIFF: https://github.com/llvm/llvm-project/commit/0248d277cabab370b48114cc62aff393b273971b.dif

[clang] Reland [HIP] fix host min/max in header (PR #133590)

2025-03-31 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu closed https://github.com/llvm/llvm-project/pull/133590 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-03-31 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev approved this pull request. Lgtm! https://github.com/llvm/llvm-project/pull/127467 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Define LLVM_ABI and CLANG_ABI for __EMSCRIPTEN__ builds (PR #131578)

2025-03-31 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev milestoned https://github.com/llvm/llvm-project/pull/131578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [cmake] Refactor clang unittest cmake (PR #133545)

2025-03-31 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek approved this pull request. This is definitely an improvement over status quo! Ideally, developers wouldn't have to list Clang libraries separately from other libraries but that would require some non-trivial build system refactoring that would be better done in fo

[clang] [Clang][RFC] Bypass TAD during overload resolution if a perfect match exists (PR #133426)

2025-03-31 Thread Younan Zhang via cfe-commits
@@ -10933,27 +11096,100 @@ OverloadCandidateSet::BestViableFunction(Sema &S, SourceLocation Loc, // -fgpu-exclude-wrong-side-overloads is off. When // -fgpu-exclude-wrong-side-overloads is on, all candidates are compared // uniformly in isBetterOverloadCandidate. - if (

[clang] [Clang][RFC] Bypass TAD during overload resolution if a perfect match exists (PR #133426)

2025-03-31 Thread Younan Zhang via cfe-commits
@@ -1126,7 +1208,8 @@ class Sema; OperatorRewriteInfo RewriteInfo; constexpr static unsigned NumInlineBytes = -24 * sizeof(ImplicitConversionSequence); +32 * sizeof(ImplicitConversionSequence); zyn0217 wrote: Can we add some comments?

[clang] [Clang][RFC] Bypass TAD during overload resolution if a perfect match exists (PR #133426)

2025-03-31 Thread Younan Zhang via cfe-commits
@@ -14354,6 +14584,17 @@ ExprResult Sema::BuildOverloadedCallExpr(Scope *S, Expr *Fn, OverloadingResult OverloadResult = CandidateSet.BestViableFunction(*this, Fn->getBeginLoc(), Best); + // [C++23][over.call.func] + // if overload resolution selects a non-static me

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-31 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: > I am wondering if we can add such CI for llvm, too... maybe you can discuss > that at the llvm discord's infrastructure channel... Absolutely, I shall do that and get back to you on this (I think there are people at llvm looking into llvm+emscripten use cases and should sup

[clang] [clang-format] Recognize TableGen paste operator on separate line (PR #133722)

2025-03-31 Thread Owen Pan via cfe-commits
@@ -4853,9 +4853,16 @@ void UnwrappedLineParser::readToken(int LevelDifference) { PreviousWasComment = FormatTok->is(tok::comment); while (!Line->InPPDirective && FormatTok->is(tok::hash) && - (!Style.isVerilog() || -Keywords.isVerilogPPDirective

[clang] [llvm] Remove Native Client support (PR #133661)

2025-03-31 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > CodeGen/Thumb2/pacbti-m-outliner-1.ll ``` diff --git a/llvm/test/CodeGen/Thumb2/pacbti-m-outliner-1.ll b/llvm/test/CodeGen/Thumb2/pacbti-m-outliner-1.ll index 23924b2..dc06c26 100644 --- a/llvm/test/CodeGen/Thumb2/pacbti-m-outliner-1.ll +++ b/llvm/test/CodeGen/Thumb2/pacb

[clang] [CMAKE][AMDGPU] fix build failure caused by PR #133619 (PR #133776)

2025-03-31 Thread Slava Zakharin via cfe-commits
vzakhari wrote: > > @farzonl can you please revert the original commit? It seems to break just > > any LLVM build, so I guess the CI testing of all new PRs should be affected. > > I don't see it breaking any build in LLVM, just the amd offload ones. Al the > Premerge tests also passed. I suspe

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

2025-03-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Tom Eccles (tblah) Changes Precise OpenMP standards support information is being documented in #132707 Flang now has good support for OpenMP Version 3.1 and earlier. --- Full diff: https://github.com/llvm/llvm-project/pull/133745.diff 8

[clang] [clang] Fix handling of explicit-`this` functions as template arguments (PR #133748)

2025-03-31 Thread Eli Friedman via cfe-commits
@@ -7558,6 +7558,18 @@ ExprResult Sema::BuildExpressionFromDeclTemplateArgument( } else { assert(ParamType->isReferenceType() && "unexpected type for decl template argument"); + +if (auto *Method = dyn_cast(VD); +Method && Method->isExplicitObjectMe

[clang] Add warning message for C++17 alias template CTAD (PR #133806)

2025-03-31 Thread via cfe-commits
https://github.com/GeorgeKA updated https://github.com/llvm/llvm-project/pull/133806 >From dd978982b2ab41d3d2a55abb448e653a80158ecd Mon Sep 17 00:00:00 2001 From: George Asante Date: Mon, 31 Mar 2025 17:41:20 -0400 Subject: [PATCH 1/2] Add warning message for C++17 alias template CTAD --- cla

[clang] [Clang] add emit -Wignored-base-class-qualifiers diagnostic for cv-qualified base classes (PR #132116)

2025-03-31 Thread Lyle Dean via cfe-commits
lyledean1 wrote: Thanks for the review @AaronBallman , I've updated the PR from your comments and the CI has passed - is this good to merge now? https://github.com/llvm/llvm-project/pull/132116 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [HLSL][RootSignature] Implement parsing of a DescriptorTable with empty clauses (PR #133302)

2025-03-31 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 `clang,llvm` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/146/builds/2619 Here is the releva

[clang] [clang] Fix crash on invalid `std::initializer_list` template-id (PR #132284)

2025-03-31 Thread via cfe-commits
offsetof wrote: > Will you need me to merge that for you? Yes please, thank you @cor3ntin https://github.com/llvm/llvm-project/pull/132284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

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

2025-03-31 Thread Oliver Hunt via cfe-commits
@@ -1098,12 +1098,39 @@ static TypeSourceInfo *getTypeSourceInfoForStdAlignValT(Sema &S, return S.Context.getTrivialTypeSourceInfo(StdAlignValDecl); } +// When searching for custom allocators on the PromiseType we want to +// warn that we will ignore type aware allocators.

[clang-tools-extra] [clang-tidy] Use DenseMap::insert_range (NFC) (PR #133844)

2025-03-31 Thread Jakub Kuderski via cfe-commits
https://github.com/kuhar approved this pull request. https://github.com/llvm/llvm-project/pull/133844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland [Clang][Cmake] fix libtool duplicate member name warnings (PR #133850)

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

[clang] [CIR] Upstream CmpOp (PR #133159)

2025-03-31 Thread Andy Kaylor via cfe-commits
@@ -710,6 +710,85 @@ class ScalarExprEmitter : public StmtVisitor { HANDLEBINOP(Xor) HANDLEBINOP(Or) #undef HANDLEBINOP + + mlir::Value emitCmp(const BinaryOperator *e) { +const mlir::Location loc = cgf.getLoc(e->getExprLoc()); +mlir::Value result; +QualType l

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-31 Thread Martin Uecker via cfe-commits
uecker wrote: > Curiously, GCC doesn't merge the standard attributes either, it seems to do > last-one-wins: https://godbolt.org/z/j3W7ej5Kq I filed a bug for this: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119526 https://github.com/llvm/llvm-project/pull/132939

[clang] [llvm] [HLSL][RootSignature] Implement parsing of a DescriptorTable with empty clauses (PR #133302)

2025-03-31 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ppc64le-rhel` running on `ppc64le-clang-rhel-test` while building `clang,llvm` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/145/builds/6149 Her

[clang] [Clang][RFC] Bypass TAD during overload resolution if a perfect match exists (PR #133426)

2025-03-31 Thread Richard Smith via cfe-commits
@@ -8455,11 +8524,17 @@ void Sema::AddNonMemberOperatorCandidates( if (FunTmpl) { AddTemplateOverloadCandidate(FunTmpl, F.getPair(), ExplicitTemplateArgs, FunctionArgs, CandidateSet); - if (CandidateSet.getRewriteInfo().shouldAd

[clang] [Clang][RFC] Bypass TAD during overload resolution if a perfect match exists (PR #133426)

2025-03-31 Thread Richard Smith via cfe-commits
@@ -10230,9 +10307,15 @@ Sema::AddArgumentDependentLookupCandidates(DeclarationName Name, /*AllowExplicit=*/true, ADLCallKind::UsesADL); if (CandidateSet.getRewriteInfo().shouldAddReversed( *this, Args, FTD->getTemplatedDecl())) { + +// As

[clang] [Clang][Cmake] fix libtool duplicate member name warnings (PR #133619)

2025-03-31 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-darwin` running on `doug-worker-3` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/23/builds/8943 Here is the r

[clang] [Clang][RFC] Bypass TAD during overload resolution if a perfect match exists (PR #133426)

2025-03-31 Thread Richard Smith via cfe-commits
https://github.com/zygoloid commented: I think we should do this. Even if WG21 decides that they only want to allow this and not require it, it seems like a good change that we stand a decent chance of reaching implementation consensus on. https://github.com/llvm/llvm-project/pull/133426 _

[clang] [alpha.webkit.ForwardDeclChecker] Ignore forward declared struct. (PR #133804)

2025-03-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ryosuke Niwa (rniwa) Changes There are some system libraries such as sqlite3 which forward declare a struct then use a pointer to that forward declared type in various APIs. Ignore these types ForwardDeclChecker like oth

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

2025-03-31 Thread via cfe-commits
@@ -93,6 +91,9 @@ void test() { (int *)null_val;// ok (int *)nullptr; // ok (nullptr_t)nullptr; // ok + (nullptr_t)0; // ok + (nullptr_t)(void *)0; // ok + (nullptr_t)null_val; // ok Sirraide wrote: What about `(nullptr_t)__null` https

[clang] [Clang][Cmake] fix libtool duplicate member name warnings (PR #133619)

2025-03-31 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `flang-aarch64-latest-gcc` running on `linaro-flang-aarch64-latest-gcc` while building `clang` at step 4 "cmake-configure". Full details are available at: https://lab.llvm.org/buildbot/#/builders/130/builds/11827 Here is the

[clang] [clang-format] add option to control bin-packing keyworded parameters (PR #131605)

2025-03-31 Thread Eugene Shalygin via cfe-commits
https://github.com/zeule updated https://github.com/llvm/llvm-project/pull/131605 >From 58eb85b45f56142f36686d2a1499deb2e7736eb6 Mon Sep 17 00:00:00 2001 From: Eugene Shalygin Date: Mon, 17 Mar 2025 11:23:35 +0100 Subject: [PATCH] [clang-format] option to control bin-packing keyworded paramete

[clang] [CIR] Generate the nsw flag correctly for unary ops (PR #133815)

2025-03-31 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/133815 A previous checkin used a workaround to generate the nsw flag where needed for unary ops. This change upstreams a subsequent change that was made in the incubator to generate the flag correctly. >From a96e0

[clang] [Driver] Add linker options to support statical linking to shared flang-rt on AIX. (PR #131822)

2025-03-31 Thread Daniel Chen via cfe-commits
DanielCChen wrote: Note that the reason `aio.exp` is not needed is because flang-rt currently doesn't do asynchronous I/O. Once it is enabled using POSIX `aio_*` system calls, it will need to export those calls. https://github.com/llvm/llvm-project/pull/131822

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

2025-03-31 Thread Justin Cai via cfe-commits
https://github.com/jzc edited 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] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-03-31 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp updated https://github.com/llvm/llvm-project/pull/133710 >From 81c45d6226d217197ae7b6c35e9ace22027cb7a5 Mon Sep 17 00:00:00 2001 From: Wang Pengcheng Date: Mon, 31 Mar 2025 20:12:40 +0800 Subject: [PATCH 1/2] [RISCV][NFC] Make generated intrinsic records more human

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

2025-03-31 Thread Matheus Izvekov via cfe-commits
@@ -1098,12 +1098,39 @@ static TypeSourceInfo *getTypeSourceInfoForStdAlignValT(Sema &S, return S.Context.getTrivialTypeSourceInfo(StdAlignValDecl); } +// When searching for custom allocators on the PromiseType we want to +// warn that we will ignore type aware allocators.

[clang] Reland [Clang][Cmake] fix libtool duplicate member name warnings (PR #133850)

2025-03-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang Author: Farzon Lotfi (farzonl) Changes fixes https://github.com/llvm/llvm-project/issues/133199 The fix to reland was moving `Targets/DirectX.cpp` from `clang/lib/CodeGen/Targets/CMakeLists.txt` back to `clang/

[clang] [clang] Implement CWG2611 (PR #133747)

2025-03-31 Thread Vlad Serebrennikov via cfe-commits
@@ -35,6 +35,29 @@ namespace std { template T declval(); } // namespace std +namespace cwg2611 { // cwg2611: 21 +#if __cpp_fold_expressions >= 201603 Endilll wrote: ```suggestion #if __cplusplus >= 201703L ``` https://github.com/llvm/llvm-project/pull/1337

[clang] [clang][bytecode] Fix comparing the addresses of union members (PR #133852)

2025-03-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Union members get the same address, so we can't just use `Pointer::getByteOffset()`. --- Full diff: https://github.com/llvm/llvm-project/pull/133852.diff 4 Files Affected: - (modified) clang/lib/AST/ByteC

[clang] [CMAKE][AMDGPU] fix build failure caused by PR #133619 (PR #133776)

2025-03-31 Thread Slava Zakharin via cfe-commits
vzakhari wrote: @farzonl can you please revert the original commit? It seems to break just any LLVM build, so I guess the CI testing of all new PRs should be affected. https://github.com/llvm/llvm-project/pull/133776 ___ cfe-commits mailing list cfe-c

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

2025-03-31 Thread James Y Knight via cfe-commits
@@ -3115,11 +3115,24 @@ void CastOperation::CheckCStyleCast() { Self.CurFPFeatureOverrides()); } } - if (DestType->isNullPtrType() && !SrcType->isNullPtrType()) { -Self.Diag(SrcExpr.get()->getExprLoc(), diag::err_nullptr_cast)

[clang] [llvm] [PowerPC] Enable indiviual crbits tracking at -O2 (PR #133617)

2025-03-31 Thread Henry Jiang via cfe-commits
https://github.com/mustartt edited https://github.com/llvm/llvm-project/pull/133617 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Align `-x` language modes with `gfortran` (PR #130268)

2025-03-31 Thread David Truby via cfe-commits
=?utf-8?q?Iñaki?= Amatria Barral Message-ID: In-Reply-To: @@ -817,8 +817,13 @@ void Flang::ConstructJob(Compilation &C, const JobAction &JA, // 'flang -E' always produces output that is suitable for use as fixed form // Fortran. However it is only valid free form sourc

[clang] [llvm] [PowerPC] Enable indiviual crbits tracking at -O2 (PR #133617)

2025-03-31 Thread Henry Jiang via cfe-commits
https://github.com/mustartt edited https://github.com/llvm/llvm-project/pull/133617 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CMAKE][AMDGPU] fix build failure caused by PR #133619 (PR #133776)

2025-03-31 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa commented: I tried to build it locally and I got a series of 'undefined reference' errors. Sorry, I will need to revert my approval. Thanks https://github.com/llvm/llvm-project/pull/133776 ___ cfe-commits mailing list cfe-

[clang] 5e2860a - Revert "[HLSL][RootSignature] Implement parsing of a DescriptorTable with empty clauses" (#133790)

2025-03-31 Thread via cfe-commits
Author: Finn Plummer Date: 2025-03-31T13:38:09-07:00 New Revision: 5e2860a8d375ded2d2912894e380fefc8cb1f23a URL: https://github.com/llvm/llvm-project/commit/5e2860a8d375ded2d2912894e380fefc8cb1f23a DIFF: https://github.com/llvm/llvm-project/commit/5e2860a8d375ded2d2912894e380fefc8cb1f23a.diff

[clang] [llvm] Revert "[HLSL][RootSignature] Implement parsing of a DescriptorTable with empty clauses" (PR #133790)

2025-03-31 Thread Finn Plummer via cfe-commits
https://github.com/inbelic closed https://github.com/llvm/llvm-project/pull/133790 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream SelectOp and ShiftOp (PR #133405)

2025-03-31 Thread Andy Kaylor via cfe-commits
@@ -12,22 +16,307 @@ void b0(int a, int b) { x = x | b; } -// CHECK: %{{.+}} = cir.binop(mul, %{{.+}}, %{{.+}}) nsw : !s32i -// CHECK: %{{.+}} = cir.binop(div, %{{.+}}, %{{.+}}) : !s32i -// CHECK: %{{.+}} = cir.binop(rem, %{{.+}}, %{{.+}}) : !s32i -// CHECK: %{{.+}} = cir.bi

[clang] [clang] Clear `NeedsCleaning` flag after `ExpandBuiltinMacro` (PR #133574)

2025-03-31 Thread marius doerner via cfe-commits
https://github.com/mariusdr edited https://github.com/llvm/llvm-project/pull/133574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream SelectOp and ShiftOp (PR #133405)

2025-03-31 Thread Andy Kaylor via cfe-commits
@@ -1138,8 +1138,9 @@ mlir::Value ScalarExprEmitter::emitShl(const BinOpInfo &ops) { mlir::isa(ops.lhs.getType())) cgf.cgm.errorNYI("sanitizers"); - cgf.cgm.errorNYI("shift ops"); - return {}; + return builder.create(cgf.getLoc(ops.loc), and

[clang] [flang] [flang] Complete alignment of -x language modes with gfortran (PR #133775)

2025-03-31 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu edited https://github.com/llvm/llvm-project/pull/133775 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream SelectOp and ShiftOp (PR #133405)

2025-03-31 Thread Andy Kaylor via cfe-commits
@@ -759,6 +762,46 @@ LogicalResult cir::BinOp::verify() { return mlir::success(); } +//===--===// +// ShiftOp +//===--===// +LogicalResult

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

2025-03-31 Thread via cfe-commits
https://github.com/Sirraide commented: Seems reasonable to me, but I’d still like @erichkeane to take a look at this as the attributes code owner https://github.com/llvm/llvm-project/pull/133107 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Add warning message for C++17 alias template CTAD (PR #133806)

2025-03-31 Thread via cfe-commits
@@ -8444,9 +8444,16 @@ let CategoryName = "Lambda Issue" in { "C++ standards before C++20">, InGroup, DefaultIgnore; // C++20 class template argument deduction for alias templates. - def warn_cxx17_compat_ctad_for_alias_templates : Warning< - "class template argument d

[clang] [CIR] Generate the nsw flag correctly for unary ops (PR #133815)

2025-03-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes A previous checkin used a workaround to generate the nsw flag where needed for unary ops. This change upstreams a subsequent change that was made in the incubator to generate the flag correctly. --- Ful

[clang] [clang] Check `std::initializer_list` more strictly (PR #133822)

2025-03-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (offsetof) Changes Require `std::initializer_list` to be a class template with a template-head equivalent to `template` and no default arguments. --- Full diff: https://github.com/llvm/llvm-project/pull/133822.diff 3 Files A

[clang] 32f2402 - Reapply "[EquivalenceClasses] Replace findValue with contains (NFC)."

2025-03-31 Thread Florian Hahn via cfe-commits
Author: Florian Hahn Date: 2025-03-31T22:27:59+01:00 New Revision: 32f24029c72dae175c9e2cc81f931f065a2ba347 URL: https://github.com/llvm/llvm-project/commit/32f24029c72dae175c9e2cc81f931f065a2ba347 DIFF: https://github.com/llvm/llvm-project/commit/32f24029c72dae175c9e2cc81f931f065a2ba347.diff

[clang-tools-extra] [clang-tidy] Use DenseMap::insert_range (NFC) (PR #133844)

2025-03-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Kazu Hirata (kazutakahirata) Changes We can safely switch to insert_range here because SyntheticStmtSourceMap starts out empty in the constructor. Also TheCFG->synthetic_stmts() comes from DenseMap, so we know that the keys are

[clang-tools-extra] [clang-tidy] Use DenseMap::insert_range (NFC) (PR #133844)

2025-03-31 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/133844 We can safely switch to insert_range here because SyntheticStmtSourceMap starts out empty in the constructor. Also TheCFG->synthetic_stmts() comes from DenseMap, so we know that the keys are unique. That

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

2025-03-31 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: Please remove redundant 'support' from PR topic 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] [HLSL] Handle incomplete array types (PR #133508)

2025-03-31 Thread Sarah Spall via cfe-commits
@@ -3249,166 +3249,204 @@ void SemaHLSL::processExplicitBindingsOnDecl(VarDecl *VD) { } } } - -static bool CastInitializer(Sema &S, ASTContext &Ctx, Expr *E, -llvm::SmallVectorImpl &List, -llvm::SmallVectorImpl &Des

[clang] [clang] Check `std::initializer_list` more strictly (PR #133822)

2025-03-31 Thread Timm Baeder via cfe-commits
@@ -12071,6 +12071,37 @@ NamespaceDecl *Sema::getOrCreateStdNamespace() { return getStdNamespace(); } +/// Check that the template-head of this class template is acceptable for +/// a declaration of 'std::initializer_list', and optionally diagnose if +/// it is not. +/// \re

[clang] [clang] Check `std::initializer_list` more strictly (PR #133822)

2025-03-31 Thread Timm Baeder via cfe-commits
@@ -12071,6 +12071,37 @@ NamespaceDecl *Sema::getOrCreateStdNamespace() { return getStdNamespace(); } +/// Check that the template-head of this class template is acceptable for +/// a declaration of 'std::initializer_list', and optionally diagnose if +/// it is not. +/// \re

[clang] [libc] [llvm] [AMDGPU] Use COV6 by default (PR #118515)

2025-03-31 Thread Shilei Tian via cfe-commits
shiltian wrote: > @shiltian Could you update MLIR infrastructure for the new default as well? > `mlir/lib/Target/LLVM/ROCDL/Target.cpp` and > `mlir/lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp`, which both keep an ear on the > ABI version, partly for linking in device libraries https://github.com/l

[clang] [Clang] add emit -Wignored-base-class-qualifiers diagnostic for cv-qualified base classes (PR #132116)

2025-03-31 Thread Lyle Dean via cfe-commits
@@ -497,6 +497,7 @@ def GNUImaginaryConstant : DiagGroup<"gnu-imaginary-constant">; def IgnoredGCH : DiagGroup<"ignored-gch">; def IgnoredReferenceQualifiers : DiagGroup<"ignored-reference-qualifiers">; def IgnoredQualifiers : DiagGroup<"ignored-qualifiers", [IgnoredReference

[clang] [Clang] add emit -Wignored-base-class-qualifiers diagnostic for cv-qualified base classes (PR #132116)

2025-03-31 Thread Lyle Dean via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -std=c++11 -Wignored-qualifiers -verify +// RUN: %clang_cc1 %s -std=c++11 -Wignored-base-class-qualifiers -verify lyledean1 wrote: I've updated those tests - so will let the CI run now and confirm everything passes https:

[clang] [clang] Clear `NeedsCleaning` flag after `ExpandBuiltinMacro` (PR #133574)

2025-03-31 Thread marius doerner via cfe-commits
https://github.com/mariusdr updated https://github.com/llvm/llvm-project/pull/133574 >From dd54aa59eabe9c3b7b110f46d82ff5c4d0b88c57 Mon Sep 17 00:00:00 2001 From: marius doerner Date: Sat, 29 Mar 2025 09:21:20 +0100 Subject: [PATCH 1/2] [clang] Clear `NeedsCleaning` flag after `ExpandBuiltinMa

[clang-tools-extra] [clang-doc] Add regression test for test comments in macros (PR #132510)

2025-03-31 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,34 @@ +// Fixes #59819. The underlying problem was fixed in https://reviews.llvm.org/D142560, but this patch adds a proper regression test. +// RUN: rm -rf %t && mkdir -p %t +// RUN: clang-doc --format=md --doxygen --output=%t --executor=standalone %s +// RUN: FileChec

[clang] [HLSL] Handle incomplete array types (PR #133508)

2025-03-31 Thread Sarah Spall via cfe-commits
@@ -3249,166 +3249,204 @@ void SemaHLSL::processExplicitBindingsOnDecl(VarDecl *VD) { } } } - -static bool CastInitializer(Sema &S, ASTContext &Ctx, Expr *E, -llvm::SmallVectorImpl &List, -llvm::SmallVectorImpl &Des

[clang] [HLSL] Handle incomplete array types (PR #133508)

2025-03-31 Thread Sarah Spall via cfe-commits
@@ -3249,166 +3249,204 @@ void SemaHLSL::processExplicitBindingsOnDecl(VarDecl *VD) { } } } - -static bool CastInitializer(Sema &S, ASTContext &Ctx, Expr *E, -llvm::SmallVectorImpl &List, -llvm::SmallVectorImpl &Des

[clang] [HLSL] Handle incomplete array types (PR #133508)

2025-03-31 Thread Sarah Spall via cfe-commits
@@ -3249,33 +3249,42 @@ void SemaHLSL::processExplicitBindingsOnDecl(VarDecl *VD) { } } } +namespace { +class InitListTransformer { + Sema &S; + ASTContext &Ctx; + QualType InitTy; + QualType *DstIt = nullptr; + Expr **ArgIt = nullptr; + bool Wrap;

[clang] [llvm] Revert "[HLSL][RootSignature] Implement parsing of a DescriptorTable with empty clauses" (PR #133790)

2025-03-31 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-sve-vls` running on `linaro-g3-03` while building `clang,llvm` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/143/builds/6581 Here is the relevant piece of th

[clang] [clang-sycl-linker] Replace llvm-link with API calls (PR #133797)

2025-03-31 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: > Shouldn't we be able to just use LTO after the SPIR-V backend left > experimental? Hi @jhuber6 Thanks for the ping back. That is the eventual path for us. However, we would like to do it in stages. Replacing llvm-link tool with linkInModule call helps us to achieve one of

[clang] [C11] Implement WG14 N1285 (temporary lifetimes) (PR #133472)

2025-03-31 Thread James Y Knight via cfe-commits
jyknight wrote: - In C89: it's impossible to get the address of a temporary struct, so the lifetime is irrelevant. - In C99: you now can get the address (from an array subobject), but the lifetime was defined as "until the next sequence point". This made it technically illegal to access even n

[clang] [clang-sycl-linker] Replace llvm-link with API calls (PR #133797)

2025-03-31 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: @jhuber6 Can you please take a look? This is one of the many changes we are making to upstream SYCL. Thanks https://github.com/llvm/llvm-project/pull/133797 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-03-31 Thread Tom Honermann via cfe-commits
tahonermann wrote: @Fznamznon, @frasercrmck, any further review feedback? @erichkeane, would you like to weigh in on this change before it lands? https://github.com/llvm/llvm-project/pull/133030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [C11] Implement WG14 N1285 (temporary lifetimes) (PR #133472)

2025-03-31 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,212 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -std=c99 -Wno-dangling -emit-llvm -o - %s | FileCheck %s --check-prefix=C99 +// RUN: %clang_cc1 -std=c11 -Wno-dangling -emit-llvm -o - %s |

[clang] [llvm] [HLSL][RootSignature] Implement parsing of a DescriptorTable with empty clauses (PR #133302)

2025-03-31 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ppc64le-linux-multistage` running on `ppc64le-clang-multistage-test` while building `clang,llvm` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/76/builds/8327 Here i

[clang] [clang] Clear `NeedsCleaning` flag after `ExpandBuiltinMacro` (PR #133574)

2025-03-31 Thread marius doerner via cfe-commits
@@ -1646,7 +1646,6 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { // Set up the return result. Tok.setIdentifierInfo(nullptr); - Tok.clearFlag(Token::NeedsCleaning); mariusdr wrote: True, my bad. If the flag is removed we can get asserts on __DAT

[clang] [C11] Implement WG14 N1285 (temporary lifetimes) (PR #133472)

2025-03-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/133472 >From f9268b3a331fd8caf2440d742a1f084c0f9648ce Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Fri, 28 Mar 2025 13:01:58 -0400 Subject: [PATCH 1/8] [C11] Implement WG14 N1285 (temporary lifetimes) This

[clang] [libc] [llvm] [AMDGPU] Use COV6 by default (PR #118515)

2025-03-31 Thread Krzysztof Drewniak via cfe-commits
krzysz00 wrote: @shiltian Could you update MLIR infrastructure for the new default as well? `mlir/lib/Target/LLVM/ROCDL/Target.cpp` and `mlir/lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp`, which both keep an ear on the ABI version, partly for linking in device libraries https://github.com/llvm/llvm

[clang] [alpha.webkit.ForwardDeclChecker] Ignore forward declared struct. (PR #133804)

2025-03-31 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/133804 >From f5d2ab90f34cf2d7323e9c3c2e37680c35f411d6 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Mon, 31 Mar 2025 14:38:22 -0700 Subject: [PATCH 1/3] [alpha.webkit.ForwardDeclChecker] Ignore forward declared stru

[clang] [alpha.webkit.NoUnretainedMemberChecker] Ignore system-header-defined ivar / property of a forward declared type (PR #133755)

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

[clang] [Clang][CodeGen][UBSan] Add more precise attributes to recoverable ubsan handlers (PR #130990)

2025-03-31 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw edited https://github.com/llvm/llvm-project/pull/130990 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4