[clang] [AMDGPU][clang] provide device implementation for __builtin_logb and … (PR #129347)

2025-02-28 Thread Joseph Huber via cfe-commits
@@ -259,6 +259,26 @@ Value *readX18AsPtr(CodeGenFunction &CGF) { return CGF.Builder.CreateIntToPtr(X18, CGF.Int8PtrTy); } +llvm::Constant *CodeGenModule::getDeviceLibFunction(const FunctionDecl *FD, +unsigned BuiltinID) { +

[clang] [AMDGPU][clang] provide device implementation for __builtin_logb and … (PR #129347)

2025-02-28 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/129347 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU][clang] provide device implementation for __builtin_logb and … (PR #129347)

2025-02-28 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 4ab9c13ba2a6f505fb1b72ae33753902ae9f81e8 86deca6179c6dce4490e859ffd536f553d8d6c0d --e

[clang-tools-extra] [clang-tidy] warn when `true` is used as a preprocessor keyword in C (PR #128265)

2025-02-28 Thread via cfe-commits
isuckatcs wrote: > Clang-tidy uses clang to process the source file, so any warning implemented > in clang is available to all clang-tidy users regardless of whether they > compile with clang or GCC or something else. A fair point indeed. I'll proceed with option 3 then. https://github.com/ll

[clang] [HLSL] Add additional overloads for min and max to allow for mixed scalar and vector arguments (PR #129334)

2025-02-28 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp commented: Are there any error conditions that need testing as well? https://github.com/llvm/llvm-project/pull/129334 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [AMDGPU][clang] provide device implementation for __builtin_logb and … (PR #129347)

2025-02-28 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm requested changes to this pull request. We do not and should never emit ocml calls in clang. There is also no reason to ever use scalbn for binary float types, it is identical to llvm.ldexp https://github.com/llvm/llvm-project/pull/129347 _

[clang] [Sema] Instantiate destructors for initialized anonymous union fields (PR #128866)

2025-02-28 Thread Maurice Heumann via cfe-commits
https://github.com/momo5502 updated https://github.com/llvm/llvm-project/pull/128866 >From 4353dbd9acc6c3e577b9aa65f5628602cf015caf Mon Sep 17 00:00:00 2001 From: Maurice Heumann Date: Wed, 26 Feb 2025 14:31:47 +0100 Subject: [PATCH] Instantiate destructors from initialized anonymous union fie

[clang-tools-extra] [clang-tidy] Avoid processing declarations in system headers (PR #128150)

2025-02-28 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/128150 >From 1c3cd94ba1723125a065f69ec1ab689d3f9c2474 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= Date: Thu, 2

[clang] [Sema] Instantiate destructors for initialized anonymous union fields (PR #128866)

2025-02-28 Thread Maurice Heumann via cfe-commits
@@ -5451,10 +5451,23 @@ bool Sema::SetCtorInitializers(CXXConstructorDecl *Constructor, bool AnyErrors, NumInitializers * sizeof(CXXCtorInitializer*)); Constructor->setCtorInitializers(baseOrMemberInitializers); +SourceLocation Location = Constructor->getLo

[clang] [ARM] Introduce -mtp=auto and make it the default (PR #128901)

2025-02-28 Thread via cfe-commits
https://github.com/Zhenhang1213 updated https://github.com/llvm/llvm-project/pull/128901 >From 0db9830f5d5e29288c87e5935df913b99a040d93 Mon Sep 17 00:00:00 2001 From: Austin Date: Thu, 27 Feb 2025 00:11:56 +0800 Subject: [PATCH] [ARM] Introduce -mtp=auto and make it the default This adds a new

[clang] [Sema] Instantiate destructors for initialized anonymous union fields (PR #128866)

2025-02-28 Thread Maurice Heumann via cfe-commits
https://github.com/momo5502 edited https://github.com/llvm/llvm-project/pull/128866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Instantiate destructors for initialized anonymous union fields (PR #128866)

2025-02-28 Thread Maurice Heumann via cfe-commits
https://github.com/momo5502 updated https://github.com/llvm/llvm-project/pull/128866 >From 9749a0462b23b17fe830dd98f33a7fe00580cbc4 Mon Sep 17 00:00:00 2001 From: Maurice Heumann Date: Wed, 26 Feb 2025 14:31:47 +0100 Subject: [PATCH] Instantiate destructors from initialized anonymous union fie

[clang] [Sema] Instantiate destructors for initialized anonymous union fields (PR #128866)

2025-02-28 Thread Maurice Heumann via cfe-commits
@@ -5451,10 +5451,23 @@ bool Sema::SetCtorInitializers(CXXConstructorDecl *Constructor, bool AnyErrors, NumInitializers * sizeof(CXXCtorInitializer*)); Constructor->setCtorInitializers(baseOrMemberInitializers); +SourceLocation Location = Constructor->getLo

[clang] [analyzer] Limit Store by region-store-binding-limit (PR #127602)

2025-02-28 Thread Balázs Benics via cfe-commits
balazs-benics-sonarsource wrote: > Hello @balazs-benics-sonarsource > > The following starts crashing with this patch: `clang --analyze bbi-104578.c` > It crashes with Thank you for the heads up @mikaelholmen. I'll switch to it ASAP. I'd expect the fix later today. https://github.com/llvm/ll

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-02-28 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > Thanks! I approved it. Thanks! I'll wait with a merge till next week in case someone else has comments. https://github.com/llvm/llvm-project/pull/126240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] Clang: Add minnum/maxnum builtin functions (PR #129207)

2025-02-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: YunQiang Su (wzssyqa) Changes With https://github.com/llvm/llvm-project/pull/112852, we claimed that llvm.minnum and llvm.maxnum should treat +0.0>-0.0, while libc doesn't require fmin(3)/fmax(3) for it. To make llvm.minnum/llvm.

[clang] Clang: Add minnum/maxnum builtin functions (PR #129207)

2025-02-28 Thread YunQiang Su via cfe-commits
https://github.com/wzssyqa edited https://github.com/llvm/llvm-project/pull/129207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2871f69 - [clang] Fix issues with #embed and intializer lists/template arguments (#128890)

2025-02-28 Thread via cfe-commits
Author: Mariya Podchishchaeva Date: 2025-02-28T09:35:59+01:00 New Revision: 2871f6905257169f8a49b13289421a668bf24051 URL: https://github.com/llvm/llvm-project/commit/2871f6905257169f8a49b13289421a668bf24051 DIFF: https://github.com/llvm/llvm-project/commit/2871f6905257169f8a49b13289421a668bf240

[clang] [clang] Fix issues with #embed and intializer lists/template arguments (PR #128890)

2025-02-28 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon closed https://github.com/llvm/llvm-project/pull/128890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Contributing.rst update snippet and docs (PR #129209)

2025-02-28 Thread Carlos Galvez via cfe-commits
@@ -203,6 +202,10 @@ for more information) that will find the pattern in the AST that we want to inspect. The results of the matching are passed to the ``check`` method, which can further inspect them and report diagnostics. +By default, the new check applies only to C++ code

[clang] [-Wunsafe-buffer-usage] Fix a potential overflow bug reported by #126334 (PR #129169)

2025-02-28 Thread David Tarditi via cfe-commits
https://github.com/dtarditi approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/129169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-28 Thread Henrich Lauko via cfe-commits
@@ -210,6 +223,193 @@ void CIRGenModule::emitGlobalDefinition(clang::GlobalDecl gd, llvm_unreachable("Invalid argument to CIRGenModule::emitGlobalDefinition"); } +static bool shouldBeInCOMDAT(CIRGenModule &cgm, const Decl &d) { + assert(!cir::MissingFeatures::supportComdat

[clang] [SystemZ] Add header guard macros to vecintrin.h (PR #129170)

2025-02-28 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/129170 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)

2025-02-28 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-x86_64-debian` running on `lldb-x86_64-debian` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/162/builds/17051 Here is the relevant piece of the build lo

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-28 Thread Henrich Lauko via cfe-commits
@@ -0,0 +1,63 @@ +//===- CIROpInterfaces.td - CIR Op Interface Definitions *- 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] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-28 Thread Henrich Lauko via cfe-commits
@@ -0,0 +1,63 @@ +//===- CIROpInterfaces.td - CIR Op Interface Definitions *- 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] [C++20] [Modules] Support generating in-class defined function with try-catch body (PR #129212)

2025-02-28 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/129212 See the example: ``` export module func; class C { public: void member() try { } catch (...) { } }; ``` We woudln't generate the definition for `C::member` but we should. Since the function i

[clang] [C++20] [Modules] Support generating in-class defined function with try-catch body (PR #129212)

2025-02-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Chuanqi Xu (ChuanqiXu9) Changes See the example: ``` export module func; class C { public: void member() try { } catch (...) { } }; ``` We woudln't generate the definition for `C::member` but we should. Since the function

[clang] ddaa5b3 - [SystemZ] Add header guard macros to vecintrin.h (#129170)

2025-02-28 Thread via cfe-commits
Author: Jonathan Albrecht Date: 2025-02-28T10:16:19+01:00 New Revision: ddaa5b3bfb2980f79c6f277608ad33a6efe8d554 URL: https://github.com/llvm/llvm-project/commit/ddaa5b3bfb2980f79c6f277608ad33a6efe8d554 DIFF: https://github.com/llvm/llvm-project/commit/ddaa5b3bfb2980f79c6f277608ad33a6efe8d554.d

[clang] [SystemZ] Add header guard macros to vecintrin.h (PR #129170)

2025-02-28 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand closed https://github.com/llvm/llvm-project/pull/129170 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SystemZ] Add header guard macros to vecintrin.h (PR #129170)

2025-02-28 Thread via cfe-commits
github-actions[bot] wrote: @jonathan-albrecht-ibm Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem

[clang] [SystemZ] Add header guard macros to vecintrin.h (PR #129170)

2025-02-28 Thread Ulrich Weigand via cfe-commits
uweigand wrote: > I'd like if this could also make it into a clang 19 release if possible. I don't think there will be any further clang 19 releases. It should be backported into clang 20, however. https://github.com/llvm/llvm-project/pull/129170 __

[clang] [llvm] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)

2025-02-28 Thread Hans Wennborg via cfe-commits
@@ -855,6 +855,16 @@ void CodeGenFunction::EmitCoroutineBody(const CoroutineBodyStmt &S) { // Create parameter copies. We do it before creating a promise, since an // evolution of coroutine TS may allow promise constructor to observe // parameter copies. +for (

[clang] [SystemZ] Add header guard macros to vecintrin.h (PR #129170)

2025-02-28 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand milestoned https://github.com/llvm/llvm-project/pull/129170 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-28 Thread Henrich Lauko via cfe-commits
@@ -210,6 +223,193 @@ void CIRGenModule::emitGlobalDefinition(clang::GlobalDecl gd, llvm_unreachable("Invalid argument to CIRGenModule::emitGlobalDefinition"); } +static bool shouldBeInCOMDAT(CIRGenModule &cgm, const Decl &d) { + assert(!cir::MissingFeatures::supportComdat

[clang-tools-extra] [clang-tidy] Contributing.rst update snippet and docs (PR #129209)

2025-02-28 Thread Marco C. via cfe-commits
https://github.com/Marcondiro created https://github.com/llvm/llvm-project/pull/129209 This reflects the add_new_check.py changes: isLanguageVersionSupported is now overridden by default by the script The changes were instroduced in https://github.com/llvm/llvm-project/pull/100129 Thanks >Fr

[clang] Disable unique-object-duplication warning in templates (PR #129120)

2025-02-28 Thread Hans Wennborg via cfe-commits
https://github.com/zmodem closed https://github.com/llvm/llvm-project/pull/129120 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Clang: Add minnum/maxnum builtin functions (PR #129207)

2025-02-28 Thread YunQiang Su via cfe-commits
@@ -209,6 +209,18 @@ def FmaxF16F128 : Builtin, F16F128MathTemplate { let Prototype = "T(T, T)"; } +def MinNum : Builtin { wzssyqa wrote: I prefer to drop it. Since we don't provide the function name without __builtin, such as `fmimnum`. https://github.c

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-28 Thread Henrich Lauko via cfe-commits
@@ -210,6 +223,193 @@ void CIRGenModule::emitGlobalDefinition(clang::GlobalDecl gd, llvm_unreachable("Invalid argument to CIRGenModule::emitGlobalDefinition"); } +static bool shouldBeInCOMDAT(CIRGenModule &cgm, const Decl &d) { + assert(!cir::MissingFeatures::supportComdat

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-02-28 Thread Pierre van Houtryve via cfe-commits
https://github.com/Pierre-vh updated https://github.com/llvm/llvm-project/pull/128509 >From cae772441c0d87a017f5cc2cb0b9c970c6b7fcde Mon Sep 17 00:00:00 2001 From: pvanhout Date: Mon, 24 Feb 2025 14:21:49 +0100 Subject: [PATCH 1/4] [clang][AMDGPU] Enable module splitting by default The default

[clang-tools-extra] [clang-tidy] Contributing.rst update snippet and docs (PR #129209)

2025-02-28 Thread Marco C. via cfe-commits
https://github.com/Marcondiro updated https://github.com/llvm/llvm-project/pull/129209 >From afe211ecfa254e12fdf448afe992ed1b2a7d Mon Sep 17 00:00:00 2001 From: Marcondiro <46560192+marcond...@users.noreply.github.com> Date: Fri, 28 Feb 2025 09:34:30 +0100 Subject: [PATCH] [clang-tidy] Contr

[clang] [SystemZ] Add header guard macros to vecintrin.h (PR #129170)

2025-02-28 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-aarch64-darwin` running on `doug-worker-4` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/15433 Here is th

[clang] Disable unique-object-duplication warning in templates (PR #129120)

2025-02-28 Thread Hans Wennborg via cfe-commits
https://github.com/zmodem approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/129120 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86][CodeGen] - Use shift operators instead of built-ins for SSE emulation of MMX intrinsics. (PR #129197)

2025-02-28 Thread Phoebe Wang via cfe-commits
@@ -880,11 +880,11 @@ _mm_sll_si64(__m64 __m, __m64 __count) ///A 32-bit integer value. /// \returns A 64-bit integer vector containing the left-shifted value. If /// \a __count is greater or equal to 64, the result is set to 0. -static __inline__ __m64 __DEFAULT_FN_ATT

[clang-tools-extra] [clang-tidy] Avoid processing declarations in system headers (PR #128150)

2025-02-28 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?G=C3=A1lvez?= , Carlos =?utf-8?q?G=C3=A1lvez?= Message-ID: In-Reply-To: carlosgalvezp wrote: Friendly ping. https://github.com/llvm/llvm-project/pull/128150 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] 15c49b9 - [Coroutines] [CodeGen] Don't change AST in CodeGen/Coroutines

2025-02-28 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-02-28T16:03:50+08:00 New Revision: 15c49b9db3f60bdbd320271d5e97f118c00b95dd URL: https://github.com/llvm/llvm-project/commit/15c49b9db3f60bdbd320271d5e97f118c00b95dd DIFF: https://github.com/llvm/llvm-project/commit/15c49b9db3f60bdbd320271d5e97f118c00b95dd.diff LO

[clang] [clang] Pass fp128 indirectly and return in xmm0 on Windows (PR #115052)

2025-02-28 Thread Trevor Gross via cfe-commits
https://github.com/tgross35 edited https://github.com/llvm/llvm-project/pull/115052 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Check for uninitialized use in lambda within CXXOperatorCallExpr (PR #129198)

2025-02-28 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 commented: Thanks for the contribution, and this makes sense to me. However I'd like others to take a look too. Of course this should come with a release note, in `clang/docs/ReleaseNotes.rst`. https://github.com/llvm/llvm-project/pull/129198 __

[clang] [Clang] Check for uninitialized use in lambda within CXXOperatorCallExpr (PR #129198)

2025-02-28 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/129198 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Check for uninitialized use in lambda within CXXOperatorCallExpr (PR #129198)

2025-02-28 Thread Younan Zhang via cfe-commits
@@ -12796,6 +12803,7 @@ namespace { } void VisitCXXOperatorCallExpr(CXXOperatorCallExpr *E) { + isInCXXOperatorCall = true; zyn0217 wrote: You can use `llvm::SaveAndRestore` to avoid restoring it manually https://github.com/llvm/llvm-project/pul

[clang] [Clang] Check for uninitialized use in lambda within CXXOperatorCallExpr (PR #129198)

2025-02-28 Thread Younan Zhang via cfe-commits
@@ -12804,6 +12812,20 @@ namespace { Visit(Callee); for (auto Arg: E->arguments()) HandleValue(Arg->IgnoreParenImpCasts()); + isInCXXOperatorCall = false; +} + +void VisitLambdaExpr(LambdaExpr *E) { + if (isInCXXOperatorCall) {

[clang] [Clang] Check for uninitialized use in lambda within CXXOperatorCallExpr (PR #129198)

2025-02-28 Thread Younan Zhang via cfe-commits
@@ -12597,6 +12597,12 @@ namespace { bool isRecordType; bool isPODType; bool isReferenceType; +// Tracks whether the current expression is being visited within a +// CXXOperatorCallExpr. This flag is set to true when entering a +// CXXOperatorCallExpr an

[clang] [llvm] [X86][CodeGen] - Use shift operators instead of built-ins for SSE emulation of MMX intrinsics. (PR #129197)

2025-02-28 Thread Phoebe Wang via cfe-commits
@@ -880,11 +880,11 @@ _mm_sll_si64(__m64 __m, __m64 __count) ///A 32-bit integer value. /// \returns A 64-bit integer vector containing the left-shifted value. If /// \a __count is greater or equal to 64, the result is set to 0. -static __inline__ __m64 __DEFAULT_FN_ATT

[clang] [ARM] Introduce -mtp=auto and make it the default (PR #128901)

2025-02-28 Thread via cfe-commits
https://github.com/Zhenhang1213 updated https://github.com/llvm/llvm-project/pull/128901 >From 0db9830f5d5e29288c87e5935df913b99a040d93 Mon Sep 17 00:00:00 2001 From: Austin Date: Thu, 27 Feb 2025 00:11:56 +0800 Subject: [PATCH] [ARM] Introduce -mtp=auto and make it the default This adds a new

[clang] Clang: Add minnum/maxnum builtin functions (PR #129207)

2025-02-28 Thread YunQiang Su via cfe-commits
https://github.com/wzssyqa created https://github.com/llvm/llvm-project/pull/129207 With https://github.com/llvm/llvm-project/pull/112852, we claimed that llvm.minnum and llvm.maxnum should treat +0.0>-0.0, while libc doesn't require fmin(3)/fmax(3) for it. To make llvm.minnum/llvm.maxnum eas

[clang] [clang-repl] Disable EmulatedTLS on Windows for interpreter executor (PR #127468)

2025-02-28 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: This is quite a tricky area... On Windows, EmulatedTLS _is_ disabled by default, both in MSVC targets and MinGW targets. However, for interop with (GCC's) libstdc++ (which currently exposes TLS symbols in the public ABI), users may need to enable emulated TLS if linking agains

[clang] [llvm] [Clang][LLVM] Implement single-single vectors MOP4{A/S} (PR #127797)

2025-02-28 Thread via cfe-commits
@@ -376,6 +376,24 @@ let SMETargetGuard = "sme2" in { // Outer product and accumulate/subtract // +multiclass MOP4 checks> { + def NAME # "_1x1" : Inst<"svmop4" # name # "_1x1_" # n # "[_{d}_{d}]", "vidd", t, MergeNone, i # wide # "_1x1", [IsInOutZA, IsStreaming], checks>; -

[clang] Clang: Add minnum/maxnum builtin functions (PR #129207)

2025-02-28 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,269 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -disable-llvm-passes -O3 -triple x86_64 %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK + +typedef _Float16 half8 __attribute__((ext_

[clang-tools-extra] [clang-tidy] Contributing.rst update snippet and docs (PR #129209)

2025-02-28 Thread Marco C. via cfe-commits
https://github.com/Marcondiro updated https://github.com/llvm/llvm-project/pull/129209 >From fbd2aa34805c3415f66410ae282f0ceeb7bd7b64 Mon Sep 17 00:00:00 2001 From: Marcondiro <46560192+marcond...@users.noreply.github.com> Date: Fri, 28 Feb 2025 09:34:30 +0100 Subject: [PATCH] [clang-tidy] Contr

[clang] Fix RegionStore assertion failure after #127602 (PR #129224)

2025-02-28 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/129224 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WIP] Correct lowering of `fp128` intrinsics (PR #76558)

2025-02-28 Thread Trevor Gross via cfe-commits
tgross35 wrote: Finally getting around to this after more than a year. @efriedma-quic as an alternative to the current implementation of duplicating `long double` layout information from Clang to LLVM, would it work if LLVM lowers to `*f128` calls but provides a module flag `fp128_use_long_dou

[clang] WIP: Improve the -Wundefined-func-template diagnostic note for invisible template functions (PR #129031)

2025-02-28 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/129031 >From 5bf873e8ab3b97956ca03ef6337baa0f52320003 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Thu, 27 Feb 2025 11:15:09 +0100 Subject: [PATCH] Improve the -Wundefined-func-template diagnostic note for invisible

[clang] [clang] Pass fp128 indirectly and return in xmm0 on Windows (PR #115052)

2025-02-28 Thread Trevor Gross via cfe-commits
https://github.com/tgross35 edited https://github.com/llvm/llvm-project/pull/115052 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] WIP: Improve the -Wundefined-func-template diagnostic note for invisible template functions (PR #129031)

2025-02-28 Thread Haojian Wu via cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/129031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Contributing.rst update snippet and docs (PR #129209)

2025-02-28 Thread Marco C. via cfe-commits
@@ -203,6 +202,10 @@ for more information) that will find the pattern in the AST that we want to inspect. The results of the matching are passed to the ``check`` method, which can further inspect them and report diagnostics. +By default, the new check applies only to C++ code

[clang] [Clang][diagnostics] Fix structured binding shadows template param loc (PR #129116)

2025-02-28 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon commented: Perhaps it makes sense to also add a release note. https://github.com/llvm/llvm-project/pull/129116 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [modules] Add missing test file for b21ee08e57173102b67bc18237b135550 (PR #129221)

2025-02-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Haojian Wu (hokein) Changes The commit missed a test file. --- Full diff: https://github.com/llvm/llvm-project/pull/129221.diff 1 Files Affected: - (added) clang/test/Modules/pr28744.cpp (+17) ``diff diff --git a/clan

[clang] [modules] Add missing test file for b21ee08e57173102b67bc18237b135550 (PR #129221)

2025-02-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Haojian Wu (hokein) Changes The commit missed a test file. --- Full diff: https://github.com/llvm/llvm-project/pull/129221.diff 1 Files Affected: - (added) clang/test/Modules/pr28744.cpp (+17) ``diff diff --git a/clang/test/M

[clang] [Clang][AArch64] Add support for SHF_AARCH64_PURECODE ELF section flag (2/3) (PR #125688)

2025-02-28 Thread Csanád Hajdú via cfe-commits
Il-Capitano wrote: @jansvoboda11 You're tagged as the compiler options maintainer for Clang, so this may be of interest to you as well. https://github.com/llvm/llvm-project/pull/125688 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [SystemZ] Add header guard macros to vecintrin.h (PR #129170)

2025-02-28 Thread Jonathan Albrecht via cfe-commits
jonathan-albrecht-ibm wrote: Thanks for reviewing and merging @uweigand! https://github.com/llvm/llvm-project/pull/129170 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Contributing.rst update snippet and docs (PR #129209)

2025-02-28 Thread Marco C. via cfe-commits
https://github.com/Marcondiro updated https://github.com/llvm/llvm-project/pull/129209 >From 58972d1e22af7306ae3583a487cb9bf466714b58 Mon Sep 17 00:00:00 2001 From: Marcondiro <46560192+marcond...@users.noreply.github.com> Date: Fri, 28 Feb 2025 09:34:30 +0100 Subject: [PATCH] [clang-tidy] Contr

[clang] [clang-tools-extra] [Clang] Add __builtin_type_pack_dedup template to deduplicate types in template arguments (PR #106730)

2025-02-28 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov updated https://github.com/llvm/llvm-project/pull/106730 >From a6788c3ba0b00c7b935cbb764c25e12f30d2fe80 Mon Sep 17 00:00:00 2001 From: Ilya Biryukov Date: Fri, 23 Aug 2024 17:27:26 +0200 Subject: [PATCH] [Clang] Add builtin templates to deduplicate and sort type

[clang] 9e2eb95 - [Coroutines] [CodeGen] Don't actually emit an output file from unit test

2025-02-28 Thread Benjamin Kramer via cfe-commits
Author: Benjamin Kramer Date: 2025-02-28T15:13:27+01:00 New Revision: 9e2eb95c238d5d7b059da766b24e5a01c683bf7a URL: https://github.com/llvm/llvm-project/commit/9e2eb95c238d5d7b059da766b24e5a01c683bf7a DIFF: https://github.com/llvm/llvm-project/commit/9e2eb95c238d5d7b059da766b24e5a01c683bf7a.dif

[clang-tools-extra] [clang-tidy] Contributing.rst update snippet and docs (PR #129209)

2025-02-28 Thread Marco C. via cfe-commits
Marcondiro wrote: @carlosgalvezp I do not have the ability to merge the PR, could you do it? thanks! https://github.com/llvm/llvm-project/pull/129209 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [analyzer] performTrivialCopy triggers checkLocation before binding (PR #129016)

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

[clang] WIP: Improve the -Wundefined-func-template diagnostic note for invisible template functions (PR #129031)

2025-02-28 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/129031 >From 5bf873e8ab3b97956ca03ef6337baa0f52320003 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Thu, 27 Feb 2025 11:15:09 +0100 Subject: [PATCH 1/3] Improve the -Wundefined-func-template diagnostic note for invis

[clang] [clang] Update SVE load and store intrinsics to have FP8 variants (PR #126726)

2025-02-28 Thread via cfe-commits
https://github.com/Lukacma approved this pull request. https://github.com/llvm/llvm-project/pull/126726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] WIP: Improve the -Wundefined-func-template diagnostic note for invisible template functions (PR #129031)

2025-02-28 Thread Haojian Wu via cfe-commits
@@ -5654,6 +5654,8 @@ def warn_func_template_missing : Warning<"instantiation of function %q0 " InGroup, DefaultIgnore; def note_forward_template_decl : Note< "forward declaration of template entity is here">; +def note_unreachable_template_decl +: Note<"declaration of

[clang] [analyzer] performTrivialCopy triggers checkLocation before binding (PR #129016)

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

[clang] [analyzer] performTrivialCopy triggers checkLocation before binding (PR #129016)

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

[clang] [analyzer] performTrivialCopy triggers checkLocation before binding (PR #129016)

2025-02-28 Thread Balazs Benics via cfe-commits
@@ -27,6 +29,14 @@ void emitErrorReport(CheckerContext &C, const BugType &Bug, } } +inline std::string getMemRegionName(const SVal &Val) { steakhal wrote: ```suggestion static std::string getMemRegionName(SVal Val) { ``` Have you considered using the Val.d

[clang] [analyzer] performTrivialCopy triggers checkLocation before binding (PR #129016)

2025-02-28 Thread Balazs Benics via cfe-commits
@@ -1199,4 +1204,4 @@ void ExprEngine::VisitLambdaExpr(const LambdaExpr *LE, ExplodedNode *Pred, // FIXME: Move all post/pre visits to ::Visit(). getCheckerManager().runCheckersForPostStmt(Dst, Tmp, LE, *this); -} steakhal wrote: This seems like an unint

[clang] [analyzer] performTrivialCopy triggers checkLocation before binding (PR #129016)

2025-02-28 Thread Balazs Benics via cfe-commits
@@ -44,6 +54,21 @@ CREATE_EXPR_ENGINE_CHECKER(ExprEngineVisitPreChecker, PreStmt, GCCAsmStmt, CREATE_EXPR_ENGINE_CHECKER(ExprEngineVisitPostChecker, PostStmt, GCCAsmStmt, "GCCAsmStmtBug") +class MemAccessChecker : public Checker { +public: + void c

[clang] [analyzer] performTrivialCopy triggers checkLocation before binding (PR #129016)

2025-02-28 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. Thanks for the PR, it looks pretty good by the looks of it. I had a couple nits inline though, check them out! https://github.com/llvm/llvm-project/pull/129016 ___ cfe-commits mailing

[clang] [analyzer] performTrivialCopy triggers checkLocation before binding (PR #129016)

2025-02-28 Thread Balazs Benics via cfe-commits
@@ -84,4 +118,24 @@ TEST(ExprEngineVisitTest, checkPostStmtGCCAsmStmt) { EXPECT_EQ(Diags, "ExprEngineVisitPostChecker: checkPostStmt\n"); } +TEST(ExprEngineVisitTest, checkLocationAndBind) { + std::string Diags; + EXPECT_TRUE(runCheckerOnCode(R"( +class MyClass{ +p

[clang] [analyzer] performTrivialCopy triggers checkLocation before binding (PR #129016)

2025-02-28 Thread Balazs Benics via cfe-commits
@@ -69,14 +69,19 @@ void ExprEngine::performTrivialCopy(NodeBuilder &Bldr, ExplodedNode *Pred, assert(ThisRD); SVal V = Call.getArgSVal(0); + const Expr *VExpr = Call.getArgExpr(0); // If the value being copied is not unknown, load from its location to get // an

[clang] [clang-tools-extra] [Clang] Add __builtin_type_pack_dedup template to deduplicate types in template arguments (PR #106730)

2025-02-28 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: @cor3ntin and everyone else, would you mind taking another look? I wanted to bring this up again and tried to do all the proposed changes: - we now have a builtin to sort types by mangled name. - the builtins now expand directly into a list of template arguments. - the built

[clang] WIP: Improve the -Wundefined-func-template diagnostic note for invisible template functions (PR #129031)

2025-02-28 Thread Haojian Wu via cfe-commits
@@ -5082,11 +5085,16 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation, if (AtEndOfTU && !getDiagnostics().hasErrorOccurred() && !getSourceManager().isInSystemHeader(PatternDecl->getBeginLoc())) { Diag(PointOfInstantiation,

[clang] [clang] Update SVE load and store intrinsics to have FP8 variants (PR #126726)

2025-02-28 Thread via cfe-commits
https://github.com/Lukacma closed https://github.com/llvm/llvm-project/pull/126726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][analyzer] OOB test consolidation III: 'outofbound' tests (PR #128508)

2025-02-28 Thread Donát Nagy via cfe-commits
NagyDonat wrote: I think the "why were these testcases redundant?" information is too verbose for a commit message; moreover it only conveys information about code that was _removed_ from the repository, so it won't be relevant for readers in the future who are presumably only interested in co

[clang] [modules] Add missing test file for b21ee08e57173102b67bc18237b135550 (PR #129221)

2025-02-28 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux-bootstrap-msan` running on `sanitizer-buildbot10` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/94/builds/4812 Here is the relev

[clang] WIP: Improve the -Wundefined-func-template diagnostic note for invisible template functions (PR #129031)

2025-02-28 Thread Haojian Wu via cfe-commits
https://github.com/hokein ready_for_review https://github.com/llvm/llvm-project/pull/129031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] performTrivialCopy triggers checkLocation before binding (PR #129016)

2025-02-28 Thread Balazs Benics via cfe-commits
@@ -69,14 +69,19 @@ void ExprEngine::performTrivialCopy(NodeBuilder &Bldr, ExplodedNode *Pred, assert(ThisRD); SVal V = Call.getArgSVal(0); + const Expr *VExpr = Call.getArgExpr(0); // If the value being copied is not unknown, load from its location to get // an

[clang] [llvm] [Clang][LLVM] Implement single-single vectors MOP4{A/S} (PR #127797)

2025-02-28 Thread via cfe-commits
@@ -387,6 +405,25 @@ let SMETargetGuard = "sme2" in { def SVBMOPS : Inst<"svbmops_za32[_{d}]_m", "viPPdd", "iUi", MergeNone, "aarch64_sme_bmops_za32", [IsInOutZA, IsStreaming], [ImmCheck<0, ImmCheck0_3>]>; + defm SVSMOP4A_H : MOP4<"a", "za32", "cs", "aarch64_sme_smop4a",

[clang] [llvm] [Clang][LLVM] Implement single-single vectors MOP4{A/S} (PR #127797)

2025-02-28 Thread via cfe-commits
@@ -387,6 +405,25 @@ let SMETargetGuard = "sme2" in { def SVBMOPS : Inst<"svbmops_za32[_{d}]_m", "viPPdd", "iUi", MergeNone, "aarch64_sme_bmops_za32", [IsInOutZA, IsStreaming], [ImmCheck<0, ImmCheck0_3>]>; + defm SVSMOP4A_H : MOP4<"a", "za32", "cs", "aarch64_sme_smop4a",

[clang] [llvm] [Clang][LLVM] Implement single-single vectors MOP4{A/S} (PR #127797)

2025-02-28 Thread via cfe-commits
@@ -376,6 +376,24 @@ let SMETargetGuard = "sme2" in { // Outer product and accumulate/subtract // +multiclass MOP4 checks> { + def NAME # "_1x1" : Inst<"svmop4" # name # "_1x1_" # n # "[_{d}_{d}]", "vidd", t, MergeNone, i # wide # "_1x1", [IsInOutZA, IsStreaming], checks>; +

[clang] [llvm] [Clang][LLVM] Implement single-single vectors MOP4{A/S} (PR #127797)

2025-02-28 Thread via cfe-commits
@@ -376,6 +376,24 @@ let SMETargetGuard = "sme2" in { // Outer product and accumulate/subtract // +multiclass MOP4 checks> { + def NAME # "_1x1" : Inst<"svmop4" # name # "_1x1_" # n # "[_{d}_{d}]", "vidd", t, MergeNone, i # wide # "_1x1", [IsInOutZA, IsStreaming], checks>; +

[clang] [llvm] [Clang][LLVM] Implement single-single vectors MOP4{A/S} (PR #127797)

2025-02-28 Thread via cfe-commits
@@ -376,6 +376,24 @@ let SMETargetGuard = "sme2" in { // Outer product and accumulate/subtract // +multiclass MOP4 checks> { Lukacma wrote: since "wide" is going to be merged with "i" anyway I don't think there is a point in passing them as a separate argume

[clang] [llvm] [Clang][LLVM] Implement single-single vectors MOP4{A/S} (PR #127797)

2025-02-28 Thread via cfe-commits
@@ -376,6 +376,24 @@ let SMETargetGuard = "sme2" in { // Outer product and accumulate/subtract // +multiclass MOP4 checks> { Lukacma wrote: ```suggestion multiclass MOP4 checks> { ``` https://github.com/llvm/llvm-project/pull/127797 _

[clang] [llvm] [Clang][LLVM] Implement single-single vectors MOP4{A/S} (PR #127797)

2025-02-28 Thread via cfe-commits
@@ -376,6 +376,24 @@ let SMETargetGuard = "sme2" in { // Outer product and accumulate/subtract // +multiclass MOP4 checks> { Lukacma wrote: This is just my suggestion for names, feel free to suggest different one. Also make sure the naming is consistent acro

<    1   2   3   4   >