[clang] Use timeTraceAsyncProfilerBegin for Source span (PR #83961)

2024-03-21 Thread Takuto Ikuta via cfe-commits
atetubou wrote: @MaskRay could you review this? https://github.com/llvm/llvm-project/pull/83961 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add `clang_getCursorCallExprKind` to get the underlying type of CallExpr (PR #86143)

2024-03-21 Thread via cfe-commits
https://github.com/16bit-ykiko updated https://github.com/llvm/llvm-project/pull/86143 >From 32d4fc35f3d52b54e308b76c00c292497afe9621 Mon Sep 17 00:00:00 2001 From: ykiko Date: Fri, 22 Mar 2024 00:00:30 +0800 Subject: [PATCH 1/4] add `clang_getCursorCallExprKind` to get the underlying type of

[clang] [Clang][Sema] Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-21 Thread Kees Cook via cfe-commits
@@ -21,10 +27,76 @@ struct __attribute((packed, aligned(4))) { char a; int x; char z[]; } e = { 1, 2 struct { int x; char y[]; } f = { 1, { 13, 15 } }; // CHECK: @f ={{.*}} global <{ i32, [2 x i8] }> <{ i32 1, [2 x i8] c"\0D\0F" }> -union { - struct { -int a; -char

[clang] Add 'forNone' and 'forNoDescendant' AST matchers (PR #86230)

2024-03-21 Thread June Rhodes via cfe-commits
https://github.com/hach-que updated https://github.com/llvm/llvm-project/pull/86230 >From 941ac5286c0e5f859ae832dc397a55a9d21221c9 Mon Sep 17 00:00:00 2001 From: June Rhodes Date: Fri, 22 Mar 2024 13:07:57 +1100 Subject: [PATCH] Add 'forNone' and 'forNoDescendant' AST matchers ---

[clang-tools-extra] [clang-tidy] add new check readability-enum-initial-value (PR #86129)

2024-03-21 Thread via cfe-commits
https://github.com/paperchalice updated https://github.com/llvm/llvm-project/pull/86129 >From 4e0845a143a820d4a68ffbdced206654c7593359 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Fri, 15 Mar 2024 08:07:47 +0800 Subject: [PATCH 1/2] [clang-tidy] add new check

[clang] Add 'isPODType' AST matcher (PR #86233)

2024-03-21 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,

[clang] Add 'isPODType' AST matcher (PR #86233)

2024-03-21 Thread June Rhodes via cfe-commits
https://github.com/hach-que updated https://github.com/llvm/llvm-project/pull/86233 >From 0e6cfaba6ab55166b7b08eecb28714c0746707f1 Mon Sep 17 00:00:00 2001 From: June Rhodes Date: Fri, 22 Mar 2024 13:36:54 +1100 Subject: [PATCH] Add 'isPODType' AST matcher ---

[clang] Add 'isPODType' AST matcher (PR #86233)

2024-03-21 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 718fbbef5f18a2b7e7fc4f842b1452ae9bee581a 87d02c2278e023b9439be96c2d34e934bcb57a26 --

[clang] Add 'forNone' AST matcher (PR #86230)

2024-03-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: June Rhodes (hach-que) Changes This adds a `forNone` AST matcher, which matches only if there are no immediate children of the current node that match the inner matcher. For example, given: ```cpp class F { public: int A; F() {}; };

[clang] Add 'forNone' and 'forNoDescendant' AST matchers (PR #86230)

2024-03-21 Thread June Rhodes via cfe-commits
https://github.com/hach-que updated https://github.com/llvm/llvm-project/pull/86230 >From 25e3b11324ba4fc43e36035d357d1aa785898bbc Mon Sep 17 00:00:00 2001 From: June Rhodes Date: Fri, 22 Mar 2024 13:07:57 +1100 Subject: [PATCH] Add 'forNone' and 'forNoDescendant' AST matchers ---

[clang] Add 'isPODType' AST matcher (PR #86233)

2024-03-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: June Rhodes (hach-que) Changes This adds an `isPODType` AST matcher which matches if the matched type is a Plain Old Data (POD) type. Given: ```cpp class Y { public: int a; std::string b; }; ``` the matcher

[clang] Add 'isPODType' AST matcher (PR #86233)

2024-03-21 Thread June Rhodes via cfe-commits
https://github.com/hach-que created https://github.com/llvm/llvm-project/pull/86233 This adds an `isPODType` AST matcher which matches if the matched type is a Plain Old Data (POD) type. Given: ```cpp class Y { public: int a; std::string b; }; ``` the matcher

[clang] Add 'forNone' and 'forNoDescendant' AST matchers (PR #86230)

2024-03-21 Thread June Rhodes via cfe-commits
https://github.com/hach-que edited https://github.com/llvm/llvm-project/pull/86230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add 'forNone' and 'forNoDescendant' AST matchers (PR #86230)

2024-03-21 Thread June Rhodes via cfe-commits
https://github.com/hach-que edited https://github.com/llvm/llvm-project/pull/86230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add 'forNone' and 'forNoDescendant' AST matchers (PR #86230)

2024-03-21 Thread June Rhodes via cfe-commits
https://github.com/hach-que edited https://github.com/llvm/llvm-project/pull/86230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add 'forNone' AST matcher (PR #86230)

2024-03-21 Thread June Rhodes via cfe-commits
https://github.com/hach-que updated https://github.com/llvm/llvm-project/pull/86230 >From 9b04a03646992a3366022dd7022858c98f7560e7 Mon Sep 17 00:00:00 2001 From: June Rhodes Date: Fri, 22 Mar 2024 13:07:57 +1100 Subject: [PATCH] Add 'forNone' and 'forNoDescendant' AST matchers ---

[clang] Add 'forNone' AST matcher (PR #86230)

2024-03-21 Thread June Rhodes via cfe-commits
https://github.com/hach-que updated https://github.com/llvm/llvm-project/pull/86230 >From bf78fb2172048c703824698b839e20ad1b8bf0b2 Mon Sep 17 00:00:00 2001 From: June Rhodes Date: Fri, 22 Mar 2024 13:07:57 +1100 Subject: [PATCH] Add 'forNone' AST matcher ---

[clang] Add 'forNone' AST matcher (PR #86230)

2024-03-21 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,

[clang] Add 'forNone' AST matcher (PR #86230)

2024-03-21 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 718fbbef5f18a2b7e7fc4f842b1452ae9bee581a b0ef223dfab9c8ebc67601ccfbbe0ce3abe15f12 --

[clang] Add 'forNone' AST matcher (PR #86230)

2024-03-21 Thread June Rhodes via cfe-commits
https://github.com/hach-que edited https://github.com/llvm/llvm-project/pull/86230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add 'forNone' AST matcher (PR #86230)

2024-03-21 Thread June Rhodes via cfe-commits
https://github.com/hach-que created https://github.com/llvm/llvm-project/pull/86230 This adds a `forNone` AST matcher, which matches only if there are no immediate children of the current node that match the inner matcher. For example, given: ```cpp class F { public: int A; F() {}; };

[clang] Add 'refersToPack' AST matcher (PR #86228)

2024-03-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: June Rhodes (hach-que) Changes This adds a 'refersToPack' AST matcher, which can be used to match against template arguments that are inside parameter packs. The inner matcher is evaluated against each argument in the parameter pack,

[clang] Add 'refersToPack' AST matcher (PR #86228)

2024-03-21 Thread June Rhodes via cfe-commits
https://github.com/hach-que created https://github.com/llvm/llvm-project/pull/86228 This adds a 'refersToPack' AST matcher, which can be used to match against template arguments that are inside parameter packs. The inner matcher is evaluated against each argument in the parameter pack, such

[clang] [X86_32] Teach X86_32 va_arg to ignore empty structs. (PR #86075)

2024-03-21 Thread Longsheng Mou via cfe-commits
@@ -1069,6 +1069,10 @@ Address X86_32ABIInfo::EmitVAArg(CodeGenFunction , auto TypeInfo = getContext().getTypeInfoInChars(Ty); + // Empty records are ignored for parameter passing purposes on non-Windows. + if (!IsWin32StructABI && isEmptyRecord(getContext(), Ty, true))

[clang-tools-extra] [clang-tidy] add new check readability-enum-initial-value (PR #86129)

2024-03-21 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,82 @@ +//===--- EnumInitialValueCheck.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:

[clang] Add 'refersToPack' AST matcher (PR #86228)

2024-03-21 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,

[clang] [NFC][Clang] Fix static analyzer bugs with dereference after null checks (PR #86018)

2024-03-21 Thread via cfe-commits
https://github.com/smanna12 closed https://github.com/llvm/llvm-project/pull/86018 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Fix static analyzer bugs with dereference after null checks (PR #86018)

2024-03-21 Thread via cfe-commits
smanna12 wrote: > If you read the code, it should be obvious the pointer is in fact non-null. > Please don't insert null checks into the code just to address static analyzer > false positives. Thank you @efriedma-quic for reviews! I misunderstood some of the code parts.

[clang] [compiler-rt] [llvm] Get the linker version and pass the it to compiler-rt tests on Darwin. (PR #86220)

2024-03-21 Thread via cfe-commits
https://github.com/thetruestblue approved this pull request. Thanks for looking into this. https://github.com/llvm/llvm-project/pull/86220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] AMDGPU: Rename and add bf16 support for global_load_tr builtins (PR #86202)

2024-03-21 Thread Changpeng Fang via cfe-commits
changpeng wrote: > I don't think intrinsics are meant for users. Builtins are the user-facing > front. :-) Then renaing the intrinsics should be relatively at a lower priority. We may do it in a separate patch once we have reached an agreement. https://github.com/llvm/llvm-project/pull/86202

[clang] [Clang] Make '-frtlib-add-rpath' include the standard library directory (PR #86217)

2024-03-21 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/86217 >From 722b8b454d652b3d52e20b9bacff58e096cc7feb Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Thu, 21 Mar 2024 18:25:35 -0500 Subject: [PATCH] [Clang] Make '-frtlib-add-rpath' include the standard library

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-21 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin approved this pull request. https://github.com/llvm/llvm-project/pull/84137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] AMDGPU: Rename and add bf16 support for global_load_tr builtins (PR #86202)

2024-03-21 Thread Shilei Tian via cfe-commits
shiltian wrote: > > > > Do you want to rename intrinsics as well? Because now intrinsic names > > > > do not match builtin names. > > > > > > > > > Do we have to match builtins with intrinsics? Renaming intrinsics here > > > means we will have to duplicate the intrinsics. > > > > > > Is

[clang] [llvm] [CodeGen][LLVM] Make the `va_list` related intrinsics generic. (PR #85460)

2024-03-21 Thread Jessica Clarke via cfe-commits
jrtc27 wrote: This probably also needs to tweak LangRef https://github.com/llvm/llvm-project/pull/85460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Make '-frtlib-add-rpath' include the standard library directory (PR #86217)

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

[clang] [llvm] [CodeGen][LLVM] Make the `va_list` related intrinsics generic. (PR #85460)

2024-03-21 Thread Alexander Richardson via cfe-commits
@@ -792,13 +792,14 @@ EncompassingIntegerType(ArrayRef Types) { Value *CodeGenFunction::EmitVAStartEnd(Value *ArgValue, bool IsStart) { Intrinsic::ID inst = IsStart ? Intrinsic::vastart : Intrinsic::vaend; - return Builder.CreateCall(CGM.getIntrinsic(inst), ArgValue); +

[clang] [compiler-rt] [llvm] Get the linker version and pass the it to compiler-rt tests on Darwin. (PR #86220)

2024-03-21 Thread Usama Hameed via cfe-commits
https://github.com/usama54321 created https://github.com/llvm/llvm-project/pull/86220 The HOST_LINK_VERSION is a hardcoded string in Darwin clang that detects the linker version at configure time. The driver uses this information to build the correct set of arguments for the linker. This

[clang] [llvm] [CodeGen][LLVM] Make the `va_list` related intrinsics generic. (PR #85460)

2024-03-21 Thread Alex Voicu via cfe-commits
@@ -700,10 +700,13 @@ class MSBuiltin { //===--- Variable Argument Handling Intrinsics ===// // -def int_vastart : DefaultAttrsIntrinsic<[], [llvm_ptr_ty], [], "llvm.va_start">; -def int_vacopy : DefaultAttrsIntrinsic<[], [llvm_ptr_ty,

[clang] [compiler-rt] [llvm] Get the linker version and pass the it to compiler-rt tests on Darwin. (PR #86220)

2024-03-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Usama Hameed (usama54321) Changes The HOST_LINK_VERSION is a hardcoded string in Darwin clang that detects the linker version at configure time. The driver uses this information to build the correct set of arguments for the linker. This

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-21 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/85340 >From 3cdcfa4e63550b9677c8ffe2f33eab85899b2c45 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Thu, 14 Mar 2024 17:04:12 -0700 Subject: [PATCH 1/8] add test --- .../clang/Basic/DiagnosticDriverKinds.td

[clang] [llvm] [CIR][Basic][NFC] Add the CIR language to the Language enum (PR #86072)

2024-03-21 Thread Nathan Lanza via cfe-commits
https://github.com/lanza closed https://github.com/llvm/llvm-project/pull/86072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CIR][Basic][NFC] Add the CIR language to the Language enum (PR #86072)

2024-03-21 Thread Nathan Lanza via cfe-commits
https://github.com/lanza edited https://github.com/llvm/llvm-project/pull/86072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CIR][Basic][NFC] Add the CIR language to the Language enum (PR #86072)

2024-03-21 Thread Nathan Lanza via cfe-commits
https://github.com/lanza updated https://github.com/llvm/llvm-project/pull/86072 >From 115f1dcca7b20dacdc5beef0e73819aef94f0ec1 Mon Sep 17 00:00:00 2001 From: Nathan Lanza Date: Thu, 21 Mar 2024 03:24:54 + Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=

[clang] e66b670 - [CIR][Basic][NFC] Add the CIR language to the Language enum

2024-03-21 Thread via cfe-commits
Author: Nathan Lanza Date: 2024-03-21T19:53:48-04:00 New Revision: e66b670f3bf9312f696e66c31152ae535207d6bb URL: https://github.com/llvm/llvm-project/commit/e66b670f3bf9312f696e66c31152ae535207d6bb DIFF: https://github.com/llvm/llvm-project/commit/e66b670f3bf9312f696e66c31152ae535207d6bb.diff

[clang] [lld] [llvm] [ARM][AArch64] Change module flags values. (PR #84804)

2024-03-21 Thread Daniel Kiss via cfe-commits
DanielKristofKiss wrote: superseded by #86212 https://github.com/llvm/llvm-project/pull/84804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-21 Thread Chris B via cfe-commits
@@ -4258,6 +4258,18 @@ bool CompilerInvocation::ParseLangArgs(LangOptions , ArgList , } else { llvm_unreachable("expected DXIL or SPIR-V target"); } + // validate that if fnative-half-type is given, that + // the language standard is at least

[clang] [libcxx] [libc++] Implement LWG3528 (`make_from_tuple` can perform (the equivalent of) a C-style cast) (PR #85263)

2024-03-21 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/85263 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [libc++] Implement LWG3528 (`make_from_tuple` can perform (the equivalent of) a C-style cast) (PR #85263)

2024-03-21 Thread via cfe-commits
@@ -1386,9 +1386,19 @@ inline _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) apply(_Fn&& __f, _Tuple&& std::forward<_Tuple>(__t), typename __make_tuple_indices>>::type{})) +#if _LIBCPP_STD_VER >= 20 template inline _LIBCPP_HIDE_FROM_ABI constexpr _Tp

[clang] [libcxx] [libc++] Implement LWG3528 (`make_from_tuple` can perform (the equivalent of) a C-style cast) (PR #85263)

2024-03-21 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/85263 >From fc8c1a24f09c8860269fbdcfb0b285ffd19f427c Mon Sep 17 00:00:00 2001 From: yronglin Date: Fri, 15 Mar 2024 00:48:08 +0800 Subject: [PATCH 01/11] [libc++] Implement LWG3528 (`make_from_tuple` can perform

[clang] [clang][modules] Avoid calling expensive `SourceManager::translateFile()` (PR #86216)

2024-03-21 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 6b1cf0040059c407264d2609403c4fc090673167 4dd48b40a034edf0b124ab08055a334ad7abd5ba --

[clang] [Clang] Make '-frtlib-add-rpath' include the standard library directory (PR #86217)

2024-03-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joseph Huber (jhuber6) Changes Summary: The original intention of the `openmp-add-rpath` option was to add the rpath to the language runtime directory. However, the current implementation only adds it to the compiler's resource directory.

[clang] [Clang] Make '-frtlib-add-rpath' include the standard library directory (PR #86217)

2024-03-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Joseph Huber (jhuber6) Changes Summary: The original intention of the `openmp-add-rpath` option was to add the rpath to the language runtime directory. However, the current implementation only adds it to the compiler's resource

[clang] [Clang] Make '-frtlib-add-rpath' include the standard library directory (PR #86217)

2024-03-21 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/86217 Summary: The original intention of the `openmp-add-rpath` option was to add the rpath to the language runtime directory. However, the current implementation only adds it to the compiler's resource directory. This

[clang] AMDGPU: Rename and add bf16 support for global_load_tr builtins (PR #86202)

2024-03-21 Thread Changpeng Fang via cfe-commits
changpeng wrote: > > > Do you want to rename intrinsics as well? Because now intrinsic names do > > > not match builtin names. > > > > > > Do we have to match builtins with intrinsics? Renaming intrinsics here > > means we will have to duplicate the intrinsics. > > Is that because of the

[clang] [clang][modules] Avoid calling expensive `SourceManager::translateFile()` (PR #86216)

2024-03-21 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/86216 The `ASTWriter` algorithm for computing affecting module maps uses `SourceManager::translateFile()` to get a `FileID` from a `FileEntry`. This is slow (O(n)) since the function performs a linear walk over

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-21 Thread Damyan Pepper via cfe-commits
@@ -4258,6 +4258,18 @@ bool CompilerInvocation::ParseLangArgs(LangOptions , ArgList , } else { llvm_unreachable("expected DXIL or SPIR-V target"); } + // validate that if fnative-half-type is given, that + // the language standard is at least

[clang] AMDGPU: Rename and add bf16 support for global_load_tr builtins (PR #86202)

2024-03-21 Thread Stanislav Mekhanoshin via cfe-commits
rampitec wrote: > > Do you want to rename intrinsics as well? Because now intrinsic names do > > not match builtin names. > > Do we have to match builtins with intrinsics? Renaming intrinsics here means > we will have to duplicate the intrinsics. Is that because of the mangling?

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-21 Thread Damyan Pepper via cfe-commits
@@ -4258,6 +4258,18 @@ bool CompilerInvocation::ParseLangArgs(LangOptions , ArgList , } else { llvm_unreachable("expected DXIL or SPIR-V target"); } + // validate that if fnative-half-type is given, that + // the language standard is at least

[clang] AMDGPU: Rename and add bf16 support for global_load_tr builtins (PR #86202)

2024-03-21 Thread Changpeng Fang via cfe-commits
changpeng wrote: > Do you want to rename intrinsics as well? Because now intrinsic names do not > match builtin names. Do we have to match builtins with intrinsics? Renaming intrinsics here means we will have to duplicate the intrinsics. https://github.com/llvm/llvm-project/pull/86202

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-21 Thread Joshua Batista via cfe-commits
@@ -4258,6 +4258,18 @@ bool CompilerInvocation::ParseLangArgs(LangOptions , ArgList , } else { llvm_unreachable("expected DXIL or SPIR-V target"); } + // validate that if fnative-half-type is given, that + // the language standard is at least

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-21 Thread Joshua Batista via cfe-commits
@@ -4258,6 +4258,18 @@ bool CompilerInvocation::ParseLangArgs(LangOptions , ArgList , } else { llvm_unreachable("expected DXIL or SPIR-V target"); } + // validate that if fnative-half-type is given, that + // the language standard is at least

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-21 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/85340 >From 3cdcfa4e63550b9677c8ffe2f33eab85899b2c45 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Thu, 14 Mar 2024 17:04:12 -0700 Subject: [PATCH 1/7] add test --- .../clang/Basic/DiagnosticDriverKinds.td

[clang] [llvm] [Clang][ARM][AArch64] Alway emit protection attributes for functions. (PR #82819)

2024-03-21 Thread Daniel Kiss via cfe-commits
DanielKristofKiss wrote: #86212 Deals with the import of the "true"/"false" values in the attributes. https://github.com/llvm/llvm-project/pull/82819 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [lld] [llvm] [ARM][AArch64] BTI,GCS,PAC Module flag update. (PR #86212)

2024-03-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-lld Author: Daniel Kiss (DanielKristofKiss) Changes Module flag is used to indicate the feature to be propagated to the function. As now the frontend emits all attributes accordingly let's help the auto upgrade to only do work when old and new

[clang] [lld] [llvm] [ARM][AArch64] BTI,GCS,PAC Module flag update. (PR #86212)

2024-03-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Daniel Kiss (DanielKristofKiss) Changes Module flag is used to indicate the feature to be propagated to the function. As now the frontend emits all attributes accordingly let's help the auto upgrade to only do work when old and new

[clang] [lld] [llvm] [ARM][AArch64] BTI,GCS,PAC Module flag update. (PR #86212)

2024-03-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Daniel Kiss (DanielKristofKiss) Changes Module flag is used to indicate the feature to be propagated to the function. As now the frontend emits all attributes accordingly let's help the auto upgrade to only do work when old and

[clang] [Clang][Sema] Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-21 Thread Harald van Dijk via cfe-commits
@@ -21,10 +27,76 @@ struct __attribute((packed, aligned(4))) { char a; int x; char z[]; } e = { 1, 2 struct { int x; char y[]; } f = { 1, { 13, 15 } }; // CHECK: @f ={{.*}} global <{ i32, [2 x i8] }> <{ i32 1, [2 x i8] c"\0D\0F" }> -union { - struct { -int a; -char

[clang] [lld] [llvm] [ARM][AArch64] Change module flags values. (PR #84804)

2024-03-21 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss closed https://github.com/llvm/llvm-project/pull/84804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] AMDGPU: Rename and add bf16 support for global_load_tr builtins (PR #86202)

2024-03-21 Thread Stanislav Mekhanoshin via cfe-commits
@@ -432,13 +432,15 @@ TARGET_BUILTIN(__builtin_amdgcn_s_wakeup_barrier, "vi", "n", "gfx12-insts") TARGET_BUILTIN(__builtin_amdgcn_s_barrier_leave, "b", "n", "gfx12-insts") TARGET_BUILTIN(__builtin_amdgcn_s_get_barrier_state, "Uii", "n", "gfx12-insts")

[clang] [lld] [llvm] [ARM][AArch64] BTI,GCS,PAC Module flag update. (PR #86212)

2024-03-21 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss created https://github.com/llvm/llvm-project/pull/86212 Module flag is used to indicate the feature to be propagated to the function. As now the frontend emits all attributes accordingly let's help the auto upgrade to only do work when old and new bitcodes

[clang] AMDGPU: Rename and add bf16 support for global_load_tr builtins (PR #86202)

2024-03-21 Thread Shilei Tian via cfe-commits
@@ -432,13 +432,15 @@ TARGET_BUILTIN(__builtin_amdgcn_s_wakeup_barrier, "vi", "n", "gfx12-insts") TARGET_BUILTIN(__builtin_amdgcn_s_barrier_leave, "b", "n", "gfx12-insts") TARGET_BUILTIN(__builtin_amdgcn_s_get_barrier_state, "Uii", "n", "gfx12-insts")

[libunwind] [libunwind] Tweak tests for musl support. (PR #85097)

2024-03-21 Thread Alexander Richardson via cfe-commits
@@ -11,20 +11,27 @@ // Basic test for float registers number are accepted. -#include #include #include #include +// Using __attribute__((section("main_func"))) is Linux specific, but then arichardson wrote: Nit: This is not specific to Linux it is

[clang] [NFC][Clang] Fix static analyzer bugs with dereference after null checks (PR #86018)

2024-03-21 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic requested changes to this pull request. If you read the code, it should be obvious the pointer is in fact non-null. Please don't insert null checks into the code just to address static analyzer false positives. https://github.com/llvm/llvm-project/pull/86018

[clang] [llvm] [Clang][ARM][AArch64] Alway emit protection attributes for functions. (PR #82819)

2024-03-21 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/82819 >From 28e7b4e10208991790f0c7b1e225831714a47572 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Mon, 22 Jan 2024 11:33:15 +0100 Subject: [PATCH] Emit attributes for functions always. Branch

[clang] [llvm] [InstallAPI] Report exports discovered in binary but not in interface (PR #86025)

2024-03-21 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/86025 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e470ca8 - [InstallAPI] Report exports discovered in binary but not in interface (#86025)

2024-03-21 Thread via cfe-commits
Author: Cyndy Ishida Date: 2024-03-21T15:03:34-07:00 New Revision: e470ca89ba77b2f200ff3a8ad65c74028f42c5f7 URL: https://github.com/llvm/llvm-project/commit/e470ca89ba77b2f200ff3a8ad65c74028f42c5f7 DIFF: https://github.com/llvm/llvm-project/commit/e470ca89ba77b2f200ff3a8ad65c74028f42c5f7.diff

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-21 Thread Damyan Pepper via cfe-commits
@@ -753,7 +753,8 @@ def err_drv_hlsl_unsupported_target : Error< "HLSL code generation is unsupported for target '%0'">; def err_drv_hlsl_bad_shader_required_in_target : Error< "%select{shader model|Vulkan environment|shader stage}0 is required as %select{OS|environment}1

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-21 Thread Damyan Pepper via cfe-commits
@@ -4258,6 +4258,18 @@ bool CompilerInvocation::ParseLangArgs(LangOptions , ArgList , } else { llvm_unreachable("expected DXIL or SPIR-V target"); } + // validate that if fnative-half-type is given, that + // the language standard is at least

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-21 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp edited https://github.com/llvm/llvm-project/pull/85340 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-21 Thread Damyan Pepper via cfe-commits
@@ -4258,6 +4258,18 @@ bool CompilerInvocation::ParseLangArgs(LangOptions , ArgList , } else { llvm_unreachable("expected DXIL or SPIR-V target"); } + // validate that if fnative-half-type is given, that + // the language standard is at least

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-21 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp requested changes to this pull request. I'm worried about what this'll do when `T.isSPIRVLogical()`. https://github.com/llvm/llvm-project/pull/85340 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-21 Thread Damyan Pepper via cfe-commits
@@ -4258,6 +4258,18 @@ bool CompilerInvocation::ParseLangArgs(LangOptions , ArgList , } else { llvm_unreachable("expected DXIL or SPIR-V target"); } + // validate that if fnative-half-type is given, that + // the language standard is at least

[clang] AMDGPU: Rename and add bf16 support for global_load_tr builtins (PR #86202)

2024-03-21 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec commented: Do you want to rename intrinsics as well? Because now intrinsic names do not match builtin names. https://github.com/llvm/llvm-project/pull/86202 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] AMDGPU: Rename and add bf16 support for global_load_tr builtins (PR #86202)

2024-03-21 Thread Changpeng Fang via cfe-commits
https://github.com/changpeng created https://github.com/llvm/llvm-project/pull/86202 Make the name of a clang builtin as close to the mnemonic instruction name as possible. The data type suffix may not be enough to tell what instruction the builtin is going to produce. This patch also add

[clang] [clang][SPIRV] Don't warn on -mcmodel (PR #86039)

2024-03-21 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks closed https://github.com/llvm/llvm-project/pull/86039 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b19bf3e - [clang][SPIRV] Don't warn on -mcmodel (#86039)

2024-03-21 Thread via cfe-commits
Author: Arthur Eubanks Date: 2024-03-21T14:48:35-07:00 New Revision: b19bf3e888f95c35bf641cd0eee18a8da702f6fe URL: https://github.com/llvm/llvm-project/commit/b19bf3e888f95c35bf641cd0eee18a8da702f6fe DIFF:

[clang] [clang][SPIRV] Don't warn on -mcmodel (PR #86039)

2024-03-21 Thread Arthur Eubanks via cfe-commits
@@ -5804,7 +5804,7 @@ void Clang::ConstructJob(Compilation , const JobAction , } else if (Triple.getArch() == llvm::Triple::x86_64) { Ok = llvm::is_contained({"small", "kernel", "medium", "large", "tiny"}, CM); -} else if

[clang] [clang][SPIRV] Don't warn on -mcmodel (PR #86039)

2024-03-21 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks updated https://github.com/llvm/llvm-project/pull/86039 >From bba8e4003c4ccc36497e62ad1696197e6987525c Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Wed, 20 Mar 2024 23:36:35 + Subject: [PATCH 1/2] [clang][SPIRV] Ignore -mcmodel The code model doesn't

[clang] AMDGPU: Rename and add bf16 support for global_load_tr builtins (PR #86202)

2024-03-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Changpeng Fang (changpeng) Changes Make the name of a clang builtin as close to the mnemonic instruction name as possible. The data type suffix may not be enough to tell what instruction the builtin is going to produce. This

[clang] [clang][Sema] Fix for enums overflowing (#24667) (PR #78742)

2024-03-21 Thread via cfe-commits
https://github.com/wheatman updated https://github.com/llvm/llvm-project/pull/78742 >From df2911ee8f23c9030dce45f835371616cf4355b7 Mon Sep 17 00:00:00 2001 From: Brian Wheatman Date: Fri, 19 Jan 2024 11:13:33 -0500 Subject: [PATCH] [clang][Sema] Fix for overflow in enumerators(#24667) Enums

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

2024-03-21 Thread via cfe-commits
https://github.com/trcrsired updated https://github.com/llvm/llvm-project/pull/79667 >From d73a87b47a549aeac7f4ea519037107a8f798df6 Mon Sep 17 00:00:00 2001 From: trcrsired Date: Fri, 26 Jan 2024 18:44:41 -0500 Subject: [PATCH] [libunwind][libcxx][libcxxabi] Fix Exception Handling build for

[clang] [clang][AST][NFC] Add '[[fallthrough]]' to cases fall through (PR #85921)

2024-03-21 Thread Fangrui Song via cfe-commits
MaskRay wrote: We should remove the comment. To make the PR more useful, the PR can be changed to remove other confusing comments like this. https://github.com/llvm/llvm-project/pull/85921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Unwrap CountAttributed for debug info (PR #86017)

2024-03-21 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna updated https://github.com/llvm/llvm-project/pull/86017 >From abfcb60e7b65e755733f4d41795aa9cfd44e0cc3 Mon Sep 17 00:00:00 2001 From: Yeoul Na Date: Thu, 21 Mar 2024 06:47:05 +0900 Subject: [PATCH 1/3] Unwrap CountAttributed for debug info Fix crash caused by

[clang] [clang][SPIRV] Don't warn on -mcmodel (PR #86039)

2024-03-21 Thread Fangrui Song via cfe-commits
@@ -5804,7 +5804,7 @@ void Clang::ConstructJob(Compilation , const JobAction , } else if (Triple.getArch() == llvm::Triple::x86_64) { Ok = llvm::is_contained({"small", "kernel", "medium", "large", "tiny"}, CM); -} else if

[clang] [X86_32] Teach X86_32 va_arg to ignore empty structs. (PR #86075)

2024-03-21 Thread Eli Friedman via cfe-commits
@@ -1069,6 +1069,10 @@ Address X86_32ABIInfo::EmitVAArg(CodeGenFunction , auto TypeInfo = getContext().getTypeInfoInChars(Ty); + // Empty records are ignored for parameter passing purposes on non-Windows. + if (!IsWin32StructABI && isEmptyRecord(getContext(), Ty, true))

[clang] [X86_64] fix arg pass error in struct. (PR #85394)

2024-03-21 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: gcc uses memory, and the ABI standard doesn't explicitly contradict it, so let's just go with that. https://github.com/llvm/llvm-project/pull/85394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Add clang_elementwise_builtin_alias (PR #86175)

2024-03-21 Thread Farzon Lotfi via cfe-commits
@@ -2239,6 +2239,39 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID, return true; ICEArguments &= ~(1 << ArgNo); } + // if the call has the elementwise attribute, then + // make sure that an elementwise expr is emitted. + if

[clang] Add clang_elementwise_builtin_alias (PR #86175)

2024-03-21 Thread Farzon Lotfi via cfe-commits
@@ -2239,6 +2239,39 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID, return true; ICEArguments &= ~(1 << ArgNo); } + // if the call has the elementwise attribute, then + // make sure that an elementwise expr is emitted. + if

[clang] [clang][SPIRV] Don't warn on -mcmodel (PR #86039)

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

[clang] Add clang_elementwise_builtin_alias (PR #86175)

2024-03-21 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/86175 >From 5e10b1e42a20a39c9a3d5ff332591713511832c8 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Wed, 20 Mar 2024 13:24:07 -0700 Subject: [PATCH 1/6] make elemnetwise alias an alias of builtin alias ---

  1   2   3   4   >