[clang] [clang] Dispatch default overloads of `TemplateArgumentVisitor` to the implementation (PR #115336)

2024-11-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Egor Zhdan (egorzhdan) Changes This fixes an issue where overriding `clang::ConstTemplateArgumentVisitor::VisitTemplateArgument` in an implementation visitor class did not have the desired effect: the overload was not invoked when one of

[clang] [Clang] Dispatch default overloads of `TemplateArgumentVisitor` to the implementation (PR #115336)

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

[clang] [flang] [clang][Driver] Add RPATH by default (PR #115286)

2024-11-07 Thread David Truby via cfe-commits
DavidTruby wrote: I'd argue that this provides the least surprising behaviour to the end user: building a file with `clang -fopenmp` or `clang++ -stdlib=libc++` where openmp/libc++ were enabled on that LLVM build gives a binary that can just be run on that system, without setting any environme

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-07 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,90 @@ + +Warning suppression mappings + + +.. contents:: + :local: + +Introduction + + +Warning suppression mappings enable users to suppress Clang's diagnostics in a +per-file granular manner. Enabli

[clang] [Clang] Remove the wrong assumption when rebuilding SizeOfPackExprs for constraint normalization (PR #115120)

2024-11-07 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM, Thanks! https://github.com/llvm/llvm-project/pull/115120 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] SemaFunctionEffects: When verifying a function, ignore any conditional noexcept expression. (PR #115342)

2024-11-07 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos created https://github.com/llvm/llvm-project/pull/115342 Would have been part of my last PR (#142666) if I'd found it a few hours sooner. >From a0b6093fcf24ade7ce9ee0c3d65f679a41751225 Mon Sep 17 00:00:00 2001 From: Doug Wyatt Date: Tue, 5 Nov 2024 13:35:50 -0800 S

[clang] [AMDGPU] Make `__GCC_DESTRUCTIVE_SIZE` 128 on AMDGPU (PR #115241)

2024-11-07 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/115241 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add `EvalASTMutator` interface (PR #115168)

2024-11-07 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/115168 >From 5ca48e03412b1b8e9253f13356b9cc957f6fd9e5 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 6 Nov 2024 17:58:43 +0300 Subject: [PATCH 1/5] Add EvalASTMutator interface with `InstantiateFunctionD

[clang] [Clang] SemaFunctionEffects: When verifying a function, ignore any conditional noexcept expression. (PR #115342)

2024-11-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Doug Wyatt (dougsonos) Changes Would have been part of my last PR (#142666) if I'd found it a few hours sooner. --- Full diff: https://github.com/llvm/llvm-project/pull/115342.diff 2 Files Affected: - (modified) clang/lib/Sema/SemaFunc

[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-11-07 Thread Gábor Horváth via cfe-commits
@@ -12,6 +12,7 @@ #include "clang/AST/ASTContext.h" #include "clang/AST/Attr.h" +#include "clang/AST/Attrs.inc" Xazax-hun wrote: Is this include intended? https://github.com/llvm/llvm-project/pull/111499 ___ cfe-co

[clang] [clang][docs] Revise documentation for `__builtin_reduce_(max|min)`. (PR #114637)

2024-11-07 Thread via cfe-commits
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/114637 >From 13d9d0771b666c5ba2262004f45dcbe34e6fd893 Mon Sep 17 00:00:00 2001 From: c8ef Date: Sat, 2 Nov 2024 11:53:54 +0800 Subject: [PATCH 1/3] Update LanguageExtensions.rst --- clang/docs/LanguageExtensions.rst | 8

[clang] [Clang] skip default argument instantiation for non-defining friend declarations without specialization info to meet [dcl.fct.default] p4 (PR #113777)

2024-11-07 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/113777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] 6ca50a2 - [libclc] Correct use of CLC macro on two definitions

2024-11-07 Thread Fraser Cormack via cfe-commits
Author: Fraser Cormack Date: 2024-11-07T17:47:52Z New Revision: 6ca50a2593641f45b5310d907e6323f5eb367dfa URL: https://github.com/llvm/llvm-project/commit/6ca50a2593641f45b5310d907e6323f5eb367dfa DIFF: https://github.com/llvm/llvm-project/commit/6ca50a2593641f45b5310d907e6323f5eb367dfa.diff LOG

[clang] 4fb953a - [AMDGPU] Make `__GCC_DESTRUCTIVE_SIZE` 128 on AMDGPU (#115241)

2024-11-07 Thread via cfe-commits
Author: Joseph Huber Date: 2024-11-07T04:59:58-08:00 New Revision: 4fb953ac348d888541efe515439e0d844cdd7fbf URL: https://github.com/llvm/llvm-project/commit/4fb953ac348d888541efe515439e0d844cdd7fbf DIFF: https://github.com/llvm/llvm-project/commit/4fb953ac348d888541efe515439e0d844cdd7fbf.diff

[clang] [compiler-rt] [llvm] [FMV][AArch64] Remove features which expose non exploitable runtime behavior. (PR #114387)

2024-11-07 Thread Alexandros Lamprineas via cfe-commits
@@ -45,8 +45,6 @@ static void __init_cpu_features_constructor(unsigned long hwcap, setCPUFeature(FEAT_SSBS2); if (hwcap2 & HWCAP2_MTE) setCPUFeature(FEAT_MEMTAG2); - if (hwcap2 & HWCAP2_MTE3) labrinea wrote: There are no uses of the removed feature

[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-11-07 Thread Gábor Horváth via cfe-commits
@@ -1199,6 +1213,17 @@ static void checkExprLifetimeImpl(Sema &SemaRef, break; } +case LK_LifetimeCapture: { + if (!MTE) Xazax-hun wrote: Do we want to diagnose the following case: ``` std::set set; void addToSet(std::string_view s [[clang:

[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-11-07 Thread Gábor Horváth via cfe-commits
@@ -45,10 +48,14 @@ enum LifetimeKind { /// a default member initializer), the program is ill-formed. LK_MemInitializer, - /// The lifetime of a temporary bound to this entity probably ends too soon, + /// The lifetime of a temporary bound to this entity may end too soon

[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-11-07 Thread Gábor Horváth via cfe-commits
@@ -1873,6 +1873,46 @@ def LifetimeBound : DeclOrTypeAttr { let SimpleHandler = 1; } +def LifetimeCaptureBy : DeclOrTypeAttr { + let Spellings = [Clang<"lifetime_capture_by", 0>]; + let Subjects = SubjectList<[ParmVar, ImplicitObjectParameter], ErrorDiag>; + let Args = [V

[clang] bf30b6c - [HLSL][SPIRV][DXIL] Implement `dot4add_u8packed` intrinsic (#115068)

2024-11-07 Thread via cfe-commits
Author: Finn Plummer Date: 2024-11-07T10:19:41-08:00 New Revision: bf30b6c33c17d43402d23f8cade450437fcff800 URL: https://github.com/llvm/llvm-project/commit/bf30b6c33c17d43402d23f8cade450437fcff800 DIFF: https://github.com/llvm/llvm-project/commit/bf30b6c33c17d43402d23f8cade450437fcff800.diff

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `dot4add_u8packed` intrinsic (PR #115068)

2024-11-07 Thread Finn Plummer via cfe-commits
https://github.com/inbelic closed https://github.com/llvm/llvm-project/pull/115068 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Webkit Checkers] Introduce a Webkit checker for memory unsafe casts (PR #114606)

2024-11-07 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: Hm... I'm still hitting a crash. In debug builds, we hit this assertion: ``` Assertion failed: (DD && "queried property of class with no definition"), function data, file DeclCXX.h, line 452. PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the

[clang] [Clang][RISCV] Remove forced-sw-shadow-stack (PR #115355)

2024-11-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jesse Huang (jaidTw) Changes This option was used to override the behavior of `-fsanitize=shadowcallstack` on RISC-V backend, which by default use a hardware implementation if possible, to use the software implementation instead. After h

[clang] [Clang][RISCV] Remove forced-sw-shadow-stack (PR #115355)

2024-11-07 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw created https://github.com/llvm/llvm-project/pull/115355 This option was used to override the behavior of `-fsanitize=shadowcallstack` on RISC-V backend, which by default use a hardware implementation if possible, to use the software implementation instead. After htt

[clang] [Clang][RISCV] Remove forced-sw-shadow-stack (PR #115355)

2024-11-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Jesse Huang (jaidTw) Changes This option was used to override the behavior of `-fsanitize=shadowcallstack` on RISC-V backend, which by default use a hardware implementation if possible, to use the software implementation instead. A

[clang] [Webkit Checkers] Introduce a Webkit checker for memory unsafe casts (PR #114606)

2024-11-07 Thread Devin Coughlin via cfe-commits
https://github.com/devincoughlin commented: This is great to see! https://github.com/llvm/llvm-project/pull/114606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Webkit Checkers] Introduce a Webkit checker for memory unsafe casts (PR #114606)

2024-11-07 Thread Devin Coughlin via cfe-commits
https://github.com/devincoughlin edited https://github.com/llvm/llvm-project/pull/114606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Webkit Checkers] Introduce a Webkit checker for memory unsafe casts (PR #114606)

2024-11-07 Thread Devin Coughlin via cfe-commits
@@ -0,0 +1,117 @@ +//===- MemoryUnsafeCastChecker.cpp -*- 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: Apach

[clang] [NFC][Clang] Refactor ClangDiagnosticEmitter to use more StringRef (PR #115212)

2024-11-07 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/115212 >From c3df877042c59ca9c9303de0f1707359cd91e9bd Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Wed, 6 Nov 2024 11:22:55 -0800 Subject: [PATCH] [Clang] Refactor ClangDiagnosticEmitter to use more StringRef Refa

[clang] [llvm] [AArch64][SVE] Change the immediate argument in svextq (PR #115340)

2024-11-07 Thread via cfe-commits
https://github.com/SpencerAbson created https://github.com/llvm/llvm-project/pull/115340 In order to align with `svext` and NEON `vext`/`vextq`, this patch changes immediate argument in `svextq` such that it refers to elements of the size of those of the source vector, rather than bytes. The [

[libunwind] 5a8956e - [compiler-rt][libunwind] Support aarch64 without FPU (#111235)

2024-11-07 Thread via cfe-commits
Author: Keith Packard Date: 2024-11-07T08:32:45-08:00 New Revision: 5a8956ea8b8ac1ef7b6c4e42553a55063ab699ea URL: https://github.com/llvm/llvm-project/commit/5a8956ea8b8ac1ef7b6c4e42553a55063ab699ea DIFF: https://github.com/llvm/llvm-project/commit/5a8956ea8b8ac1ef7b6c4e42553a55063ab699ea.diff

[clang] [C2y] Implement WG14 N3344 (PR #115313)

2024-11-07 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Paper doesn't say, but presumably based on this patch, 'alternative #1' is > what was accepted? Correct, alternative #1 :-) https://github.com/llvm/llvm-project/pull/115313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-11-07 Thread Gábor Horváth via cfe-commits
@@ -1909,6 +1911,12 @@ void TypePrinter::printAttributedAfter(const AttributedType *T, OS << " [[clang::lifetimebound]]"; return; } + if (T->getAttrKind() == attr::LifetimeCaptureBy) { +// FIXME: Print the attribute arguments once we have a way to retrieve thes

[clang] [llvm] Introduce a new WebKit checker for a unchecked call arguments (#113708) (PR #114522)

2024-11-07 Thread Ryosuke Niwa via cfe-commits
@@ -1,4 +1,4 @@ -//===- UncountedCallArgsChecker.cpp --*- C++ -*-==// +//===- RawPtrRefCallArgsChecker.cpp --*- C++ -*-==// rniwa wrote: I don't think so. I could imagine `UncountedCallArgsChecker` and `U

[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-11-07 Thread Gábor Horváth via cfe-commits
@@ -1873,6 +1873,46 @@ def LifetimeBound : DeclOrTypeAttr { let SimpleHandler = 1; } +def LifetimeCaptureBy : DeclOrTypeAttr { + let Spellings = [Clang<"lifetime_capture_by", 0>]; + let Subjects = SubjectList<[ParmVar, ImplicitObjectParameter], ErrorDiag>; + let Args = [V

[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-11-07 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/111499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ef353b0 - Introduce a new WebKit checker for a unchecked call arguments (#113708) (#114522)

2024-11-07 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2024-11-07T08:34:37-08:00 New Revision: ef353b02b0728f2328c3494c70dc426d58d23508 URL: https://github.com/llvm/llvm-project/commit/ef353b02b0728f2328c3494c70dc426d58d23508 DIFF: https://github.com/llvm/llvm-project/commit/ef353b02b0728f2328c3494c70dc426d58d23508.diff

[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-11-07 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun commented: I did not get to the end of this PR yet, but I was wondering if it would make sense to split it up. One PR could add the attribute with the semantic analysis (e.g., warnings for ill-formed arguments). The second PR could introduce the lifetime analysis p

[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-11-07 Thread Gábor Horváth via cfe-commits
@@ -1873,6 +1873,46 @@ def LifetimeBound : DeclOrTypeAttr { let SimpleHandler = 1; } +def LifetimeCaptureBy : DeclOrTypeAttr { + let Spellings = [Clang<"lifetime_capture_by", 0>]; + let Subjects = SubjectList<[ParmVar, ImplicitObjectParameter], ErrorDiag>; + let Args = [V

[clang] [flang] [clang][Driver] Add RPATH by default (PR #115286)

2024-11-07 Thread Paul Osmialowski via cfe-commits
pawosm-arm wrote: > Some distributions (e.g. Fedora) have policies against DT_RUNPATH for system > packages. For as long as I remember, distros (and Fedora is a good example of this phenomenon) were patching the software packages heavily, so adding one more to ensure their well established po

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-07 Thread Jon Chesterfield via cfe-commits
JonChesterfield wrote: Awesome! This is absolutely something that has been on my todo stack for ages and it's very good to see someone else writing the thing. It looks like the implementation is contentious so I'll leave that for the moment. Under some time constraints so please forgive the le

[clang] [Webkit Checkers] Introduce a Webkit checker for memory unsafe casts (PR #114606)

2024-11-07 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: I'm hitting this crash in the checker when I try to compile WebKit with this patch applied: ``` Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it): 0 clang-17 0x00010fb

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-07 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet commented: > Note that there are a few open comments from previous iterations. I tried to go over them, but github UI was ... suboptimal. So PLMK if you got some that aren't addressed in this revision as well. https://github.com/llvm/llvm-project/pull/112517 ___

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-07 Thread kadir çetinkaya via cfe-commits
@@ -167,4 +176,159 @@ TEST(DiagnosticTest, storedDiagEmptyWarning) { // Make sure an empty warning can round-trip with \c StoredDiagnostic. Diags.Report(CaptureConsumer.StoredDiags.front()); } + +class SuppressionMappingTest : public testing::Test { +public: + SuppressionM

[clang] [Clang] skip default argument instantiation for non-defining friend declarations without specialization info to meet [dcl.fct.default] p4 (PR #113777)

2024-11-07 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk edited https://github.com/llvm/llvm-project/pull/113777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Introduce a new generic target `gfx9-4-generic` (PR #115190)

2024-11-07 Thread Konstantin Zhuravlyov via cfe-commits
@@ -576,6 +576,12 @@ Generic processor code objects are versioned. See :ref:`amdgpu-generic-processor - ``v_dot2_f32_f16`` + ``gfx9-4-generic`` ``amdgcn`` - ``gfx940`

[clang] [llvm] Introduce a new WebKit checker for a unchecked call arguments (#113708) (PR #114522)

2024-11-07 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: Thanks for the review! https://github.com/llvm/llvm-project/pull/114522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] skip default argument instantiation for non-defining friend declarations without specialization info to meet [dcl.fct.default] p4 (PR #113777)

2024-11-07 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @zyn0217 done https://github.com/llvm/llvm-project/pull/113777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add `EvalASTMutator` interface (PR #115168)

2024-11-07 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/115168 >From 5ca48e03412b1b8e9253f13356b9cc957f6fd9e5 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 6 Nov 2024 17:58:43 +0300 Subject: [PATCH 1/4] Add EvalASTMutator interface with `InstantiateFunctionD

[clang] [llvm] [Transforms][Utils][PromoteMem2Reg] Propagate nnan and ninf flags on par with the nsz flag (PR #114271)

2024-11-07 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm approved this pull request. https://github.com/llvm/llvm-project/pull/114271 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][NFC] Remove check::BranchCondition from debug.DumpTraversal (PR #113906)

2024-11-07 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat closed https://github.com/llvm/llvm-project/pull/113906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-07 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,90 @@ + +Warning suppression mappings + + +.. contents:: + :local: + +Introduction + + +Warning suppression mappings enable users to suppress Clang's diagnostics in a +per-file granular manner. Enabli

[clang] [C2y] Add conformance test for WG14 N3364 (PR #115332)

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

[clang] c1ead03 - [C2y] Add conformance test for WG14 N3364 (#115332)

2024-11-07 Thread via cfe-commits
Author: Aaron Ballman Date: 2024-11-07T11:53:59-05:00 New Revision: c1ead03e01e47c797e32a3f981ace5ef21eebd18 URL: https://github.com/llvm/llvm-project/commit/c1ead03e01e47c797e32a3f981ace5ef21eebd18 DIFF: https://github.com/llvm/llvm-project/commit/c1ead03e01e47c797e32a3f981ace5ef21eebd18.diff

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

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

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-07 Thread kadir çetinkaya via cfe-commits
@@ -477,6 +486,136 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor Flavor, setSeverity(Diag, Map, Loc); } +namespace { +// FIXME: We should isolate the parser from SpecialCaseList and just use it +// here. +class WarningsSpecialCaseList : public llvm::SpecialC

[clang] [Clang] Dispatch default overloads of `TemplateArgumentVisitor` to the implementation (PR #115336)

2024-11-07 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan edited https://github.com/llvm/llvm-project/pull/115336 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-11-07 Thread Sam Elliott via cfe-commits
lenary wrote: > > I think we shouldn't do this for RVA22, so as not to break existing users > > of that profile, who may have a toolchain that doesn't support B. > > This change makes sense to me for the RV*23 profiles, especially since your > > change to RVM23 has been accepted. > > For RVA22

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-07 Thread kadir çetinkaya via cfe-commits
@@ -701,11 +702,10 @@ class CompilerInstance : public ModuleLoader { /// used by some diagnostics printers (for logging purposes only). /// /// \return The new object on success, or null on failure. - static IntrusiveRefCntPtr - createDiagnostics(DiagnosticOptions *Opts

[clang] [Clang] Remove the wrong assumption when rebuilding SizeOfPackExprs for constraint normalization (PR #115120)

2024-11-07 Thread Matheus Izvekov via cfe-commits
@@ -1731,31 +1731,21 @@ namespace { return inherited::TransformLambdaBody(E, Body); } -ExprResult RebuildSizeOfPackExpr(SourceLocation OperatorLoc, - NamedDecl *Pack, SourceLocation PackLoc, -

[clang] [Clang] Improve EmitClangAttrSpellingListIndex (PR #114899)

2024-11-07 Thread Erich Keane via cfe-commits
@@ -3843,19 +3844,60 @@ void EmitClangAttrSpellingListIndex(const RecordKeeper &Records, const Record &R = *I.second; std::vector Spellings = GetFlattenedSpellings(R); OS << " case AT_" << I.first << ": {\n"; -for (unsigned I = 0; I < Spellings.size(); ++ I) {

[clang] [Clang] Remove the wrong assumption when rebuilding SizeOfPackExprs for constraint normalization (PR #115120)

2024-11-07 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/115120 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add clang atomic control options and attribute (PR #114841)

2024-11-07 Thread Yaxun Liu via cfe-commits
@@ -0,0 +1,19 @@ +//===--- AtomicOptions.def - Atomic Options database -*- 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: Ap

[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

2024-11-07 Thread via cfe-commits
https://github.com/goldsteinn updated https://github.com/llvm/llvm-project/pull/112792 >From 802764e879862541e205ba1a070824b71d2fef9a Mon Sep 17 00:00:00 2001 From: Noah Goldstein Date: Thu, 17 Oct 2024 17:31:24 -0500 Subject: [PATCH 01/12] [emacs][clang-format] Add elisp API for clang-format o

[clang] Enable AST mutation in the constant evaluator (PR #115168)

2024-11-07 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/115168 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] skip default argument instantiation for non-defining friend declarations without specialization info to meet [dcl.fct.default] p4 (PR #113777)

2024-11-07 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @mizvekov thanks https://github.com/llvm/llvm-project/pull/113777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

2024-11-07 Thread Michael Toguchi via cfe-commits
mdtoguchi wrote: Ping https://github.com/llvm/llvm-project/pull/107493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Distinguish expanding-packs-in-place cases for SubstTemplateTypeParmTypes (PR #114220)

2024-11-07 Thread Matheus Izvekov via cfe-commits
@@ -3149,9 +3156,15 @@ struct ExpandPackedTypeConstraints assert(SemaRef.ArgumentPackSubstitutionIndex != -1); +TemplateArgument Arg = TemplateArgs(T->getDepth(), T->getIndex()); + +std::optional PackIndex; +if (Arg.getKind() == TemplateArgument::Pack) +

[clang] [llvm] [HLSL][SPIRV] Added clamp intrinsic (PR #113394)

2024-11-07 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/113394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][serialization] Pass `ASTContext` explicitly (PR #115235)

2024-11-07 Thread Ben Langmuir via cfe-commits
@@ -4753,15 +4755,12 @@ void ASTWriter::AddString(StringRef Str, RecordDataImpl &Record) { } bool ASTWriter::PreparePathForOutput(SmallVectorImpl &Path) { - assert(Context && "should have context when outputting path"); - // Leave special file names as they are. String

[clang] 7bd9be2 - [Driver] Use heterogenous lookups with std::set (NFC) (#115259)

2024-11-07 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-11-07T10:54:12-08:00 New Revision: 7bd9be2e0a74e6d17ec3f95ff364a4461dec4dbe URL: https://github.com/llvm/llvm-project/commit/7bd9be2e0a74e6d17ec3f95ff364a4461dec4dbe DIFF: https://github.com/llvm/llvm-project/commit/7bd9be2e0a74e6d17ec3f95ff364a4461dec4dbe.diff L

[clang] c714f92 - [InstallAPI] Call DenseMap::find without constructing std::string (NFC) (#115260)

2024-11-07 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-11-07T10:54:35-08:00 New Revision: c714f928b2f9ab3dd481f272a2aa72b83fd0562e URL: https://github.com/llvm/llvm-project/commit/c714f928b2f9ab3dd481f272a2aa72b83fd0562e DIFF: https://github.com/llvm/llvm-project/commit/c714f928b2f9ab3dd481f272a2aa72b83fd0562e.diff L

[clang] [InstallAPI] Call DenseMap::find without constructing std::string (NFC) (PR #115260)

2024-11-07 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/115260 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Use heterogenous lookups with std::set (NFC) (PR #115259)

2024-11-07 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/115259 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Distinguish expanding-packs-in-place cases for SubstTemplateTypeParmTypes (PR #114220)

2024-11-07 Thread Shafik Yaghmour via cfe-commits
@@ -3149,9 +3156,15 @@ struct ExpandPackedTypeConstraints assert(SemaRef.ArgumentPackSubstitutionIndex != -1); +TemplateArgument Arg = TemplateArgs(T->getDepth(), T->getIndex()); + +std::optional PackIndex; +if (Arg.getKind() == TemplateArgument::Pack) +

[clang] [Webkit Checkers] Introduce a Webkit checker for memory unsafe casts (PR #114606)

2024-11-07 Thread Ryosuke Niwa via cfe-commits
@@ -0,0 +1,117 @@ +//===- MemoryUnsafeCastChecker.cpp -*- 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: Apach

[clang] Add clang atomic control options and attribute (PR #114841)

2024-11-07 Thread Yaxun Liu via cfe-commits
@@ -569,19 +569,21 @@ void AMDGPUTargetCodeGenInfo::setTargetAtomicMetadata( AtomicInst.setMetadata(llvm::LLVMContext::MD_noalias_addrspace, ASRange); } - if (!RMW || !CGF.getTarget().allowAMDGPUUnsafeFPAtomics()) + if (!RMW) return; - // TODO: Introduce new, m

[clang] Add clang atomic control options and attribute (PR #114841)

2024-11-07 Thread Yaxun Liu via cfe-commits
@@ -0,0 +1,30 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify -fcuda-is-device %s +// RUN: %clang_cc1 -fsyntax-only -verify -fcuda-is-device %s \ +// RUN: -fatomic=no_fine_grained_memory:off,no_remote_memory:on,ignore_denormal_mode:on +

[clang] [llvm] [Clang] Match MSVC handling of duplicate header search paths in Microsoft compatibility modes. (PR #105738)

2024-11-07 Thread Tom Honermann via cfe-commits
tahonermann wrote: > Doesn't that impact whether a header is found via `""` or `<>` syntax? e.g., > if something went from a user header to a system header, I thought that meant > the search order would then change depending on which include syntax you used? No, those are orthogonal concerns,

[clang] [Webkit Checkers] Introduce a Webkit checker for memory unsafe casts (PR #114606)

2024-11-07 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa edited https://github.com/llvm/llvm-project/pull/114606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 24e2e25 - [C2y] Implement WG14 N3344 (#115313)

2024-11-07 Thread via cfe-commits
Author: Aaron Ballman Date: 2024-11-07T10:34:00-05:00 New Revision: 24e2e259a06d9aa67dc278ac24dcb98da9dd63f6 URL: https://github.com/llvm/llvm-project/commit/24e2e259a06d9aa67dc278ac24dcb98da9dd63f6 DIFF: https://github.com/llvm/llvm-project/commit/24e2e259a06d9aa67dc278ac24dcb98da9dd63f6.diff

[clang] [clang][serialization] Pass `ASTContext` explicitly (PR #115235)

2024-11-07 Thread Jan Svoboda via cfe-commits
@@ -4753,15 +4755,12 @@ void ASTWriter::AddString(StringRef Str, RecordDataImpl &Record) { } bool ASTWriter::PreparePathForOutput(SmallVectorImpl &Path) { - assert(Context && "should have context when outputting path"); - // Leave special file names as they are. String

[clang] [analyzer][NFC] Remove check::BranchCondition from debug.DumpTraversal (PR #113906)

2024-11-07 Thread Donát Nagy via cfe-commits
NagyDonat wrote: Thanks for the information! I'll merge this now and I might create a followup commit to remove the rest of `TraversalChecker.cpp` later. https://github.com/llvm/llvm-project/pull/113906 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [Clang] Improve EmitClangAttrSpellingListIndex (PR #114899)

2024-11-07 Thread Chinmay Deshpande via cfe-commits
https://github.com/chinmaydd updated https://github.com/llvm/llvm-project/pull/114899 >From cf4d70c23b2896483b452622300aa4c8c41c01e5 Mon Sep 17 00:00:00 2001 From: Chinmay Deshpande Date: Fri, 1 Nov 2024 19:49:52 -0400 Subject: [PATCH 1/5] [Clang] Improve EmitClangAttrSpellingListIndex EmitCla

[clang] [clang] Set FPOptions at the beginning of CompoundStmt (PR #111654)

2024-11-07 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/111654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Set FPOptions at the beginning of CompoundStmt (PR #111654)

2024-11-07 Thread Zahira Ammarguellat via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -ffast-math -ffp-contract=fast -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -ffast-math -ffp-contract=fast -emit-llvm -O2 -o - %s | FileCheck %s zahiraam wrote: It seems to me that this issue exists only at O2, right

[clang] [clang] Set FPOptions at the beginning of CompoundStmt (PR #111654)

2024-11-07 Thread Zahira Ammarguellat via cfe-commits
@@ -1684,6 +1684,15 @@ class CompoundStmt final return hasStoredFPFeatures() ? getStoredFPFeatures() : FPOptionsOverride(); } + /// Get FPOptions inside this statement. They may differ from the outer + /// options due to pragmas. + /// \param CurFPOptions FPOptions ou

[clang] [clang] Set FPOptions at the beginning of CompoundStmt (PR #111654)

2024-11-07 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam commented: You seem to have some fails in the CI. https://github.com/llvm/llvm-project/pull/111654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [z/OS] Make sure __alignas_is_defined and __alignof_is_defined are defined on z/OS. (PR #115368)

2024-11-07 Thread Zibi Sarbinowski via cfe-commits
https://github.com/zibi2 created https://github.com/llvm/llvm-project/pull/115368 None >From 34569fd0fbe6894d598d48e2088040ee730d308d Mon Sep 17 00:00:00 2001 From: Zbigniew Sarbinowski Date: Thu, 7 Nov 2024 20:27:52 + Subject: [PATCH] Make sure __alignas_is_defined and __alignof_is_define

[clang] [z/OS] Make sure __alignas_is_defined and __alignof_is_defined are defined on z/OS. (PR #115368)

2024-11-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Zibi Sarbinowski (zibi2) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/115368.diff 1 Files Affected: - (modified) clang/lib/Headers/stdalign.h (-5) ``diff diff --git a/clang/lib/Headers/stdalign.h b/clang/

[clang] [z/OS] Make sure __alignas_is_defined and __alignof_is_defined are defined on z/OS. (PR #115368)

2024-11-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Zibi Sarbinowski (zibi2) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/115368.diff 1 Files Affected: - (modified) clang/lib/Headers/stdalign.h (-5) ``diff diff --git a/clang/lib/Headers/stdalign.h b/

[clang] [z/OS] Make sure __alignas_is_defined and __alignof_is_defined are defined on z/OS. (PR #115368)

2024-11-07 Thread Abhina Sree via cfe-commits
https://github.com/abhina-sree approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/115368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix for OpenMP offloading compilation error with GNU++20 option when using complex header (PR #115306)

2024-11-07 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] [C2y] Add test coverage for WG14 N3370 (PR #115054)

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

[clang] [clang] Support 'this' position for lifetimebound attribute (PR #115021)

2024-11-07 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun updated https://github.com/llvm/llvm-project/pull/115021 From 2c1b0358a5ebc65af8c4abc0720fc1febeb3109d Mon Sep 17 00:00:00 2001 From: Gabor Horvath Date: Tue, 5 Nov 2024 16:37:57 + Subject: [PATCH] [clang] Support 'this' position for lifetimebound attribute Thi

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-07 Thread Finn Plummer via cfe-commits
@@ -812,6 +821,34 @@ def SplitDouble : DXILOp<102, splitDouble> { let attributes = [Attributes]; } +def WaveIsFirstLane : DXILOp<110, waveIsFirstLane> { inbelic wrote: This reordering will be addressed as part of DXIL.td clean-up in #114461. https://gith

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-07 Thread Finn Plummer via cfe-commits
@@ -75,7 +75,9 @@ static const std::map {"SPV_KHR_cooperative_matrix", SPIRV::Extension::Extension::SPV_KHR_cooperative_matrix}, {"SPV_KHR_non_semantic_info", - SPIRV::Extension::Extension::SPV_KHR_non_semantic_info}}; + SPIRV::Extension

[clang] [HLSL] Add empty struct test cases to `__builtin_hlsl_is_typed_resource_element_compatible` test file (PR #115045)

2024-11-07 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/115045 >From ef4a7eea3eacce4f77b628aebe7f2838733971d0 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Tue, 5 Nov 2024 10:35:59 -0800 Subject: [PATCH 1/4] add empty struct test cases --- .../SemaHLSL/Types/Traits

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-07 Thread Finn Plummer via cfe-commits
@@ -2120,6 +2123,32 @@ bool SPIRVInstructionSelector::selectSplatVector(Register ResVReg, return MIB.constrainAllUses(TII, TRI, RBI); } +bool SPIRVInstructionSelector::selectClip(Register ResVReg, + const SPIRVType *ResType, +

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-07 Thread Finn Plummer via cfe-commits
@@ -89,6 +89,7 @@ let TargetPrefix = "spv" in { def int_spv_sign : DefaultAttrsIntrinsic<[LLVMScalarOrSameVectorWidth<0, llvm_i32_ty>], [llvm_any_ty], [IntrNoMem]>; def int_spv_radians : DefaultAttrsIntrinsic<[LLVMMatchType<0>], [llvm_anyfloat_ty], [IntrNoMem]>; def int

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-07 Thread Finn Plummer via cfe-commits
@@ -456,6 +456,7 @@ defm VulkanMemoryModelDeviceScopeKHR : CapabilityOperand<5346, 0, 0, [], []>; defm ImageFootprintNV : CapabilityOperand<5282, 0, 0, [], []>; defm FragmentBarycentricNV : CapabilityOperand<5284, 0, 0, [], []>; defm ComputeDerivativeGroupQuadsNV : CapabilityO

  1   2   3   4   5   >