[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

[clang] d63cc4c - [analyzer] Unknown array lvalue element in Store (#133381)

2025-03-31 Thread via cfe-commits
Author: T-Gruber Date: 2025-03-31T08:44:28+02:00 New Revision: d63cc4c87689a79d25521c9aa2ce4a335e5984e3 URL: https://github.com/llvm/llvm-project/commit/d63cc4c87689a79d25521c9aa2ce4a335e5984e3 DIFF: https://github.com/llvm/llvm-project/commit/d63cc4c87689a79d25521c9aa2ce4a335e5984e3.diff LOG:

[clang] [flang] [llvm] [AMDGPU] Use a target feature to enable __builtin_amdgcn_global_load_lds on gfx9/10 (PR #133055)

2025-03-31 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez updated https://github.com/llvm/llvm-project/pull/133055 From bf3f06cc99a1ac2460ffea741c0fe495f0778e70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Martinez=20Caama=C3=B1o?= Date: Thu, 20 Mar 2025 13:23:25 +0100 Subject: [PATCH 1/4] [AMDGPU] Add "lds-bu

[clang] [flang] [llvm] [AMDGPU] Use a target feature to enable __builtin_amdgcn_global_load_lds on gfx9/10 (PR #133055)

2025-03-31 Thread Juan Manuel Martinez Caamaño via cfe-commits
@@ -0,0 +1,45 @@ +; RUN: split-file %s %t +; +; RUN: not --crash llc -mtriple=amdgcn -mcpu=gfx1100 %t/struct.ll 2>&1 | FileCheck --ignore-case %s +; RUN: not --crash llc -global-isel -mtriple=amdgcn -mcpu=gfx1100 %t/struct.ll 2>&1 | FileCheck --ignore-case %s +; RUN: not --crash

[clang] [llvm] Vectorize: Support fminimumnum and fmaximumnum (PR #131781)

2025-03-31 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,407 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 arsenm wrote: You don't have a backend vectorization test. This PR contains no clang changes. You should delete the clang test and replace it

[libclc] [libclc][amdgpu] Implement native_exp via builtin (PR #133696)

2025-03-31 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: Just realised I missed the brief - `native_exp2` should use the builtin, `native_exp` should continue to call `native_exp2`. https://github.com/llvm/llvm-project/pull/133696 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang-tools-extra] [clang-tidy][NFC][doc] improve "options" sections of `misc-`, `cppcore-` and other checks (PR #133694)

2025-03-31 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/133694 >From 3f2086a843ccbc2dca5185199bbb91c366bcae06 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Mon, 31 Mar 2025 13:12:23 +0300 Subject: [PATCH 1/2] [clang-tidy] improve docs for various checks --- .../che

[clang] [clang][modules] Guard against bad -fmodule-file mappings (#132059) (PR #133462)

2025-03-31 Thread Naveen Seth Hanig via cfe-commits
naveen-seth wrote: Hi @ChuanqiXu9, @mpark, @shafik, For context, here is how this PR would change clang's behavior when replicating the original crash in #132059: The original crash, where the module `hello` wasn’t mapped to any BMI file, would now display the following: ```bash clang++ -fmo

[libclc] [libclc][amdgpu] Implement native_exp2 via AMD builtin (PR #133696)

2025-03-31 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck edited https://github.com/llvm/llvm-project/pull/133696 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc][amdgpu] Implement native_exp2 via AMD builtin (PR #133696)

2025-03-31 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: > Just realised I missed the brief - `native_exp2` should use the builtin, > `native_exp` should continue to call `native_exp2`. Done https://github.com/llvm/llvm-project/pull/133696 ___ cfe-commits mailing list cfe-commits@lists.l

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

2025-03-31 Thread Nikita Popov via cfe-commits
nikic wrote: @farzonl Instructions in the sense of the instructions retired during compilation, not the number of instructions in the object file :) I wouldn't expect the changes you made here to have any significant impact on build time. (I guess it might serialize the build more, maybe?) ht

[clang] [analyzer] Unknown array lvalue element in Store (PR #133381)

2025-03-31 Thread Balazs Benics via cfe-commits
@@ -511,13 +511,9 @@ SVal StoreManager::getLValueElement(QualType elementType, NonLoc Offset, // Only allow non-integer offsets if the base region has no offset itself. // FIXME: This is a somewhat arbitrary restriction. We should be using // SValBuilder here to add the

[clang] [clang][Sema] Fix typo in 'offsetof' diagnostics (PR #133448)

2025-03-31 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/133448 >From 732a9b611bb4b6c49a0b4bf1d616870ffa051d8f Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Fri, 28 Mar 2025 13:29:27 + Subject: [PATCH 1/2] [clang][Sema] Fix typo in 'offsetof' diagnostics Before:

[libclc] [libclc][amdgpu] Implement native_exp via builtin (PR #133696)

2025-03-31 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/133696 This came up during a discussion on #129679, which has been split out as a preparatory commit. An example of the AMDGPU codegen is: define <2 x float> @_Z10native_expDv2_f(<2 x float> %x) { %0 =

[clang] [llvm] [SROA] Vector promote some memsets (PR #133301)

2025-03-31 Thread via cfe-commits
@@ -1011,6 +1011,31 @@ static Value *foldPHINodeOrSelectInst(Instruction &I) { return foldSelectInst(cast(I)); } +/// Returns a fixed vector type equivalent to the memory set by II or nullptr if +/// unable to do so. +static FixedVectorType *getVectorTypeFor(const MemSetIns

[clang] [clang][CodeGen] Make pragma-loop test more rboust (NFC) (PR #133707)

2025-03-31 Thread Ryotaro Kasuga via cfe-commits
https://github.com/kasuga-fj created https://github.com/llvm/llvm-project/pull/133707 pragma-loop.cpp contains tests for loop metadata generated via pragma directives. These tests were not working as (perhaps) expected. This is because the regex `.*` consumes multiple elements in metadata. For

[clang] [clang][CodeGen] Make pragma-loop test more rboust (NFC) (PR #133707)

2025-03-31 Thread Ryotaro Kasuga via cfe-commits
https://github.com/kasuga-fj edited https://github.com/llvm/llvm-project/pull/133707 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[Clang] Improve diagnostics for expansion length mismatch" (PR #121044)

2025-03-31 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/121044 >From 77537d523bc164a86b46e83651500a4b37c0c3bf Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Tue, 24 Dec 2024 13:06:44 +0800 Subject: [PATCH 1/6] Reapply "[Clang] Improve diagnostics for expansion length mi

[libclc] [libclc][amdgpu] Implement native_exp via AMD builtin (PR #133696)

2025-03-31 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck edited https://github.com/llvm/llvm-project/pull/133696 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-03-31 Thread Aaron Ballman 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 AaronBallman wrote: Might as well improve test coverage a bit. ``` // RUN: %clang_cc1 %s -std=c++11 -Wignored-

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

2025-03-31 Thread Aaron Ballman 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] [flang] [llvm] [AMDGPU] Use a target feature to enable __builtin_amdgcn_global_load_lds on gfx9/10 (PR #133055)

2025-03-31 Thread Juan Manuel Martinez Caamaño via cfe-commits
@@ -260,7 +260,7 @@ AMDGPUTargetInfo::AMDGPUTargetInfo(const llvm::Triple &Triple, MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64; CUMode = !(GPUFeatures & llvm::AMDGPU::FEATURE_WGP); - for (auto F : {"image-insts", "gws"}) + for (auto F : {"image-insts", "gws", "mem

[libclc] [libclc][amdgpu] Implement native_exp2 via AMD builtin (PR #133696)

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

[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/6] [C11] Implement WG14 N1285 (temporary lifetimes) This

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

2025-03-31 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > However, we do have some prior art -- we're not inventing the whole idea of > decl-merging from scratch right now. So maybe we can follow that prior art? > For example, top-level attributes on a struct's definition can be inherited > from a declaration in the same scope.

[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-03-31 Thread Kito Cheng via cfe-commits
@@ -1196,36 +1196,93 @@ SmallVector parsePrototypes(StringRef Prototypes) { return PrototypeDescriptors; } +#define STRINGIFY(NAME) \ + case NAME: \ +

[clang] Reapply "[Clang] Improve diagnostics for expansion length mismatch" (PR #121044)

2025-03-31 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions h,cpp -- clang/include/clang/Sema/Sema.h clang/include/clang

[clang] [llvm] [mlir] [MLIR][OpenMP] Add codegen for teams reductions (PR #133310)

2025-03-31 Thread Sergio Afonso via cfe-commits
@@ -3688,27 +3708,95 @@ static Function *getFreshReductionFunc(Module &M) { ".omp.reduction.func", &M); } -OpenMPIRBuilder::InsertPointOrErrorTy -OpenMPIRBuilder::createReductions(const LocationDescription &Loc, - Inse

[clang] [llvm] [mlir] [MLIR][OpenMP] Add codegen for teams reductions (PR #133310)

2025-03-31 Thread Sergio Afonso via cfe-commits
@@ -4434,10 +4497,24 @@ getKmpcForStaticLoopForType(Type *Ty, OpenMPIRBuilder *OMPBuilder, static void createTargetLoopWorkshareCall( OpenMPIRBuilder *OMPBuilder, WorksharingLoopType LoopType, BasicBlock *InsertBlock, Value *Ident, Value *LoopBodyArg, -Type *Parall

<    1   2   3   4   >