[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2024-02-23 Thread Mariya Podchishchaeva via cfe-commits
@@ -14277,6 +14325,113 @@ StmtResult Sema::ActOnCXXForRangeIdentifier(Scope *S, SourceLocation IdentLoc, : IdentLoc); } +static ImplicitConversionKind GetConversionKind(QualType FromType, Fznamznon wrote:

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2024-02-23 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon edited https://github.com/llvm/llvm-project/pull/73099 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2024-02-23 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon edited https://github.com/llvm/llvm-project/pull/73099 ___ 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] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-23 Thread Danny Mösch via cfe-commits
SimplyDanny wrote: I don't get why the Windows tests are failing. 🤔 Can you give me a hint maybe, @PiotrZSL? https://github.com/llvm/llvm-project/pull/80541 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] 22734e1 - [Clang][AArch64] Fix 'svzero_za' intrinsic to take no arguments. (#82648)

2024-02-23 Thread via cfe-commits
Author: Sander de Smalen Date: 2024-02-23T11:31:24Z New Revision: 22734e15d8f2c437e8543f19632299d2e09b31f3 URL: https://github.com/llvm/llvm-project/commit/22734e15d8f2c437e8543f19632299d2e09b31f3 DIFF: https://github.com/llvm/llvm-project/commit/22734e15d8f2c437e8543f19632299d2e09b31f3.diff L

[clang] [Clang][AArch64] Fix 'svzero_za' intrinsic to take no arguments. (PR #82648)

2024-02-23 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm closed https://github.com/llvm/llvm-project/pull/82648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3c90fce - [Clang][AArch64] Add missing prototypes for streaming-compatible routines (#82649)

2024-02-23 Thread via cfe-commits
Author: Sander de Smalen Date: 2024-02-23T11:31:53Z New Revision: 3c90fce4504e22953ec5586599afaecfb2923a9e URL: https://github.com/llvm/llvm-project/commit/3c90fce4504e22953ec5586599afaecfb2923a9e DIFF: https://github.com/llvm/llvm-project/commit/3c90fce4504e22953ec5586599afaecfb2923a9e.diff L

[clang] [Clang][AArch64] Add missing prototypes for streaming-compatible routines (PR #82649)

2024-02-23 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm closed https://github.com/llvm/llvm-project/pull/82649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Let `bugprone-use-after-move` also handle calls to `std::forward` (PR #82673)

2024-02-23 Thread Julian Schmidt via cfe-commits
5chmidti wrote: I'd like to see the diagnostics say `forwarded` instead of `moved` (for all 4 possible diagnostics). `after it was potentially moved by forwarding` could work as well. Otherwise, the changes themselves look good https://github.com/llvm/llvm-project/pull/82673 _

[clang] cdf19d1 - [Clang] Fix acle_sme_zero.c (missing aarch64-registered-target)

2024-02-23 Thread Sander de Smalen via cfe-commits
Author: Sander de Smalen Date: 2024-02-23T11:43:55Z New Revision: cdf19d13bf39f0679c3636eada87a5645f9a4c84 URL: https://github.com/llvm/llvm-project/commit/cdf19d13bf39f0679c3636eada87a5645f9a4c84 DIFF: https://github.com/llvm/llvm-project/commit/cdf19d13bf39f0679c3636eada87a5645f9a4c84.diff L

[clang] [RISCV] Disable generation of asynchronous unwind tables for RISCV baremetal (PR #81727)

2024-02-23 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: ping! for merging this PR https://github.com/llvm/llvm-project/pull/81727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f1e0392 - [RISCV] Disable generation of asynchronous unwind tables for RISCV baremetal (#81727)

2024-02-23 Thread via cfe-commits
Author: Garvit Gupta Date: 2024-02-23T20:01:58+08:00 New Revision: f1e0392b822e06f39c49df3ba594f4c98f608ba0 URL: https://github.com/llvm/llvm-project/commit/f1e0392b822e06f39c49df3ba594f4c98f608ba0 DIFF: https://github.com/llvm/llvm-project/commit/f1e0392b822e06f39c49df3ba594f4c98f608ba0.diff

[clang] [RISCV] Disable generation of asynchronous unwind tables for RISCV baremetal (PR #81727)

2024-02-23 Thread Kito Cheng via cfe-commits
https://github.com/kito-cheng closed https://github.com/llvm/llvm-project/pull/81727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Disable generation of asynchronous unwind tables for RISCV baremetal (PR #81727)

2024-02-23 Thread via cfe-commits
github-actions[bot] wrote: @quic-garvgupt Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a

[clang] 3b3d097 - [Clang] Fix acle_sme_zero.c once more.

2024-02-23 Thread Sander de Smalen via cfe-commits
Author: Sander de Smalen Date: 2024-02-23T12:13:14Z New Revision: 3b3d0978c334702114131e4dab549aa25b9f0ad4 URL: https://github.com/llvm/llvm-project/commit/3b3d0978c334702114131e4dab549aa25b9f0ad4 DIFF: https://github.com/llvm/llvm-project/commit/3b3d0978c334702114131e4dab549aa25b9f0ad4.diff L

[clang] ddb4450 - [ClangFormat] Fix indent in child lines within a macro argument. (#82523)

2024-02-23 Thread via cfe-commits
Author: r4nt Date: 2024-02-23T13:18:00+01:00 New Revision: ddb4450a468072b5c066c29f4821edec4689d500 URL: https://github.com/llvm/llvm-project/commit/ddb4450a468072b5c066c29f4821edec4689d500 DIFF: https://github.com/llvm/llvm-project/commit/ddb4450a468072b5c066c29f4821edec4689d500.diff LOG: [Cl

[clang] [ClangFormat] Fix indent in child lines within a macro argument. (PR #82523)

2024-02-23 Thread via cfe-commits
https://github.com/r4nt closed https://github.com/llvm/llvm-project/pull/82523 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ad49fe3 - [clang][Interp] Don't return success for already failed global variables

2024-02-23 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-23T14:05:19+01:00 New Revision: ad49fe3e89c3b3950956548f14cdb5c159ba0aec URL: https://github.com/llvm/llvm-project/commit/ad49fe3e89c3b3950956548f14cdb5c159ba0aec DIFF: https://github.com/llvm/llvm-project/commit/ad49fe3e89c3b3950956548f14cdb5c159ba0aec.diff LO

[clang] [libc] [llvm] [openmp] [libc] Rework the GPU build to be a regular target (PR #81921)

2024-02-23 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > @jhuber6 , looks like these changes break the following builds > > * https://lab.llvm.org/buildbot/#/builders/235/builds/5630 > > * https://lab.llvm.org/buildbot/#/builders/232/builds/19808 > > > there are a lot of CMake error messages started with > > ``` > CMake Er

[clang] [libc] [llvm] [openmp] [libc] Rework the GPU build to be a regular target (PR #81921)

2024-02-23 Thread Joseph Huber via cfe-commits
jhuber6 wrote: @vvereschaka Should be fixed now. https://github.com/llvm/llvm-project/pull/81921 ___ 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] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-23 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-02-23 Thread Haojian Wu via cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/77890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-02-23 Thread Haojian Wu via cfe-commits
@@ -1446,6 +1447,58 @@ namespace { return inherited::TransformFunctionProtoType(TLB, TL); } +QualType TransformInjectedClassNameType(TypeLocBuilder &TLB, +InjectedClassNameTypeLoc TL) { + auto Type = inherited::Tra

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-02-23 Thread Haojian Wu via cfe-commits
@@ -2612,44 +2671,309 @@ struct ConvertConstructorToDeductionGuideTransform { SemaRef.CurrentInstantiationScope->InstantiatedLocal(OldParam, NewParam); return NewParam; } +}; - FunctionTemplateDecl *buildDeductionGuide( - TemplateParameterList *TemplateParams,

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-02-23 Thread Haojian Wu via cfe-commits
@@ -2258,6 +2260,94 @@ class ExtractTypeForDeductionGuide } }; +// Build a deduction guide with the specified parameter types. +FunctionTemplateDecl * +buildDeductionGuide(Sema &SemaRef, TemplateDecl *OriginalTemplate, +TemplateParameterList *TemplatePara

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-02-23 Thread Haojian Wu via cfe-commits
@@ -10598,10 +10598,34 @@ QualType Sema::DeduceTemplateSpecializationFromInitializer( if (TemplateName.isDependent()) return SubstAutoTypeDependent(TSInfo->getType()); - // We can only perform deduction for class templates. + // We can only perform deduction for class

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-02-23 Thread Haojian Wu via cfe-commits
@@ -2612,44 +2671,309 @@ struct ConvertConstructorToDeductionGuideTransform { SemaRef.CurrentInstantiationScope->InstantiatedLocal(OldParam, NewParam); return NewParam; } +}; - FunctionTemplateDecl *buildDeductionGuide( - TemplateParameterList *TemplateParams,

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-02-23 Thread Haojian Wu via cfe-commits
@@ -2612,44 +2671,309 @@ struct ConvertConstructorToDeductionGuideTransform { SemaRef.CurrentInstantiationScope->InstantiatedLocal(OldParam, NewParam); return NewParam; } +}; - FunctionTemplateDecl *buildDeductionGuide( - TemplateParameterList *TemplateParams,

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-02-23 Thread Haojian Wu via cfe-commits
@@ -2612,44 +2671,309 @@ struct ConvertConstructorToDeductionGuideTransform { SemaRef.CurrentInstantiationScope->InstantiatedLocal(OldParam, NewParam); return NewParam; } +}; - FunctionTemplateDecl *buildDeductionGuide( - TemplateParameterList *TemplateParams,

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-02-23 Thread Haojian Wu via cfe-commits
@@ -2612,44 +2671,309 @@ struct ConvertConstructorToDeductionGuideTransform { SemaRef.CurrentInstantiationScope->InstantiatedLocal(OldParam, NewParam); return NewParam; } +}; - FunctionTemplateDecl *buildDeductionGuide( - TemplateParameterList *TemplateParams,

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-02-23 Thread Haojian Wu via cfe-commits
@@ -2612,44 +2671,309 @@ struct ConvertConstructorToDeductionGuideTransform { SemaRef.CurrentInstantiationScope->InstantiatedLocal(OldParam, NewParam); return NewParam; } +}; - FunctionTemplateDecl *buildDeductionGuide( - TemplateParameterList *TemplateParams,

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-02-23 Thread Haojian Wu via cfe-commits
@@ -10525,9 +10534,11 @@ class Sema final { SourceLocation PointOfInstantiation, FunctionDecl *Decl, ArrayRef TemplateArgs, ConstraintSatisfaction &Satisfaction); - FunctionDecl *InstantiateFunctionDeclaration(FunctionTemplateDecl *FTD, -

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-02-23 Thread Haojian Wu via cfe-commits
@@ -39,6 +40,7 @@ #include "llvm/ADT/SmallBitVector.h" #include "llvm/ADT/SmallString.h" #include "llvm/ADT/StringExtras.h" +#include "llvm/Support/Casting.h" hokein wrote: Done. https://github.com/llvm/llvm-project/pull/77890 ___

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-02-23 Thread Haojian Wu via cfe-commits
https://github.com/hokein commented: Thanks for the initial review. https://github.com/llvm/llvm-project/pull/77890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-02-23 Thread Haojian Wu via cfe-commits
@@ -2612,44 +2671,309 @@ struct ConvertConstructorToDeductionGuideTransform { SemaRef.CurrentInstantiationScope->InstantiatedLocal(OldParam, NewParam); return NewParam; } +}; - FunctionTemplateDecl *buildDeductionGuide( - TemplateParameterList *TemplateParams,

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-02-23 Thread Haojian Wu via cfe-commits
@@ -2612,44 +2671,309 @@ struct ConvertConstructorToDeductionGuideTransform { SemaRef.CurrentInstantiationScope->InstantiatedLocal(OldParam, NewParam); return NewParam; } +}; - FunctionTemplateDecl *buildDeductionGuide( - TemplateParameterList *TemplateParams,

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-02-23 Thread Haojian Wu via cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/77890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-02-23 Thread via cfe-commits
@@ -2612,44 +2671,309 @@ struct ConvertConstructorToDeductionGuideTransform { SemaRef.CurrentInstantiationScope->InstantiatedLocal(OldParam, NewParam); return NewParam; } +}; - FunctionTemplateDecl *buildDeductionGuide( - TemplateParameterList *TemplateParams,

[clang] [AArch64][SME2] Refactor arm_sme.td into multiclasses (PR #78169)

2024-02-23 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm requested changes to this pull request. There isn't that much commonality factored out by these multi-classes as I had initially hoped, but I can understand why it's difficult to group these together in a better way. Given the above and the fact that the origi

[clang] Thread safety analysis: provide printSCFG definition. (PR #80277)

2024-02-23 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/80277 >From bb1a8f86e0b9ce3748af03625757d20900e053fc Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Thu, 1 Feb 2024 12:41:29 +0100 Subject: [PATCH 1/2] Thread safety analysis: provide printSCFG definition. I'm calling

[clang] Thread safety analysis: provide printSCFG definition. (PR #80277)

2024-02-23 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/80277 >From bb1a8f86e0b9ce3748af03625757d20900e053fc Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Thu, 1 Feb 2024 12:41:29 +0100 Subject: [PATCH 1/2] Thread safety analysis: provide printSCFG definition. I'm calling

[clang] Thread safety analysis: provide printSCFG definition. (PR #80277)

2024-02-23 Thread Haojian Wu via cfe-commits
hokein wrote: > This sounds like a good idea! Done. https://github.com/llvm/llvm-project/pull/80277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Let `bugprone-use-after-move` also handle calls to `std::forward` (PR #82673)

2024-02-23 Thread via cfe-commits
https://github.com/AMS21 updated https://github.com/llvm/llvm-project/pull/82673 >From 84b816ae115808c9144f4a0808849844a6fcab00 Mon Sep 17 00:00:00 2001 From: AMS21 Date: Thu, 22 Feb 2024 19:24:43 +0100 Subject: [PATCH] [clang-tidy] Let `bugprone-use-after-move` also handle calls to `std::forwa

[clang-tools-extra] [clang-tidy] Let `bugprone-use-after-move` also handle calls to `std::forward` (PR #82673)

2024-02-23 Thread via cfe-commits
AMS21 wrote: Rebased and address review comment https://github.com/llvm/llvm-project/pull/82673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Let `bugprone-use-after-move` also handle calls to `std::forward` (PR #82673)

2024-02-23 Thread via cfe-commits
https://github.com/AMS21 updated https://github.com/llvm/llvm-project/pull/82673 >From 803386786f2011d1c8e5ff96795012f8e120880a Mon Sep 17 00:00:00 2001 From: AMS21 Date: Thu, 22 Feb 2024 19:24:43 +0100 Subject: [PATCH] [clang-tidy] Let `bugprone-use-after-move` also handle calls to `std::forwa

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-23 Thread Erich Keane via cfe-commits
@@ -8069,6 +8069,38 @@ static void handleAMDGPUNumVGPRAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) AMDGPUNumVGPRAttr(S.Context, AL, NumVGPR)); } +static void handleAMDGPUMaxNumWorkGroupsAttr(Sema &S, Decl *D, +

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-23 Thread Erich Keane via cfe-commits
@@ -8069,6 +8069,38 @@ static void handleAMDGPUNumVGPRAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) AMDGPUNumVGPRAttr(S.Context, AL, NumVGPR)); } +static void handleAMDGPUMaxNumWorkGroupsAttr(Sema &S, Decl *D, +

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-23 Thread Erich Keane via cfe-commits
@@ -194,3 +204,87 @@ __global__ void non_cexpr_waves_per_eu_2() {} // expected-error@+1{{'amdgpu_waves_per_eu' attribute requires parameter 1 to be an integer constant}} __attribute__((amdgpu_waves_per_eu(2, ipow2(2 __global__ void non_cexpr_waves_per_eu_2_4() {} + +// exp

[clang-tools-extra] [include-cleaner] Dont apply name-match for non-owning headers (PR #82625)

2024-02-23 Thread Haojian Wu via cfe-commits
https://github.com/hokein approved this pull request. https://github.com/llvm/llvm-project/pull/82625 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Let `bugprone-use-after-move` also handle calls to `std::forward` (PR #82673)

2024-02-23 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/82673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Let `bugprone-use-after-move` also handle calls to `std::forward` (PR #82673)

2024-02-23 Thread Julian Schmidt via cfe-commits
@@ -359,24 +360,52 @@ void UseAfterMoveFinder::getReinits( } } +enum class MoveType { + Move,// std::move + Forward, // std::forward +}; + +static MoveType determineMoveType(const FunctionDecl *FuncDecl) { + if (FuncDecl->getName() == "move") +return MoveType::Mov

[clang-tools-extra] [clang-tidy] Let `bugprone-use-after-move` also handle calls to `std::forward` (PR #82673)

2024-02-23 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti commented: Please add a short explanation that `forward` is also checked in the check's docs here https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/docs/clang-tidy/checks/bugprone/use-after-move.rst. https://github.com/llvm/llvm-project/pull/82673 ___

[clang-tools-extra] [clang-tidy] Let `bugprone-use-after-move` also handle calls to `std::forward` (PR #82673)

2024-02-23 Thread Julian Schmidt via cfe-commits
@@ -359,24 +360,52 @@ void UseAfterMoveFinder::getReinits( } } +enum class MoveType { + Move,// std::move + Forward, // std::forward +}; + +static MoveType determineMoveType(const FunctionDecl *FuncDecl) { + if (FuncDecl->getName() == "move") +return MoveType::Mov

[clang] clang serialization unittests: fix some leaks (PR #82773)

2024-02-23 Thread Krasimir Georgiev via cfe-commits
https://github.com/krasimirgg created https://github.com/llvm/llvm-project/pull/82773 No functional changes intended. Fixes some leaks found by running under asan with `--gtest_repeat=2`. >From 43f8b15fa3e5465f1939d0359ff5dcfc83ed1717 Mon Sep 17 00:00:00 2001 From: Krasimir Georgiev Date: Fri

[clang] clang serialization unittests: fix some leaks (PR #82773)

2024-02-23 Thread Krasimir Georgiev via cfe-commits
https://github.com/krasimirgg ready_for_review https://github.com/llvm/llvm-project/pull/82773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang serialization unittests: fix some leaks (PR #82773)

2024-02-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Krasimir Georgiev (krasimirgg) Changes No functional changes intended. Fixes some leaks found by running under asan with `--gtest_repeat=2`. --- Full diff: https://github.com/llvm/llvm-project/pull/82773.diff 2 Files Affected:

[clang] clang serialization unittests: fix some leaks (PR #82773)

2024-02-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Krasimir Georgiev (krasimirgg) Changes No functional changes intended. Fixes some leaks found by running under asan with `--gtest_repeat=2`. --- Full diff: https://github.com/llvm/llvm-project/pull/82773.diff 2 Files Affected: - (modif

[clang] clang serialization unittests: fix some leaks (PR #82773)

2024-02-23 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 3b232f066d40a3e91ac27e421a3baeaca0cd59ec 43f8b15fa3e5465f1939d0359ff5dcfc83ed1717 --

[clang] clang serialization unittests: fix some leaks (PR #82773)

2024-02-23 Thread Krasimir Georgiev via cfe-commits
https://github.com/krasimirgg updated https://github.com/llvm/llvm-project/pull/82773 >From 43f8b15fa3e5465f1939d0359ff5dcfc83ed1717 Mon Sep 17 00:00:00 2001 From: Krasimir Georgiev Date: Fri, 23 Feb 2024 15:11:51 + Subject: [PATCH 1/2] clang serialization unittests: fix some leaks No func

[clang] [clang] Add __builtin_start_object_lifetime builtin. (PR #82776)

2024-02-23 Thread Haojian Wu via cfe-commits
https://github.com/hokein created https://github.com/llvm/llvm-project/pull/82776 This patch implements a clang builtin `__builtin_start_object_lifetime`, it has the same semantics as C++23's `std::start_lifetime_as`, but without the implicit-lifetime type restriction, it could be used for imp

[clang] [clang] Add __builtin_start_object_lifetime builtin. (PR #82776)

2024-02-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Haojian Wu (hokein) Changes This patch implements a clang builtin `__builtin_start_object_lifetime`, it has the same semantics as C++23's `std::start_lifetime_as`, but without the implicit-lifetime type restriction, it could be used for i

[clang] [clang] Add __builtin_start_object_lifetime builtin. (PR #82776)

2024-02-23 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: This would also need a release note I believe. I don't have the codegen expertise to review this with high confidence, but it looks right to me. https://github.com/llvm/llvm-project/pull/82776 ___ cfe-commits m

[clang] [clang] Add __builtin_start_object_lifetime builtin. (PR #82776)

2024-02-23 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/82776 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add __builtin_start_object_lifetime builtin. (PR #82776)

2024-02-23 Thread Erich Keane via cfe-commits
@@ -4386,6 +4386,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, return RValue::get(nullptr); } + case Builtin::BI__builtin_start_object_lifetime: case Builtin::BI__builtin_launder: { erichkeane wrote: Should t

[clang-tools-extra] [clang-tidy] Improve `google-explicit-constructor` checks handling of `explicit(bool)` (PR #82689)

2024-02-23 Thread via cfe-commits
@@ -130,18 +134,30 @@ void ExplicitConstructorCheck::check(const MatchFinder::MatchResult &Result) { return; } - if (Ctor->isExplicit() || Ctor->isCopyOrMoveConstructor() || + if (ExplicitSpec.isExplicit() || Ctor->isCopyOrMoveConstructor() || TakesInitializerL

[clang-tools-extra] [clang-tidy] Add support for determining constness of more expressions. (PR #82617)

2024-02-23 Thread via cfe-commits
@@ -34,69 +36,185 @@ void extractNodesByIdTo(ArrayRef Matches, StringRef ID, Nodes.insert(Match.getNodeAs(ID)); } +// A matcher that matches DeclRefExprs that are used in ways such that the +// underlying declaration is not modified. +// If the declaration is of pointer t

[clang-tools-extra] [clang-tidy] Add support for determining constness of more expressions. (PR #82617)

2024-02-23 Thread via cfe-commits
https://github.com/EugeneZelenko edited https://github.com/llvm/llvm-project/pull/82617 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add support for determining constness of more expressions. (PR #82617)

2024-02-23 Thread via cfe-commits
https://github.com/EugeneZelenko commented: Please mention changes in Release Notes. https://github.com/llvm/llvm-project/pull/82617 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add support for determining constness of more expressions. (PR #82617)

2024-02-23 Thread via cfe-commits
@@ -34,69 +36,185 @@ void extractNodesByIdTo(ArrayRef Matches, StringRef ID, Nodes.insert(Match.getNodeAs(ID)); } +// A matcher that matches DeclRefExprs that are used in ways such that the +// underlying declaration is not modified. +// If the declaration is of pointer t

[clang] [NFC][ARM][AArch64] Deduplicated code. (PR #82785)

2024-02-23 Thread via cfe-commits
https://github.com/DanielKristofKiss created https://github.com/llvm/llvm-project/pull/82785 Add the SignReturnAddressScopeKind to the BranchProtectionInfo class. >From f1de474eb318c06272a2ac8008af5de6762b7617 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Fri, 23 Feb 2024 17:12:26 +0100 Sub

[clang] [NFC][ARM][AArch64] Deduplicated code. (PR #82785)

2024-02-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-backend-arm Author: Dani (DanielKristofKiss) Changes Add the SignReturnAddressScopeKind to the BranchProtectionInfo class. --- Full diff: https://github.com/llvm/llvm-project/pull/82785.diff 3 Files Affected: - (modified) c

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-23 Thread Balazs Benics via cfe-commits
@@ -565,37 +565,67 @@ til::SExpr *SExprBuilder::translateBinaryOperator(const BinaryOperator *BO, case BO_PtrMemI: return new (Arena) til::Undefined(BO); - case BO_Mul: return translateBinOp(til::BOP_Mul, BO, Ctx); - case BO_Div: return translateBinOp(til::BOP_Div,

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-23 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/82599 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-23 Thread Balazs Benics via cfe-commits
@@ -535,7 +545,8 @@ void CFNumberChecker::checkPreStmt(const CallExpr *CE, } //===--===// -// CFRetain/CFRelease/CFMakeCollectable/CFAutorelease checking for null arguments. +// CFRetain/CFRelease/CFMakeColl

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-23 Thread Balazs Benics via cfe-commits
@@ -18,37 +18,57 @@ using namespace til; StringRef til::getUnaryOpcodeString(TIL_UnaryOpcode Op) { switch (Op) { -case UOP_Minus:return "-"; -case UOP_BitNot: return "~"; -case UOP_LogicNot: return "!"; + case UOP_Minus: +return "-"; + case UOP_BitNot

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-23 Thread Balazs Benics via cfe-commits
@@ -380,27 +376,41 @@ enum CFNumberType { }; static std::optional GetCFNumberSize(ASTContext &Ctx, uint64_t i) { - static const unsigned char FixedSize[] = { 8, 16, 32, 64, 32, 64 }; + static const unsigned char FixedSize[] = {8, 16, 32, 64, 32, 64}; if (i < kCFNumberCh

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-23 Thread Balazs Benics via cfe-commits
@@ -33,30 +33,17 @@ namespace ento { /// checking. /// /// \sa CheckerContext -class CheckerDocumentation : public Checker< check::PreStmt, - check::PostStmt, - check::PreObjCMessage, -

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-23 Thread Balazs Benics via cfe-commits
@@ -244,24 +246,25 @@ void WalkAST::VisitCallExpr(CallExpr *CE) { if (containsBadStrlcpyStrlcatPattern(CE)) { const Expr *DstArg = CE->getArg(0); const Expr *LenArg = CE->getArg(2); - PathDiagnosticLocation Loc = -PathDiagnosticLocation::createBegin

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-23 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: Yeey, my review is done. We only have a handful (<50) debatable formatting problems. I'll try to fix them in an other PR. https://github.com/llvm/llvm-project/pull/82599 ___ cfe-commits mailing list cfe-commits@l

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-23 Thread Balazs Benics via cfe-commits
@@ -1,4 +1,5 @@ -//===-- SimpleStreamChecker.cpp -*- C++ -*--// +//===-- SimpleStreamChecker.cpp -*- C++ +//-*--// steakhal wrote: ```suggestion //===-- SimpleStreamChecker.cpp -

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-23 Thread Balazs Benics via cfe-commits
@@ -49,54 +50,44 @@ const char *IsARPBind = "isautoreleasepoolbind"; class ObjCAutoreleaseWriteChecker : public Checker { public: - void checkASTCodeBody(const Decl *D, -AnalysisManager &AM, + void checkASTCodeBody(const Decl *D, AnalysisManager &AM,

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-23 Thread Balazs Benics via cfe-commits
@@ -110,21 +111,41 @@ void ExprEngine::VisitBinaryOperator(const BinaryOperator* B, continue; } -assert (B->isCompoundAssignmentOp()); +assert(B->isCompoundAssignmentOp()); switch (Op) { - default: -llvm_unreachable("Invalid opcode for co

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-23 Thread Balazs Benics via cfe-commits
@@ -219,17 +219,19 @@ void WalkAST::VisitCallExpr(CallExpr *CE) { if (containsBadStrncatPattern(CE)) { const Expr *DstArg = CE->getArg(0); const Expr *LenArg = CE->getArg(2); - PathDiagnosticLocation Loc = -PathDiagnosticLocation::createBegin(LenArg

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-23 Thread Balazs Benics via cfe-commits
@@ -1,4 +1,5 @@ -//=- DirectIvarAssignment.cpp - Check rules on ObjC properties -*- C++ *-==// +//=- DirectIvarAssignment.cpp - Check rules on ObjC properties -*- C++ +//*-==// steakhal wrote: Bad formatting. ```suggestion //=- DirectIvarAssignment.cpp -

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2024-02-23 Thread Balazs Benics via cfe-commits
@@ -1,4 +1,5 @@ -//===-- STLAlgorithmModeling.cpp ---*- C++ -*--// +//===-- STLAlgorithmModeling.cpp ---*- C++ +//-*--// steakhal wrote: ```suggestion //===-- STLAlgorithmModeling.cpp --

[clang-tools-extra] [clang-tidy] Improve `google-explicit-constructor` checks handling of `explicit(bool)` (PR #82689)

2024-02-23 Thread Julian Schmidt via cfe-commits
@@ -130,18 +134,30 @@ void ExplicitConstructorCheck::check(const MatchFinder::MatchResult &Result) { return; } - if (Ctor->isExplicit() || Ctor->isCopyOrMoveConstructor() || + if (ExplicitSpec.isExplicit() || Ctor->isCopyOrMoveConstructor() || TakesInitializerL

[clang-tools-extra] [clang-tidy] Improve `google-explicit-constructor` checks handling of `explicit(bool)` (PR #82689)

2024-02-23 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/82689 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Improve `google-explicit-constructor` checks handling of `explicit(bool)` (PR #82689)

2024-02-23 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/82689 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang serialization unittests: fix some leaks (PR #82773)

2024-02-23 Thread Benjamin Kramer via cfe-commits
https://github.com/d0k approved this pull request. https://github.com/llvm/llvm-project/pull/82773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-02-23 Thread Maciej Gabka via cfe-commits
@@ -2405,6 +2421,11 @@ void LoopAccessInfo::analyzeLoop(AAResults *AA, LoopInfo *LI, // Save 'store' instructions. Abort if other instructions write to memory. if (I.mayWriteToMemory()) { +// We can safety handle math functions that have vectorized +

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-23 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,1014 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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: A

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-23 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,995 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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: Ap

[clang] [RFC][clang][Support] Extract type persing function. [NFCI] (PR #82797)

2024-02-23 Thread Francesco Petrogalli via cfe-commits
https://github.com/fpetrogalli created https://github.com/llvm/llvm-project/pull/82797 I wanted to get a sense if people are OK for me to provide unit tests in `clang/unittests/Support` for the the parsing function I factored out from `clang-tblgen` into `clangSupport`. The refactoring would

[clang] [RFC][clang][Support] Extract type persing function. [NFCI] (PR #82797)

2024-02-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Francesco Petrogalli (fpetrogalli) Changes I wanted to get a sense if people are OK for me to provide unit tests in `clang/unittests/Support` for the the parsing function I factored out from `clang-tblgen` into `clangSupport`. The refact

[clang] [RFC][clang][Support] Extract type persing function. [NFCI] (PR #82797)

2024-02-23 Thread Francesco Petrogalli via cfe-commits
fpetrogalli wrote: I have added for feedback all people involved in https://github.com/llvm/llvm-project/pull/68324 https://github.com/llvm/llvm-project/pull/82797 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

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

2024-02-23 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan edited https://github.com/llvm/llvm-project/pull/77732 ___ 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-02-23 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan commented: I think the braces can also be omitted on the conditions within the `clang/*` files. https://github.com/llvm/llvm-project/pull/77732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

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

2024-02-23 Thread Amy Kwan via cfe-commits
@@ -337,12 +350,77 @@ CharUnits PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const { return CharUnits::fromQuantity(4); } +ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(QualType Ty, + uint64_t &TypeSize) const { + + asse

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

2024-02-23 Thread Amy Kwan via cfe-commits
@@ -271,22 +271,33 @@ namespace { class PPC32_SVR4_ABIInfo : public DefaultABIInfo { bool IsSoftFloatABI; bool IsRetSmallStructInRegABI; + bool isComplexInRegABI; + // Size of GPR in bits amy-kwan wrote: ```suggestion bool IsComplexInRegABI; // Size

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

2024-02-23 Thread Amy Kwan via cfe-commits
@@ -2540,6 +2540,10 @@ def ffp_contract : Joined<["-"], "ffp-contract=">, Group, HelpText<"Form fused FP ops (e.g. FMAs)">, Values<"fast,on,off,fast-honor-pragmas">; +def fcomplex_ppc_gnu_abi : Flag<["-"], "fcomplex-ppc-gnu-abi">, Group, Visibility<[ClangOption, CC1Optio

  1   2   3   4   >