[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); + re

[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 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] 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 tha

[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] [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 dir

[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] [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 https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[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. https://github.com/l

[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] 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, it

[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: Apa

[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 &CGF, auto TypeInfo = getContext().getTypeInfoInChars(Ty); + // Empty records are ignored for parameter passing purposes on non-Windows. + if (!IsWin32StructABI && isEmptyRecord(getContext(), Ty, true

[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 th

[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, such

[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 '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 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 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] 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/include/clang/ASTMatchers/AS

[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/inclu

[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 '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 `fieldDecl(hasType(qual

[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 `fieldDecl(hasType(q

[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/inclu

[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 '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 '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/include/clang/ASTMatchers/

[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, it

[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 readability-enum-initial-value

[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/inclu

[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 b

[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] 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] Split -Wcast-function-type into a separate group (PR #86131)

2024-03-21 Thread Abhin P Jose via cfe-commits
Abhinkop wrote: I think that this would occur primarily in the whole code base. Because a compilation that has added -Wextra diagnostic group would provide new warnings and coupling, this with -Werror would break the build. I think we have to take a look at these builds and investigate why it

[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: > I don't think intrinsics are meant for users. Builtins are the user-facing > front. :-) Depending on who you consider an user. Are folks writing MLIR generators users? https://github.com/llvm/llvm-project/pull/86202 ___ cfe-commits

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

2024-03-21 Thread Piotr Sobczak via cfe-commits
piotrAMD wrote: The change LG - thanks for adding support for bf16. Agreed that the intrinsics should match the builtins for consistency (now or in a follow-up commit). These intrinsics were added for the upcoming generation - it should be fine to rename them at this stage. https://github.com

[clang] [clang-forma] Support `PointerAlignment: Left` for pointer to member (PR #86253)

2024-03-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #85761. --- Full diff: https://github.com/llvm/llvm-project/pull/86253.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+19-12) - (modified) clang/unittests/Format/FormatTe

<    1   2   3   4