[clang] [clang-format] Add SpacesInParensOption for attributes and filtering for repeated parens (PR #77522)

2024-03-28 Thread Alibek Omarov via cfe-commits
a1batross wrote: Any news on this? https://github.com/llvm/llvm-project/pull/77522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RFC][Clang] Enable custom type checking for printf (PR #86801)

2024-03-28 Thread Vikram Hegde via cfe-commits
vikramRH wrote: Thanks for the comments @AaronBallman. The core issue here is that the current builtin handling design does not allow multiple overloads for the same identifier to coexist (ref.

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-03-28 Thread via cfe-commits
@@ -0,0 +1,199 @@ +//===--- MinMaxUseInitializerListCheck.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-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-03-28 Thread via cfe-commits
@@ -0,0 +1,199 @@ +//===--- MinMaxUseInitializerListCheck.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-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-03-28 Thread via cfe-commits
https://github.com/sopyb updated https://github.com/llvm/llvm-project/pull/85572 >From 17d6ad65216237f9a325d9b608c1372cbbf83ff0 Mon Sep 17 00:00:00 2001 From: sopy Date: Sun, 17 Mar 2024 17:30:27 +0200 Subject: [PATCH 1/5] [clang-tidy] add check to suggest replacement of nested std::min or

[clang] [Modules] No transitive source location change (PR #86912)

2024-03-28 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > Yes, I explained this in Some low level details section. The size of source > > location won't be affected. Since the size of source location is unsigned > > (practically, it is 32 bits in most platforms). And we use uint64_t as a > > unit in the serializer. So there are

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-03-28 Thread via cfe-commits
https://github.com/sopyb updated https://github.com/llvm/llvm-project/pull/85572 >From 17d6ad65216237f9a325d9b608c1372cbbf83ff0 Mon Sep 17 00:00:00 2001 From: sopy Date: Sun, 17 Mar 2024 17:30:27 +0200 Subject: [PATCH 1/5] [clang-tidy] add check to suggest replacement of nested std::min or

[clang] [Modules] No transitive source location change (PR #86912)

2024-03-28 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: > Yes, I explained this in Some low level details section. The size of source > location won't be affected. Since the size of source location is unsigned > (practically, it is 32 bits in most platforms). And we use uint64_t as a unit > in the serializer. So there are 32

[clang] [Clang] Fix __is_array returning true for zero-sized arrays (PR #86652)

2024-03-28 Thread Kees Cook via cfe-commits
kees wrote: I guess I don't have a strong opinion here, since these helpers are specific to C++, and I've been generally trying to remove fixed-size 0-sized arrays in C projects (i.e. the Linux kernel). I do care about C flexible arrays (and their associated extensions), though. I suspect

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-03-28 Thread Chuanqi Xu via cfe-commits
@@ -60,11 +63,11 @@ int use() { // CHECK-NOT: @_ZTSW3Mod4Base = constant // CHECK-NOT: @_ZTIW3Mod4Base = constant -// CHECK: @_ZTVW3Mod4Base = external unnamed_addr +// CHECK: @_ZTVW3Mod4Base = external -// CHECK-INLINE: @_ZTVW3Mod4Base = linkonce_odr {{.*}}unnamed_addr

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-03-28 Thread Chuanqi Xu via cfe-commits
@@ -1483,10 +1483,15 @@ void ASTDeclWriter::VisitCXXRecordDecl(CXXRecordDecl *D) { if (D->isThisDeclarationADefinition()) Record.AddCXXDefinitionData(D); - // Store (what we currently believe to be) the key function to avoid - // deserializing every method so we can

[clang] [llvm] [HLSL][DXIL][SPIRV] Intrinsic unification PR (PR #87034)

2024-03-28 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl created https://github.com/llvm/llvm-project/pull/87034 DO NOT MERGE This is part of a proposal for how to unify spir-v and DirectX intrinsics. The issue tracking this work is: #83882 >From 8f7fb8ece073c251f78a2133b42d8baccb89c7f3 Mon Sep 17 00:00:00 2001

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-03-28 Thread Chuanqi Xu via cfe-commits
@@ -41,9 +43,10 @@ Base::~Base() {} // CHECK: @_ZTSW3Mod4Base = constant // CHECK: @_ZTIW3Mod4Base = constant -// CHECK-INLINE: @_ZTVW3Mod4Base = linkonce_odr {{.*}}unnamed_addr constant -// CHECK-INLINE: @_ZTSW3Mod4Base = linkonce_odr {{.*}}constant -// CHECK-INLINE:

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-03-28 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/75912 >From 7399d2417a4b758fa0a98da1f99f3b4ec0eb1046 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 19 Dec 2023 17:00:59 +0800 Subject: [PATCH 1/2] [C++20] [Modules] [Itanium ABI] Generate the vtable in the

[clang] [Modules] No transitive source location change (PR #86912)

2024-03-28 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/86912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Fix a CTAD regression after 42239d2e9 (PR #86914)

2024-03-28 Thread Younan Zhang via cfe-commits
@@ -1836,7 +1836,19 @@ static TemplateParameterList *GetTemplateParameterList(TemplateDecl *TD) { // Make sure we get the template parameter list from the most // recent declaration, since that is the only one that is guaranteed to // have all the default template

[clang] [Modules] No transitive source location change (PR #86912)

2024-03-28 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/86912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Ignore the parentheses in the guard of DiagnoseUnexpandedParameterPack (PR #86401)

2024-03-28 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 converted_to_draft https://github.com/llvm/llvm-project/pull/86401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Ignore the parentheses in the guard of DiagnoseUnexpandedParameterPack (PR #86401)

2024-03-28 Thread Younan Zhang via cfe-commits
zyn0217 wrote: @dwblaikie : You're right. The patch is insufficient because the `FunctionParmPackExpr` in your example could also be wrapped with e.g. ``` CallExpr 0x649b0cf0 '' |-UnresolvedLookupExpr 0x649af8f8 '' lvalue (ADL) = 'f1' 0x64990e98 `-FunctionParmPackExpr

[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

2024-03-28 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/85050 >From b46c8fa030deb980c1550edc0ff8510d4e3c4e17 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 12 Mar 2024 17:26:49 +0800 Subject: [PATCH 1/3] [C++20] [Modules] Introduce -fgen-reduced-bmi ---

[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

2024-03-28 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Got it. I've renamed the flag as `-fexperimental-modules-reduced-bmi`. I feel the suggestion like let users to use `-Xclang` options look odd.. --- > What do you mean by "symmetric"? I mean, we always want the users to do something explicitly to enable the feature. But

[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

2024-03-28 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/85050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

2024-03-28 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/85050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Introduce -fmodules-reduced-bmi (PR #85050)

2024-03-28 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/85050 >From b46c8fa030deb980c1550edc0ff8510d4e3c4e17 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 12 Mar 2024 17:26:49 +0800 Subject: [PATCH 1/3] [C++20] [Modules] Introduce -fgen-reduced-bmi ---

[clang] [Modules] No transitive source location change (PR #86912)

2024-03-28 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/86912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] No transitive source location change (PR #86912)

2024-03-28 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/86912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] No transitive source location change (PR #86912)

2024-03-28 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/86912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] No transitive source location change (PR #86912)

2024-03-28 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > By default, `SourceLocation` is 32 bits. One bit is used to distinguish macro > expansions. Looking at libc++'s module map, it contains 999 top-level modules > at this moment. That's 10 bits just to be able to import the (entire) > standard library. That leaves 21 bits,

[clang] [Modules] No transitive source location change (PR #86912)

2024-03-28 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/86912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-28 Thread Chris B via cfe-commits
https://github.com/llvm-beanz edited https://github.com/llvm/llvm-project/pull/83933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-28 Thread Chris B via cfe-commits
@@ -0,0 +1,432 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-28 Thread Chris B via cfe-commits
https://github.com/llvm-beanz commented: It might be useful to have a section in this document that briefly describes what is done at each phase of the compiler and what information is passed through to the next. For example: ClangSema parses the attribute and generates . ClangCodeGen reads

[clang] [clang][ExtractAPI] Add ability to create multiple symbol graphs (PR #86676)

2024-03-28 Thread via cfe-commits
https://github.com/QuietMisdreavus approved this pull request. Looks good, thanks! https://github.com/llvm/llvm-project/pull/86676 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Remove barely used class 'KnownSVal' (NFC) (PR #86953)

2024-03-28 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ approved this pull request. Yeah nuke it. https://github.com/llvm/llvm-project/pull/86953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5906b1a - [APINotes][test] Fix permissions of a file copied from a source tree

2024-03-28 Thread Dmitri Gribenko via cfe-commits
Author: Dmitri Gribenko Date: 2024-03-29T00:38:11+01:00 New Revision: 5906b1ad3f70586c72293d5c62eb3f26977b8b96 URL: https://github.com/llvm/llvm-project/commit/5906b1ad3f70586c72293d5c62eb3f26977b8b96 DIFF:

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-28 Thread Chris B via cfe-commits
@@ -0,0 +1,426 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are

[clang] [Clang] [C++26] Implement P2573R2: `= delete("should have a reason");` (PR #86526)

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

[clang] [Clang] [C++26] Implement P2573R2: `= delete("should have a reason");` (PR #86526)

2024-03-28 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/86526 >From 98af47e8ccc633016c14b91c221f9f8fc620f068 Mon Sep 17 00:00:00 2001 From: Sirraide Date: Mon, 25 Mar 2024 14:46:52 +0100 Subject: [PATCH 01/15] [Clang] Parse `= delete("message")` ---

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-28 Thread Joshua Batista via cfe-commits
@@ -0,0 +1,258 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-28 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/86358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CodeGen][arm64e] Add methods and data members to Address, which are needed to authenticate signed pointers (PR #86923)

2024-03-28 Thread Akira Hatanaka via cfe-commits
ahatanak wrote: I plan to file a bug or notify the authors of the code of the potential bug once I have a better understanding of the problem. FYI, the code was crashing because the lvalue passed to `OpaqueValueMappingData::bind` had a larger alignment than the alignment of the type passed

[clang] [Clang] [C++26] Implement P2573R2: `= delete("should have a reason");` (PR #86526)

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

[clang] [Clang] [C++26] Implement P2573R2: `= delete("should have a reason");` (PR #86526)

2024-03-28 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/86526 >From 98af47e8ccc633016c14b91c221f9f8fc620f068 Mon Sep 17 00:00:00 2001 From: Sirraide Date: Mon, 25 Mar 2024 14:46:52 +0100 Subject: [PATCH 01/14] [Clang] Parse `= delete("message")` ---

[clang] [Clang] [C++26] Implement P2573R2: `= delete("should have a reason");` (PR #86526)

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

[clang] [Clang] [C++26] Implement P2573R2: `= delete("should have a reason");` (PR #86526)

2024-03-28 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/86526 >From 98af47e8ccc633016c14b91c221f9f8fc620f068 Mon Sep 17 00:00:00 2001 From: Sirraide Date: Mon, 25 Mar 2024 14:46:52 +0100 Subject: [PATCH 01/13] [Clang] Parse `= delete("message")` ---

[clang] bbbcc1d - Reapply "[clang][nullability] allow _Nonnull etc on nullable class types (#82705)"

2024-03-28 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2024-03-28T23:57:09+01:00 New Revision: bbbcc1d99d08855069f4501c896c43a6d4d7b598 URL: https://github.com/llvm/llvm-project/commit/bbbcc1d99d08855069f4501c896c43a6d4d7b598 DIFF: https://github.com/llvm/llvm-project/commit/bbbcc1d99d08855069f4501c896c43a6d4d7b598.diff

[clang] [DebugInfo] Add flag to only emit referenced member functions (PR #87018)

2024-03-28 Thread David Blaikie via cfe-commits
dwblaikie wrote: Cleaning up some old branches - @pogo59 @rnk who commented on the original https://reviews.llvm.org/D152017 I think the only outstanding thing was the flag name, I've renamed it from `-gincomplete-types` to `-gomit-unreferenced-members` to try to address the feedback. It's

[clang] [DebugInfo] Add flag to only emit referenced member functions (PR #87018)

2024-03-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: David Blaikie (dwblaikie) Changes Complete C++ type information can be quite expensive - and there's limited value in representing every member function, even those that can't be called (we don't do similarly for every non-member

[clang] [DebugInfo] Add flag to only emit referenced member functions (PR #87018)

2024-03-28 Thread David Blaikie via cfe-commits
https://github.com/dwblaikie created https://github.com/llvm/llvm-project/pull/87018 Complete C++ type information can be quite expensive - and there's limited value in representing every member function, even those that can't be called (we don't do similarly for every non-member function

[clang] [Clang] [C++26] Implement P2573R2: `= delete("should have a reason");` (PR #86526)

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

[clang] [Clang] Fix __is_array returning true for zero-sized arrays (PR #86652)

2024-03-28 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Another option would be to to not acknowledge zero-sized arrays in the type traits at all, just like vector types: https://godbolt.org/z/aP685vz8q. That may be the most consistent stance on this. Basically "It's non-standard and doesn't fit neatly in any of the standard

[clang] [Clang] [C++26] Implement P2573R2: `= delete("should have a reason");` (PR #86526)

2024-03-28 Thread via cfe-commits
@@ -0,0 +1,30 @@ +// RUN: %clang_cc1 -std=c++2c -fsyntax-only -verify %s Sirraide wrote: Done. https://github.com/llvm/llvm-project/pull/86526 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang] [C++26] Implement P2573R2: `= delete("should have a reason");` (PR #86526)

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

[clang] Resolve FIXME: Look at E, not M (PR #85541)

2024-03-28 Thread John McCall via cfe-commits
rjmccall wrote: Hmm. Well, you'd have to ask @zygoloid what he was thinking in r183721/r183859, but I don't think it's correct in general to be looking at E (the MTE sub-expression) for most of the logic here. IIRC, the MTE sub-expression is essentially the initializer for the materialized

[clang] [Clang] [C++26] Implement P2573R2: `= delete("should have a reason");` (PR #86526)

2024-03-28 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/86526 >From 98af47e8ccc633016c14b91c221f9f8fc620f068 Mon Sep 17 00:00:00 2001 From: Sirraide Date: Mon, 25 Mar 2024 14:46:52 +0100 Subject: [PATCH 01/11] [Clang] Parse `= delete("message")` ---

[clang] [Clang] Fix __is_array returning true for zero-sized arrays (PR #86652)

2024-03-28 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > I wonder if we should be considering making zero-length arrays into a > non-conforming extension behind a flag? e.g., `-fzero-sized-arrays` and then > it does report true for `__is_array`, `__is_bounded_array`, and handles > template specializations, etc as though it were

[clang] [ObjC] Fix jmp_buf sizing for ObjC exceptions (PR #85481)

2024-03-28 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: As far as I can tell, the code in question only actually runs for 32-bit x86 targets (it's tied to the old ABI, which was replaced on newer targets). So there's no point to modifying it. https://github.com/llvm/llvm-project/pull/85481

[clang] 219511a - [APINotes] Make an assert in a std::sort call tolerate self-comparisons

2024-03-28 Thread Dmitri Gribenko via cfe-commits
Author: Dmitri Gribenko Date: 2024-03-28T23:11:58+01:00 New Revision: 219511aee21cc652e1ede0458de4a4a66f04c81c URL: https://github.com/llvm/llvm-project/commit/219511aee21cc652e1ede0458de4a4a66f04c81c DIFF:

[clang] Resolve FIXME: Look at E, not M (PR #85541)

2024-03-28 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: https://github.com/llvm/llvm-project/blob/c0f8be4fcfb725d53841d4b17a68685e2a79/clang/lib/CodeGen/CGExpr.cpp#L277 https://github.com/llvm/llvm-project/pull/85541 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] 380f0fb - [CodeGen/DWARF] Introduce DWARF tag for SwiftTail and emit it in CodeGen.

2024-03-28 Thread Adrian Prantl via cfe-commits
Author: Adrian Prantl Date: 2024-03-28T14:54:51-07:00 New Revision: 380f0fb682041aca3d682d9f1be9d3021f4b2daa URL: https://github.com/llvm/llvm-project/commit/380f0fb682041aca3d682d9f1be9d3021f4b2daa DIFF: https://github.com/llvm/llvm-project/commit/380f0fb682041aca3d682d9f1be9d3021f4b2daa.diff

[clang] [Clang][objectsize] Generate object size calculation for sub-objects (PR #86858)

2024-03-28 Thread Kees Cook via cfe-commits
https://github.com/kees commented: I can't speak to the implementation details, but this passes my PoC tests that examine subobjects. https://github.com/llvm/llvm-project/pull/86858 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang] Fix __is_array returning true for zero-sized arrays (PR #86652)

2024-03-28 Thread Kees Cook via cfe-commits
kees wrote: > My natural inclination is that it is array-like, but... that just makes me > want `__is_array` to return `true` for it all the more. Yes. An array is an array, regardless of its size. The size is just a storage characteristic. It'd almost be like arguing that `NaN` isn't a

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-28 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/86358 >From 109e6039abe8bd3b598f1fdc2dbd7bca783ff4e6 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Fri, 22 Mar 2024 15:54:14 -0700 Subject: [PATCH 1/4] [clang] Move state out of `PreprocessorOptions` (1/n) An

[clang] [llvm] [openmp] [Libomptarget] Statically link all plugin runtimes (PR #87009)

2024-03-28 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/87009 >From fe0b6725e9aa89cc378ffd97f19354d59ab4fa93 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Wed, 27 Mar 2024 15:27:16 -0500 Subject: [PATCH 1/4] [Libomptarget] Rename `libomptarget.rtl.x86_64` to

[clang] [llvm] [openmp] [Libomptarget] Statically link all plugin runtimes (PR #87009)

2024-03-28 Thread Joseph Huber via cfe-commits
jhuber6 wrote: This contains three other dependent commits until they land. For now just browse the most recent commit for the relevant changes. https://github.com/llvm/llvm-project/pull/87009 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [openmp] [Libomptarget] Statically link all plugin runtimes (PR #87009)

2024-03-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-backend-amdgpu @llvm/pr-subscribers-clang Author: Joseph Huber (jhuber6) Changes This patch overhauls the `libomptarget` and plugin interface. Currently, we define a C API and compile each plugin as a separate shared

[clang] [llvm] [openmp] [Libomptarget] Statically link all plugin runtimes (PR #87009)

2024-03-28 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/87009 This patch overhauls the `libomptarget` and plugin interface. Currently, we define a C API and compile each plugin as a separate shared library. Then, `libomptarget` loads these API functions and forwards its

[clang] Resolve FIXME: Look at E, not M (PR #85541)

2024-03-28 Thread John McCall via cfe-commits
rjmccall wrote: Well, sometimes we do leave FIXMEs that end up being suprisingly easy to fix. But what FIXME are we talking about here? The patch doesn't remove any FIXMEs, or for that matter include any tests. https://github.com/llvm/llvm-project/pull/85541

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-28 Thread Jan Svoboda via cfe-commits
@@ -34,12 +34,17 @@ class InitOnlyAction : public FrontendAction { /// Preprocessor-based frontend action that also loads PCH files. class ReadPCHAndPreprocessAction : public FrontendAction { + llvm::function_ref OnCI; jansvoboda11 wrote: Sounds good.

[clang] [Clang] [C++26] Implement P2573R2: `= delete("should have a reason");` (PR #86526)

2024-03-28 Thread via cfe-commits
@@ -18157,7 +18158,7 @@ void Sema::SetDeclDeleted(Decl *Dcl, SourceLocation DelLoc) { // C++11 [dcl.fct.def.delete]p4: // A deleted function is implicitly inline. Fn->setImplicitlyInline(); - Fn->setDeletedAsWritten(); + Fn->setDeletedWithMessage(Message);

[clang] [Clang] [C++26] Implement P2573R2: `= delete("should have a reason");` (PR #86526)

2024-03-28 Thread via cfe-commits
Sirraide wrote: So, the message is now stored in the `DefaultFunctionInfo`, which I’ve renamed to `ExtraFunctionInfo`; because setting the deleted message may require allocating a `DefaultFunctionInfo`, I’ve added a separate function for that (`FunctionDecl::setDeletedMessage()`).

[clang] [Clang] [C++26] Implement P2573R2: `= delete("should have a reason");` (PR #86526)

2024-03-28 Thread via cfe-commits
@@ -2013,6 +2013,12 @@ class FunctionDecl : public DeclaratorDecl, DefaultedFunctionInfo *DefaultedInfo; }; + /// Message that indicates why this function was deleted. + /// + /// FIXME: Figure out where to actually put this; maybe in the + /// 'DefaultedInfo'

[clang] [Clang] [C++26] Implement P2573R2: `= delete("should have a reason");` (PR #86526)

2024-03-28 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/86526 >From 98af47e8ccc633016c14b91c221f9f8fc620f068 Mon Sep 17 00:00:00 2001 From: Sirraide Date: Mon, 25 Mar 2024 14:46:52 +0100 Subject: [PATCH 01/10] [Clang] Parse `= delete("message")` ---

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-28 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/86358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-28 Thread Ben Langmuir via cfe-commits
@@ -34,12 +34,17 @@ class InitOnlyAction : public FrontendAction { /// Preprocessor-based frontend action that also loads PCH files. class ReadPCHAndPreprocessAction : public FrontendAction { + llvm::function_ref OnCI; benlangmuir wrote: My concern is that

[clang] Resolve FIXME: Look at E, not M (PR #85541)

2024-03-28 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I assume the FIXME is referring to some deeper change here? If it were that easy, the FIXME wouldn't be there in the first place. CC @zygoloid @rjmccall https://github.com/llvm/llvm-project/pull/85541 ___ cfe-commits mailing

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-28 Thread Jan Svoboda via cfe-commits
@@ -736,6 +736,19 @@ class Preprocessor { State ConditionalStackState = Off; } PreambleConditionalStack; + /// Function for getting the dependency preprocessor directives of a file. + /// + /// These are directives derived from a special form of lexing where the +

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-28 Thread Jan Svoboda via cfe-commits
@@ -34,12 +34,17 @@ class InitOnlyAction : public FrontendAction { /// Preprocessor-based frontend action that also loads PCH files. class ReadPCHAndPreprocessAction : public FrontendAction { + llvm::function_ref OnCI; jansvoboda11 wrote: `function_ref` is

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-28 Thread Jan Svoboda via cfe-commits
@@ -34,12 +34,17 @@ class InitOnlyAction : public FrontendAction { /// Preprocessor-based frontend action that also loads PCH files. class ReadPCHAndPreprocessAction : public FrontendAction { + llvm::function_ref OnCI; jansvoboda11 wrote: The function acts

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-28 Thread Ben Langmuir via cfe-commits
@@ -736,6 +736,19 @@ class Preprocessor { State ConditionalStackState = Off; } PreambleConditionalStack; + /// Function for getting the dependency preprocessor directives of a file. + /// + /// These are directives derived from a special form of lexing where the +

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-28 Thread Ben Langmuir via cfe-commits
@@ -34,12 +34,17 @@ class InitOnlyAction : public FrontendAction { /// Preprocessor-based frontend action that also loads PCH files. class ReadPCHAndPreprocessAction : public FrontendAction { + llvm::function_ref OnCI; benlangmuir wrote: What does `OnCI`

[clang] [Headers] Don't declare unreachable() from stddef.h in C++ (PR #86748)

2024-03-28 Thread Louis Dionne via cfe-commits
ldionne wrote: > > Thanks for the explanation, @AaronBallman . I think I am generally deeply > > confused about what should be provided by the compiler and what should be > > provided by the C Standard Library on any given platform. From your reply, > > it looks like there's no clear rule and

[clang] [APINotes] Add test for C++ class templates (PR #87006)

2024-03-28 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. https://github.com/llvm/llvm-project/pull/87006 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [APINotes] Add test for C++ class templates (PR #87006)

2024-03-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Egor Zhdan (egorzhdan) Changes This upstreams https://github.com/apple/llvm-project/pull/7930. This adds a test to verify that we can apply attributes to C++ class templates using API Notes. Doing the same for function templates is not

[clang] [APINotes] Add test for C++ class templates (PR #87006)

2024-03-28 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan created https://github.com/llvm/llvm-project/pull/87006 This upstreams https://github.com/apple/llvm-project/pull/7930. This adds a test to verify that we can apply attributes to C++ class templates using API Notes. Doing the same for function templates is not

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-28 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: Ping. https://github.com/llvm/llvm-project/pull/86358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Track dependencies through dependency files (PR #86965)

2024-03-28 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/86965 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] 688d71e - [libclc] Track dependencies through dependency files (#86965)

2024-03-28 Thread via cfe-commits
Author: Fraser Cormack Date: 2024-03-28T20:29:25Z New Revision: 688d71ea8817ace88955671c1af7c80fbfba2c7f URL: https://github.com/llvm/llvm-project/commit/688d71ea8817ace88955671c1af7c80fbfba2c7f DIFF: https://github.com/llvm/llvm-project/commit/688d71ea8817ace88955671c1af7c80fbfba2c7f.diff

[clang] [Clang] [C++26] Implement P2573R2: `= delete("should have a reason");` (PR #86526)

2024-03-28 Thread via cfe-commits
@@ -1473,7 +1475,7 @@ Decl *Parser::ParseFunctionDefinition(ParsingDeclarator , D.getMutableDeclSpec().abort(); if (BodyKind != Sema::FnBodyKind::Other) { -Actions.SetFunctionBodyKind(Res, KWLoc, BodyKind); +Actions.SetFunctionBodyKind(Res, KWLoc, BodyKind,

[clang] [llvm] RFC: Implementing new mechanism for hard register operands to inline asm as a constraint. (PR #85846)

2024-03-28 Thread via cfe-commits
https://github.com/tltao updated https://github.com/llvm/llvm-project/pull/85846 >From 71c2e7959cff33f9cd6fc98a99b7261d535183af Mon Sep 17 00:00:00 2001 From: Tony Tao Date: Tue, 19 Mar 2024 14:32:48 -0400 Subject: [PATCH 1/5] Revisiting the hard register constraint PR on phabricator:

[clang] [llvm] Add option to generate additional debug info for expression dereferencing pointer to pointers. (PR #81545)

2024-03-28 Thread David Blaikie via cfe-commits
dwblaikie wrote: > > Reading LLVM IR lit CHECK lines from clang codegen is a bit difficult - > > could you include some simple examples (perhaps from the new clang tests in > > this patch) showing the DWARF output just as comments in this review for > > something more easily glanceable? > >

[clang] [llvm] RFC: Implementing new mechanism for hard register operands to inline asm as a constraint. (PR #85846)

2024-03-28 Thread via cfe-commits
@@ -770,6 +770,18 @@ bool TargetInfo::validateOutputConstraint(ConstraintInfo ) const { case 'E': case 'F': break; // Pass them. +case '{': { tltao wrote: Yes, we should be using the same names. The register asm variable is parsed in

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-03-28 Thread David Blaikie via cfe-commits
@@ -60,11 +63,11 @@ int use() { // CHECK-NOT: @_ZTSW3Mod4Base = constant // CHECK-NOT: @_ZTIW3Mod4Base = constant -// CHECK: @_ZTVW3Mod4Base = external unnamed_addr +// CHECK: @_ZTVW3Mod4Base = external -// CHECK-INLINE: @_ZTVW3Mod4Base = linkonce_odr {{.*}}unnamed_addr

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

2024-03-28 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/86216 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 44af53b - [clang][modules] Avoid calling expensive `SourceManager::translateFile()` (#86216)

2024-03-28 Thread via cfe-commits
Author: Jan Svoboda Date: 2024-03-28T13:02:48-07:00 New Revision: 44af53b22aaa1fe382b22329bbc7e4610ecbacc8 URL: https://github.com/llvm/llvm-project/commit/44af53b22aaa1fe382b22329bbc7e4610ecbacc8 DIFF: https://github.com/llvm/llvm-project/commit/44af53b22aaa1fe382b22329bbc7e4610ecbacc8.diff

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-03-28 Thread David Blaikie via cfe-commits
@@ -41,9 +43,10 @@ Base::~Base() {} // CHECK: @_ZTSW3Mod4Base = constant // CHECK: @_ZTIW3Mod4Base = constant -// CHECK-INLINE: @_ZTVW3Mod4Base = linkonce_odr {{.*}}unnamed_addr constant -// CHECK-INLINE: @_ZTSW3Mod4Base = linkonce_odr {{.*}}constant -// CHECK-INLINE:

[clang] [clang][Darwin] Handle reexported library arguments in driver (PR #86980)

2024-03-28 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: Thanks for the reviews! https://github.com/llvm/llvm-project/pull/86980 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-03-28 Thread David Blaikie via cfe-commits
@@ -1483,10 +1483,15 @@ void ASTDeclWriter::VisitCXXRecordDecl(CXXRecordDecl *D) { if (D->isThisDeclarationADefinition()) Record.AddCXXDefinitionData(D); - // Store (what we currently believe to be) the key function to avoid - // deserializing every method so we can

[clang] [Headers] Don't declare unreachable() from stddef.h in C++ (PR #86748)

2024-03-28 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Thanks for the explanation, @AaronBallman . I think I am generally deeply > confused about what should be provided by the compiler and what should be > provided by the C Standard Library on any given platform. From your reply, it > looks like there's no clear rule and

[clang] Add clang_elementwise_builtin_alias (PR #86175)

2024-03-28 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/8] make elemnetwise alias an alias of builtin alias ---

  1   2   3   4   >