[clang] [Clang] [Frontend] fix crash on parsing ternary operator with `vector_size` condition (PR #102004)

2024-08-05 Thread Pavel Skripkin via cfe-commits
https://github.com/pskrgag created https://github.com/llvm/llvm-project/pull/102004 Fix clang crash on parsing ternary operator with incompatible or pointer types as result. Closes: #101718 >From 37f21a6fc5c69232c26b99659178b767c29a0107 Mon Sep 17 00:00:00 2001 From: Pavel Skripkin Date: Mon

[clang] [Clang] [Frontend] fix crash on parsing ternary operator with `vector_size` condition (PR #102004)

2024-08-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Pavel Skripkin (pskrgag) Changes Fix clang crash on parsing ternary operator with incompatible or pointer types as result. Closes: #101718 --- Full diff: https://github.com/llvm/llvm-project/pull/102004.diff 3 Files Affected: - (modif

[clang] [compiler-rt] [llvm] [PAC][AArch64] Support init/fini array signing (PR #96478)

2024-08-05 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/96478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [DebugInfo][RemoveDIs] Use iterator-inserters in clang (PR #102006)

2024-08-05 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse created https://github.com/llvm/llvm-project/pull/102006 As part of the LLVM effort to eliminate debug-info intrinsics, we're moving to a world where only iterators should be used to insert instructions. This isn't a problem in clang when instructions get generated be

[clang] [DebugInfo][RemoveDIs] Use iterator-inserters in clang (PR #102006)

2024-08-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: Jeremy Morse (jmorse) Changes As part of the LLVM effort to eliminate debug-info intrinsics, we're moving to a world where only iterators should be used to insert instructions. This isn't a problem in cl

[clang] [DebugInfo][RemoveDIs] Use iterator-inserters in clang (PR #102006)

2024-08-05 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 26ca7820ebe06369227efaa282fb2ac96c5aa74a cf967317327aa3971da62a15f357ee5b29268f14 --e

[clang] [clang-tools-extra] [lldb] [clang] Reland: Instantiate alias templates with sugar (PR #101858)

2024-08-05 Thread Andrey Ali Khan Bolshakov via cfe-commits
bolshakov-a wrote: When instantiating such an alias: ```cpp template using Identity = T; ``` before the patch: ``` TemplateSpecializationType 0x676f0a60 'Identity' sugar alias |-name: 'Identity' qualified | `-TypeAliasTemplateDecl 0x676c91d8 Identity |-TemplateArgument type 'IndirectCla

[clang] [clang-tools-extra] [lldb] [clang] Reland: Instantiate alias templates with sugar (PR #101858)

2024-08-05 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > @mizvekov, do you have any idea how to get back the lost > `SubstTemplateTypeParmType`? It plays an important role in the IWYU tool > analysis. Thanks! So from my undertstanding, IWYU only needs the SubstTemplateTypeParmType for resugaring purposes, in order to recover the t

[clang] [Clang] Add [[clang::diagnose_specializations]] (PR #101469)

2024-08-05 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,34 @@ +// RUN: %clang_cc1 %s -verify + +#if !__has_cpp_attribute(clang::diagnose_specializations) +# error +#endif + +struct [[clang::diagnose_specializations]] S {}; // expected-warning {{'diagnose_specializations' attribute only applies to class templates}} + +templ

[clang] a113b4e - [clang][Interp] Remove GlobalDecl flag (#101995)

2024-08-05 Thread via cfe-commits
Author: Timm Baeder Date: 2024-08-05T18:16:32+02:00 New Revision: a113b4e52736b8d32499edf391b8ca53268a641f URL: https://github.com/llvm/llvm-project/commit/a113b4e52736b8d32499edf391b8ca53268a641f DIFF: https://github.com/llvm/llvm-project/commit/a113b4e52736b8d32499edf391b8ca53268a641f.diff L

[clang] [clang][Interp] Remove GlobalDecl flag (PR #101995)

2024-08-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/101995 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-08-05 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/100692 >From 3771ffabce14ab67f53d2a2f4357b0bd13c8088a Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Wed, 24 Jul 2024 03:59:41 -0300 Subject: [PATCH] [clang] check deduction consistency when partial ordering fu

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-08-05 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @zygoloid ping, this is ready for another round of review. https://github.com/llvm/llvm-project/pull/100692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakBinaryOperations configuration (PR #95013)

2024-08-05 Thread Ameer J via cfe-commits
https://github.com/ameerj updated https://github.com/llvm/llvm-project/pull/95013 >From a50f3d4395efd09eea8ba2e750bb785857f9a550 Mon Sep 17 00:00:00 2001 From: ameerj Date: Mon, 10 Jun 2024 12:09:40 -0400 Subject: [PATCH 01/19] Add BinPackBinaryOperations --- clang/include/clang/Format/Format

[clang] [clang-format] Add BreakBinaryOperations configuration (PR #95013)

2024-08-05 Thread Ameer J via cfe-commits
https://github.com/ameerj edited https://github.com/llvm/llvm-project/pull/95013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add [[clang::diagnose_specializations]] (PR #101469)

2024-08-05 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,34 @@ +// RUN: %clang_cc1 %s -verify + +#if !__has_cpp_attribute(clang::diagnose_specializations) +# error +#endif + +struct [[clang::diagnose_specializations]] S {}; // expected-warning {{'diagnose_specializations' attribute only applies to class templates}} + +templ

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-08-05 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 b4ac7f4fc91ee5c8a192bcf15fffa69cb30d1912 3771ffabce14ab67f53d2a2f4357b0bd13c8088a --e

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-08-05 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/100692 >From 561c9125d28c21676e4c28f0f04247433a860d62 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Wed, 24 Jul 2024 03:59:41 -0300 Subject: [PATCH] [clang] check deduction consistency when partial ordering fu

[clang] [Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (PR #101448)

2024-08-05 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/101448 >From 1fd8db659961fd1702c0c786feb71ad6c5998aa8 Mon Sep 17 00:00:00 2001 From: Sirraide Date: Wed, 31 Jul 2024 21:44:02 +0200 Subject: [PATCH 01/10] [Parser] Parse variadic friends --- clang/include/clang/AST/

[clang] [Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (PR #101448)

2024-08-05 Thread via cfe-commits
Sirraide wrote: So after talking over some of the more horrible edge cases w/ Corentin for a while, it looks like implementing this requires supporting unexpanded packs in nested name specifiers, which we don’t, but he has a patch for that, so I’ll be taking a look at that next. https://githu

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-08-05 Thread Johannes Doerfert via cfe-commits
jdoerfert wrote: This broke the Flang build. You need to add some Flang code for all changes in omp.td. Look for a similar clause in the flang subproject to see what to do, and verify by building Flang. Maybe revert for now until fixed. https://github.com/llvm/llvm-project/pull/92731 _

[clang] [Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (PR #101448)

2024-08-05 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/101448 >From 1fd8db659961fd1702c0c786feb71ad6c5998aa8 Mon Sep 17 00:00:00 2001 From: Sirraide Date: Wed, 31 Jul 2024 21:44:02 +0200 Subject: [PATCH 01/11] [Parser] Parse variadic friends --- clang/include/clang/AST/

[clang] [Clang][Sema] Make UnresolvedLookupExprs in class scope explicit specializations instantiation dependent (PR #100392)

2024-08-05 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/100392 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Make UnresolvedLookupExprs in class scope explicit specializations instantiation dependent (PR #100392)

2024-08-05 Thread Matheus Izvekov via cfe-commits
@@ -8629,13 +8629,14 @@ ASTNodeImporter::VisitUnresolvedLookupExpr(UnresolvedLookupExpr *E) { return UnresolvedLookupExpr::Create( Importer.getToContext(), *ToNamingClassOrErr, *ToQualifierLocOrErr, *ToTemplateKeywordLocOrErr, ToNameInfo, E->requiresADL(),

[clang] [Clang][Sema] Make UnresolvedLookupExprs in class scope explicit specializations instantiation dependent (PR #100392)

2024-08-05 Thread Matheus Izvekov via cfe-commits
@@ -8629,13 +8629,14 @@ ASTNodeImporter::VisitUnresolvedLookupExpr(UnresolvedLookupExpr *E) { return UnresolvedLookupExpr::Create( Importer.getToContext(), *ToNamingClassOrErr, *ToQualifierLocOrErr, *ToTemplateKeywordLocOrErr, ToNameInfo, E->requiresADL(),

[clang] [Clang][Sema] Make UnresolvedLookupExprs in class scope explicit specializations instantiation dependent (PR #100392)

2024-08-05 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov commented: I agree that the issue with many parameters is pre-existing. So you add a new flag to the UnresolvedLookupExpr which just forwards to the same flag in the base class OverloadExpr. OverloadExpr already suffers, even worse, from this problem of too many pa

[clang] [analyzer] Fix crash on using `bitcast(, )` as array subscript (PR #101647)

2024-08-05 Thread Matthew Voss via cfe-commits
ormris wrote: Thanks! Appreciate the fix. https://github.com/llvm/llvm-project/pull/101647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Be more careful about enabling GCS (PR #101973)

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

[clang] [Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (PR #101448)

2024-08-05 Thread via cfe-commits
cor3ntin wrote: > So after talking over some of the more horrible edge cases w/ Corentin for a > while, it looks like implementing this requires supporting unexpanded packs > in nested name specifiers, which we don’t, but he has a patch for that, so > I’ll be taking a look at that next. I thi

[clang] [clang-tools-extra] [lldb] [clang] Reland: Instantiate alias templates with sugar (PR #101858)

2024-08-05 Thread Andrey Ali Khan Bolshakov via cfe-commits
bolshakov-a wrote: No, IWYU has some complex logic to figure out which type components the type alias author intends to provide, and which should be `#include`d at the use site. Of course, substituted template type arguments are the user responsibility, not the alias author's one, hence this i

[clang] [Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (PR #101448)

2024-08-05 Thread via cfe-commits
Sirraide wrote: > I think it would be fine and probably preferable to do that feature in stages > / multiple PRS That makes sense to me, yeah. So the next step would be supporting dependent friend declarations properly, I take it? I.e. cases such as ```c++ template friend class Foo::Nested; `

[clang] [clang-format] Add BreakBinaryOperations configuration (PR #95013)

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

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-08-05 Thread Julian Brown via cfe-commits
jtb20 wrote: Hopefully fixed by: https://github.com/llvm/llvm-project/pull/102008 https://github.com/llvm/llvm-project/pull/92731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1fdc553 - [clang] Add test for CWG2091 "Deducing reference non-type template arguments" (#100765)

2024-08-05 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2024-08-05T21:03:16+04:00 New Revision: 1fdc553e9734dd0655778e67ba02823f8647bd9b URL: https://github.com/llvm/llvm-project/commit/1fdc553e9734dd0655778e67ba02823f8647bd9b DIFF: https://github.com/llvm/llvm-project/commit/1fdc553e9734dd0655778e67ba02823f8647bd9b.

[clang] [clang] Add test for CWG2091 "Deducing reference non-type template arguments" (PR #100765)

2024-08-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/100765 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores unsigned consts (PR #101073)

2024-08-05 Thread Chris Warner via cfe-commits
cwarner-8702 wrote: @PiotrZSL Ok. I was hoping that since this new option is _only_ used by the `clang-tidy` check, that it's tests would suffice. But I would also like to have more assurance than that. I need some help figuring out how to go about testing the change to the `Expr` class i

[clang] [Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (PR #101448)

2024-08-05 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/101448 >From 1fd8db659961fd1702c0c786feb71ad6c5998aa8 Mon Sep 17 00:00:00 2001 From: Sirraide Date: Wed, 31 Jul 2024 21:44:02 +0200 Subject: [PATCH 01/12] [Parser] Parse variadic friends --- clang/include/clang/AST/

[clang] [llvm] [PowerPC] Fix codegen for transparent_union function params (PR #101738)

2024-08-05 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/101738 >From f25e4ab65ed16a1e1a3bde91efe24bd0d52e0e74 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri, 2 Aug 2024 13:58:37 -0400 Subject: [PATCH 1/3] [PowerPC] Fix codegen for transparent_union function params Upda

[clang] [llvm] Add emitAtomicCompareExchangeBuiltin helper function (PR #101966)

2024-08-05 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 04f65043bc8711996a4ade05c67ae2d087ae8be5 ee84c6bb3146d25f21c14d6d8e0abb794683f5ec --e

[clang] [Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (PR #101448)

2024-08-05 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/101448 >From 1fd8db659961fd1702c0c786feb71ad6c5998aa8 Mon Sep 17 00:00:00 2001 From: Sirraide Date: Wed, 31 Jul 2024 21:44:02 +0200 Subject: [PATCH 01/14] [Parser] Parse variadic friends --- clang/include/clang/AST/

[clang] [Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (PR #101448)

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

[clang] [Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (PR #101448)

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

[clang] [Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (PR #101448)

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

[clang] [PS4/PS5][Driver] Allow -static in PlayStation drivers (PR #102020)

2024-08-05 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd created https://github.com/llvm/llvm-project/pull/102020 On PlayStation, allow users to supply -static to the linker, via the driver. An initial step. Later changes will have the PS5 driver supply additional options to the linker, if and when -static is passe

[clang] [PS4/PS5][Driver] Allow -static in PlayStation drivers (PR #102020)

2024-08-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Edd Dawson (playstation-edd) Changes On PlayStation, allow users to supply -static to the linker, via the driver. An initial step. Later changes will have the PS5 driver supply additional options to the linker, if and when -static is pass

[clang] [llvm] [RISCV] Add sifive-p470 processor (PR #102022)

2024-08-05 Thread Michael Maitland via cfe-commits
https://github.com/michaelmaitland created https://github.com/llvm/llvm-project/pull/102022 This is an OOO core that has a vector unit. For more information see https://www.sifive.com/cores/performance-p450-470. Use the existing P400 scheduler model. This model is missing accurate vector sche

[clang] [llvm] [RISCV] Add sifive-p470 processor (PR #102022)

2024-08-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Michael Maitland (michaelmaitland) Changes This is an OOO core that has a vector unit. For more information see https://www.sifive.com/cores/performance-p450-470. Use the existing P400 scheduler model. This model is missing accur

[clang] [PS4/PS5][Driver] Allow -static in PlayStation drivers (PR #102020)

2024-08-05 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 6f8ef5ad2f35321257adbe353f86027bf5209023 aa97906cdf1ac08e0b5d607914c28dcb2bbc2545 --e

[clang] [PS4/PS5][Driver] Allow -static in PlayStation drivers (PR #102020)

2024-08-05 Thread Fangrui Song via cfe-commits
@@ -141,6 +141,9 @@ void tools::PS4cpu::Linker::ConstructJob(Compilation &C, const JobAction &JA, if (Args.hasArg(options::OPT_pie)) CmdArgs.push_back("-pie"); + MaskRay wrote: We don't use double blank lines as a logical separator. https://github.com

[clang] [PS4/PS5][Driver] Allow -static in PlayStation drivers (PR #102020)

2024-08-05 Thread Fangrui Song via cfe-commits
@@ -141,6 +141,9 @@ void tools::PS4cpu::Linker::ConstructJob(Compilation &C, const JobAction &JA, if (Args.hasArg(options::OPT_pie)) CmdArgs.push_back("-pie"); + + if (Args.hasArg(options::OPT_static)) +CmdArgs.push_back("--static"); MaskRay wrote:

[clang] [clang-tools-extra] [lldb] [clang] Reland: Instantiate alias templates with sugar (PR #101858)

2024-08-05 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: The basic premise here was implemented back in D134604, and this has been for a few years applied in some cases, like substitution of default arguments. We leave a Subst* node behind with the purpose of somewhere down the line changing it back to what the user wrote. So we do

[clang] [clang][ExprConst] allow single element access of vector object to be constant expression (PR #101126)

2024-08-05 Thread Timm Baeder via cfe-commits
@@ -3,40 +3,39 @@ typedef int __attribute__((vector_size(16))) VI4; constexpr VI4 A = {1,2,3,4}; -static_assert(A[0] == 1, ""); // ref-error {{not an integral constant expression}} -static_assert(A[1] == 2, ""); // ref-error {{not an integral constant expression}} -static_as

[clang] [llvm] [PowerPC] Fix codegen for transparent_union function params (PR #101738)

2024-08-05 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/101738 >From f25e4ab65ed16a1e1a3bde91efe24bd0d52e0e74 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri, 2 Aug 2024 13:58:37 -0400 Subject: [PATCH 1/4] [PowerPC] Fix codegen for transparent_union function params Upda

[clang] [Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (PR #101448)

2024-08-05 Thread via cfe-commits
Sirraide wrote: Ok, I might be missing something, but I think this part of the implementation is mostly ‘done’ now https://github.com/llvm/llvm-project/pull/101448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (PR #101448)

2024-08-05 Thread via cfe-commits
@@ -754,6 +754,10 @@ static void InitializeCPlusPlusFeatureTestMacros(const LangOptions &LangOpts, Builder.defineMacro("__cpp_multidimensional_subscript", "202211L"); Builder.defineMacro("__cpp_auto_cast", "202110L"); } + // C++26 features. + if (LangOpts.CPlusPlus

[clang] Warning Libc functions (PR #101583)

2024-08-05 Thread Ziqing Luo via cfe-commits
@@ -443,6 +448,260 @@ AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) { return false; } +AST_MATCHER(CallExpr, isUnsafeLibcFunctionCall) { + static const std::set PredefinedNames{ + // numeric conversion: + "atof", + "atoi", + "atol", + "atoll

[clang] [clang][ExprConst] allow single element access of vector object to be constant expression (PR #101126)

2024-08-05 Thread Timm Baeder via cfe-commits
tbaederr wrote: If nobody else still has concerns, this LGTM from my end. https://github.com/llvm/llvm-project/pull/101126 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-08-05 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,396 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2 + +// RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu \ +// RUN: -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-DEF +// RUN: %clang_cc1 -triple power

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

2024-08-05 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/97362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] c649194 - [libunwind] Be more careful about enabling GCS (#101973)

2024-08-05 Thread via cfe-commits
Author: John Brawn Date: 2024-08-05T18:54:05+01:00 New Revision: c649194a71b47431f2eb2e041435d564e3b51072 URL: https://github.com/llvm/llvm-project/commit/c649194a71b47431f2eb2e041435d564e3b51072 DIFF: https://github.com/llvm/llvm-project/commit/c649194a71b47431f2eb2e041435d564e3b51072.diff LO

[libunwind] [libunwind] Be more careful about enabling GCS (PR #101973)

2024-08-05 Thread John Brawn via cfe-commits
https://github.com/john-brawn-arm closed https://github.com/llvm/llvm-project/pull/101973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [lldb] [clang] Reland: Instantiate alias templates with sugar (PR #101858)

2024-08-05 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: One possibility here is that if you have the type, then you will have a template specialization type for the template alias, and that gives you the template arguments used to specialize the alias. Which should answer this need. But of course, if you have a lossy semantic adjust

[clang] [clang-format] Add PackParameters enum option to replace BinPackParameters. (PR #101882)

2024-08-05 Thread via cfe-commits
https://github.com/VolatileAcorn updated https://github.com/llvm/llvm-project/pull/101882 >From 1dda62940402b032e084a5e0a62bca2c210314c5 Mon Sep 17 00:00:00 2001 From: Tom Pottage Date: Fri, 2 Aug 2024 20:26:47 +0100 Subject: [PATCH] [clang-format] Change BinPackParameters to an enum to add a

[clang] [clang-format] Change BinPackParameters to an enum to add a BreakAlways (PR #101882)

2024-08-05 Thread via cfe-commits
https://github.com/VolatileAcorn edited https://github.com/llvm/llvm-project/pull/101882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Change BinPackParameters to an enum to add a BreakAlways (PR #101882)

2024-08-05 Thread via cfe-commits
https://github.com/VolatileAcorn edited https://github.com/llvm/llvm-project/pull/101882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [flang] [lld] [llvm] [mlir] [CMake] Workaround the incompatibility for executable exports (PR #101741)

2024-08-05 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan updated https://github.com/llvm/llvm-project/pull/101741 >From 49c9db2b5c9b7309defb1c2dfa484ca4883a7794 Mon Sep 17 00:00:00 2001 From: Steven Wu Date: Fri, 2 Aug 2024 12:43:21 -0700 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=

[clang] [clang-tools-extra] [flang] [lld] [llvm] [mlir] [CMake] Fold export_executable_symbols_* into function args. (PR #101741)

2024-08-05 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan edited https://github.com/llvm/llvm-project/pull/101741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [flang] [lld] [llvm] [mlir] [CMake] Fold export_executable_symbols_* into function args. (PR #101741)

2024-08-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mlir-core @llvm/pr-subscribers-clang-tidy Author: Steven Wu (cachemeifyoucan) Changes `LLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLES` is not completely compatible with `export_executable_symbols` as the later will be ignored if the previous is set to NO.

[clang] [clang-tools-extra] [flang] [lld] [llvm] [mlir] [CMake] Fold export_executable_symbols_* into function args. (PR #101741)

2024-08-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-driver Author: Steven Wu (cachemeifyoucan) Changes `LLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLES` is not completely compatible with `export_executable_symbols` as the later will be ignored if the previous is set to NO. Workaround the issue by setti

[clang] [clang-tools-extra] [flang] [lld] [llvm] [mlir] [CMake] Fold export_executable_symbols_* into function args. (PR #101741)

2024-08-05 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan edited https://github.com/llvm/llvm-project/pull/101741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [lldb] [clang] Reland: Instantiate alias templates with sugar (PR #101858)

2024-08-05 Thread Andrey Ali Khan Bolshakov via cfe-commits
bolshakov-a wrote: > One possibility here is that if you have the type, then you will have a > template specialization type for the template alias, and that gives you the > template arguments used to specialize the alias. Which should answer this > need. This can probably go, thank you! http

[clang] [NFC] Deduplicate clang::AccessKinds to diagnostic strings (PR #102030)

2024-08-05 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok created https://github.com/llvm/llvm-project/pull/102030 None >From 2763f4618c654decf262493cb90cc8b1352b1599 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Mon, 5 Aug 2024 19:05:59 +0100 Subject: [PATCH] [NFC] Deduplicate clang::AccessKinds to diagnostic strings

[clang] [NFC] Deduplicate clang::AccessKinds to diagnostic strings (PR #102030)

2024-08-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mital Ashok (MitalAshok) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/102030.diff 1 Files Affected: - (modified) clang/include/clang/Basic/DiagnosticASTKinds.td (+24-40) ``diff diff --git a/clang/include/

[clang] [NFC] Deduplicate clang::AccessKinds to diagnostic strings (PR #102030)

2024-08-05 Thread Mital Ashok via cfe-commits
MitalAshok wrote: Split off from #91895 CC @cor3ntin https://github.com/llvm/llvm-project/pull/102030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __builtin_is_within_lifetime to implement P2641R4's std::is_within_lifetime (PR #91895)

2024-08-05 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok converted_to_draft https://github.com/llvm/llvm-project/pull/91895 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Deduplicate clang::AccessKinds to diagnostic strings (PR #102030)

2024-08-05 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/102030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Point 'declared here' note of invalid fns to definition (PR #102031)

2024-08-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/102031 None >From 23cad192584b903bfcd3c3ea0a6c0bfeb6951afe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 5 Aug 2024 20:14:19 +0200 Subject: [PATCH] [clang][Interp] Point 'declared here' note

[clang] [Clang] Add __builtin_is_within_lifetime to implement P2641R4's std::is_within_lifetime (PR #91895)

2024-08-05 Thread Mital Ashok via cfe-commits
@@ -1832,6 +1832,33 @@ static ExprResult BuiltinLaunder(Sema &S, CallExpr *TheCall) { return TheCall; } +static ExprResult BuiltinIsWithinLifetime(Sema &S, CallExpr *TheCall) { + if (checkArgCount(S, TheCall, 1)) +return ExprError(); + + ExprResult Arg = S.DefaultFunc

[clang] [clang][Interp] Point 'declared here' note of invalid fns to definition (PR #102031)

2024-08-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/102031.diff 2 Files Affected: - (modified) clang/lib/AST/Interp/Interp.cpp (+6-1) - (modified) clang/test/AST/Interp/cxx20.cpp (+17) ``

[clang] [attributes][-Wunsafe-buffer-usage] Support adding unsafe_buffer_usage attribute to struct fields (PR #101585)

2024-08-05 Thread via cfe-commits
@@ -0,0 +1,113 @@ +// RUN: %clang_cc1 -std=c++20 -Wunsafe-buffer-usage \ +// RUN:-fsafe-buffer-usage-suggestions -verify %s + +using size_t = __typeof(sizeof(int)); + +namespace std { + class type_info; + class bad_cast; + class bad_typeid; + + template class span

[clang] [attributes][-Wunsafe-buffer-usage] Support adding unsafe_buffer_usage attribute to struct fields (PR #101585)

2024-08-05 Thread via cfe-commits
@@ -0,0 +1,113 @@ +// RUN: %clang_cc1 -std=c++20 -Wunsafe-buffer-usage \ +// RUN:-fsafe-buffer-usage-suggestions -verify %s + +using size_t = __typeof(sizeof(int)); + +namespace std { + class type_info; + class bad_cast; + class bad_typeid; + + template class span

[clang] Add isTrivial() and isTriviallyCopyable() AST matchers (PR #90634)

2024-08-05 Thread via cfe-commits
https://github.com/higher-performance updated https://github.com/llvm/llvm-project/pull/90634 >From a58dbe94dde39b44065321fd2d3444332536c778 Mon Sep 17 00:00:00 2001 From: higher-performance Date: Tue, 30 Apr 2024 14:40:59 -0600 Subject: [PATCH] Add isTrivial() and isTriviallyCopyable() AST mat

[clang] Add isTrivial() and isTriviallyCopyable() AST matchers (PR #90634)

2024-08-05 Thread via cfe-commits
https://github.com/higher-performance updated https://github.com/llvm/llvm-project/pull/90634 >From f981f44824d9387fde221e2aa0e260802f3d67f2 Mon Sep 17 00:00:00 2001 From: higher-performance Date: Tue, 30 Apr 2024 14:40:59 -0600 Subject: [PATCH] Add isTrivial() and isTriviallyCopyable() AST mat

[clang] Warning Libc functions (PR #101583)

2024-08-05 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 updated https://github.com/llvm/llvm-project/pull/101583 >From 979619ea3ac0b52944468160f582d82fce3cee7d Mon Sep 17 00:00:00 2001 From: Ziqing Luo Date: Thu, 1 Aug 2024 16:36:27 -0700 Subject: [PATCH] [-Wunsafe-buffer-usage] Add warn on unsafe calls to libc funct

[clang] [HLSL] Implement output parameter (PR #101083)

2024-08-05 Thread Chris B via cfe-commits
https://github.com/llvm-beanz updated https://github.com/llvm/llvm-project/pull/101083 >From e8ec3e24e0061714b5dc440b1b92086965809483 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Mon, 29 Jul 2024 16:05:11 -0500 Subject: [PATCH 1/9] [HLSL] Implement output parameter HLSL output parameter

[clang] [Clang][Sema] Ensure that the selected candidate for a member function explicit specialization is more constrained than all others (PR #101721)

2024-08-05 Thread Richard Smith via cfe-commits
https://github.com/zygoloid approved this pull request. LGTM too, thanks https://github.com/llvm/llvm-project/pull/101721 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement output parameter (PR #101083)

2024-08-05 Thread Chris B via cfe-commits
llvm-beanz wrote: @rjmccall curious if you have some time to look at this PR. I've made some small changes to extend parameter ABI annotations and write back arguments (used by ObjC) to cover HLSL's odd parameter behaviors. https://github.com/llvm/llvm-project/pull/101083 _

[clang] [llvm] [PowerPC] Fix codegen for transparent_union function params (PR #101738)

2024-08-05 Thread Hubert Tong via cfe-commits
@@ -65,6 +65,10 @@ CGCXXABI::RecordArgABI getRecordArgABI(QualType T, CGCXXABI &CXXABI); bool classifyReturnType(const CGCXXABI &CXXABI, CGFunctionInfo &FI, const ABIInfo &Info); +// For transparent union types, return the type of the first element. +/

[clang] [llvm] [PowerPC] Fix codegen for transparent_union function params (PR #101738)

2024-08-05 Thread Hubert Tong via cfe-commits
@@ -393,6 +401,18 @@ CharUnits PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const { return CharUnits::fromQuantity(4); } +ABIArgInfo PPC32_SVR4_ABIInfo::classifyArgumentType(QualType Ty) const { + bool IsTransparentUnion; + Ty = useFirstFieldIfTransparentUnion(T

[libcxxabi] [libunwind] [libcxxabi][libunwind] Support for using LLVM libc (PR #101688)

2024-08-05 Thread Louis Dionne via cfe-commits
ldionne wrote: > @ldionne I'm starting to think that we should have a generic module in > https://github.com/llvm/llvm-project/tree/main/cmake/Modules that would be > controlled by `LLVM_USE_LIBC` and define `libc-headers`, `libc-static` and > `libc-shared`. That way we could avoid duplicating

[clang] [llvm] [PPC] Implement BCD assist builtins (PR #101390)

2024-08-05 Thread Hubert Tong via cfe-commits
@@ -0,0 +1,58 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// REQUIRES: powerpc-registered-target +// RUN: %clang_cc1 -triple powerpc64le-unknown-linux -O2 -target-cpu pwr7 \ +// RUN: -emit-llvm %s -o - | FileCheck %s

[libcxxabi] [libunwind] [libcxxabi][libunwind] Support for using LLVM libc (PR #101688)

2024-08-05 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,39 @@ +#=== ldionne wrote: For now, can't you include `libcxx/cmake/Modules/HandleLibC.cmake` instead? https://github.com/llvm/llvm-project/pull/101688 ___

[clang] [lld] [llvm] [LTO] enable `ObjCARCContractPass` only on optimized build (PR #101114)

2024-08-05 Thread Peter Rong via cfe-commits
DataCorrupted wrote: > The pipeline test changes here still look problematic. Can you make the > ObjCARCContract pass preserve the DT? ObjCARCContractPass can't preserve the DT at static time, it may alter CFG (See more in [this patch](https://reviews.llvm.org/D92808)). Unfortunately, legacy

[clang] [llvm] [PPC] Implement BCD assist builtins (PR #101390)

2024-08-05 Thread Hubert Tong via cfe-commits
@@ -0,0 +1,75 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// REQUIRES: powerpc-registered-target +// RUN: %clang_cc1 -triple powerpc64le-unknown-linux -O2 -target-cpu pwr7 \ +// RUN: -emit-llvm %s -o - | FileCheck %s

[clang] [lld] [llvm] [LTO] enable `ObjCARCContractPass` only on optimized build (PR #101114)

2024-08-05 Thread Nikita Popov via cfe-commits
nikic wrote: > > The pipeline test changes here still look problematic. Can you make the > > ObjCARCContract pass preserve the DT? > > ObjCARCContractPass can't preserve the DT at static time, it may alter CFG > (See more in [this patch](https://reviews.llvm.org/D92808)). Unfortunately, > leg

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-08-05 Thread via cfe-commits
https://github.com/higher-performance created https://github.com/llvm/llvm-project/pull/102040 This is a new Clang-specific attribute to ensure that field initializations are performed explicitly. For example, if we have ``` struct B { [[clang::explicit]] int f1; }; >From e141508349c1

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-08-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (higher-performance) Changes This is a new Clang-specific attribute to ensure that field initializations are performed explicitly. For example, if we have ``` struct B { [[clang::explicit]] int f1; }; --- Full diff: https://

[clang] [lld] [llvm] [LTO] enable `ObjCARCContractPass` only on optimized build (PR #101114)

2024-08-05 Thread Peter Rong via cfe-commits
https://github.com/DataCorrupted updated https://github.com/llvm/llvm-project/pull/101114 >From 1aaa05fe132bd2742e971df1a81186d6f1fe8a61 Mon Sep 17 00:00:00 2001 From: Peter Rong Date: Mon, 29 Jul 2024 16:05:54 -0700 Subject: [PATCH 1/4] Reapply "Run ObjCContractPass in Default Codegen Pipeline

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-08-05 Thread via cfe-commits
https://github.com/higher-performance edited https://github.com/llvm/llvm-project/pull/102040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-08-05 Thread via cfe-commits
https://github.com/higher-performance edited https://github.com/llvm/llvm-project/pull/102040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   >