[clang] [CodeGen] Avoid repeated hash lookup (NFC) (PR #108735)

2024-09-15 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/108735 None >From 244ac0c6799d4cd1afb4134fbbd711e4250b96d4 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 13 Sep 2024 21:27:55 -0700 Subject: [PATCH] [CodeGen] Avoid repeated hash lookup (NFC) --- clan

[clang] [CodeGen] Avoid repeated hash lookup (NFC) (PR #108735)

2024-09-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/108735.diff 1 Files Affected: - (modified) clang/lib/CodeGen/CGOpenMPRuntime.cpp (+1-6) ``diff diff --git a/clang/lib/CodeGen/CGOp

[clang] [TableGen] Avoid repeated hash lookups (NFC) (PR #108736)

2024-09-15 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/108736 None >From 38db9c4e0d85afd6ece4ca91221205492d374d12 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 13 Sep 2024 21:32:36 -0700 Subject: [PATCH] [TableGen] Avoid repeated hash lookups (NFC) --- cl

[clang] [TableGen] Avoid repeated hash lookups (NFC) (PR #108736)

2024-09-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/108736.diff 1 Files Affected: - (modified) clang/utils/TableGen/ClangAttrEmitter.cpp (+2-4) ``diff diff --git a/clang/utils/TableG

[clang] [Frontend] Avoid repeated hash lookups (NFC) (PR #108738)

2024-09-15 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/108738 None >From 21dcd68cb908289a77470e8c8878452d25b99200 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 13 Sep 2024 21:29:51 -0700 Subject: [PATCH] [Frontend] Avoid repeated hash lookups (NFC) --- cl

[clang] [Frontend] Avoid repeated hash lookups (NFC) (PR #108738)

2024-09-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/108738.diff 1 Files Affected: - (modified) clang/lib/Frontend/Rewrite/RewriteObjC.cpp (+1-2) ``diff diff --git a/clang/lib/Fronten

[clang] [llvm] [CGData][ThinLTO] Global Outlining with Two-CodeGen Rounds (PR #90933)

2024-09-15 Thread Kyungwoo Lee via cfe-commits
https://github.com/kyulee-com updated https://github.com/llvm/llvm-project/pull/90933 >From 95709740e820c0efddb1fdb53436a03194a1b88e Mon Sep 17 00:00:00 2001 From: Kyungwoo Lee Date: Fri, 26 Apr 2024 20:02:52 -0700 Subject: [PATCH 1/2] [ThinLTO][NFC] Prep for two-codegen rounds --- clang/lib/

[clang] [llvm] [CGData][ThinLTO] Global Outlining with Two-CodeGen Rounds (PR #90933)

2024-09-15 Thread Kyungwoo Lee via cfe-commits
https://github.com/kyulee-com updated https://github.com/llvm/llvm-project/pull/90933 >From c1a0219457a3c162d7fa6b9d70750ba7a040d9f2 Mon Sep 17 00:00:00 2001 From: Kyungwoo Lee Date: Fri, 26 Apr 2024 20:02:52 -0700 Subject: [PATCH 1/2] [ThinLTO][NFC] Prep for two-codegen rounds --- clang/lib/

[clang] [llvm] [CGData][ThinLTO][NFC] Prep for two-codegen rounds (PR #90934)

2024-09-15 Thread Kyungwoo Lee via cfe-commits
https://github.com/kyulee-com updated https://github.com/llvm/llvm-project/pull/90934 >From c1a0219457a3c162d7fa6b9d70750ba7a040d9f2 Mon Sep 17 00:00:00 2001 From: Kyungwoo Lee Date: Fri, 26 Apr 2024 20:02:52 -0700 Subject: [PATCH] [ThinLTO][NFC] Prep for two-codegen rounds --- clang/lib/Code

[clang] [llvm] [CGData][ThinLTO] Global Outlining with Two-CodeGen Rounds (PR #90933)

2024-09-15 Thread Kyungwoo Lee via cfe-commits
https://github.com/kyulee-com edited https://github.com/llvm/llvm-project/pull/90933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Support specifying address space in clang builtin prototypes (PR #108497)

2024-09-15 Thread Vikram Hegde via cfe-commits
vikramRH wrote: Gentle ping @AaronBallman , @philnik777 , @fpetrogalli :) https://github.com/llvm/llvm-project/pull/108497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86][test] Avoid writing to a potentially write-protected dir (PR #108525)

2024-09-15 Thread Malay Sanghi via cfe-commits
https://github.com/MalaySanghi closed https://github.com/llvm/llvm-project/pull/108525 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86][test] Avoid writing to a potentially write-protected dir (PR #108525)

2024-09-15 Thread Malay Sanghi via cfe-commits
MalaySanghi wrote: > I have submitted it as > [a41bb71](https://github.com/llvm/llvm-project/commit/a41bb71f2216cef08ab04f1d730ae1701c145f3c) > (with 3 files). Sorry for the race, but I want it working :) Apologies for missing that file and thanks for taking this up. https://github.com/llvm/l

[clang] [Frontend] Avoid repeated hash lookups (NFC) (PR #108738)

2024-09-15 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/108738 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TableGen] Avoid repeated hash lookups (NFC) (PR #108736)

2024-09-15 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/108736 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Avoid repeated hash lookup (NFC) (PR #108735)

2024-09-15 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/108735 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix regression in AlwaysBreak for-await (PR #108634)

2024-09-15 Thread Owen Pan via cfe-commits
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/108634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix regression in BAS_AlwaysBreak for-await (PR #108634)

2024-09-15 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/108634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Avoid repeated hash lookup (NFC) (PR #108735)

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

[clang] cc96ce8 - [CodeGen] Avoid repeated hash lookup (NFC) (#108735)

2024-09-15 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-09-15T01:20:29-07:00 New Revision: cc96ce831cda8f70897926fdce6a83519fe5b31e URL: https://github.com/llvm/llvm-project/commit/cc96ce831cda8f70897926fdce6a83519fe5b31e DIFF: https://github.com/llvm/llvm-project/commit/cc96ce831cda8f70897926fdce6a83519fe5b31e.diff L

[clang] 56f061f - [TableGen] Avoid repeated hash lookups (NFC) (#108736)

2024-09-15 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-09-15T01:20:37-07:00 New Revision: 56f061f71b66a01a7f89069873f9c6dcda82b044 URL: https://github.com/llvm/llvm-project/commit/56f061f71b66a01a7f89069873f9c6dcda82b044 DIFF: https://github.com/llvm/llvm-project/commit/56f061f71b66a01a7f89069873f9c6dcda82b044.diff L

[clang] [git-clang-format] Fix: make the tool backward compatible (PR #108721)

2024-09-15 Thread Owen Pan via cfe-commits
owenca wrote: Why do we need to make newer versions of git-clang-format "compatible" with older versions of clang-format? Shouldn't both be from the same LLVM release? https://github.com/llvm/llvm-project/pull/108721 ___ cfe-commits mailing list cfe-c

[clang] [TableGen] Avoid repeated hash lookups (NFC) (PR #108736)

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

[clang] [Frontend] Avoid repeated hash lookups (NFC) (PR #108738)

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

[clang] ba7a0b7 - [Frontend] Avoid repeated hash lookups (NFC) (#108738)

2024-09-15 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-09-15T01:21:00-07:00 New Revision: ba7a0b725c67e9c3a31f5ffedb6fbe4c5237ac56 URL: https://github.com/llvm/llvm-project/commit/ba7a0b725c67e9c3a31f5ffedb6fbe4c5237ac56 DIFF: https://github.com/llvm/llvm-project/commit/ba7a0b725c67e9c3a31f5ffedb6fbe4c5237ac56.diff L

[clang] [clang-format] Fix a bug in annotating StartOfName (PR #99791)

2024-09-15 Thread Owen Pan via cfe-commits
owenca wrote: > That is very unfortunate. It means one will either get different results for > the clang-format versions, one disables the formatting, or works around it by > sth. Like Q_EMIT(something()->mySignal()). Or wait for the next release (in this case 19.1.0, which is just around the

[clang] [compiler-rt] [llvm] [FMV][AArch64] Unify ls64, ls64_v and ls64_accdata. (PR #108024)

2024-09-15 Thread via cfe-commits
@@ -73,8 +73,6 @@ enum CPUFeatures { FEAT_SSBS, FEAT_SSBS2, FEAT_BTI, - FEAT_LS64, - FEAT_LS64_V, Wilco1 wrote: Yes, that's a way to keep backwards compatibility with older ABIs. However we can't break this ABI every compiler release (except perhaps t

[clang-tools-extra] [clang-tidy] fix false positive when member initialization depends on structured binging variable in cppcoreguidelines-prefer-member-initializer (PR #108743)

2024-09-15 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/108743 Fixes: #82970 Detecting dependiences with `varDecl` is too strict. It will ignore the `bingingDecl`. This patch wants to use `valueDecl` to match more cases including `bingingDecl`. >From b81896cc8c5bef06

[clang-tools-extra] [clang-tidy] fix false positive when member initialization depends on structured binging variable in cppcoreguidelines-prefer-member-initializer (PR #108743)

2024-09-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Congcong Cai (HerrCai0907) Changes Fixes: #82970 Detecting dependiences with `varDecl` is too strict. It will ignore the `bingingDecl`. This patch wants to use `valueDecl` to match more cases including `bingingDecl`. --- Ful

[clang] [llvm] [AMDGPU] Convert AMDGPUResourceUsageAnalysis pass from Module to MF pass (PR #102913)

2024-09-15 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,225 @@ +//===- AMDGPUMCResourceInfo.cpp --- MC Resource Info --===// +// +// 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] [llvm] [AMDGPU] Convert AMDGPUResourceUsageAnalysis pass from Module to MF pass (PR #102913)

2024-09-15 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,225 @@ +//===- AMDGPUMCResourceInfo.cpp --- MC Resource Info --===// +// +// 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] [llvm] [AMDGPU] Convert AMDGPUResourceUsageAnalysis pass from Module to MF pass (PR #102913)

2024-09-15 Thread Matt Arsenault via cfe-commits
@@ -40,12 +42,19 @@ class AMDGPUAsmPrinter final : public AsmPrinter { AMDGPUResourceUsageAnalysis *ResourceUsage; + MCResourceInfo RI; + SIProgramInfo CurrentProgramInfo; std::unique_ptr HSAMetadataStream; MCCodeEmitter *DumpCodeInstEmitter = nullptr; + //

[clang] [llvm] [AMDGPU] Change CF intrinsics lowering to reconverge on predecessors. (PR #92809)

2024-09-15 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm closed https://github.com/llvm/llvm-project/pull/92809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Change CF intrinsics lowering to reconverge on predecessors. (PR #92809)

2024-09-15 Thread Matt Arsenault via cfe-commits
arsenm wrote: Replaced by #108596 https://github.com/llvm/llvm-project/pull/92809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] handle invalid close location in static assert declaration (PR #108701)

2024-09-15 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/108701 >From cbe06cf33277f904fe002db90d428a55b777ff5d Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sat, 14 Sep 2024 17:02:01 +0300 Subject: [PATCH 1/3] [Clang] handle invalid close location in static assert dec

[clang] [git-clang-format] Fix: make the tool backward compatible (PR #108721)

2024-09-15 Thread Eden Reich via cfe-commits
edenreich wrote: Because I was trying to use this tool with the current stable release of clang-format, and it's currently broken? IDK, or I just wait for the next release of clang-format before I can consider using git-clang-format 🤷‍♂️ https://github.com/llvm/llvm-project/pull/108721 __

[clang] [git-clang-format] Fix: make the tool backward compatible (PR #108721)

2024-09-15 Thread Eden Reich via cfe-commits
https://github.com/edenreich closed https://github.com/llvm/llvm-project/pull/108721 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a56ca1a - [clang][codegen] Fix possible crash when setting TBAA metadata on FP math libcalls (#108575)

2024-09-15 Thread via cfe-commits
Author: Benjamin Maxwell Date: 2024-09-15T13:41:26+01:00 New Revision: a56ca1a0fb248c6f38b5841323a74673748f43ea URL: https://github.com/llvm/llvm-project/commit/a56ca1a0fb248c6f38b5841323a74673748f43ea DIFF: https://github.com/llvm/llvm-project/commit/a56ca1a0fb248c6f38b5841323a74673748f43ea.di

[clang] [clang][codegen] Fix possible crash when setting TBAA metadata on FP math libcalls (PR #108575)

2024-09-15 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue closed https://github.com/llvm/llvm-project/pull/108575 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #94647)

2024-09-15 Thread Matt Arsenault via cfe-commits
@@ -434,6 +434,15 @@ struct AAAMDAttributesFunction : public AAAMDAttributes { indicatePessimisticFixpoint(); return; } + +for (Instruction &I : instructions(F)) { + if (isa(I) && arsenm wrote: For a nightmare of an edge case, addrspac

[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #94647)

2024-09-15 Thread Matt Arsenault via cfe-commits
@@ -678,6 +690,37 @@ struct AAAMDAttributesFunction : public AAAMDAttributes { return !A.checkForAllCallLikeInstructions(DoesNotRetrieve, *this, UsedAssumedInformation); } + + // Returns true if FlatScratchInit is needed, i.e

[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #94647)

2024-09-15 Thread Matt Arsenault via cfe-commits
@@ -678,6 +690,37 @@ struct AAAMDAttributesFunction : public AAAMDAttributes { return !A.checkForAllCallLikeInstructions(DoesNotRetrieve, *this, UsedAssumedInformation); } + + // Returns true if FlatScratchInit is needed, i.e

[clang] [Clang] handle invalid close location in static assert declaration (PR #108701)

2024-09-15 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @zyn0217 Thanks for the detailed feedback. I considered handling it earlier and skipping the validation of the closing parenthesis, but I was concerned the message `"expected ';' after 'static_assert'"` might not be accurate in this case., I assumed `""` is a valid string, ev

[clang] [CGData] Clang Options (PR #90304)

2024-09-15 Thread Kyungwoo Lee via cfe-commits
https://github.com/kyulee-com edited https://github.com/llvm/llvm-project/pull/90304 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] fix false positive that floating point variable only used in increment expr in cert-flp30-c (PR #108706)

2024-09-15 Thread via cfe-commits
@@ -111,6 +111,9 @@ Changes in existing checks ` check to suggest replacing the offending code with ``reinterpret_cast``, to more clearly express intent. +- Improved :doc:`cert-flp30-c` check to + fix false positive that floating point variable only used in increment exp

[clang] [Clang] Allow user defined conversion implicit cast to _Complex types in constant expressions (PR #108758)

2024-09-15 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok created https://github.com/llvm/llvm-project/pull/108758 This already worked with `-fexperimental-new-constant-interpreter` Fixes #108750 >From 0a6b4e83318af66888f6297549a806b5d81e4933 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sun, 15 Sep 2024 15:48:59 +01

[clang] [Clang] Allow user defined conversion implicit cast to _Complex types in constant expressions (PR #108758)

2024-09-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mital Ashok (MitalAshok) Changes This already worked with `-fexperimental-new-constant-interpreter` Fixes #108750 --- Full diff: https://github.com/llvm/llvm-project/pull/108758.diff 3 Files Affected: - (modified) clang/docs/ReleaseNot

[clang] [clang][NFC] declare internal linkage function static (PR #108759)

2024-09-15 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/108759 Detected by `misc-use-internal-linkage` >From 3e4add8033e9ca6d3c4b5fb062a6370a07e71381 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sun, 15 Sep 2024 21:18:01 +0800 Subject: [PATCH] [clang][NFC] declar

[clang] [clang][NFC] declare internal linkage function static (PR #108759)

2024-09-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Congcong Cai (HerrCai0907) Changes Detected by `misc-use-internal-linkage` --- Full diff: https://github.com/llvm/llvm-project/pull/108759.diff 9 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/MoveChec

[clang] [clang][NFC] declare internal linkage function static (PR #108759)

2024-09-15 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 9fc789d922ddf1c849f62bdfbe034f3cd9354967 3e4add8033e9ca6d3c4b5fb062a6370a07e71381 --e

[clang] [clang][NFC] declare internal linkage function static (PR #108759)

2024-09-15 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/108759 >From cf770d55592adb41d072caa5f1aca7cd739d6e2b Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sun, 15 Sep 2024 21:18:01 +0800 Subject: [PATCH] [clang][NFC] declare internal linkage function static Detect

[clang] [Clang] Allow user defined conversion implicit cast to _Complex types in constant expressions (PR #108758)

2024-09-15 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 approved this pull request. https://github.com/llvm/llvm-project/pull/108758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix evaluation of the unsigned enumeration values, #108766 (PR #108769)

2024-09-15 Thread Dmitry Fursov via cfe-commits
https://github.com/fursov created https://github.com/llvm/llvm-project/pull/108769 If the type of an enumeration is not native (e.g. uint8_t) but is unsigned then evaluation of the value might get wrong: for values bigger than half of type range the return value will be negative. This happens

[clang] Fix evaluation of the unsigned enumeration values, #108766 (PR #108769)

2024-09-15 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] Fix evaluation of the unsigned enumeration values, #108766 (PR #108769)

2024-09-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Dmitry Fursov (fursov) Changes If the type of an enumeration is not native (e.g. uint8_t) but is unsigned then evaluation of the value might get wrong: for values bigger than half of type range the return value will be negative. This happ

[clang] [clang] Add nuw attribute to GEPs (PR #105496)

2024-09-15 Thread Cheng Shao via cfe-commits
TerrorJack wrote: This breaks wasm codegen: https://github.com/llvm/llvm-project/issues/108770 https://github.com/llvm/llvm-project/pull/105496 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [Clang] Propagate elide safe context through [[clang::coro_must_await]] (PR #108474)

2024-09-15 Thread Yuxuan Chen via cfe-commits
@@ -880,14 +898,12 @@ ExprResult Sema::BuildUnresolvedCoawaitExpr(SourceLocation Loc, Expr *Operand, } auto *RD = Promise->getType()->getAsCXXRecordDecl(); - bool AwaitElidable = - isCoroAwaitElidableCall(Operand) && - isAttributedCoroAwaitElidable( -

[clang] [Clang] Propagate elide safe context through [[clang::coro_must_await]] (PR #108474)

2024-09-15 Thread Yuxuan Chen via cfe-commits
@@ -8261,12 +8261,19 @@ def CoroAwaitElidableDoc : Documentation { The ``[[clang::coro_await_elidable]]`` is a class attribute which can be applied to a coroutine return type. -When a coroutine function that returns such a type calls another coroutine function, -the compiler

[clang] Revert "[HIP] Use original file path for CUID" (PR #108771)

2024-09-15 Thread via cfe-commits
https://github.com/dyung created https://github.com/llvm/llvm-project/pull/108771 Reverts llvm/llvm-project#107734 The test modified in this commit, hip-cuid-hash.hip is failing on MacOS: - https://lab.llvm.org/buildbot/#/builders/190/builds/5764 - https://lab.llvm.org/buildbot/#/builders/23/bu

[clang] Revert "[HIP] Use original file path for CUID" (PR #108771)

2024-09-15 Thread via cfe-commits
https://github.com/dyung closed https://github.com/llvm/llvm-project/pull/108771 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4e09d7b - Revert "[HIP] Use original file path for CUID" (#108771)

2024-09-15 Thread via cfe-commits
Author: dyung Date: 2024-09-15T09:40:55-07:00 New Revision: 4e09d7bc2ce492c4fc281cfbaf8caa81a76a6a10 URL: https://github.com/llvm/llvm-project/commit/4e09d7bc2ce492c4fc281cfbaf8caa81a76a6a10 DIFF: https://github.com/llvm/llvm-project/commit/4e09d7bc2ce492c4fc281cfbaf8caa81a76a6a10.diff LOG: Re

[clang] Revert "[HIP] Use original file path for CUID" (PR #108771)

2024-09-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: None (dyung) Changes Reverts llvm/llvm-project#107734 The test modified in this commit, hip-cuid-hash.hip is failing on MacOS: - https://lab.llvm.org/buildbot/#/builders/190/builds/5764 - https://lab.llvm.

[clang] Revert "[HIP] Use original file path for CUID" (PR #108771)

2024-09-15 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime` running on `omp-vega20-0` while building `clang` at step 7 "Add check check-offload". Full details are available at: https://lab.llvm.org/buildbot/#/builders/30/builds/6211 Here is the relevan

[clang] [Clang] Propagate elide safe context through [[clang::coro_must_await]] (PR #108474)

2024-09-15 Thread Adrian Vogelsgesang via cfe-commits
https://github.com/vogelsgesang edited https://github.com/llvm/llvm-project/pull/108474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Create bugprone-bit-cast-pointers check (PR #108083)

2024-09-15 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/108083 >From cb4ea5f12c72dd547d6ae3e742e99d717289344e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= Date: Tue, 10 Sep 2024 13:46:51 + Subject: [PATCH] [clang-tidy] Create bugprone-bit-cast-p

[clang-tools-extra] [clang-tidy] Create bugprone-bit-cast-pointers check (PR #108083)

2024-09-15 Thread Carlos Galvez via cfe-commits
@@ -0,0 +1,32 @@ +//===--- BitCastPointersCheck.cpp - clang-tidy ===// +// +// 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-tools-extra] [clang-tidy] Create bugprone-bit-cast-pointers check (PR #108083)

2024-09-15 Thread Carlos Galvez via cfe-commits
@@ -0,0 +1,32 @@ +//===--- BitCastPointersCheck.cpp - clang-tidy ===// +// +// 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-tools-extra] [clang-tidy] Create bugprone-bit-cast-pointers check (PR #108083)

2024-09-15 Thread Carlos Galvez via cfe-commits
@@ -0,0 +1,32 @@ +//===--- BitCastPointersCheck.cpp - clang-tidy ===// +// +// 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-tools-extra] [clang-tidy] Create bugprone-bit-cast-pointers check (PR #108083)

2024-09-15 Thread Carlos Galvez via cfe-commits
@@ -0,0 +1,34 @@ +//===--- BitCastPointersCheck.h - clang-tidy *- 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-tools-extra] [clang-tidy] Create bugprone-bit-cast-pointers check (PR #108083)

2024-09-15 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp edited https://github.com/llvm/llvm-project/pull/108083 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Create bugprone-bit-cast-pointers check (PR #108083)

2024-09-15 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,32 @@ +//===--- BitCastPointersCheck.cpp - clang-tidy ===// +// +// 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-tools-extra] [clang-tidy] Create bugprone-bit-cast-pointers check (PR #108083)

2024-09-15 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,32 @@ +//===--- BitCastPointersCheck.cpp - clang-tidy ===// +// +// 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-tools-extra] [clang-tidy] Create bugprone-bit-cast-pointers check (PR #108083)

2024-09-15 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,32 @@ +//===--- BitCastPointersCheck.cpp - clang-tidy ===// +// +// 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-tools-extra] [clang-tidy] Create bugprone-bit-cast-pointers check (PR #108083)

2024-09-15 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,34 @@ +//===--- BitCastPointersCheck.h - clang-tidy *- 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-tools-extra] [clang-tidy] Create bugprone-bit-cast-pointers check (PR #108083)

2024-09-15 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,34 @@ +// RUN: %check_clang_tidy -std=c++20-or-later %s bugprone-bit-cast-pointers %t + +namespace std +{ +template +To bit_cast(From from) +{ + // Dummy implementation for the purpose of the test. + // We don't want to include to get std::memcpy. + To to{}; + ret

[clang] [compiler-rt] [llvm] [X86] AMD Zen 5 Initial enablement (PR #107964)

2024-09-15 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon demilestoned https://github.com/llvm/llvm-project/pull/107964 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy]suggest use `std::span` as replacement of c array in C++20 for modernize-avoid-c-arrays (PR #108555)

2024-09-15 Thread Julian Schmidt via cfe-commits
@@ -10,6 +10,9 @@ modernize-avoid-c-arrays Finds C-style array types and recommend to use ``std::array<>`` / ``std::vector<>``. All types of C arrays are diagnosed. +For incomplete C-style array types appeared in parameters, It would be better to +use ``std::span`` / ``gsl::s

[clang-tools-extra] [clang-tidy]suggest use `std::span` as replacement of c array in C++20 for modernize-avoid-c-arrays (PR #108555)

2024-09-15 Thread Julian Schmidt via cfe-commits
@@ -72,11 +74,29 @@ void AvoidCArraysCheck::registerMatchers(MatchFinder *Finder) { void AvoidCArraysCheck::check(const MatchFinder::MatchResult &Result) { const auto *ArrayType = Result.Nodes.getNodeAs("typeloc"); - + const bool IsInParam = + Result.Nodes.getNodeAs("

[clang-tools-extra] [clang-tidy]suggest use `std::span` as replacement of c array in C++20 for modernize-avoid-c-arrays (PR #108555)

2024-09-15 Thread Julian Schmidt via cfe-commits
@@ -112,8 +112,9 @@ Changes in existing checks the offending code with ``reinterpret_cast``, to more clearly express intent. - Improved :doc:`modernize-avoid-c-arrays - ` check to suggest use std::span - as replacement of c array in C++20. + ` check to suggest using + `

[clang-tools-extra] [clang-tidy]suggest use `std::span` as replacement of c array in C++20 for modernize-avoid-c-arrays (PR #108555)

2024-09-15 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/108555 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy]suggest use `std::span` as replacement of c array in C++20 for modernize-avoid-c-arrays (PR #108555)

2024-09-15 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. LGTM, just small nits. But wait for others to approve as well https://github.com/llvm/llvm-project/pull/108555 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang-tools-extra] [clang-tidy]suggest use `std::span` as replacement of c array in C++20 for modernize-avoid-c-arrays (PR #108555)

2024-09-15 Thread Julian Schmidt via cfe-commits
@@ -72,11 +74,29 @@ void AvoidCArraysCheck::registerMatchers(MatchFinder *Finder) { void AvoidCArraysCheck::check(const MatchFinder::MatchResult &Result) { const auto *ArrayType = Result.Nodes.getNodeAs("typeloc"); - + const bool IsInParam = + Result.Nodes.getNodeAs("

[clang-tools-extra] [clang-tidy]suggest use `std::span` as replacement of c array in C++20 for modernize-avoid-c-arrays (PR #108555)

2024-09-15 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/108555 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM] Add IRNormalizer Pass (PR #68176)

2024-09-15 Thread Justin Fargnoli via cfe-commits
justinfargnoli wrote: Ping @plotfi @nikic for review. https://github.com/llvm/llvm-project/pull/68176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] fix false positive that floating point variable only used in increment expr in cert-flp30-c (PR #108706)

2024-09-15 Thread Julian Schmidt via cfe-commits
@@ -9,22 +9,33 @@ #include "FloatLoopCounter.h" #include "clang/AST/ASTContext.h" #include "clang/ASTMatchers/ASTMatchFinder.h" +#include "clang/ASTMatchers/ASTMatchers.h" using namespace clang::ast_matchers; namespace clang::tidy::cert { void FloatLoopCounter::registe

[clang-tools-extra] [clang-tidy] fix false positive that floating point variable only used in increment expr in cert-flp30-c (PR #108706)

2024-09-15 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. https://github.com/llvm/llvm-project/pull/108706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] fix false positive that floating point variable only used in increment expr in cert-flp30-c (PR #108706)

2024-09-15 Thread Julian Schmidt via cfe-commits
@@ -111,6 +111,9 @@ Changes in existing checks ` check to suggest replacing the offending code with ``reinterpret_cast``, to more clearly express intent. +- Improved :doc:`cert-flp30-c` check to + fix false positive that floating point variable only used in increment exp

[clang-tools-extra] [clang-tidy] fix false positive when member initialization depends on structured binging variable in cppcoreguidelines-prefer-member-initializer (PR #108743)

2024-09-15 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/108743 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] fix false positive when member initialization depends on structured binging variable in cppcoreguidelines-prefer-member-initializer (PR #108743)

2024-09-15 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/108743 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] fix false positive when member initialization depends on structured binging variable in cppcoreguidelines-prefer-member-initializer (PR #108743)

2024-09-15 Thread Julian Schmidt via cfe-commits
@@ -111,6 +111,10 @@ Changes in existing checks ` check to suggest replacing the offending code with ``reinterpret_cast``, to more clearly express intent. +- Improved :doc:`cppcoreguidelines-prefer-member-initializer + ` check to avoid + false positive when member initi

[clang] 713a202 - [CGData] Clang Options (#90304)

2024-09-15 Thread via cfe-commits
Author: Kyungwoo Lee Date: 2024-09-15T16:04:42-07:00 New Revision: 713a2029578eb36a29793105948d8e4fe965da18 URL: https://github.com/llvm/llvm-project/commit/713a2029578eb36a29793105948d8e4fe965da18 DIFF: https://github.com/llvm/llvm-project/commit/713a2029578eb36a29793105948d8e4fe965da18.diff

[clang] [CGData] Clang Options (PR #90304)

2024-09-15 Thread Kyungwoo Lee via cfe-commits
https://github.com/kyulee-com closed https://github.com/llvm/llvm-project/pull/90304 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add `[[hlsl::contained_type()]]` attribute (PR #108456)

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

[clang] [HLSL] Add `[[hlsl::contained_type()]]` attribute (PR #108456)

2024-09-15 Thread Justin Bogner via cfe-commits
@@ -30,15 +29,15 @@ RWBuffer Buffer; // CHECK-NEXT: CXXRecordDecl 0x{{[0-9A-Fa-f]+}} <> implicit class RWBuffer definition // CHECK: FinalAttr 0x{{[0-9A-Fa-f]+}} <> Implicit final -// CHECK-NEXT: implicit h 'element_type * {{\[\[}}hlsl::resource_class(UAV)]]':'element_type *

[clang] [HLSL] Add `[[hlsl::contained_type()]]` attribute (PR #108456)

2024-09-15 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/108456 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] fix false positive when member initialization depends on structured binging variable in cppcoreguidelines-prefer-member-initializer (PR #108743)

2024-09-15 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/108743 >From b81896cc8c5bef064b7ea3564c2ddd40948e49fb Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sun, 15 Sep 2024 17:00:35 +0800 Subject: [PATCH 1/2] [clang-tidy] fix false positive when member initializati

[clang-tools-extra] [clang-tidy] fix false positive that floating point variable only used in increment expr in cert-flp30-c (PR #108706)

2024-09-15 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/108706 >From 9fbbc1821c41a75a3a606f4a8bb0a7c43fe9dee3 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 14 Sep 2024 23:25:36 +0800 Subject: [PATCH 1/2] [clang-tidy] fix false positive that floating point vari

[clang-tools-extra] [clang-tidy]suggest use `std::span` as replacement of c array in C++20 for modernize-avoid-c-arrays (PR #108555)

2024-09-15 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/108555 >From 35742b5f2f085b8f6626456cd0d21ebecbe8f831 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 12 Sep 2024 23:11:51 +0800 Subject: [PATCH 1/4] [clang-tidy]suggest use `std::span` as replacement of c

[clang-tools-extra] 7deca85 - [clang-tidy] fix false positive when member initialization depends on structured binging variable in cppcoreguidelines-prefer-member-initializer (#108743)

2024-09-15 Thread via cfe-commits
Author: Congcong Cai Date: 2024-09-16T09:04:32+08:00 New Revision: 7deca859e55faf9662c54a00b6e333826d717e19 URL: https://github.com/llvm/llvm-project/commit/7deca859e55faf9662c54a00b6e333826d717e19 DIFF: https://github.com/llvm/llvm-project/commit/7deca859e55faf9662c54a00b6e333826d717e19.diff

[clang-tools-extra] [clang-tidy] fix false positive when member initialization depends on structured binging variable in cppcoreguidelines-prefer-member-initializer (PR #108743)

2024-09-15 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/108743 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   >