[clang] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.ptr.buffer.load` (PR #99258)

2024-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/99258 >From 578d497caf7b0cc8d10779055dd4f220323ac9a1 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Tue, 16 Jul 2024 18:34:35 -0400 Subject: [PATCH] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.ptr.

[clang] [clang codegen] Emit int TBAA metadata on FP math libcall expf (PR #96025)

2024-07-18 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM with one minor comment https://github.com/llvm/llvm-project/pull/96025 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang codegen] Emit int TBAA metadata on FP math libcall expf (PR #96025)

2024-07-18 Thread Eli Friedman via cfe-commits
@@ -688,7 +688,34 @@ static RValue emitLibraryCall(CodeGenFunction &CGF, const FunctionDecl *FD, const CallExpr *E, llvm::Constant *calleeValue) { CodeGenFunction::CGFPOptionsRAII FPOptsRAII(CGF, E); CGCallee callee = CGCallee::forDirect(calle

[clang] [clang codegen] Emit int TBAA metadata on FP math libcall expf (PR #96025)

2024-07-18 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/96025 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [run-clang-tidy.py] Refactor, add progress indicator, add type hints (PR #89490)

2024-07-18 Thread Nicolas van Kempen via cfe-commits
@@ -501,70 +506,72 @@ def main(): # Build up a big regexy filter from all command line arguments. file_name_re = re.compile("|".join(args.files)) +files = {f for f in files if file_name_re.search(f)} -return_code = 0 +returncode = 0 try: -# S

[clang] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.ptr.buffer.load` (PR #99258)

2024-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/99258 >From f60231b73454e0693a9302455acf3ab25302cccd Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Tue, 16 Jul 2024 18:34:35 -0400 Subject: [PATCH] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.ptr.

[clang-tools-extra] [run-clang-tidy.py] Refactor, add progress indicator, add type hints (PR #89490)

2024-07-18 Thread Nicolas van Kempen via cfe-commits
nicovank wrote: Thanks for the ping, I had a version for 3.7+ working, and it seems hard to retrofit to 3.6. I think having the 3.7 version is fine. It's on my home machine, will update this PR later today 👍 https://github.com/llvm/llvm-project/pull/89490 _

[clang] [Clang][AMDGPU] Use unsigned data type for `__builtin_amdgcn_raw_buffer_store_*` (PR #99546)

2024-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/99546 >From 972ea8be8943d74a55af5f257e14ee18d8d4de2a Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Thu, 18 Jul 2024 14:28:27 -0400 Subject: [PATCH] [Clang][AMDGPU] Use unsigned data type for `__builtin_amdgcn_raw_

[clang] [Clang][AMDGPU] Use unsigned data type for `__builtin_amdgcn_raw_buffer_store_*` (PR #99546)

2024-07-18 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/99546 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AMDGPU] Use unsigned data type for `__builtin_amdgcn_raw_buffer_store_*` (PR #99546)

2024-07-18 Thread Matt Arsenault via cfe-commits
@@ -2,19 +2,19 @@ // REQUIRES: amdgpu-registered-target // RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu verde -emit-llvm -o - %s | FileCheck %s -typedef char i8; -typedef short i16; -typedef int i32; -typedef int i64 __attribute__((ext_vector_type(2))); -typedef

[clang] [clang] Diagnose use of deprecated template alias (PR #97619)

2024-07-18 Thread via cfe-commits
https://github.com/premanandrao updated https://github.com/llvm/llvm-project/pull/97619 >From e1076942f07b1d2de857688c88de6ff966861650 Mon Sep 17 00:00:00 2001 From: Premanand M Rao Date: Wed, 3 Jul 2024 11:20:42 -0700 Subject: [PATCH 1/4] [clang] Diagnose use of deprecated template alias Issu

[clang] [clang] Diagnose use of deprecated template alias (PR #97619)

2024-07-18 Thread via cfe-commits
@@ -0,0 +1,72 @@ +// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s +// +// This test checks that a deprecated attribute on an alias +// template triggers a warning diagnostic when it is used. + +template +struct NoAttr { + void foo() {} +}; + +// expected-note@+2 5{{'Using

[clang] [libc] [libcxx] [libc][libcxx] Support for building libc++ against LLVM libc (PR #99287)

2024-07-18 Thread Louis Dionne via cfe-commits
https://github.com/ldionne approved this pull request. I really like this patch. It introduces the hook we need to clean up a lot of stuff in our CMake and it also adds the flexibility you need to unblock LLVM libc work. I think we ended up in a good place. https://github.com/llvm/llvm-project

[clang] [llvm] [PowerPC] Add builtin_cpu_is P11 support (PR #99550)

2024-07-18 Thread via cfe-commits
https://github.com/azhan92 created https://github.com/llvm/llvm-project/pull/99550 This PR adds power11 as a target for __builtin_cpu_is. >From a2cf264bc8b08364544407650c630c11a475fcab Mon Sep 17 00:00:00 2001 From: Alison Zhang Date: Thu, 18 Jul 2024 14:32:30 -0400 Subject: [PATCH] support P

[clang] [llvm] [PowerPC] Add builtin_cpu_is P11 support (PR #99550)

2024-07-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (azhan92) Changes This PR adds power11 as a target for __builtin_cpu_is. --- Full diff: https://github.com/llvm/llvm-project/pull/99550.diff 2 Files Affected: - (modified) clang/test/CodeGen/aix-builtin-cpu-is.c (+4) - (modified)

[clang] [llvm] AMDGPU: Loop over the types for global_load_tr16 pats (NFC) (PR #99551)

2024-07-18 Thread Changpeng Fang via cfe-commits
https://github.com/changpeng created https://github.com/llvm/llvm-project/pull/99551 None >From 31601c539553d7af0efd94722eabf4627f8a387c Mon Sep 17 00:00:00 2001 From: Changpeng Fang Date: Thu, 18 Jul 2024 11:03:24 -0700 Subject: [PATCH 1/2] AMDGPU: Add back half and bfloat support for global

[clang] [llvm] AMDGPU: Loop over the types for global_load_tr16 pats (NFC) (PR #99551)

2024-07-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Changpeng Fang (changpeng) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/99551.diff 1 Files Affected: - (modified) llvm/lib/Target/AMDGPU/FLATInstructions.td (+4-6) ``diff diff --git a/llvm/lib/Ta

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-07-18 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I think the issue is the usage of "Info.EvalStatus.Diag" to determine whether we consider the expression an ICE; that's going to lead to unpredictable results, and it's not how we handle things anywhere else. Not sure what the goal of that change is. Separately, Sema::Ad

[clang] [llvm] AMDGPU: Loop over the types for global_load_tr16 pats (NFC) (PR #99551)

2024-07-18 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec approved this pull request. https://github.com/llvm/llvm-project/pull/99551 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Loop over the types for global_load_tr16 pats (NFC) (PR #99551)

2024-07-18 Thread Changpeng Fang via cfe-commits
https://github.com/changpeng closed https://github.com/llvm/llvm-project/pull/99551 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add method 'backupStr' to ASTContext (PR #99417)

2024-07-18 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 edited https://github.com/llvm/llvm-project/pull/99417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [hexagon] handle --unwindlib arg (PR #99552)

2024-07-18 Thread Brian Cain via cfe-commits
https://github.com/androm3da created https://github.com/llvm/llvm-project/pull/99552 None >From 304b87ca8eab37f499dc202bc184c66f45b574e5 Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Wed, 17 Jul 2024 08:08:30 -0500 Subject: [PATCH] [clang] [hexagon] handle --unwindlib arg Signed-off-by: Bri

[clang] [clang] [hexagon] handle --unwindlib arg (PR #99552)

2024-07-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-hexagon @llvm/pr-subscribers-clang-driver Author: Brian Cain (androm3da) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/99552.diff 3 Files Affected: - (modified) clang/include/clang/Basic/DiagnosticDriverKinds.td (+2) - (m

[clang] [clang] [hexagon] handle --unwindlib arg (PR #99552)

2024-07-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Brian Cain (androm3da) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/99552.diff 3 Files Affected: - (modified) clang/include/clang/Basic/DiagnosticDriverKinds.td (+2) - (modified) clang/lib/Driver/ToolChains/Hexagon

[clang] [clang] [hexagon] handle --unwindlib arg (PR #99552)

2024-07-18 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 493d504b35b9f655177b81ef3848e4a08a17831a 304b87ca8eab37f499dc202bc184c66f45b574e5 --e

[clang] [clang] [hexagon] handle --unwindlib arg (PR #99552)

2024-07-18 Thread Brian Cain via cfe-commits
https://github.com/androm3da updated https://github.com/llvm/llvm-project/pull/99552 >From 4729e43f3904774dbe5a06ed18a12cbddae8db03 Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Wed, 17 Jul 2024 08:08:30 -0500 Subject: [PATCH] [clang] [hexagon] handle --unwindlib arg Signed-off-by: Brian Cai

[clang] [llvm] [PowerPC] Add builtin_cpu_is P11 support (PR #99550)

2024-07-18 Thread via cfe-commits
https://github.com/azhan92 edited https://github.com/llvm/llvm-project/pull/99550 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 892c58c - [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.ptr.buffer.load` (#99258)

2024-07-18 Thread via cfe-commits
Author: Shilei Tian Date: 2024-07-18T15:33:03-04:00 New Revision: 892c58cf7490c219ff8fc4dc0d2497e062a9c665 URL: https://github.com/llvm/llvm-project/commit/892c58cf7490c219ff8fc4dc0d2497e062a9c665 DIFF: https://github.com/llvm/llvm-project/commit/892c58cf7490c219ff8fc4dc0d2497e062a9c665.diff L

[clang] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.ptr.buffer.load` (PR #99258)

2024-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/99258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AMDGPU] Use unsigned data type for `__builtin_amdgcn_raw_buffer_store_*` (PR #99546)

2024-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/99546 >From ec7b9ffaa36592e285491db654577436e9a250f6 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Thu, 18 Jul 2024 14:28:27 -0400 Subject: [PATCH] [Clang][AMDGPU] Use unsigned data type for `__builtin_amdgcn_raw_

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-07-18 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: > > @alanzhao1 do you think it's reasonable for the workaround to only apply to > > code in system headers, or does the NDK get included as regular headers > > generally? > > Having it only apply to system headers should be OK - in our case, chrome > imports these headers as

[clang] [clang][test] Split AArch64 target feature checks across multiple lines. NFC (PR #99365)

2024-07-18 Thread Jon Roelofs via cfe-commits
jroelofs wrote: This broke the aix-ppc64 bot: https://lab.llvm.org/buildbot/#/builders/64/builds/335 Must have a different version of `sed` than I do :( https://github.com/llvm/llvm-project/pull/99365 ___ cfe-commits mailing list cfe-commits@lists.ll

[clang] 05275b0 - fixup! [clang][test] Split AArch64 target feature checks across multiple lines. NFC (#99365)

2024-07-18 Thread Jon Roelofs via cfe-commits
Author: Jon Roelofs Date: 2024-07-18T13:25:23-07:00 New Revision: 05275b05ca58e4d015eea1503f120e6967ef1b91 URL: https://github.com/llvm/llvm-project/commit/05275b05ca58e4d015eea1503f120e6967ef1b91 DIFF: https://github.com/llvm/llvm-project/commit/05275b05ca58e4d015eea1503f120e6967ef1b91.diff L

[clang] [clang] Add deprecation warning for `-Ofast` driver option (PR #98736)

2024-07-18 Thread Sebastian Pop via cfe-commits
@@ -442,6 +442,10 @@ def warn_drv_deprecated_arg : Warning< def warn_drv_deprecated_arg_no_relaxed_template_template_args : Warning< "argument '-fno-relaxed-template-template-args' is deprecated">, InGroup; +def warn_drv_deprecated_arg_ofast : Warning< + "argument '-Ofast'

[clang] af5352f - [Clang][AMDGPU] Use unsigned data type for `__builtin_amdgcn_raw_buffer_store_*` (#99546)

2024-07-18 Thread via cfe-commits
Author: Shilei Tian Date: 2024-07-18T16:34:59-04:00 New Revision: af5352fe8e66e71ae381498745c0e52ca56478c6 URL: https://github.com/llvm/llvm-project/commit/af5352fe8e66e71ae381498745c0e52ca56478c6 DIFF: https://github.com/llvm/llvm-project/commit/af5352fe8e66e71ae381498745c0e52ca56478c6.diff L

[clang] [Clang][AMDGPU] Use unsigned data type for `__builtin_amdgcn_raw_buffer_store_*` (PR #99546)

2024-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/99546 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4272847 - [clang][deps] Don't treat ObjC method args as module directives (#97654)

2024-07-18 Thread via cfe-commits
Author: Michael Spencer Date: 2024-07-18T13:37:01-07:00 New Revision: 4272847546225bcf2e83e09e3a620bf286c058fd URL: https://github.com/llvm/llvm-project/commit/4272847546225bcf2e83e09e3a620bf286c058fd DIFF: https://github.com/llvm/llvm-project/commit/4272847546225bcf2e83e09e3a620bf286c058fd.dif

[clang] [clang][deps] Don't treat ObjC method args as module directives (PR #97654)

2024-07-18 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese closed https://github.com/llvm/llvm-project/pull/97654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][test] Split AArch64 target feature checks across multiple lines. NFC (PR #99365)

2024-07-18 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-sie-win` running on `sie-win-worker` while building `clang` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/46/builds/1896 Here is the

[clang] 06518ce - Revert "[clang][test] Split AArch64 target feature checks across multiple lines. NFC (#99365)"

2024-07-18 Thread Jon Roelofs via cfe-commits
Author: Jon Roelofs Date: 2024-07-18T13:48:17-07:00 New Revision: 06518cea3905556d8d1eea4088132ebb234bfdab URL: https://github.com/llvm/llvm-project/commit/06518cea3905556d8d1eea4088132ebb234bfdab DIFF: https://github.com/llvm/llvm-project/commit/06518cea3905556d8d1eea4088132ebb234bfdab.diff L

[clang] [Clang][Sema] Disallow applying `onwership_returns` to functions that return non-pointers (PR #99564)

2024-07-18 Thread Pavel Skripkin via cfe-commits
https://github.com/pskrgag created https://github.com/llvm/llvm-project/pull/99564 `onwership_returns` works only with pointers, since it models user-defined memory allocation functions. Make semantics more clear and report an error if attribute is attached to wrong function. Closes #99501

[clang] [Clang][Sema] Disallow applying `onwership_returns` to functions that return non-pointers (PR #99564)

2024-07-18 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] [Clang][Sema] Disallow applying `onwership_returns` to functions that return non-pointers (PR #99564)

2024-07-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Pavel Skripkin (pskrgag) Changes `onwership_returns` works only with pointers, since it models user-defined memory allocation functions. Make semantics more clear and report an error if attribute is attached to wrong function. Closes #9

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-18 Thread Thurston Dang via cfe-commits
@@ -3865,6 +3866,42 @@ struct MemorySanitizerVisitor : public InstVisitor { setOriginForNaryOp(I); } + /// Handle Arm NEON vector store intrinsics (vst{2,3,4}). + /// + /// Arm NEON vector store intrinsics have the output address (pointer) as the + /// last argument

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-18 Thread Thurston Dang via cfe-commits
@@ -3865,6 +3866,42 @@ struct MemorySanitizerVisitor : public InstVisitor { setOriginForNaryOp(I); } + /// Handle Arm NEON vector store intrinsics (vst{2,3,4}). + /// + /// Arm NEON vector store intrinsics have the output address (pointer) as the + /// last argument

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-18 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/99360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-18 Thread Thurston Dang via cfe-commits
@@ -3742,6 +3751,124 @@ struct MemorySanitizerVisitor : public InstVisitor { setOriginForNaryOp(I); } + // Given two shadows ..., ..., return the interleaved value + // ABABABAB ... + // + // Width == number of elements in A == number of elements in B + Val

[clang] [test][PAC][clang] Add missing tests against linux triples (PR #99482)

2024-07-18 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/99482 >From f2709fc1530537974a7fe8036f28558b9fb30bb5 Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Thu, 18 Jul 2024 15:26:30 +0300 Subject: [PATCH 1/2] [test][PAC][clang] Add missing tests against linux triples

[clang] [test][PAC][clang] Add missing tests against linux triples (PR #99482)

2024-07-18 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/99482 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [libc] clang-tidy: readability-redundant-smartptr-get does not remove -> (#97964) (PR #98757)

2024-07-18 Thread via cfe-commits
@@ -235,3 +276,13 @@ void Negative() { if (MACRO(x) == nullptr) ; } + +void test_redundant_get() { + std::vector> v; + auto f = [](int) {}; + for (auto i = v.begin(); i != v.end(); ++i) { +f(*i->get()); akshaykumars614 wrote: Can I add a member to

[clang] [clang] [hexagon] handle --unwindlib arg (PR #99552)

2024-07-18 Thread Fangrui Song via cfe-commits
@@ -156,6 +156,8 @@ def err_drv_unsupported_rtlib_for_platform : Error< "unsupported runtime library '%0' for platform '%1'">; def err_drv_invalid_unwindlib_name : Error< "invalid unwind library name in argument '%0'">; +def err_drv_unsupported_unwind_for_platform : Error<

[clang] [clang] [hexagon] handle --unwindlib arg (PR #99552)

2024-07-18 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/99552 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [hexagon] handle --unwindlib arg (PR #99552)

2024-07-18 Thread Brian Cain via cfe-commits
@@ -156,6 +156,8 @@ def err_drv_unsupported_rtlib_for_platform : Error< "unsupported runtime library '%0' for platform '%1'">; def err_drv_invalid_unwindlib_name : Error< "invalid unwind library name in argument '%0'">; +def err_drv_unsupported_unwind_for_platform : Error<

[clang] [Clang] Loop over FieldDecls instead of all Decls (PR #99574)

2024-07-18 Thread Bill Wendling via cfe-commits
https://github.com/bwendling created https://github.com/llvm/llvm-project/pull/99574 Only FieldDecls are important when determining GEP indices. A struct defined within another struct has the same semantics as if it were defined outside of the struct. So there's no need to look into RecordDecl

[clang] [Clang] Loop over FieldDecls instead of all Decls (PR #99574)

2024-07-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Bill Wendling (bwendling) Changes Only FieldDecls are important when determining GEP indices. A struct defined within another struct has the same semantics as if it were defined outside of the struct. So there's no need to look in

[clang-tools-extra] [clangd] fix crash in include cleaner (PR #99514)

2024-07-18 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Is there a bug report this is fixing? Or a test case? https://github.com/llvm/llvm-project/pull/99514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Loop over FieldDecls instead of all Decls (PR #99574)

2024-07-18 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 4afdcd98c5e28e0b353b21bf01c5cd3568878e41 f907be4ed6189729dd2546d597dd003a5edb1006 --e

[clang] [Clang] Loop over FieldDecls instead of all Decls (PR #99574)

2024-07-18 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/99574 >From f907be4ed6189729dd2546d597dd003a5edb1006 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Thu, 18 Jul 2024 14:32:41 -0700 Subject: [PATCH 1/2] [Clang] Loop over FieldDecls instead of all Decls Only Fie

[clang] [Clang] [docs] [MSVC] Add sections on `__forceinline` and intrinsic behaviour differences between Clang and MSVC (PR #99426)

2024-07-18 Thread Reid Kleckner via cfe-commits
@@ -154,3 +154,133 @@ a hint suggesting how to fix the problem. As of this writing, Clang is able to compile a simple ATL hello world application. There are still issues parsing WRL headers for modern Windows 8 rnk wrote: "modern Windows 8" is obviously stale

[clang] [Clang] [docs] [MSVC] Add sections on `__forceinline` and intrinsic behaviour differences between Clang and MSVC (PR #99426)

2024-07-18 Thread Reid Kleckner via cfe-commits
@@ -154,3 +154,133 @@ a hint suggesting how to fix the problem. As of this writing, Clang is able to compile a simple ATL hello world application. There are still issues parsing WRL headers for modern Windows 8 apps, but they should be addressed soon. + +__forceinline behavior

[clang] [Clang] [docs] [MSVC] Add sections on `__forceinline` and intrinsic behaviour differences between Clang and MSVC (PR #99426)

2024-07-18 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. https://github.com/llvm/llvm-project/pull/99426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement authentication for C++ member function pointers (PR #99576)

2024-07-18 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt created https://github.com/llvm/llvm-project/pull/99576 Introduces type based signing of member function pointers. To support this discrimination schema we no longer emit member function pointer to virtual methods and indices into a vtable but migrate to using thunks.

[clang] 6c6baf0 - Revert "[clang][test] Split AArch64 target feature checks across multiple lines. NFC (#99365)"

2024-07-18 Thread Jon Roelofs via cfe-commits
Author: Jon Roelofs Date: 2024-07-18T14:48:11-07:00 New Revision: 6c6baf019a25710cdc3c3971b09cd6332d0379c0 URL: https://github.com/llvm/llvm-project/commit/6c6baf019a25710cdc3c3971b09cd6332d0379c0 DIFF: https://github.com/llvm/llvm-project/commit/6c6baf019a25710cdc3c3971b09cd6332d0379c0.diff L

[clang] [clang] [hexagon] handle --unwindlib arg (PR #99552)

2024-07-18 Thread Brian Cain via cfe-commits
https://github.com/androm3da updated https://github.com/llvm/llvm-project/pull/99552 >From c7fae87eadc5931902d8b0adb555f7ce4b0b99c1 Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Wed, 17 Jul 2024 08:08:30 -0500 Subject: [PATCH] [clang] [hexagon] handle --unwindlib arg Signed-off-by: Brian Cai

[clang] [clang] Implement authentication for C++ member function pointers (PR #99576)

2024-07-18 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 4afdcd98c5e28e0b353b21bf01c5cd3568878e41 571ab7b4f78cd2e4f89afcd9c35da1c07848742b --e

[clang-tools-extra] [libc] clang-tidy: readability-redundant-smartptr-get does not remove -> (#97964) (PR #98757)

2024-07-18 Thread Nathan James via cfe-commits
@@ -235,3 +276,13 @@ void Negative() { if (MACRO(x) == nullptr) ; } + +void test_redundant_get() { + std::vector> v; + auto f = [](int) {}; + for (auto i = v.begin(); i != v.end(); ++i) { +f(*i->get()); njames93 wrote: I think he is saying have a

[clang] [ExprConstant] Handle shift overflow the same way as other kinds of overflow (PR #99579)

2024-07-18 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic created https://github.com/llvm/llvm-project/pull/99579 We have a mechanism to allow folding expressions that aren't ICEs as an extension; use it more consistently. This ends up causing bad effects on diagnostics in a few cases, but that's not specific to shif

[clang] [ExprConstant] Handle shift overflow the same way as other kinds of overflow (PR #99579)

2024-07-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Eli Friedman (efriedma-quic) Changes We have a mechanism to allow folding expressions that aren't ICEs as an extension; use it more consistently. This ends up causing bad effects on diagnostics in a few cases, but that's not specific to

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-07-18 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Posted #99579. https://github.com/llvm/llvm-project/pull/70307 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ExprConstant] Handle shift overflow the same way as other kinds of overflow (PR #99579)

2024-07-18 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 49b2c30feb3730ccb1ba075dd37e68d47095bb23 1137011c51285b083cab6c15de670e64337d3de0 --e

[clang] Fix diagnostics-dsym.test on mac-arm64 (PR #99399)

2024-07-18 Thread via cfe-commits
zeroomega wrote: > Thank you @zeroomega ! I am also running on arm64-mac and that test is > passing. What is your `cmake` invocation? I'd like to dig into the underlying > cause of non-stable ordering. It looks like the darwin-aarch64 is passing the > test as well https://lab.llvm.org/buildbot

[clang] [Clang] Loop over FieldDecls instead of all Decls (PR #99574)

2024-07-18 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/99574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang codegen] Fix the ci fail for PR98704 (PR #99267)

2024-07-18 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: This seems fine. https://github.com/llvm/llvm-project/pull/99267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] fix crash in include cleaner (PR #99514)

2024-07-18 Thread Yuxuan Shui via cfe-commits
yshui wrote: Good question. I will try to add one once I figure out how this test system works https://github.com/llvm/llvm-project/pull/99514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] 1f6f97e - [Clang] Loop over FieldDecls instead of all Decls (#99574)

2024-07-18 Thread via cfe-commits
Author: Bill Wendling Date: 2024-07-18T22:11:56Z New Revision: 1f6f97e2b64a9c4c51712d32b53e07d2a20e0cc0 URL: https://github.com/llvm/llvm-project/commit/1f6f97e2b64a9c4c51712d32b53e07d2a20e0cc0 DIFF: https://github.com/llvm/llvm-project/commit/1f6f97e2b64a9c4c51712d32b53e07d2a20e0cc0.diff LOG:

[clang] [Clang] Loop over FieldDecls instead of all Decls (PR #99574)

2024-07-18 Thread Bill Wendling via cfe-commits
https://github.com/bwendling closed https://github.com/llvm/llvm-project/pull/99574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [HLSL] Implement intangible AST type (PR #97362)

2024-07-18 Thread Joshua Batista via cfe-commits
bob80905 wrote: Just an FYI, the syntax for adding a resource_class attribute as currently implemented looks like this: `[[hlsl::resource_class(SRV)]]` In your description, you may want to update this and other similar attributes. https://github.com/llvm/llvm-project/pull/97362

[clang] Fix diagnostics-dsym.test on mac-arm64 (PR #99399)

2024-07-18 Thread via cfe-commits
https://github.com/zeroomega updated https://github.com/llvm/llvm-project/pull/99399 >From 15ac1fc1d3e2ca29e5b7b18a794f8ad036f95368 Mon Sep 17 00:00:00 2001 From: Haowei Wu Date: Wed, 17 Jul 2024 15:45:53 -0700 Subject: [PATCH] Fix diagnostics-dsym.test on mac-arm64 The output ordering of diag

[clang] Fix diagnostics-dsym.test on mac-arm64 (PR #99399)

2024-07-18 Thread via cfe-commits
zeroomega wrote: @cyndyishida I updated the patch to use CHECK-DAG and confirm the test now pass under both XCode toolchain and our in house one. Please take a look. Thx. https://github.com/llvm/llvm-project/pull/99399 ___ cfe-commits mailing list cfe

[clang] [clang] Implement authentication for C++ member function pointers (PR #99576)

2024-07-18 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/99576 >From c2bc964341fb4d0738e94d4afa6abc84eed0113c Mon Sep 17 00:00:00 2001 From: Ahmed Bougacha Date: Fri, 10 May 2024 15:58:57 -0700 Subject: [PATCH] [clang] Implement pointer authentication for C++ member function

[clang] [clang] Implement authentication for C++ member function pointers (PR #99576)

2024-07-18 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/99576 >From 547ce3e9c7fe7e046b20f51f2f0d370a683659d1 Mon Sep 17 00:00:00 2001 From: Ahmed Bougacha Date: Fri, 10 May 2024 15:58:57 -0700 Subject: [PATCH] [PAC] Implement pointer authentication for C++ member function p

[clang] [PAC] Implement authentication for C++ member function pointers (PR #99576)

2024-07-18 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt edited https://github.com/llvm/llvm-project/pull/99576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-18 Thread Vitaly Buka via cfe-commits
@@ -2498,6 +2499,15 @@ struct MemorySanitizerVisitor : public InstVisitor { MSV->setOrigin(I, Origin); } } + +/// Store the current combined value at the specified origin +/// location. +void DoneAndStoreOrigin(TypeSize TS, Value *OriginPtr) { +

[clang] [clang-format] Improve BlockIndent at ColumnLimit (PR #93140)

2024-07-18 Thread Gedare Bloom via cfe-commits
gedare wrote: I have another PR lined up to submit but it depends on this one. It would be great if we can get some forward progress @owenca https://github.com/llvm/llvm-project/pull/93140 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] [test][PAC][clang] Add missing tests against linux triples (PR #99482)

2024-07-18 Thread Anton Korobeynikov via cfe-commits
https://github.com/asl approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/99482 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-18 Thread Vitaly Buka via cfe-commits
@@ -2498,6 +2499,15 @@ struct MemorySanitizerVisitor : public InstVisitor { MSV->setOrigin(I, Origin); } } + +/// Store the current combined value at the specified origin +/// location. +void DoneAndStoreOrigin(TypeSize TS, Value *OriginPtr) { +

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-18 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/99360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-18 Thread Thurston Dang via cfe-commits
@@ -2498,6 +2499,15 @@ struct MemorySanitizerVisitor : public InstVisitor { MSV->setOrigin(I, Origin); } } + +/// Store the current combined value at the specified origin +/// location. +void DoneAndStoreOrigin(TypeSize TS, Value *OriginPtr) { +

[clang] [clang-scan-deps] Ignore import/include directives with missing filenames (PR #99520)

2024-07-18 Thread Michael Spencer via cfe-commits
@@ -544,7 +544,7 @@ Scanner::lexIncludeFilename(const char *&First, const char *const End) { void Scanner::lexPPDirectiveBody(const char *&First, const char *const End) { while (true) { const dependency_directives_scan::Token &Tok = lexToken(First, End); -if (Tok.is(

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-18 Thread Thurston Dang via cfe-commits
@@ -2498,6 +2499,15 @@ struct MemorySanitizerVisitor : public InstVisitor { MSV->setOrigin(I, Origin); } } + +/// Store the current combined value at the specified origin +/// location. +void DoneAndStoreOrigin(TypeSize TS, Value *OriginPtr) { +

[clang] [ExprConstant] Handle shift overflow the same way as other kinds of overflow (PR #99579)

2024-07-18 Thread Richard Smith via cfe-commits
@@ -142,7 +142,7 @@ constexpr int arb(int n) { // expected-note {{declared here}} expected-note {{function parameter 'n' with unknown value cannot be used in a constant expression}} } constexpr long Overflow[(1 << 30) << 2]{}; // expected-warning {{requires 34

[clang] [ExprConstant] Handle shift overflow the same way as other kinds of overflow (PR #99579)

2024-07-18 Thread Richard Smith via cfe-commits
@@ -200,14 +200,7 @@ namespace LongInt { }; enum shiftof { -X = (1<<-29), // all-error {{expression is not an integral constant expression}} \ - // all-note {{negative shift count -29}} - -X2 = (-1<<29), // cxx17-error {{expression is not an integral

[clang] [ExprConstant] Handle shift overflow the same way as other kinds of overflow (PR #99579)

2024-07-18 Thread Richard Smith via cfe-commits
@@ -2849,19 +2849,23 @@ static bool handleIntIntBinOp(EvalInfo &Info, const BinaryOperator *E, if (SA != RHS) { Info.CCEDiag(E, diag::note_constexpr_large_shift) << RHS << E->getType() << LHS.getBitWidth(); + if (!Info.noteUndefinedBehavior()) +r

[clang] [ExprConstant] Handle shift overflow the same way as other kinds of overflow (PR #99579)

2024-07-18 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/99579 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ExprConstant] Handle shift overflow the same way as other kinds of overflow (PR #99579)

2024-07-18 Thread Richard Smith via cfe-commits
zygoloid wrote: As noted in one of the inline comments, it doesn't seem good to be losing a diagnostic for ill-formed code. But this all makes sense to me as a step to make our behavior more consistent. I wonder if it'd make sense to make our folding behavior stricter by default as a prerequis

[clang] [Clang] Loop over FieldDecls instead of all Decls (PR #99574)

2024-07-18 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux` running on `sanitizer-buildbot8` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/51/builds/1493 Here is the relevant piece of the b

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-18 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/99360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ExprConstant] Handle shift overflow the same way as other kinds of overflow (PR #99579)

2024-07-18 Thread Eli Friedman via cfe-commits
@@ -200,14 +200,7 @@ namespace LongInt { }; enum shiftof { -X = (1<<-29), // all-error {{expression is not an integral constant expression}} \ - // all-note {{negative shift count -29}} - -X2 = (-1<<29), // cxx17-error {{expression is not an integral

[clang] [ExprConstant] Handle shift overflow the same way as other kinds of overflow (PR #99579)

2024-07-18 Thread Eli Friedman via cfe-commits
@@ -142,7 +142,7 @@ constexpr int arb(int n) { // expected-note {{declared here}} expected-note {{function parameter 'n' with unknown value cannot be used in a constant expression}} } constexpr long Overflow[(1 << 30) << 2]{}; // expected-warning {{requires 34

[clang] [ExprConstant] Handle shift overflow the same way as other kinds of overflow (PR #99579)

2024-07-18 Thread Eli Friedman via cfe-commits
@@ -2849,19 +2849,23 @@ static bool handleIntIntBinOp(EvalInfo &Info, const BinaryOperator *E, if (SA != RHS) { Info.CCEDiag(E, diag::note_constexpr_large_shift) << RHS << E->getType() << LHS.getBitWidth(); + if (!Info.noteUndefinedBehavior()) +r

<    1   2   3   4   5   >