[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-29 Thread Alexey Bader via cfe-commits
@@ -0,0 +1,42 @@ +// Tests the clang-sycl-linker tool. +// +// Test a simple case without arguments. +// RUN: %clangxx -fsycl -emit-llvm -c %s -o %t.bc +// RUN: clang-sycl-linker --dry-run -triple spirv64 %t.bc -o a.spv 2>&1 \ +// RUN: | FileCheck %s --check-prefix=SIMPLE +// SI

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [libunwind][libcxx][libcxxabi][compiler-rt-builtins] Fix Exception Handling build for wasm (PR #79667)

2024-10-29 Thread via cfe-commits
https://github.com/trcrsired updated https://github.com/llvm/llvm-project/pull/79667 >From 2b526821d4e70f3ea83f95d25f804d9fbcf82612 Mon Sep 17 00:00:00 2001 From: cqwrteur <100043421+trcrsi...@users.noreply.github.com> Date: Sat, 1 Jun 2024 02:55:50 -0400 Subject: [PATCH] [libunwind][libcxx][lib

[clang] Remove device override for operator new when the C++ standard >= 26 (PR #114056)

2024-10-29 Thread Ognyan Mirev via cfe-commits
@@ -91,12 +91,14 @@ __device__ inline void operator delete[](void *ptr, #endif // Device overrides for placement new and delete. +#if _LIBCPP_STD_VER < 26 OgnianM wrote: Looks like it https://github.com/gcc-mirror/gcc/blob/9dd9a88b75334bc079b8ab5fb2dbb5d56765

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-10-29 Thread via cfe-commits
https://github.com/antangelo edited https://github.com/llvm/llvm-project/pull/98788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Remove device override for operator new when the C++ standard >= 26 (PR #114056)

2024-10-29 Thread Ognyan Mirev via cfe-commits
https://github.com/OgnianM edited https://github.com/llvm/llvm-project/pull/114056 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix the unexpected control flow in ParseTentative.cpp (PR #109298)

2024-10-29 Thread Shafik Yaghmour via cfe-commits
shafik wrote: So this is the commit that introduced this 06e41ae5c77c6 and it looks like code like this: ```objc id x(id(0)); ``` we are trying to differentiate a protocol Vs the next parameter? https://github.com/llvm/llvm-project/pull/109298 ___ c

[clang] [llvm] [X86][AMX] Support AMX-FP8 (PR #113850)

2024-10-29 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,83 @@ +/*===- amxfp8intrin.h - AMX intrinsics -*- C++ -*=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apa

[clang] [clang] Check null TypeSourceInfo in CreateUnaryExprOrTypeTraitExpr (PR #112111)

2024-10-29 Thread Shafik Yaghmour via cfe-commits
@@ -0,0 +1,26 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +a() {struct b c (sizeof(b * [({ {tree->d* next)} 0 + +// expected-error@3 {{a type specifier is required for all declarations}} +// expected-error@3 {{use of undeclared identifier 'tree'; did you mean 'true'?}} +//

[clang] [clang] fix the unexpected control flow in ParseTentative.cpp (PR #109298)

2024-10-29 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: So I think on my last comment, using `break` as opposed to `continue` makes sense. Agree @cor3ntin https://github.com/llvm/llvm-project/pull/109298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2024-10-29 Thread Matt Arsenault via cfe-commits
@@ -5390,11 +5391,19 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, V->getType()->isIntegerTy()) V = Builder.CreateZExt(V, ArgInfo.getCoerceToType()); -// If the argument doesn't match, perform a bitcast to coerce it. This -

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2024-10-29 Thread Matt Arsenault via cfe-commits
@@ -23,8 +25,10 @@ X Test() // sret argument. // CHECK-CXX98: call void @_ZN1XC1ERKS_( // CHECK-CXX11: call void @_ZN1XC1EOS_( + // CHECK-CXX11-NONZEROALLOCAAS: call void @_ZN1XC1EOS_( arsenm wrote: Can you add more context checks here? https://github.

[clang] [llvm] [X86][AMX] Support AMX-FP8 (PR #113850)

2024-10-29 Thread Feng Zou via cfe-commits
https://github.com/fzou1 updated https://github.com/llvm/llvm-project/pull/113850 >From fd570cb8d41f5f94b61d515985245fc81aab633e Mon Sep 17 00:00:00 2001 From: Feng Zou Date: Thu, 24 Oct 2024 21:56:48 +0800 Subject: [PATCH 1/5] Support AMX-FP8 Ref.: https://cdrdv2.intel.com/v1/dl/getContent/67

[clang-tools-extra] [clangd] [Modules] Use ASTReader directly in IsModuleFileUpToDate (PR #113879)

2024-10-29 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/113879 >From 99e1989c3b2fad7702795a707d130fe96a93f42f Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Mon, 28 Oct 2024 15:54:37 +0800 Subject: [PATCH 1/4] [clangd] [Modules] Use ASTReader directly in IsModuleFileUp

[clang] [Clang][AST] Store injected template arguments in TemplateParameterList (PR #113579)

2024-10-29 Thread Krystian Stasiowski via cfe-commits
@@ -51,14 +51,15 @@ DefaultTemplateArgumentContainsUnexpandedPack(const TemplateParam &P) { P.getDefaultArgument().getArgument().containsUnexpandedParameterPack(); } -TemplateParameterList::TemplateParameterList(const ASTContext& C, +TemplateParameterList::TemplateP

[clang] [Clang][AST] Store injected template arguments in TemplateParameterList (PR #113579)

2024-10-29 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/113579 >From 95c86a7036e62240ab7704f0b1e47cdc9ac437c6 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 15 Oct 2024 11:15:55 -0400 Subject: [PATCH 1/3] [Clang][AST] Store injected template arguments in

[clang] [llvm] [X86][AMX] Support AMX-FP8 (PR #113850)

2024-10-29 Thread Phoebe Wang via cfe-commits
@@ -267,3 +267,42 @@ let Predicates = [HasAMXCOMPLEX, In64BitMode] in { } } // SchedRW = [WriteSystem] } + +// AMX-FP8 +let Predicates = [HasAMXFP8, In64BitMode] in { + let SchedRW = [WriteSystem] in { +let Constraints = "$src1 = $dst" in { + class AMX_FP8_BASE

[clang] [libcxx] [clang] Warn about memset/memcpy to NonTriviallyCopyable types (PR #111434)

2024-10-29 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Is it expected that this warns for C code? I only see `cxx` in this change > but I see a new instance of this warning in my Linux kernel builds: > > ``` > drivers/net/ethernet/netronome/nfp/nfdk/rings.c:60:18: warning: first > argument in call to '__builtin_memset' is a p

[clang] Nominate Shafik Yaghmour and Vlad Serebrennikov for C++ conformance (PR #114071)

2024-10-29 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/114071 Shafik and Vlad are both members of WG21 and both have familiarity with reasoning about the C++ standard. They've both volunteered to help answer conformance related questions, and this is an area where we

[clang] 1e991b1 - Nominate Corentin Jabot for lambdas (#114043)

2024-10-29 Thread via cfe-commits
Author: Aaron Ballman Date: 2024-10-29T11:06:18-04:00 New Revision: 1e991b1021c1d7694e1a0dfe9e261fb27555f05f URL: https://github.com/llvm/llvm-project/commit/1e991b1021c1d7694e1a0dfe9e261fb27555f05f DIFF: https://github.com/llvm/llvm-project/commit/1e991b1021c1d7694e1a0dfe9e261fb27555f05f.diff

[clang] [Tooling/Inclusion] Add binary search related `std::ranges` symbols to the mapping. (PR #113796)

2024-10-29 Thread via cfe-commits
c8ef wrote: > can you move these changes into > `clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc`? that's the > hand-curated version, we try to autogenerate the other one by parsing > cppreference. Done. Please take another look. https://github.com/llvm/llvm-project/pull/113796 _

[clang] [clang-tools-extra] [clangd] Support parsing comments without ASTContext (PR #78491)

2024-10-29 Thread Erich Keane via cfe-commits
https://github.com/erichkeane closed https://github.com/llvm/llvm-project/pull/78491 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AST] Store injected template arguments in TemplateParameterList (PR #113579)

2024-10-29 Thread Erich Keane via cfe-commits
@@ -51,14 +51,15 @@ DefaultTemplateArgumentContainsUnexpandedPack(const TemplateParam &P) { P.getDefaultArgument().getArgument().containsUnexpandedParameterPack(); } -TemplateParameterList::TemplateParameterList(const ASTContext& C, +TemplateParameterList::TemplateP

[clang] [llvm] Enable seq_cst Clause for flush Directive in OpenMP (PR #114072)

2024-10-29 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] bf6c483 - [clang][x86] Add constexpr support for SSE2 _mm_set*_epi* intrinsics

2024-10-29 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2024-10-29T15:39:15Z New Revision: bf6c483e4714841b1511ea3666f05a468bd988fe URL: https://github.com/llvm/llvm-project/commit/bf6c483e4714841b1511ea3666f05a468bd988fe DIFF: https://github.com/llvm/llvm-project/commit/bf6c483e4714841b1511ea3666f05a468bd988fe.diff LOG:

[clang] Nominate Corentin Jabot for lambdas (PR #114043)

2024-10-29 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/114043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix 71315698c9 in presence of incomplete types (PR #114095)

2024-10-29 Thread via cfe-commits
@@ -8900,7 +8900,8 @@ void Sema::CheckMemaccessArguments(const CallExpr *Call, << Call->getCallee()->getSourceRange()); else if (const auto *RT = PointeeTy->getAs()) { - bool IsTriviallyCopyableCXXRecord = + bool MayBeTriviallyCopyableCXXRecord = +

[clang] [llvm] [RFC][RISCV] Use the 'B' extension in RISC-V profile definitions (PR #113942)

2024-10-29 Thread Craig Topper via cfe-commits
topperc wrote: The change should be reflected in clang/test/Driver/riscv-profiles.c too. https://github.com/llvm/llvm-project/pull/113942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [clang] constexpr built-in fma function. (PR #113020)

2024-10-29 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I suspect fma is not one of the functions we want to try to share, at least not short-term. It's one of the core IEEE operations, LLVM has APFloat::fusedMultiplyAdd since forever, and there's probably some weirdness with dependencies if we try to share it because other op

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `dot4add_i8packed` intrinsic (PR #113623)

2024-10-29 Thread Steven Perron via cfe-commits
@@ -1,48 +1,59 @@ -; RUN: llc -O0 -mtriple=spirv32v1.3-vulkan-unknown %s -o - | FileCheck %s +; RUN: llc -O0 -mtriple=spirv32v1.6-vulkan-unknown %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-DOT +; RUN: llc -O0 -mtriple=spirv32-vulkan-unknown -spirv-ext=+SPV_KHR_integer_do

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [libunwind][libcxx][libcxxabi][compiler-rt-builtins] Fix Exception Handling build for wasm (PR #79667)

2024-10-29 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson requested changes to this pull request. There are tons of unrelated changes that make this really hard to review. Please do the formatting part of the changes separately and address the outstanding comments. https://github.com/llvm/llvm-project/pull/79667 ___

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `dot4add_i8packed` intrinsic (PR #113623)

2024-10-29 Thread Steven Perron via cfe-commits
@@ -1694,6 +1701,110 @@ bool SPIRVInstructionSelector::selectIntegerDot(Register ResVReg, return Result; } +template +bool SPIRVInstructionSelector::selectDot4AddPacked(Register ResVReg, + const SPIRVType *ResType, +

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-10-29 Thread Dana Jansens via cfe-commits
https://github.com/danakj updated https://github.com/llvm/llvm-project/pull/91991 >From 9c0a0ca3f0bcf4910592dca2b7b9d7d9b83f6cee Mon Sep 17 00:00:00 2001 From: danakj Date: Mon, 13 May 2024 12:11:41 -0400 Subject: [PATCH 1/4] Generate -Wunsafe-buffer-usage warnings in ctor and field initialize

[clang] [clang][deps] Stop sorting file dependencies (PR #114079)

2024-10-29 Thread Ben Langmuir via cfe-commits
@@ -34,8 +34,8 @@ module mod { header "mod.h" } // CHECK:], // CHECK-NEXT: "context-hash": "[[HASH_MOD:.*]]", // CHECK-NEXT: "file-deps": [ -// CHECK-NEXT: "[[PREFIX]]/mod.h" -// CHECK-NEXT: "[[PREFIX]]/module.modulemap" +// CHECK-DAG:

[clang] [clang] Add sincos builtin using `llvm.sincos` intrinsic (PR #114086)

2024-10-29 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue updated https://github.com/llvm/llvm-project/pull/114086 >From eae78e24f06ada3ebcc767319f5ad147bae27715 Mon Sep 17 00:00:00 2001 From: Benjamin Maxwell Date: Mon, 9 Sep 2024 10:15:20 + Subject: [PATCH] [clang] Add sincos builtin using `llvm.sincos` intrinsic This

[clang] Nominate Shafik Yaghmour and Vlad Serebrennikov for C++ conformance (PR #114071)

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

[clang] [clang][deps] Stop sorting file dependencies (PR #114079)

2024-10-29 Thread Ben Langmuir via cfe-commits
@@ -472,7 +465,8 @@ class FullDeps { JOS.attributeArray("command-line", toJSONStrings(JOS, MD.getBuildArguments())); JOS.attribute("context-hash", StringRef(MD.ID.ContextHash)); -JOS.attributeArray("file-deps",

[clang] [Tooling/Inclusion] Add binary search related `std::ranges` symbols to the mapping. (PR #113796)

2024-10-29 Thread via cfe-commits
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/113796 >From aa9e5c50287aa3d60fe1145ccda6b1e5f90c53a8 Mon Sep 17 00:00:00 2001 From: c8ef Date: Sun, 27 Oct 2024 14:15:23 +0800 Subject: [PATCH 1/2] add Binary search operations (on sorted ranges) --- clang/lib/Tooling/I

[clang] [Clang] Add __ugly__ spelling for the msvc attribute scope (PR #113765)

2024-10-29 Thread Stephan T. Lavavej via cfe-commits
StephanTLavavej wrote: The MSVC FE team hasn't expressed enthusiasm for adding ugly spellings. If I learn more I'll rely that info. https://github.com/llvm/llvm-project/pull/113765 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [clang][deps] Stop relying on name of inferred module maps (PR #114085)

2024-10-29 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir commented: Can this be tested? https://github.com/llvm/llvm-project/pull/114085 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [FMV][AArch64] Remove features which can be expressed as a combination of others. (PR #113580)

2024-10-29 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/113580 >From ff05dea7d4509d3a1ead7e2bcef685db62afe07a Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Thu, 24 Oct 2024 15:58:53 +0100 Subject: [PATCH 1/3] [FMV][AArch64] Remove features which can be express

[clang] [libcxx] [clang] Warn about memset/memcpy to NonTriviallyCopyable types (PR #111434)

2024-10-29 Thread via cfe-commits
serge-sans-paille wrote: Thanks! I can reproduce. The easy fix is to deactivate the warning for c source but I'd like to udnerstand why it considers that structure as non trivially copyable first :-) https://github.com/llvm/llvm-project/pull/111434

[clang] [Clang] Add __ugly__ spelling for the msvc attribute scope (PR #113765)

2024-10-29 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > The MSVC FE team hasn't expressed enthusiasm for adding ugly spellings. If I > learn more I'll relay that info. Thank you for checking! Unfortunately, I think that's a reason for Clang to not support it for the `msvc` vendor prefix either. https://github.com/llvm/llvm-pr

[clang] f964514 - Nominate Shafik Yaghmour and Vlad Serebrennikov for C++ conformance (#114071)

2024-10-29 Thread via cfe-commits
Author: Aaron Ballman Date: 2024-10-29T13:16:20-04:00 New Revision: f964514490ecf6d57dc9f53ebda913a6fe1e3abd URL: https://github.com/llvm/llvm-project/commit/f964514490ecf6d57dc9f53ebda913a6fe1e3abd DIFF: https://github.com/llvm/llvm-project/commit/f964514490ecf6d57dc9f53ebda913a6fe1e3abd.diff

[clang] Nominate Shafik Yaghmour and Vlad Serebrennikov for C++ conformance (PR #114071)

2024-10-29 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/114071 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2024-10-29 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/114062 >From d2d2d3d5db3f639aab178f9ca9a20db2842d2b65 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Tue, 29 Oct 2024 14:20:44 + Subject: [PATCH 1/2] `sret` args should always point to the `alloca` AS, so we can

[clang] [llvm] Revert "[clang][AArch64] Add getHostCPUFeatures to query for enabled … (PR #114066)

2024-10-29 Thread Elvina Yakubova via cfe-commits
https://github.com/ElvinaYakubova closed https://github.com/llvm/llvm-project/pull/114066 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `dot4add_i8packed` intrinsic (PR #113623)

2024-10-29 Thread Steven Perron via cfe-commits
@@ -1694,6 +1698,84 @@ bool SPIRVInstructionSelector::selectIntegerDot(Register ResVReg, return Result; } +// Since pre-1.6 SPIRV has no DotProductInput4x8BitPacked implementation, +// extract the elements of the packed inputs, multiply them and add the result +// to the ac

[clang] [compiler-rt] [llvm] [FMV][AArch64] Remove features which can be expressed as a combination of others. (PR #113580)

2024-10-29 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/113580 >From ff05dea7d4509d3a1ead7e2bcef685db62afe07a Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Thu, 24 Oct 2024 15:58:53 +0100 Subject: [PATCH 1/3] [FMV][AArch64] Remove features which can be express

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `dot4add_i8packed` intrinsic (PR #113623)

2024-10-29 Thread Steven Perron via cfe-commits
@@ -1694,6 +1698,84 @@ bool SPIRVInstructionSelector::selectIntegerDot(Register ResVReg, return Result; } +// Since pre-1.6 SPIRV has no DotProductInput4x8BitPacked implementation, +// extract the elements of the packed inputs, multiply them and add the result +// to the ac

[clang] [clang][deps] Stop sorting file dependencies (PR #114079)

2024-10-29 Thread Jan Svoboda via cfe-commits
@@ -34,8 +34,8 @@ module mod { header "mod.h" } // CHECK:], // CHECK-NEXT: "context-hash": "[[HASH_MOD:.*]]", // CHECK-NEXT: "file-deps": [ -// CHECK-NEXT: "[[PREFIX]]/mod.h" -// CHECK-NEXT: "[[PREFIX]]/module.modulemap" +// CHECK-DAG:

[clang] [clang] Add sincos builtin using `llvm.sincos` intrinsic (PR #114086)

2024-10-29 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue created https://github.com/llvm/llvm-project/pull/114086 This registers `sincos[f|l]` as a clang builtin and updates GCBuiltin to emit the `llvm.sincos.*` intrinsic when `-fno-math-errno` is set. >From 3433ebee477c17f634fbc1b32ee7c297ff4c1942 Mon Sep 17 00:00:00 2001

[clang] [clang][deps] Stop relying on name of inferred module maps (PR #114085)

2024-10-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jan Svoboda (jansvoboda11) Changes What the special case for `"__inferred_module.map"` was getting at is that in general we cannot report overridden files as dependencies: neither the build system nor Clang itself won't know what to do wi

[clang] [clang] Add sincos builtin using `llvm.sincos` intrinsic (PR #114086)

2024-10-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Benjamin Maxwell (MacDue) Changes This registers `sincos[f|l]` as a clang builtin and updates GCBuiltin to emit the `llvm.sincos.*` intrinsic when `-fno-math-errno` is set. --- Full diff: https://github.com/llvm/llvm-project/pull/114086.d

[clang] [clang] Add sincos builtin using `llvm.sincos` intrinsic (PR #114086)

2024-10-29 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 340cd4e631d72d02cd79f9aad74d2a354abc977e 3433ebee477c17f634fbc1b32ee7c297ff4c1942 --e

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-10-29 Thread Dana Jansens via cfe-commits
@@ -3328,3 +3300,63 @@ void clang::checkUnsafeBufferUsage(const Decl *D, } } } + +void clang::checkUnsafeBufferUsage(const Decl *D, + UnsafeBufferUsageHandler &Handler, + bool EmitSuggestions) { +#ifndef

[clang] [clang] Fix 71315698c9 in presence of incomplete types (PR #114095)

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

[clang] [clang] Fix 71315698c9 in presence of incomplete types (PR #114095)

2024-10-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (serge-sans-paille) Changes Incomplete types are not considered trivially copyable by clang but we don't want to warn about invalid argument for memcpy / memset in that case because we cannot prove they are not Trivially Copyable. -

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-10-29 Thread Dana Jansens via cfe-commits
https://github.com/danakj updated https://github.com/llvm/llvm-project/pull/91991 >From 9c0a0ca3f0bcf4910592dca2b7b9d7d9b83f6cee Mon Sep 17 00:00:00 2001 From: danakj Date: Mon, 13 May 2024 12:11:41 -0400 Subject: [PATCH 1/5] Generate -Wunsafe-buffer-usage warnings in ctor and field initialize

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-10-29 Thread Dana Jansens via cfe-commits
danakj wrote: The suggested fixes were applied, thanks for them. It was a bit of work to page all this back in after a while. https://github.com/llvm/llvm-project/pull/91991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [Clang][AST] Store injected template arguments in TemplateParameterList (PR #113579)

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

[clang] [Tooling/Inclusion] Add binary search related `std::ranges` symbols to the mapping. (PR #113796)

2024-10-29 Thread via cfe-commits
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/113796 >From aa9e5c50287aa3d60fe1145ccda6b1e5f90c53a8 Mon Sep 17 00:00:00 2001 From: c8ef Date: Sun, 27 Oct 2024 14:15:23 +0800 Subject: [PATCH 1/4] add Binary search operations (on sorted ranges) --- clang/lib/Tooling/I

[clang] [Clang] Disable use of the counted_by attribute for whole struct pointers (PR #112636)

2024-10-29 Thread Tavian Barnes via cfe-commits
tavianator wrote: > The expression can be simplified to ... As the padding at the end of the > structure is always smaller than the alignof. So `round_up(alignof(struct S), > offsetof(struct S, fam)) = sizeof(struct S)` I think that's right for sane ABIs. I assume Clang always lays structs ou

[clang] [llvm] [X86][AMX] Support AMX-FP8 (PR #113850)

2024-10-29 Thread Phoebe Wang via cfe-commits
@@ -267,3 +267,42 @@ let Predicates = [HasAMXCOMPLEX, In64BitMode] in { } } // SchedRW = [WriteSystem] } + +// AMX-FP8 +let Predicates = [HasAMXFP8, In64BitMode] in { + let SchedRW = [WriteSystem] in { +let Constraints = "$src1 = $dst" in { + class AMX_FP8_BASE

[clang] [libcxx] [clang] Warn about memset/memcpy to NonTriviallyCopyable types (PR #111434)

2024-10-29 Thread Nathan Chancellor via cfe-commits
nathanchance wrote: Is it expected that this warns for C code? I only see `cxx` in this change but I see a new instance of this warning in my Linux kernel builds: ``` drivers/net/ethernet/netronome/nfp/nfdk/rings.c:60:18: warning: first argument in call to '__builtin_memset' is a pointer to no

[clang] [clang][modules] Avoid allocations when reading blob paths (PR #113984)

2024-10-29 Thread Ben Langmuir via cfe-commits
@@ -1341,9 +1341,22 @@ class ASTReader serialization::InputFile getInputFile(ModuleFile &F, unsigned ID, bool Complain = true); + /// Buffer we use as temporary storage backing resolved paths. + SmallString<256> PathBuf;

[clang] Reapply "[Clang][Sema] Refactor collection of multi-level template argument lists (#106585, #111173)" (PR #111852)

2024-10-29 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @usx95 Minimal reproducer: ```cpp // input.cppm export module input; export template constexpr int f(); template class B { template friend constexpr int f(); }; template struct B<0>; template constexpr int f() { return N; } ``` ```cpp // input.cpp import input; st

[clang] [libcxx] [clang] Warn about memset/memcpy to NonTriviallyCopyable types (PR #111434)

2024-10-29 Thread Nathan Chancellor via cfe-commits
nathanchance wrote: > @nathanchance could you share your preprocessed source so that I can get a > reproducer? Thanks! Sure thing! ``` $ clang --target=x86_64-linux-gnu -fcf-protection -fsyntax-only -Wno-{address-of-packed-member,constant-logical-operand,gnu,unused-value} -Wnontrivial-memacc

[clang] [clang] Add sincos builtin using `llvm.sincos` intrinsic (PR #114086)

2024-10-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-backend-x86 Author: Benjamin Maxwell (MacDue) Changes This registers `sincos[f|l]` as a clang builtin and updates GCBuiltin to emit the `llvm.sincos.*` intrinsic when `-fno-math-errno` is set. --- Full diff: https://g

[clang] [clang][deps] Stop relying on name of inferred module maps (PR #114085)

2024-10-29 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/114085 What the special case for `"__inferred_module.map"` was getting at is that in general we cannot report overridden files as dependencies: neither the build system nor Clang itself won't know what to do with

[clang] [clang] Don't consider the lifetimeboundCall when analyzing the gsl pointer construction. (PR #114044)

2024-10-29 Thread Haojian Wu via cfe-commits
@@ -1094,6 +1094,24 @@ static bool pathOnlyHandlesGslPointer(IndirectLocalPath &Path) { return false; } +static bool +isLifetimeboundInterleaveInGSL(llvm::ArrayRef PathRef) { hokein wrote: > I am just wondering if this is the right approach to filter thi

[clang] [clang] Don't consider the lifetimeboundCall when analyzing the gsl pointer construction. (PR #114044)

2024-10-29 Thread Haojian Wu via cfe-commits
@@ -780,3 +780,30 @@ void test13() { } } // namespace GH100526 + +namespace test { + +struct [[gsl::Pointer]] FooOwner {}; +struct [[gsl::Pointer]] FooPointer { + FooPointer(const FooOwner&); +}; + +template +struct [[gsl::Owner]] Container { + const T& get() const [[clang::

[clang] [clang] Fix 71315698c9 in presence of incomplete types (PR #114095)

2024-10-29 Thread Aaron Ballman via cfe-commits
@@ -8900,7 +8900,8 @@ void Sema::CheckMemaccessArguments(const CallExpr *Call, << Call->getCallee()->getSourceRange()); else if (const auto *RT = PointeeTy->getAs()) { - bool IsTriviallyCopyableCXXRecord = + bool MayBeTriviallyCopyableCXXRecord = +

[clang] [llvm] Reland "[LLVM] Add IRNormalizer Pass" (PR #113780)

2024-10-29 Thread Justin Fargnoli via cfe-commits
justinfargnoli wrote: @vvereschaka I'm unable to reproduce the build failure locally or via the `buildkite` jobs. Are the jobs that you're running on the BuildBot clean builds? https://github.com/llvm/llvm-project/pull/113780 ___ cfe-commits mailin

[clang] [clang] Fix 71315698c9 in presence of incomplete types (PR #114095)

2024-10-29 Thread via cfe-commits
@@ -8900,7 +8900,8 @@ void Sema::CheckMemaccessArguments(const CallExpr *Call, << Call->getCallee()->getSourceRange()); else if (const auto *RT = PointeeTy->getAs()) { - bool IsTriviallyCopyableCXXRecord = + bool MayBeTriviallyCopyableCXXRecord = +

[clang] [clang] Fix 71315698c9 in presence of incomplete types (PR #114095)

2024-10-29 Thread via cfe-commits
https://github.com/serge-sans-paille updated https://github.com/llvm/llvm-project/pull/114095 >From 10c84d008beef4477b39feb7541efb831598cd75 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Tue, 29 Oct 2024 18:31:13 +0100 Subject: [PATCH] [clang] Fix 71315698c9 in presence of incomplete t

[clang] [alpha.webkit.UncountedLocalVarsChecker] Warn the use of a raw pointer/reference when the guardian variable gets mutated. (PR #113859)

2024-10-29 Thread Rashmi Mudduluru via cfe-commits
@@ -83,6 +83,77 @@ void foo7(RefCountable* obj) { bar.obj->method(); } +void foo8(RefCountable* obj) { + RefPtr foo; + { +RefCountable *bar = foo.get(); +// expected-warning@-1{{Local variable 'bar' is uncounted and unsafe [alpha.webkit.UncountedLocalVarsChecker]}

[clang] [clang] constexpr built-in fma function. (PR #113020)

2024-10-29 Thread Michael Jones via cfe-commits
michaelrj-google wrote: I've created an issue for planning out the LLVM-libc + clang code sharing (https://github.com/llvm/llvm-project/issues/114109). That being said I think FMA might be fine to implement within clang, due to its simplicity. Additionally, LLVM-libc may call `__builtin_fma`:

[clang] Remove device override for operator new when the C++ standard >= 26 (PR #114056)

2024-10-29 Thread Artem Belevich via cfe-commits
@@ -91,12 +91,14 @@ __device__ inline void operator delete[](void *ptr, #endif // Device overrides for placement new and delete. +#if _LIBCPP_STD_VER < 26 Artem-B wrote: This helps with libc++. Do we run into this issue with libstdc++, too? If so, we may ch

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `dot4add_i8packed` intrinsic (PR #113623)

2024-10-29 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/113623 >From 81dfa26a941f7a0926a3126fe3ebbb4d2a67cec1 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Wed, 23 Oct 2024 22:59:15 + Subject: [PATCH 1/4] [HLSL][SPIRV][DXIL] Implement `dot4add_i8packed` intrinsic

[clang] f257e9b - [clang][x86] Update AVX/AVX512 setzero constexpr tests to use the TEST_CONSTEXPR macro

2024-10-29 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2024-10-29T14:34:19Z New Revision: f257e9bdbbb790e4fe0a5e2538c92d7edd85a2e5 URL: https://github.com/llvm/llvm-project/commit/f257e9bdbbb790e4fe0a5e2538c92d7edd85a2e5 DIFF: https://github.com/llvm/llvm-project/commit/f257e9bdbbb790e4fe0a5e2538c92d7edd85a2e5.diff LOG:

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-10-29 Thread Sam Elliott via cfe-commits
https://github.com/lenary edited https://github.com/llvm/llvm-project/pull/112983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Tooling/Inclusion] Update std symbols mapping (PR #113612)

2024-10-29 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. thanks a ton for the comprehensive change, i think this looks amazing! can you just move the parser changes into a separate PR and revert changes in the assertion and rather delete the duplicates from stdspecialsymbolmap? http

[clang] [Tooling/Inclusion] Update std symbols mapping (PR #113612)

2024-10-29 Thread kadir çetinkaya via cfe-commits
@@ -232,6 +232,47 @@ SYMBOL(ssize, std::, ) SYMBOL(ssize, std::, ) SYMBOL(ssize, std::, ) SYMBOL(ssize, std::, ) +// C++ [range.access.general]: ... the customization point objects +// in [range.access] are available when the header is included. +SYMBOL(begin, std::ranges::, )

[clang] [Tooling/Inclusion] Update std symbols mapping (PR #113612)

2024-10-29 Thread kadir çetinkaya via cfe-commits
@@ -232,6 +232,37 @@ SYMBOL(ssize, std::, ) SYMBOL(ssize, std::, ) SYMBOL(ssize, std::, ) SYMBOL(ssize, std::, ) +// C++ [range.access.general]: ... the customization point objects +// in [range.access] are available when the header is included. +SYMBOL(begin, std::ranges::, )

[clang] [Tooling/Inclusion] Update std symbols mapping (PR #113612)

2024-10-29 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/113612 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Tooling/Inclusion] Update std symbols mapping (PR #113612)

2024-10-29 Thread kadir çetinkaya via cfe-commits
@@ -115,15 +115,17 @@ static int initialize(Lang Language) { NSLen = 0; } -if (SymIndex >= 0 && -Mapping->SymbolNames[SymIndex].qualifiedName() == QName) { - // Not a new symbol, use the same index. +if (SymIndex > 0) { assert(llvm::none_o

[clang] 75e7ba8 - [HLSL] Re-implement countbits with the correct return type (#113189)

2024-10-29 Thread via cfe-commits
Author: Sarah Spall Date: 2024-10-29T07:56:05-07:00 New Revision: 75e7ba8c0b7efe75632d328a80391b9086ba8740 URL: https://github.com/llvm/llvm-project/commit/75e7ba8c0b7efe75632d328a80391b9086ba8740 DIFF: https://github.com/llvm/llvm-project/commit/75e7ba8c0b7efe75632d328a80391b9086ba8740.diff L

[clang] [llvm] [HLSL] Re-implement countbits with the correct return type (PR #113189)

2024-10-29 Thread Sarah Spall via cfe-commits
https://github.com/spall closed https://github.com/llvm/llvm-project/pull/113189 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AST] Store injected template arguments in TemplateParameterList (PR #113579)

2024-10-29 Thread Krystian Stasiowski via cfe-commits
@@ -51,14 +51,15 @@ DefaultTemplateArgumentContainsUnexpandedPack(const TemplateParam &P) { P.getDefaultArgument().getArgument().containsUnexpandedParameterPack(); } -TemplateParameterList::TemplateParameterList(const ASTContext& C, +TemplateParameterList::TemplateP

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2024-10-29 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/114062 >From d2d2d3d5db3f639aab178f9ca9a20db2842d2b65 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Tue, 29 Oct 2024 14:20:44 + Subject: [PATCH] `sret` args should always point to the `alloca` AS, so we can use

[clang] [llvm] Revert "[clang][AArch64] Add getHostCPUFeatures to query for enabled … (PR #114066)

2024-10-29 Thread Elvina Yakubova via cfe-commits
https://github.com/ElvinaYakubova created https://github.com/llvm/llvm-project/pull/114066 …features in cpu info (#97749)" This reverts commit d732c0b13c55259177f2936516b6087d634078e0. This is breaking buildbots https://lab.llvm.org/buildbot/#/builders/190/builds/8413, https://lab.llvm.org/b

[clang] [Tooling/Inclusion] Add binary search related `std::ranges` symbols to the mapping. (PR #113796)

2024-10-29 Thread via cfe-commits
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/113796 >From aa9e5c50287aa3d60fe1145ccda6b1e5f90c53a8 Mon Sep 17 00:00:00 2001 From: c8ef Date: Sun, 27 Oct 2024 14:15:23 +0800 Subject: [PATCH 1/3] add Binary search operations (on sorted ranges) --- clang/lib/Tooling/I

[clang] [compiler-rt] [XRay] Remove reliance on default PIC behavior in DSO tests (PR #113892)

2024-10-29 Thread Jordan Rupprecht via cfe-commits
https://github.com/rupprecht approved this pull request. https://github.com/llvm/llvm-project/pull/113892 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [XRay] Remove reliance on default PIC behavior in DSO tests (PR #113892)

2024-10-29 Thread Jordan Rupprecht via cfe-commits
https://github.com/rupprecht closed https://github.com/llvm/llvm-project/pull/113892 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a388df7 - [XRay] Remove reliance on default PIC behavior in DSO tests (#113892)

2024-10-29 Thread via cfe-commits
Author: Sebastian Kreutzer Date: 2024-10-29T09:40:53-05:00 New Revision: a388df712700f38ad9a51d49a657a28e739f5eb4 URL: https://github.com/llvm/llvm-project/commit/a388df712700f38ad9a51d49a657a28e739f5eb4 DIFF: https://github.com/llvm/llvm-project/commit/a388df712700f38ad9a51d49a657a28e739f5eb4.

[clang] [clang-tools-extra] First run at removing the linked-list for decls. Tests not run, but … (PR #113983)

2024-10-29 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/113983 >From 09c1c890394ecaa66b20cd933ba0d85c2141e34f Mon Sep 17 00:00:00 2001 From: erichkeane Date: Mon, 28 Oct 2024 17:00:38 -0700 Subject: [PATCH 1/2] First run at removing the linked-list for decls. Tests not

[clang] [clang-tools-extra] First run at removing the linked-list for decls. Tests not run, but … (PR #113983)

2024-10-29 Thread Erich Keane via cfe-commits
erichkeane wrote: This still crashes a lot locally, a few of my asserts are finding cases where a declaration is not in the list of decls of its parent for some reason. I think there is value to do this, but it might have to be broken up. https://github.com/llvm/llvm-project/pull/113983 _

[clang] [libcxx] [clang] Warn about memset/memcpy to NonTriviallyCopyable types (PR #111434)

2024-10-29 Thread via cfe-commits
serge-sans-paille wrote: @nathanchance could you share your preprocessed source so that I can get a reproducer? Thanks! https://github.com/llvm/llvm-project/pull/111434 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [llvm] [X86][AMX] Support AMX-FP8 (PR #113850)

2024-10-29 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,24 @@ +/*===-- amxfp8intrin.h - AMX intrinsics -*- C++ -*=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0

[clang] [clang][deps] Stop sorting file dependencies (PR #114079)

2024-10-29 Thread Ben Langmuir via cfe-commits
@@ -472,7 +465,8 @@ class FullDeps { JOS.attributeArray("command-line", toJSONStrings(JOS, MD.getBuildArguments())); JOS.attribute("context-hash", StringRef(MD.ID.ContextHash)); -JOS.attributeArray("file-deps",

<    1   2   3   4   5   >