[clang] [clang-format] Correctly annotate braces in macro definition (PR #106662)

2024-09-02 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/106662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-02 Thread Budimir Aranđelović via cfe-commits
budimirarandjelovichtec wrote: Let's wait few days if there are any opinions. Then, someone from my company will merge it. https://github.com/llvm/llvm-project/pull/105479 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] fix(clang/**.py): fix comparison to None (PR #94014)

2024-09-02 Thread Eisuke Kawashima via cfe-commits
https://github.com/e-kwsm updated https://github.com/llvm/llvm-project/pull/94014 >From 70a3af851a0928bff0244a9d6fe4cd7fa0466a42 Mon Sep 17 00:00:00 2001 From: Eisuke Kawashima Date: Sat, 11 May 2024 23:57:11 +0900 Subject: [PATCH] fix(clang/**.py): fix comparison to None from PEP8 (https://pe

[clang] fix(clang/**.py): fix invalid escape sequences (PR #94029)

2024-09-02 Thread Eisuke Kawashima via cfe-commits
https://github.com/e-kwsm updated https://github.com/llvm/llvm-project/pull/94029 >From 3d9fa04f2b42030f27eb6e21a6e238c8a6a74b20 Mon Sep 17 00:00:00 2001 From: Eisuke Kawashima Date: Sat, 11 May 2024 02:39:21 +0900 Subject: [PATCH] fix(clang/**.py): fix invalid escape sequences --- clang/docs

[clang] 08a72cb - [clang] Bump up DIAG_SIZE_SEMA by 500 for downstream diagnostics.

2024-09-02 Thread Lang Hames via cfe-commits
Author: Lang Hames Date: 2024-09-02T17:29:07+10:00 New Revision: 08a72cbd6b12b5ccffb82c657bd668938f1b42e1 URL: https://github.com/llvm/llvm-project/commit/08a72cbd6b12b5ccffb82c657bd668938f1b42e1 DIFF: https://github.com/llvm/llvm-project/commit/08a72cbd6b12b5ccffb82c657bd668938f1b42e1.diff LO

[clang] [clang] Fix crash in code with StmtExpr and atomic char load in Expr::EvaluateAsRValue. (PR #106751)

2024-09-02 Thread Daniel Petrovic via cfe-commits
daniel-petrovic wrote: The statement expression should always provide r-value: https://clang.llvm.org/doxygen/classclang_1_1StmtExpr.html#details According https://en.cppreference.com/w/c/language/atomic: > Atomic properties are only meaningful for [lvalue > expressions](https://en.cppreferen

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-BF16 new instructions. (PR #101603)

2024-09-02 Thread Freddy Ye via cfe-commits
FreddyLeaf wrote: > Should we add folding in X86InstrFMA3Info.cpp? yes, addressed in [b9e35f0](https://github.com/llvm/llvm-project/pull/101603/commits/b9e35f050d6319ebd8da3c0f4cf5399dd03b3915) https://github.com/llvm/llvm-project/pull/101603 ___ cfe

[clang] [llvm] [SCCP] Infer return attributes in SCCP as well (PR #106732)

2024-09-02 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/106732 >From 50efbbd59ed639d9604f3b13faf1fb8be60161e7 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 30 Aug 2024 12:46:53 +0200 Subject: [PATCH 1/3] [SCCP] Infer return attributes in SCCP as well We can infer th

[clang-tools-extra] [clang-tidy] Add option to cppcoreguidelines-pro-type-reinterpret-cas… (PR #106922)

2024-09-02 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: On another thought, the use case is quite niche and it's probably best for people to create their own `safe_reinterpret_cast` wrapper. Let's keep the check simple. https://github.com/llvm/llvm-project/pull/106922 ___ cfe-commits

[clang-tools-extra] [clang-tidy] Add option to cppcoreguidelines-pro-type-reinterpret-cas… (PR #106922)

2024-09-02 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp closed https://github.com/llvm/llvm-project/pull/106922 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add tests for CWG issues about friend declaration matching (PR #106117)

2024-09-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/106117 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Embed all source files for C++20 Modules (PR #102444)

2024-09-02 Thread Iain Sandoe via cfe-commits
iains wrote: Sorry I have not made much review here - although did comment on https://github.com/llvm/llvm-project/issues/72383 .. 1. it seems highly unlikely to me that the designers of the c++ modules facility would have expected it necessary to carry the source along with the BMI (but I a

[clang-tools-extra] [clang-tidy] Add user-defined functions to `bugprone-unsafe-functions` check (PR #106350)

2024-09-02 Thread via cfe-commits
https://github.com/Discookie updated https://github.com/llvm/llvm-project/pull/106350 >From c4e05bdb36e270cbf0557f38fad7c04edf011905 Mon Sep 17 00:00:00 2001 From: Viktor Date: Wed, 28 Aug 2024 08:47:20 + Subject: [PATCH 1/4] [clang-tidy] Add user-defined functions to bugprone-unsafe-funct

[clang-tools-extra] [clang-tidy] Add user-defined functions to `bugprone-unsafe-functions` check (PR #106350)

2024-09-02 Thread via cfe-commits
https://github.com/Discookie updated https://github.com/llvm/llvm-project/pull/106350 >From c4e05bdb36e270cbf0557f38fad7c04edf011905 Mon Sep 17 00:00:00 2001 From: Viktor Date: Wed, 28 Aug 2024 08:47:20 + Subject: [PATCH 1/5] [clang-tidy] Add user-defined functions to bugprone-unsafe-funct

[clang-tools-extra] [clang-tidy] Add user-defined functions to `bugprone-unsafe-functions` check (PR #106350)

2024-09-02 Thread via cfe-commits
@@ -19,6 +19,9 @@ The check implements the following rules from the CERT C Coding Standard: Unsafe functions +The following functions are reported if `ReportDefaultFunctions +`_ is enabled. + Discookie wrote: I hope I did it correctly, I'm n

[clang-tools-extra] [clang-tidy] Add user-defined functions to `bugprone-unsafe-functions` check (PR #106350)

2024-09-02 Thread via cfe-commits
@@ -7,6 +7,8 @@ //===--===// #include "UnsafeFunctionsCheck.h" +#include "../utils/Matchers.h" Discookie wrote: Not in this case! utils/Matchers.h is not included in ClangTidyCheck (but it i

[clang-tools-extra] [clang-tidy] Add user-defined functions to `bugprone-unsafe-functions` check (PR #106350)

2024-09-02 Thread via cfe-commits
@@ -86,6 +123,22 @@ Options this option enables. Default is `true`. +.. option:: ReportDefaultFunctions + +When `true`, the check reports the default set of functions. +Default is `true`. + +.. option:: CustomNormalFunctions + +A comma-separated list of regul

[clang-tools-extra] [clang-tidy] Add user-defined functions to `bugprone-unsafe-functions` check (PR #106350)

2024-09-02 Thread via cfe-commits
@@ -186,16 +298,62 @@ void UnsafeFunctionsCheck::check(const MatchFinder::MatchResult &Result) { const auto *FuncDecl = cast(DeclRef->getDecl()); assert(DeclRef && FuncDecl && "No valid matched node in check()"); + // Only one of these are matched at a time. const aut

[clang-tools-extra] [clang-tidy] Add user-defined functions to `bugprone-unsafe-functions` check (PR #106350)

2024-09-02 Thread via cfe-commits
@@ -127,57 +139,157 @@ static bool isAnnexKAvailable(std::optional &CacheVar, Preprocessor *PP, return CacheVar.value(); } +static std::vector +ParseCheckedFunctions(StringRef Option, StringRef OptionName, + ClangTidyContext *Context) { + std::vector F

[clang] 0fa78b6 - [clang-format] Correctly annotate braces in macro definition (#106662)

2024-09-02 Thread via cfe-commits
Author: Owen Pan Date: 2024-09-02T01:40:13-07:00 New Revision: 0fa78b6c7bd43c2498700a98c47a02cf4fd06388 URL: https://github.com/llvm/llvm-project/commit/0fa78b6c7bd43c2498700a98c47a02cf4fd06388 DIFF: https://github.com/llvm/llvm-project/commit/0fa78b6c7bd43c2498700a98c47a02cf4fd06388.diff LOG:

[clang] [clang-format] Correctly annotate braces in macro definition (PR #106662)

2024-09-02 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/106662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Correctly annotate braces in macro definition (PR #106662)

2024-09-02 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick 0fa78b6c7bd43c2498700a98c47a02cf4fd06388 https://github.com/llvm/llvm-project/pull/106662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Correctly annotate braces in macro definition (PR #106662)

2024-09-02 Thread via cfe-commits
llvmbot wrote: Failed to cherry-pick: 0fa78b6c7bd43c2498700a98c47a02cf4fd06388 https://github.com/llvm/llvm-project/actions/runs/10663817609 Please manually backport the fix and push it to your github fork. Once this is done, please create a [pull request](https://github.com/llvm/llvm-proje

[clang] [llvm] [SPARC] Align i128 to 16 bytes in SPARC datalayouts (PR #106951)

2024-09-02 Thread via cfe-commits
https://github.com/koachan created https://github.com/llvm/llvm-project/pull/106951 Align i128s to 16 bytes, following the example at https://reviews.llvm.org/D86310. clang already does this implicitly, but do it in backend code too for the benefit of other frontends (see e.g https://github.

[clang] [llvm] [SPARC] Align i128 to 16 bytes in SPARC datalayouts (PR #106951)

2024-09-02 Thread via cfe-commits
koachan wrote: CC @beetrees https://github.com/llvm/llvm-project/pull/106951 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPARC] Align i128 to 16 bytes in SPARC datalayouts (PR #106951)

2024-09-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Koakuma (koachan) Changes Align i128s to 16 bytes, following the example at https://reviews.llvm.org/D86310. clang already does this implicitly, but do it in backend code too for the benefit of other frontends (see e.g https://github.co

[clang] [clang][analyzer] Bring alpha.security.MmapWriteExec checker out of alpha package (PR #102636)

2024-09-02 Thread Balázs Kéri via cfe-commits
https://github.com/balazske updated https://github.com/llvm/llvm-project/pull/102636 From 11e871ab17c119c71b8ef4bbcd3b186ec0e9a14f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Fri, 9 Aug 2024 17:41:46 +0200 Subject: [PATCH] [clang][analyzer] Bring checker alpha.secur

[clang] eaea4d1 - [clang] The ms-extension __noop should return zero in a constexpr context. (#106849)

2024-09-02 Thread via cfe-commits
Author: c8ef Date: 2024-09-02T11:15:44+02:00 New Revision: eaea4d15acd4cab92e6287d692d2652066c3368a URL: https://github.com/llvm/llvm-project/commit/eaea4d15acd4cab92e6287d692d2652066c3368a DIFF: https://github.com/llvm/llvm-project/commit/eaea4d15acd4cab92e6287d692d2652066c3368a.diff LOG: [cl

[clang] [clang] The ms-extension __noop should return zero in a constexpr context. (PR #106849)

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

[clang] [clang][analyzer] Bring alpha.security.MmapWriteExec checker out of alpha package (PR #102636)

2024-09-02 Thread Balázs Kéri via cfe-commits
https://github.com/balazske updated https://github.com/llvm/llvm-project/pull/102636 From 11e871ab17c119c71b8ef4bbcd3b186ec0e9a14f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Fri, 9 Aug 2024 17:41:46 +0200 Subject: [PATCH 1/2] [clang][analyzer] Bring checker alpha.

[clang] [llvm] [AArch64] Implement intrinsics for SME2 FSCALE (PR #100128)

2024-09-02 Thread via cfe-commits
@@ -0,0 +1,186 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2 +; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sme2 -mattr=+fp8 -force-streaming -verify-machineinstrs < %s | FileCheck %s + +; FSCALE (Single, x2) + +define {

[clang] 24fe1d4 - [SCCP] Infer return attributes in SCCP as well (#106732)

2024-09-02 Thread via cfe-commits
Author: Nikita Popov Date: 2024-09-02T11:44:37+02:00 New Revision: 24fe1d4fd61983277c8061ce591970bc775a0fb5 URL: https://github.com/llvm/llvm-project/commit/24fe1d4fd61983277c8061ce591970bc775a0fb5 DIFF: https://github.com/llvm/llvm-project/commit/24fe1d4fd61983277c8061ce591970bc775a0fb5.diff

[clang] [llvm] [SCCP] Infer return attributes in SCCP as well (PR #106732)

2024-09-02 Thread Nikita Popov via cfe-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/106732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Implement intrinsics for SME2 FSCALE (PR #100128)

2024-09-02 Thread via cfe-commits
https://github.com/Lukacma updated https://github.com/llvm/llvm-project/pull/100128 >From ea280c4177aa64c29a921ea40c95fc7024ce24ed Mon Sep 17 00:00:00 2001 From: Marian Lukac Date: Tue, 23 Jul 2024 14:11:49 + Subject: [PATCH 1/2] [AArch64] Implement intrinsics for SME2 FSCALE --- clang/in

[clang] [llvm] [AArch64] Implement intrinsics for SME2 FSCALE (PR #100128)

2024-09-02 Thread via cfe-commits
@@ -0,0 +1,186 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2 +; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sme2 -mattr=+fp8 -force-streaming -verify-machineinstrs < %s | FileCheck %s + +; FSCALE (Single, x2) + +define {

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-09-02 Thread Haojian Wu via cfe-commits
@@ -944,12 +950,67 @@ getRHSTemplateDeclAndArgs(Sema &SemaRef, TypeAliasTemplateDecl *AliasTemplate) { return {Template, AliasRhsTemplateArgs}; } +struct InheritedConstructorDeductionInfo { + TemplateDecl *DerivedClassTemplate; hokein wrote: nit: would be

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-09-02 Thread Haojian Wu via cfe-commits
@@ -944,12 +950,67 @@ getRHSTemplateDeclAndArgs(Sema &SemaRef, TypeAliasTemplateDecl *AliasTemplate) { return {Template, AliasRhsTemplateArgs}; } +struct InheritedConstructorDeductionInfo { + TemplateDecl *DerivedClassTemplate; + TypeSourceInfo *CCType; +}; + +// Build th

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-09-02 Thread Haojian Wu via cfe-commits
@@ -1216,10 +1308,225 @@ void DeclareImplicitDeductionGuidesForTypeAlias( ->getDeductionCandidateKind() == DeductionCandidate::Aggregate) continue; -BuildDeductionGuideForTypeAlias(SemaRef, AliasTemplate, F, Loc); +BuildDeductionGuideForTypeAlias(Sema

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-09-02 Thread Haojian Wu via cfe-commits
@@ -1216,10 +1324,225 @@ void DeclareImplicitDeductionGuidesForTypeAlias( ->getDeductionCandidateKind() == DeductionCandidate::Aggregate) continue; -BuildDeductionGuideForTypeAlias(SemaRef, AliasTemplate, F, Loc); +BuildDeductionGuideForTypeAlias(Sema

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-09-02 Thread Haojian Wu via cfe-commits
@@ -944,12 +950,67 @@ getRHSTemplateDeclAndArgs(Sema &SemaRef, TypeAliasTemplateDecl *AliasTemplate) { return {Template, AliasRhsTemplateArgs}; } +struct InheritedConstructorDeductionInfo { + TemplateDecl *DerivedClassTemplate; + TypeSourceInfo *CCType; +}; + +// Build th

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-09-02 Thread Haojian Wu via cfe-commits
@@ -1216,10 +1308,225 @@ void DeclareImplicitDeductionGuidesForTypeAlias( ->getDeductionCandidateKind() == DeductionCandidate::Aggregate) continue; -BuildDeductionGuideForTypeAlias(SemaRef, AliasTemplate, F, Loc); +BuildDeductionGuideForTypeAlias(Sema

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-09-02 Thread Haojian Wu via cfe-commits
@@ -1216,10 +1324,225 @@ void DeclareImplicitDeductionGuidesForTypeAlias( ->getDeductionCandidateKind() == DeductionCandidate::Aggregate) continue; -BuildDeductionGuideForTypeAlias(SemaRef, AliasTemplate, F, Loc); +BuildDeductionGuideForTypeAlias(Sema

[clang] [clang][bytecode] Fix zero-init of first union member (PR #106962)

2024-09-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/106962 ... if done via a ImplicitValueInitExpr. We were already doing this later in visitZeroRecordInitializer(). >From 3ca8c6c3408d78163c01d5ff95796fdc310b9b63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4d

[clang] [clang][bytecode] Implement __noop (PR #106714)

2024-09-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/106714 >From f78ac3974423d2cd01bc73ed0de854ce4d6f50cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 30 Aug 2024 13:45:37 +0200 Subject: [PATCH] [clang][bytecode] Implement __noop This does n

[clang] [clang][bytecode] Fix zero-init of first union member (PR #106962)

2024-09-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes ... if done via a ImplicitValueInitExpr. We were already doing this later in visitZeroRecordInitializer(). --- Full diff: https://github.com/llvm/llvm-project/pull/106962.diff 2 Files Affected: - (modified

[clang] [clang-format] Add new option: WrapNamespaceBodyWithNewlines (PR #106145)

2024-09-02 Thread Björn Schäpers via cfe-commits
@@ -28104,6 +28104,211 @@ TEST_F(FormatTest, BreakBinaryOperations) { Style); } +TEST_F(FormatTest, WrapNamespaceBodyWithEmptyLinesNever) { + FormatStyle Style = getLLVMStyle(); + Style.FixNamespaceComments = false; + Style.ShortNamespaceLines = 0; + Style.M

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-09-02 Thread Haojian Wu via cfe-commits
hokein wrote: > The current implementation strictly follows the standard's specification for > replacing the return type of an alias deduction guide. > > However, this approach adds some implicit declarations in the AST (in terms > of the partial class template specialization), which is cumber

[clang] [llvm] [MC] Emit a jump table size section (PR #101962)

2024-09-02 Thread Nabeel Omer via cfe-commits
https://github.com/omern1 updated https://github.com/llvm/llvm-project/pull/101962 >From 14f3cb82f0d7e69261bd7e1317bd66392e9a2c2b Mon Sep 17 00:00:00 2001 From: Nabeel Omer Date: Mon, 5 Aug 2024 11:50:18 +0100 Subject: [PATCH 01/10] [MC] Emit a jump table size section This patch will make LLVM

[clang] [llvm] [WIP] Add initial support for arc hyperbolic intrinsics (PR #106766)

2024-09-02 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon updated https://github.com/llvm/llvm-project/pull/106766 >From a4a531a089980c602bc1e7e10e3774186b5b6268 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Fri, 30 Aug 2024 18:34:27 +0100 Subject: [PATCH] [WIP] Add initial support for arc hyperbolic intrinsics --- cl

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-02 Thread Momchil Velikov via cfe-commits
@@ -2142,85 +2178,58 @@ void NeonEmitter::genOverloadTypeCheckCode(raw_ostream &OS, OS << "#endif\n\n"; } -void NeonEmitter::genIntrinsicRangeCheckCode(raw_ostream &OS, -SmallVectorImpl &Defs) { - OS << "#ifdef GET_NEON_IMMEDIATE_CHE

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-02 Thread Momchil Velikov via cfe-commits
@@ -403,142 +369,183 @@ enum ArmSMEState : unsigned { ArmZT0Mask = 0b11 << 2 }; +bool SemaARM::CheckImmediateArg(CallExpr *TheCall, unsigned CheckTy, +unsigned ArgIdx, unsigned EltBitWidth, +unsigned VecBitWidth

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-02 Thread Momchil Velikov via cfe-commits
@@ -2142,85 +2178,58 @@ void NeonEmitter::genOverloadTypeCheckCode(raw_ostream &OS, OS << "#endif\n\n"; } -void NeonEmitter::genIntrinsicRangeCheckCode(raw_ostream &OS, -SmallVectorImpl &Defs) { - OS << "#ifdef GET_NEON_IMMEDIATE_CHE

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-02 Thread Momchil Velikov via cfe-commits
@@ -2142,85 +2178,58 @@ void NeonEmitter::genOverloadTypeCheckCode(raw_ostream &OS, OS << "#endif\n\n"; } -void NeonEmitter::genIntrinsicRangeCheckCode(raw_ostream &OS, -SmallVectorImpl &Defs) { - OS << "#ifdef GET_NEON_IMMEDIATE_CHE

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-02 Thread Momchil Velikov via cfe-commits
@@ -403,142 +369,183 @@ enum ArmSMEState : unsigned { ArmZT0Mask = 0b11 << 2 }; +bool SemaARM::CheckImmediateArg(CallExpr *TheCall, unsigned CheckTy, +unsigned ArgIdx, unsigned EltBitWidth, +unsigned VecBitWidth

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-02 Thread Momchil Velikov via cfe-commits
@@ -403,6 +408,38 @@ class Intrinsic { (Type.isScalar() && Type.isHalf())) UseMacro = true; } + +int ArgIdx, Kind, TypeArgIdx; +std::vector ImmCheckList = R->getValueAsListOfDefs("ImmChecks"); +for (const auto *I : ImmCheckList) { + unsign

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-02 Thread Momchil Velikov via cfe-commits
@@ -37,15 +37,20 @@ class SemaARM : public SemaBase { /// flags. Do Sema checks for the runtime mode. }; + bool CheckImmediateArg(CallExpr *TheCall, unsigned CheckTy, unsigned ArgIdx, + unsigned EltBitWidth, unsigned VecBi

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-02 Thread Momchil Velikov via cfe-commits
@@ -37,15 +37,20 @@ class SemaARM : public SemaBase { /// flags. Do Sema checks for the runtime mode. }; + bool CheckImmediateArg(CallExpr *TheCall, unsigned CheckTy, unsigned ArgIdx, + unsigned EltBitWidth, unsigned VecBi

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-02 Thread Momchil Velikov via cfe-commits
@@ -403,142 +369,183 @@ enum ArmSMEState : unsigned { ArmZT0Mask = 0b11 << 2 }; +bool SemaARM::CheckImmediateArg(CallExpr *TheCall, unsigned CheckTy, +unsigned ArgIdx, unsigned EltBitWidth, +unsigned VecBitWidth

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-02 Thread Momchil Velikov via cfe-commits
@@ -1541,8 +1528,9 @@ void SVEEmitter::createRangeChecks(raw_ostream &OS) { OS << "case SVE::BI__builtin_sve_" << Def->getMangledName() << ":\n"; for (auto &Check : Def->getImmChecks()) - OS << "ImmChecks.push_back(std::make_tuple(" << Check.getArg() << ", " -

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-02 Thread Momchil Velikov via cfe-commits
@@ -2142,85 +2178,58 @@ void NeonEmitter::genOverloadTypeCheckCode(raw_ostream &OS, OS << "#endif\n\n"; } -void NeonEmitter::genIntrinsicRangeCheckCode(raw_ostream &OS, -SmallVectorImpl &Defs) { - OS << "#ifdef GET_NEON_IMMEDIATE_CHE

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-02 Thread Momchil Velikov via cfe-commits
@@ -1210,18 +1196,19 @@ void SVEEmitter::createIntrinsic( // Collate a list of range/option checks for the immediates. SmallVector ImmChecks; for (auto *R : ImmCheckList) { - int64_t Arg = R->getValueAsInt("Arg"); - int64_t EltSizeArg = R->getValueAsInt("E

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-02 Thread Momchil Velikov via cfe-commits
@@ -2142,85 +2178,58 @@ void NeonEmitter::genOverloadTypeCheckCode(raw_ostream &OS, OS << "#endif\n\n"; } -void NeonEmitter::genIntrinsicRangeCheckCode(raw_ostream &OS, -SmallVectorImpl &Defs) { - OS << "#ifdef GET_NEON_IMMEDIATE_CHE

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-09-02 Thread Donát Nagy via cfe-commits
@@ -50,6 +118,75 @@ class BuiltinFunctionChecker : public Checker { } // namespace +std::pair +BuiltinFunctionChecker::checkOverflow(CheckerContext &C, SVal RetVal, + QualType Res) const { + ProgramStateRef State = C.getState(); + SValBu

[clang] [llvm] [clang][HLSL] Add WaveIsFirstLane() intrinsic (PR #103299)

2024-09-02 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts updated https://github.com/llvm/llvm-project/pull/103299 From 04886f07618a283cc56d8a28aaf99e16d3897855 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nathan=20Gau=C3=ABr?= Date: Tue, 13 Aug 2024 14:39:03 +0200 Subject: [PATCH] [clang][HLSL] Add WaveIsLaneFirst() intrinsic M

[clang] [clang] Add tests for CWG issues about friend declaration matching (PR #106117)

2024-09-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/106117 >From 65307bd2f5f8ca5c6aaa24335c77a63280d668e3 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 26 Aug 2024 20:45:31 +0300 Subject: [PATCH 1/5] [clang] Add tests for CWG issues about friend declarati

[clang] [analyzer] [MallocChecker] suspect all release functions as candite for supression (PR #104599)

2024-09-02 Thread Donát Nagy via cfe-commits
@@ -3648,35 +3652,53 @@ PathDiagnosticPieceRef MallocBugVisitor::VisitNode(const ExplodedNode *N, return nullptr; } - // See if we're releasing memory while inlining a destructor - // (or one of its callees). This turns on various common - //

[clang] [analyzer] [MallocChecker] suspect all release functions as candite for supression (PR #104599)

2024-09-02 Thread Donát Nagy via cfe-commits
@@ -3551,21 +3551,25 @@ PathDiagnosticPieceRef MallocBugVisitor::VisitNode(const ExplodedNode *N, const LocationContext *CurrentLC = N->getLocationContext(); - // If we find an atomic fetch_add or fetch_sub within the destructor in which - // the pointer was released (be

[clang] [analyzer] [MallocChecker] suspect all release functions as candite for supression (PR #104599)

2024-09-02 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/104599 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] [MallocChecker] suspect all release functions as candidate for suppression (PR #104599)

2024-09-02 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/104599 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] [MallocChecker] suspect all release functions as candidate for suppression (PR #104599)

2024-09-02 Thread Donát Nagy via cfe-commits
NagyDonat wrote: (Just fixed some typos in the PR title.) https://github.com/llvm/llvm-project/pull/104599 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f79722b - [clang][bytecode][NFC] Move test case to -verify=both style

2024-09-02 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-09-02T13:15:48+02:00 New Revision: f79722b932ce40edf2937f3b9386e6fb43757bce URL: https://github.com/llvm/llvm-project/commit/f79722b932ce40edf2937f3b9386e6fb43757bce DIFF: https://github.com/llvm/llvm-project/commit/f79722b932ce40edf2937f3b9386e6fb43757bce.diff LO

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-09-02 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk deleted https://github.com/llvm/llvm-project/pull/106036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add tests for CWG issues about friend declaration matching (PR #106117)

2024-09-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/106117 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add tests for CWG issues about friend declaration matching (PR #106117)

2024-09-02 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @cor3ntin Can you take another look? I added CWG1900 section to the PR description. Nothing has changes for other Core issues. https://github.com/llvm/llvm-project/pull/106117 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [analyzer] [MallocChecker] suspect all release functions as candidate for suppression (PR #104599)

2024-09-02 Thread Balazs Benics via cfe-commits
steakhal wrote: I'm still chilling. Ill be back next week at soonest. I'll be probably still very busy with catching up with this week and even more busy for validating the clang-19 release. I'll do my best :D sorry for the inconvinience. I have complete trust in Donát, so dont block this or a

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-09-02 Thread Balazs Benics via cfe-commits
@@ -50,6 +118,75 @@ class BuiltinFunctionChecker : public Checker { } // namespace +std::pair +BuiltinFunctionChecker::checkOverflow(CheckerContext &C, SVal RetVal, + QualType Res) const { + ProgramStateRef State = C.getState(); + SValBu

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-09-02 Thread Oleksandr T. via cfe-commits
@@ -177,6 +177,26 @@ static bool isLanguageDefinedBuiltin(const SourceManager &SourceMgr, return false; } +static bool isReservedAttrName(Preprocessor &PP, IdentifierInfo *II) { a-tarasyuk wrote: @philnik777 @AaronBallman The reason I asked is that I recal

[clang] [clang] Add tests for CWG issues about friend declaration matching (PR #106117)

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

[clang] [ExtendLifetimes] Add extend lifetimes to emit fake uses from clang (PR #106724)

2024-09-02 Thread Stephen Tozer via cfe-commits
@@ -1412,6 +1420,39 @@ void CodeGenFunction::EmitAndRegisterVariableArrayDimensions( } } +/// Return the maximum size of an aggregate for which we generate a fake use +/// intrinsic when -fextend-lifetimes is in effect. +static uint64_t maxFakeUseAggregateSize(const ASTCont

[clang] [ExtendLifetimes] Add extend lifetimes to emit fake uses from clang (PR #106724)

2024-09-02 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer updated https://github.com/llvm/llvm-project/pull/106724 >From 2b529d443d5e8512ffea6566a3d4d1e04e9542e3 Mon Sep 17 00:00:00 2001 From: Stephen Tozer Date: Fri, 30 Aug 2024 12:49:26 +0100 Subject: [PATCH 1/2] [ExtendLifetimes] Add extend lifetimes to emit fake uses fr

[clang] [compiler-rt] [libcxx] [lldb] [llvm] Rename Sanitizer Coverage => Coverage Sanitizer (PR #106505)

2024-09-02 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/106505 >From adb4a0eb00972811343ff05eac6977512f01970a Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Thu, 29 Aug 2024 09:43:56 +0200 Subject: [PATCH 1/2] Rename Sanitizer Coverage => Coverage Sanitizer This is s

[clang] [compiler-rt] [libcxx] [lldb] [llvm] Rename Sanitizer Coverage => Coverage Sanitizer (PR #106505)

2024-09-02 Thread via cfe-commits
@@ -257,7 +257,7 @@ General purpose options A semicolon list of arguments to pass when running the libc++ benchmarks using the ``check-cxx-benchmarks`` rule. By default we run the benchmarks for a very short amount of time, - since the primary use of ``check-cxx-benchma

[clang] [ExtendLifetimes] Add extend lifetimes to emit fake uses from clang (PR #106724)

2024-09-02 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer edited https://github.com/llvm/llvm-project/pull/106724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f838d6b - [clang][bytecode] Implement __noop (#106714)

2024-09-02 Thread via cfe-commits
Author: Timm Baeder Date: 2024-09-02T13:50:22+02:00 New Revision: f838d6b1b2d84d3149685c3a3896dc82889563f7 URL: https://github.com/llvm/llvm-project/commit/f838d6b1b2d84d3149685c3a3896dc82889563f7 DIFF: https://github.com/llvm/llvm-project/commit/f838d6b1b2d84d3149685c3a3896dc82889563f7.diff L

[clang] [clang][bytecode] Implement __noop (PR #106714)

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

[clang] a9006bf - [clang][bytecode] Fix zero-init of first union member (#106962)

2024-09-02 Thread via cfe-commits
Author: Timm Baeder Date: 2024-09-02T13:51:01+02:00 New Revision: a9006bffa994d5afe9ad0b661b69d655658ab5e8 URL: https://github.com/llvm/llvm-project/commit/a9006bffa994d5afe9ad0b661b69d655658ab5e8 DIFF: https://github.com/llvm/llvm-project/commit/a9006bffa994d5afe9ad0b661b69d655658ab5e8.diff L

[clang] [clang][bytecode] Fix zero-init of first union member (PR #106962)

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

[clang] [clang] Add tests for CWG issues about friend declaration matching (PR #106117)

2024-09-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/106117 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] [MallocChecker] suspect all release functions as candidate for suppression (PR #104599)

2024-09-02 Thread Donát Nagy via cfe-commits
NagyDonat wrote: @steakhal Don't worry about this PR, I don't think that there is anything that you _need_ to review -- I just added you as a reviewer to ensure that you know about it and you _may_ review it if you want. (Although now that I think about it, you're probably subscribed to the [a

[clang] [C++20] [Modules] Embed all source files for C++20 Modules (PR #102444)

2024-09-02 Thread Iain Sandoe via cfe-commits
iains wrote: FWIW: As [clang, GCC, MSVC] are currently implementing modules, there is no question of compatibility at the exchange of BMIs level (so that is currently a non-issue). It does not seem that this is something in the "compatible with gcc-4.2.1" layer However, it is a tooling i

[clang-tools-extra] [include-cleaner] Report refs for enum constants used through namespace aliases (PR #106706)

2024-09-02 Thread kadir çetinkaya via cfe-commits
@@ -146,9 +148,24 @@ class ASTWalker : public RecursiveASTVisitor { // // If it's an enum constant, it must be due to prior decl. Report references // to it when qualifier isn't a type. -if (llvm::isa(FD)) { - if (!DRE->getQualifier() || DRE->getQualifier(

[clang-tools-extra] [include-cleaner] Report refs for enum constants used through namespace aliases (PR #106706)

2024-09-02 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/106706 From 53b34977daa00abdad9bb6b3a351b05ae59cb2df Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Fri, 30 Aug 2024 12:28:02 +0200 Subject: [PATCH] [include-cleaner] Report refs for enum constants used through

[clang-tools-extra] 60ed104 - [include-cleaner] Report refs for enum constants used through namespace aliases (#106706)

2024-09-02 Thread via cfe-commits
Author: kadir çetinkaya Date: 2024-09-02T14:16:49+02:00 New Revision: 60ed1043d76554a48f66fc0c15fb97ac8b3af7b0 URL: https://github.com/llvm/llvm-project/commit/60ed1043d76554a48f66fc0c15fb97ac8b3af7b0 DIFF: https://github.com/llvm/llvm-project/commit/60ed1043d76554a48f66fc0c15fb97ac8b3af7b0.dif

[clang-tools-extra] [include-cleaner] Report refs for enum constants used through namespace aliases (PR #106706)

2024-09-02 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet closed https://github.com/llvm/llvm-project/pull/106706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-09-02 Thread Pavel Skripkin via cfe-commits
@@ -50,6 +118,75 @@ class BuiltinFunctionChecker : public Checker { } // namespace +std::pair +BuiltinFunctionChecker::checkOverflow(CheckerContext &C, SVal RetVal, + QualType Res) const { + ProgramStateRef State = C.getState(); + SValBu

[clang] [NFC] Fix dead links in TargetCXXABI.def (PR #96348)

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

[clang] dc3f66a - [NFC] Fix dead links in TargetCXXABI.def (#96348)

2024-09-02 Thread via cfe-commits
Author: Mital Ashok Date: 2024-09-02T14:35:21+02:00 New Revision: dc3f66af58db258287e1c2dbfb3f06916b463227 URL: https://github.com/llvm/llvm-project/commit/dc3f66af58db258287e1c2dbfb3f06916b463227 DIFF: https://github.com/llvm/llvm-project/commit/dc3f66af58db258287e1c2dbfb3f06916b463227.diff L

[clang] [NFC] Fix dead links in TargetCXXABI.def (PR #96348)

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

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-02 Thread via cfe-commits
@@ -2142,85 +2178,58 @@ void NeonEmitter::genOverloadTypeCheckCode(raw_ostream &OS, OS << "#endif\n\n"; } -void NeonEmitter::genIntrinsicRangeCheckCode(raw_ostream &OS, -SmallVectorImpl &Defs) { - OS << "#ifdef GET_NEON_IMMEDIATE_CHE

[clang] [llvm] Recover performance loss after PagedVector introduction (PR #67972)

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

  1   2   3   >