[clang] 4b4aaf1 - [clang][Interp] Fix non-initializing CK_VectorSplat casts

2024-06-18 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-06-18T09:05:28+02:00 New Revision: 4b4aaf1e792367b4ce0e24966a7d21e2a83bb979 URL: https://github.com/llvm/llvm-project/commit/4b4aaf1e792367b4ce0e24966a7d21e2a83bb979 DIFF: https://github.com/llvm/llvm-project/commit/4b4aaf1e792367b4ce0e24966a7d21e2a83bb979.diff LO

[clang] [llvm] [AArch64] Add ability to list extensions enabled for a target (PR #95805)

2024-06-18 Thread David Green via cfe-commits
@@ -19,3 +19,19 @@ // RUN: %clang --target=arm64 -mlittle-endian -march=armv8.1a -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-GENERICV81A %s // RUN: %clang --target=arm64 -mlittle-endian -march=armv8.1-a -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-GENERICV81A %s // ARM

[clang] [llvm] [AArch64] Add ability to list extensions enabled for a target (PR #95805)

2024-06-18 Thread David Green via cfe-commits
@@ -140,89 +152,480 @@ def FeatureAES : Extension< // compatibility, and now imply features SHA2 and AES, which was the // "traditional" meaning of Crypto. let FMVDependencies = "+aes,+sha2" in -def FeatureCrypto : Extension<"crypto", "Crypto", +def FeatureCrypto : ExtensionWit

[clang] [clang][Interp] Implement complex division (PR #94892)

2024-06-18 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/94892 >From 7a1c16f2fe0b23ffe49789275ffa66b2ac64c4d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 9 Jun 2024 09:25:24 +0200 Subject: [PATCH] [clang][Interp] Implement Complex division ---

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-18 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus edited https://github.com/llvm/llvm-project/pull/94957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang][include-cleaner]skip stdlib recogntion only when there are defintion with body in main file. (PR #95797)

2024-06-18 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/95797 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang][include-cleaner]skip stdlib recogntion only when there are defintion with body in main file. (PR #95797)

2024-06-18 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. hi @HerrCai0907 ! Left some detailed comments in the patch. Due to timezone differences, I highly suspect this will be fixed quickly and we have some extra delays for getting changes into releases (and I am going to be OOO nex

[clang-tools-extra] [clang][include-cleaner]skip stdlib recogntion only when there are defintion with body in main file. (PR #95797)

2024-06-18 Thread kadir çetinkaya via cfe-commits
@@ -39,20 +40,24 @@ Hints declHints(const Decl *D) { } std::vector> locateDecl(const Decl &D) { - std::vector> Result; - // FIXME: Should we also provide physical locations? - if (auto SS = tooling::stdlib::Recognizer()(&D)) { -Result.push_back({*SS, Hints::CompleteSymb

[clang] [clang] Fix-it hint for `++this` -> `++*this` when deref is modifiable (PR #94159)

2024-06-18 Thread via cfe-commits
Sirraide wrote: Having more context would probably help yeah. We should be able to improve that a bit even if the fix-it isn’t viable... https://github.com/llvm/llvm-project/pull/94159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] Revert "[X86] Add support for MS inp functions." (PR #95890)

2024-06-18 Thread Malay Sanghi via cfe-commits
https://github.com/MalaySanghi created https://github.com/llvm/llvm-project/pull/95890 Reverts llvm/llvm-project#93804 Revert commit 089dfeee8a8761c35a3a56e75281275871dd53bc. The original request can be fulfilled with alternative __inbyte/__inword/__indword >From 1d96bd439d4631d0ff9d7005f27b77

[clang] [Clang] [Sema] Ensure noexcept(typeid(E)) checks if E throws when needed (PR #95846)

2024-06-18 Thread via cfe-commits
Sirraide wrote: Do we already have tests for your most recent commit (i.e. dependent expressions)? Because I recall CI passing even when that wasn’t there, but that may have been my imagination. https://github.com/llvm/llvm-project/pull/95846 ___ cfe

[clang] Revert "[X86] Add support for MS inp functions." (PR #95890)

2024-06-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-backend-x86 Author: Malay Sanghi (MalaySanghi) Changes Reverts llvm/llvm-project#93804 Revert commit 089dfeee8a8761c35a3a56e75281275871dd53bc. The original request can be fulfilled with alternative __inbyte/__inword/__indword

[clang] Revert "[X86] Add support for MS inp functions." (PR #95890)

2024-06-18 Thread Malay Sanghi via cfe-commits
MalaySanghi wrote: @phoebewang please review and revert https://github.com/llvm/llvm-project/pull/95890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl][AST] Fix auto NTTP MSVC 1920+ mangling for pointer types (PR #92477)

2024-06-18 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM Your commit message mentions variables, function pointers, and member function pointers... is there anything else we need to handle? Null pointers? Integers? https://github.com/llvm/llvm-project/pull/92477 __

[clang] Revert "[X86] Add support for MS inp functions." (PR #95890)

2024-06-18 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/95890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86]Add support for _outp{|w|d} (PR #93774)

2024-06-18 Thread Malay Sanghi via cfe-commits
https://github.com/MalaySanghi closed https://github.com/llvm/llvm-project/pull/93774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86]Add support for _outp{|w|d} (PR #93774)

2024-06-18 Thread Malay Sanghi via cfe-commits
MalaySanghi wrote: Closing. The original request can be fulfilled with __outbyte/__outword/__outdword https://github.com/llvm/llvm-project/pull/93774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [llvm] [RISCV] Add processor definition for SpacemiT-X60 (PR #94564)

2024-06-18 Thread Shao-Ce SUN via cfe-commits
@@ -381,3 +381,20 @@ def XIANGSHAN_NANHU : RISCVProcessorModel<"xiangshan-nanhu", TuneZExtHFusion, TuneZExtWFusion, TuneShiftedZExtWFusion]>; + +

[clang-tools-extra] ae0813f - Revert "[clang-tidy] fix false positives for the functions with the same name as standard library functions in misc-include-cleaner (#94923)"

2024-06-18 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2024-06-18T09:15:30+02:00 New Revision: ae0813f2d7222c4eab7cd3e6099d49f50318d1d5 URL: https://github.com/llvm/llvm-project/commit/ae0813f2d7222c4eab7cd3e6099d49f50318d1d5 DIFF: https://github.com/llvm/llvm-project/commit/ae0813f2d7222c4eab7cd3e6099d49f50318d1d5.dif

[clang] [llvm] [analyzer][NFC] Reorganize Z3 report refutation (PR #95128)

2024-06-18 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/95128 >From 6b9a5a6902c3efca6ac7d6a5dabc8950767560cc Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Tue, 11 Jun 2024 16:53:46 +0200 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?U

[clang] [llvm] [analyzer][NFC] Reorganize Z3 report refutation (PR #95128)

2024-06-18 Thread Balazs Benics via cfe-commits
steakhal wrote: Implement move-only rule-of-5 for: - `Z3Config` - `Z3Context` https://github.com/llvm/llvm-project/pull/95128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add processor definition for SpacemiT-X60 (PR #94564)

2024-06-18 Thread Shao-Ce SUN via cfe-commits
https://github.com/sunshaoce edited https://github.com/llvm/llvm-project/pull/94564 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF (PR #91423)

2024-06-18 Thread via cfe-commits
https://github.com/eddyz87 updated https://github.com/llvm/llvm-project/pull/91423 >From 434c6971332af7dbf80affd9a273e60860e30595 Mon Sep 17 00:00:00 2001 From: Eduard Zingerman Date: Tue, 14 Feb 2023 01:19:50 +0200 Subject: [PATCH 1/2] [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF T

[clang] [llvm] [RISCV] Add processor definition for SpacemiT-X60 (PR #94564)

2024-06-18 Thread Craig Topper via cfe-commits
@@ -381,3 +381,20 @@ def XIANGSHAN_NANHU : RISCVProcessorModel<"xiangshan-nanhu", TuneZExtHFusion, TuneZExtWFusion, TuneShiftedZExtWFusion]>; + +

[clang] Revert "[clang] Fix-it hint for `++this` -> `++*this` when deref is modifiable" (PR #95833)

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

[clang] [llvm] [RISCV] Add processor definition for SpacemiT-X60 (PR #94564)

2024-06-18 Thread Craig Topper via cfe-commits
@@ -381,3 +381,20 @@ def XIANGSHAN_NANHU : RISCVProcessorModel<"xiangshan-nanhu", TuneZExtHFusion, TuneZExtWFusion, TuneShiftedZExtWFusion]>; + +

[clang] 7dd7d57 - Revert "[clang] Fix-it hint for `++this` -> `++*this` when deref is modifiable" (#95833)

2024-06-18 Thread via cfe-commits
Author: Sirraide Date: 2024-06-18T09:40:17+02:00 New Revision: 7dd7d5749f7d9d98fec50ee88e633e8b85c6502a URL: https://github.com/llvm/llvm-project/commit/7dd7d5749f7d9d98fec50ee88e633e8b85c6502a DIFF: https://github.com/llvm/llvm-project/commit/7dd7d5749f7d9d98fec50ee88e633e8b85c6502a.diff LOG:

[clang] Revert "[clang] Fix-it hint for `++this` -> `++*this` when deref is modifiable" (PR #95833)

2024-06-18 Thread via cfe-commits
https://github.com/Sirraide closed https://github.com/llvm/llvm-project/pull/95833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add processor definition for SpacemiT-X60 (PR #94564)

2024-06-18 Thread Craig Topper via cfe-commits
https://github.com/topperc deleted https://github.com/llvm/llvm-project/pull/94564 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 89c26f6 - [analyzer][NFC] Reorganize Z3 report refutation

2024-06-18 Thread via cfe-commits
Author: Balazs Benics Date: 2024-06-18T09:42:29+02:00 New Revision: 89c26f6c7b0a6dfa257ec090fcf5b6e6e0c89aab URL: https://github.com/llvm/llvm-project/commit/89c26f6c7b0a6dfa257ec090fcf5b6e6e0c89aab DIFF: https://github.com/llvm/llvm-project/commit/89c26f6c7b0a6dfa257ec090fcf5b6e6e0c89aab.diff

[clang] [llvm] [analyzer][NFC] Reorganize Z3 report refutation (PR #95128)

2024-06-18 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/95128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add processor definition for SpacemiT-X60 (PR #94564)

2024-06-18 Thread Shao-Ce SUN via cfe-commits
@@ -381,3 +381,20 @@ def XIANGSHAN_NANHU : RISCVProcessorModel<"xiangshan-nanhu", TuneZExtHFusion, TuneZExtWFusion, TuneShiftedZExtWFusion]>; + +

[clang] [clang-format] Add option to remove leading blank lines (PR #91221)

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

[clang] [clang-format] Add option to remove leading blank lines (PR #91221)

2024-06-18 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/91221 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add option to remove leading blank lines (PR #91221)

2024-06-18 Thread Owen Pan via cfe-commits
@@ -21947,6 +21950,10 @@ TEST_F(FormatTest, HandlesUTF8BOM) { verifyFormat("\xef\xbb\xbf"); verifyFormat("\xef\xbb\xbf#include "); verifyFormat("\xef\xbb\xbf\n#include "); + auto Style = getLLVMStyle(); owenca wrote: Ditto. https://github.com/llvm/llvm

[clang] [clang-format] Add option to remove leading blank lines (PR #91221)

2024-06-18 Thread Owen Pan via cfe-commits
@@ -45,6 +45,9 @@ TEST_F(FormatTest, FormatsGlobalStatementsAt0) { verifyFormat("\nint i;", " \n\t \v \f int i;"); verifyFormat("int i;\nint j;", "int i; int j;"); verifyFormat("int i;\nint j;", "int i;\n int j;"); + auto Style = getLLVMStyle(); ---

[clang] [clang] Skip auto-init on scalar vars that have a non-constant Init and no self-ref (PR #94642)

2024-06-18 Thread Alexander Potapenko via cfe-commits
@@ -15,7 +15,7 @@ struct Foo { int foo(unsigned n) { bool var_size_1; - long var_size_8 = 123; ramosian-glider wrote: LGTM https://github.com/llvm/llvm-project/pull/94642 ___ cfe-commits mailing list cfe-commits

[clang] [llvm] [analyzer] Harden safeguards for Z3 query times (PR #95129)

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

[clang] [llvm] [analyzer] Harden safeguards for Z3 query times (PR #95129)

2024-06-18 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/95129 >From 1b61e227a5ee3bf9646cbb7f1c1fca7490868dbf Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Tue, 11 Jun 2024 16:54:26 +0200 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20ch?= =?U

[clang] eacc3b3 - [analyzer] Harden safeguards for Z3 query times

2024-06-18 Thread via cfe-commits
Author: Balazs Benics Date: 2024-06-18T09:48:22+02:00 New Revision: eacc3b3504be061f7334410dd0eb599688ba103a URL: https://github.com/llvm/llvm-project/commit/eacc3b3504be061f7334410dd0eb599688ba103a DIFF: https://github.com/llvm/llvm-project/commit/eacc3b3504be061f7334410dd0eb599688ba103a.diff

[clang] [llvm] [analyzer] Harden safeguards for Z3 query times (PR #95129)

2024-06-18 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/95129 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[X86] Add support for MS inp functions." (PR #95890)

2024-06-18 Thread Shengchen Kan via cfe-commits
https://github.com/KanRobert approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/95890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-18 Thread Kristóf Umann via cfe-commits
@@ -696,6 +730,69 @@ struct StreamOperationEvaluator { } // end anonymous namespace +//===--===// +// Definition of NoStreamStateChangeVisitor. +//===--

[clang-tools-extra] [llvm] [llvm] Remove the Legacy PM Hello example (PR #95708)

2024-06-18 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space edited https://github.com/llvm/llvm-project/pull/95708 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 8b0d38b - [llvm] Remove the Legacy PM Hello example (#95708)

2024-06-18 Thread via cfe-commits
Author: Andrzej Warzyński Date: 2024-06-18T09:01:56+01:00 New Revision: 8b0d38be9ece414dbc7a91dbd8fa506b0e3287e7 URL: https://github.com/llvm/llvm-project/commit/8b0d38be9ece414dbc7a91dbd8fa506b0e3287e7 DIFF: https://github.com/llvm/llvm-project/commit/8b0d38be9ece414dbc7a91dbd8fa506b0e3287e7.d

[clang-tools-extra] [llvm] [llvm] Remove the Legacy PM Hello example (PR #95708)

2024-06-18 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space closed https://github.com/llvm/llvm-project/pull/95708 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix-it hint for `++this` -> `++*this` when deref is modifiable (PR #94159)

2024-06-18 Thread Rajveer Singh Bharadwaj via cfe-commits
Rajveer100 wrote: @Sirraide @zygoloid Can I be of any help to improve this? https://github.com/llvm/llvm-project/pull/94159 ___ 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 `bugprone-pointer-arithmetic-on-polymorphic-object` check (PR #91951)

2024-06-18 Thread via cfe-commits
https://github.com/Discookie updated https://github.com/llvm/llvm-project/pull/91951 >From 69cbd3da19eb0f8eb6758782b46daf99b5b79ea4 Mon Sep 17 00:00:00 2001 From: Viktor Date: Mon, 6 May 2024 06:11:58 + Subject: [PATCH 01/15] Add `bugprone-virtual-arithmetic` check Finds pointer arithmetic

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-18 Thread Kristóf Umann via cfe-commits
@@ -696,6 +730,69 @@ struct StreamOperationEvaluator { } // end anonymous namespace +//===--===// +// Definition of NoStreamStateChangeVisitor. +//===--

[clang] [llvm] Update ReleaseNotes for MC/DC changes. (PR #95887)

2024-06-18 Thread via cfe-commits
https://github.com/zmodem edited https://github.com/llvm/llvm-project/pull/95887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Update ReleaseNotes for MC/DC changes. (PR #95887)

2024-06-18 Thread via cfe-commits
https://github.com/zmodem approved this pull request. Looks good to me, I just noticed some minor things. Thanks for writing release notes! https://github.com/llvm/llvm-project/pull/95887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [llvm] Update ReleaseNotes for MC/DC changes. (PR #95887)

2024-06-18 Thread via cfe-commits
@@ -586,6 +586,20 @@ Improvements to Clang's time-trace - Clang now specifies that using ``auto`` in a lambda parameter is a C++14 extension when appropriate. (`#46059: `_). +Improvements to Coverage mapping --

[clang] [llvm] Update ReleaseNotes for MC/DC changes. (PR #95887)

2024-06-18 Thread via cfe-commits
@@ -586,6 +586,20 @@ Improvements to Clang's time-trace - Clang now specifies that using ``auto`` in a lambda parameter is a C++14 extension when appropriate. (`#46059: `_). +Improvements to Coverage mapping +-

[clang] [llvm] Update ReleaseNotes for MC/DC changes. (PR #95887)

2024-06-18 Thread via cfe-commits
@@ -586,6 +586,20 @@ Improvements to Clang's time-trace - Clang now specifies that using ``auto`` in a lambda parameter is a C++14 extension when appropriate. (`#46059: `_). +Improvements to Coverage mapping +-

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-18 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus updated https://github.com/llvm/llvm-project/pull/94957 From faf00d0e1286e053ba9fb457513bd8309eb541ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Umann?= Date: Fri, 7 Jun 2024 12:07:35 +0200 Subject: [PATCH 1/5] [analyzer] Add an ownership change visitor

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-18 Thread Kristóf Umann via cfe-commits
Szelethus wrote: > I did not find a similar test for `MallocChecker` but there could be one with > similar test functions. I'm not sure what tests you are referring to. I did fix your other observations. https://github.com/llvm/llvm-project/pull/94957 __

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-18 Thread Kristóf Umann via cfe-commits
@@ -696,6 +730,69 @@ struct StreamOperationEvaluator { } // end anonymous namespace +//===--===// +// Definition of NoStreamStateChangeVisitor. +//===--

[clang] [Clang] [WIP] Added builtin_alloca support for OpenCL1.2 and below (PR #95750)

2024-06-18 Thread Vikash Gupta via cfe-commits
https://github.com/vg0204 edited https://github.com/llvm/llvm-project/pull/95750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Serialization] Use specialized decl hash function for GlobalDeclID (PR #95730)

2024-06-18 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/95730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reland "[AArch64] Decouple feature dependency expansion. (#94279)" (PR #95519)

2024-06-18 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/95519 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIRV][HLSL] Add lowering of `rsqrt` to SPIRV (PR #95849)

2024-06-18 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/95849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add processor definition for SpacemiT-X60 (PR #94564)

2024-06-18 Thread Shao-Ce SUN via cfe-commits
https://github.com/sunshaoce updated https://github.com/llvm/llvm-project/pull/94564 >From 363e29385277c049bc91a86e76ff6f6ae70ceaa9 Mon Sep 17 00:00:00 2001 From: Shao-Ce SUN Date: Thu, 6 Jun 2024 12:05:33 +0800 Subject: [PATCH 1/8] [RISCV] Add processor definition for Spacemit-K1 --- clang/t

[clang] [llvm] [RISCV] Add processor definition for SpacemiT-X60 (PR #94564)

2024-06-18 Thread Shao-Ce SUN via cfe-commits
@@ -381,3 +381,20 @@ def XIANGSHAN_NANHU : RISCVProcessorModel<"xiangshan-nanhu", TuneZExtHFusion, TuneZExtWFusion, TuneShiftedZExtWFusion]>; + +

[clang] [llvm] [AArch64][TargetParser] move CPUInfo into tablegen [NFC] (PR #92145)

2024-06-18 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm closed https://github.com/llvm/llvm-project/pull/92145 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] Reland [clang][Sema, Lex, Parse] Preprocessor embed in C and C++ (PR #95802)

2024-06-18 Thread Donát Nagy via cfe-commits
@@ -441,6 +441,7 @@ tok::PPKeywordKind IdentifierInfo::getPPKeywordID() const { CASE( 4, 'e', 's', else); CASE( 4, 'l', 'n', line); CASE( 4, 's', 'c', sccs); + CASE(5, 'e', 'b', embed); NagyDonat wrote: ```suggestion CASE( 5, 'e', 'b', embed); ``` Jus

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-06-18 Thread James Henderson via cfe-commits
jh7370 wrote: > [jh7370](https://github.com/jh7370) sorry for pinging again. I will be highly > grateful if you kindly review this pull request. This change will unblock > some of our internal tasks and timely completion of this is crucial for us. > Thank you in advance. I hope to look at thi

[clang] [Serialization] Storing DeclID separately (PR #95897)

2024-06-18 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/95897 In https://github.com/llvm/llvm-project/pull/92083, there are some unaddressed question about the increased size of PCMs. And I prepared this draft to try to address this. This is patch is not ready for revi

[clang] [Serialization] Storing DeclID separately (PR #95897)

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

[clang] [llvm] [AArch64] Add ability to list extensions enabled for a target (PR #95805)

2024-06-18 Thread David Spickett via cfe-commits
@@ -13,3 +13,57 @@ // RUN: %clang --target=aarch64_be -mbig-endian -march=armv8.6a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV86A-BE %s // RUN: %clang --target=aarch64_be -mbig-endian -march=armv8.6-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV86A-BE %s // GENER

[clang] [Serialization] Storing DeclID separately (PR #95897)

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

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-06-18 Thread Mariya Podchishchaeva via cfe-commits
@@ -610,8 +610,26 @@ bool ConstStructBuilder::AppendBytes(CharUnits FieldOffsetInChars, } bool ConstStructBuilder::AppendBitField( -const FieldDecl *Field, uint64_t FieldOffset, llvm::ConstantInt *CI, +const FieldDecl *Field, uint64_t FieldOffset, llvm::Constant *C,

[clang] [clang][analyzer] Add notes to PointerSubChecker (PR #95899)

2024-06-18 Thread Balázs Kéri via cfe-commits
https://github.com/balazske created https://github.com/llvm/llvm-project/pull/95899 Notes are added to indicate the array declarations of the arrays in a found invalid pointer subtraction. From 1eb6e7ebde0e97e1cd077dc27ffd3ebd6ed0e93d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3

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

2024-06-18 Thread Vikram Hegde via cfe-commits
vikramRH wrote: > Hello @vikramRH, please feel free to commandeer this. Thanks @yuanfang-chen. Also, clang already rejects expressions like &V[0] (https://godbolt.org/z/eGcxzGo66), which is also true with constexprs and this PR. What's the specific concern here ? https://github.com/llvm/llvm-

[clang] [clang][analyzer] Add notes to PointerSubChecker (PR #95899)

2024-06-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balázs Kéri (balazske) Changes Notes are added to indicate the array declarations of the arrays in a found invalid pointer subtraction. --- Full diff: https://github.com/llvm/llvm-project/pull/95899.diff 2 Files Affect

[clang] [clang][analyzer] Add notes to PointerSubChecker (PR #95899)

2024-06-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Balázs Kéri (balazske) Changes Notes are added to indicate the array declarations of the arrays in a found invalid pointer subtraction. --- Full diff: https://github.com/llvm/llvm-project/pull/95899.diff 2 Files Affected: - (modified)

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-06-18 Thread Nikita Popov via cfe-commits
@@ -118,6 +124,37 @@ llvm::Type *CodeGenTypes::ConvertTypeForMem(QualType T, bool ForBitField) { return R; } +bool CodeGenTypes::LLVMTypeLayoutMatchesAST(QualType ASTTy, +llvm::Type *LLVMTy) { + CharUnits ASTSize = Context.getTyp

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-18 Thread Donát Nagy via cfe-commits
@@ -393,6 +401,173 @@ ProgramStateRef CStringChecker::checkNonNull(CheckerContext &C, return stateNonNull; } +static std::optional getIndex(ProgramStateRef State, + const ElementRegion *ER, CharKind CK) { + SValBuilder &SValBuilder = St

[clang-tools-extra] [clang-tidy] Add `bugprone-pointer-arithmetic-on-polymorphic-object` check (PR #91951)

2024-06-18 Thread via cfe-commits
https://github.com/Discookie updated https://github.com/llvm/llvm-project/pull/91951 >From 69cbd3da19eb0f8eb6758782b46daf99b5b79ea4 Mon Sep 17 00:00:00 2001 From: Viktor Date: Mon, 6 May 2024 06:11:58 + Subject: [PATCH 01/15] Add `bugprone-virtual-arithmetic` check Finds pointer arithmetic

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-18 Thread Kristóf Umann via cfe-commits
@@ -393,6 +401,173 @@ ProgramStateRef CStringChecker::checkNonNull(CheckerContext &C, return stateNonNull; } +static std::optional getIndex(ProgramStateRef State, + const ElementRegion *ER, CharKind CK) { + SValBuilder &SValBuilder = St

[clang] [clang][analyzer] Add notes to PointerSubChecker (PR #95899)

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

[clang] [clang][analyzer] Add notes to PointerSubChecker (PR #95899)

2024-06-18 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: Looks good overall, I have one remark about a rare case that would require some specialized code. https://github.com/llvm/llvm-project/pull/95899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [clang][analyzer] Add notes to PointerSubChecker (PR #95899)

2024-06-18 Thread Donát Nagy via cfe-commits
@@ -144,9 +144,24 @@ void PointerSubChecker::checkPreStmt(const BinaryOperator *B, // Allow arithmetic on different symbolic regions. if (isa(SuperLR) || isa(SuperRR)) return; +if (const auto *SuperDLR = dyn_cast(SuperLR)) + DiffDeclL = SuperDLR->getDecl

[clang] [Clang] [Sema] Ensure noexcept(typeid(E)) checks if E throws when needed (PR #95846)

2024-06-18 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/95846 >From 89da8b3bcc678430fe4225c723e87914f2c378cd Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Mon, 17 Jun 2024 21:48:57 +0100 Subject: [PATCH 1/4] [Clang] [Sema] Ensure noexcept(typeid(E)) checks if E throw

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-06-18 Thread Budimir Aranđelović via cfe-commits
https://github.com/budimirarandjelovicsyrmia updated https://github.com/llvm/llvm-project/pull/70307 From 69c6fc02cef92c0dd0eda0a30daa82856552ef1c Mon Sep 17 00:00:00 2001 From: budimirarandjelovicsyrmia Date: Thu, 26 Oct 2023 10:39:52 +0200 Subject: [PATCH] [clang] Emit bad shift warnings ---

[clang] [Clang] [Sema] Ensure noexcept(typeid(E)) checks if E throws when needed (PR #95846)

2024-06-18 Thread Mital Ashok via cfe-commits
MitalAshok wrote: @Sirraide Yes, the tests did pass because there were no tests for this. For reference: * `llvm:main` currently only handles these two wrong https://github.com/llvm/llvm-project/pull/95846/commits/89da8b3bcc678430fe4225c723e87914f2c378cd#diff-c35ff1c0977223e8ef2893fd21f3886c57

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-06-18 Thread Mariya Podchishchaeva via cfe-commits
@@ -1533,9 +1533,17 @@ void CodeGenFunction::EmitReturnStmt(const ReturnStmt &S) { Builder.CreateStore(Result.getScalarVal(), ReturnValue); } else { switch (getEvaluationKind(RV->getType())) { -case TEK_Scalar: - Builder.CreateStore(EmitScalarExpr(RV), Retur

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-06-18 Thread Mariya Podchishchaeva via cfe-commits
@@ -128,6 +128,15 @@ class CodeGenTypes { /// memory representation is usually i8 or i32, depending on the target. llvm::Type *ConvertTypeForMem(QualType T, bool ForBitField = false); + /// Check that size and abi alignment of given LLVM type matches size and + /// align

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

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

[clang] [clang][analyzer] Add notes to PointerSubChecker (PR #95899)

2024-06-18 Thread Balázs Kéri via cfe-commits
balazske wrote: I found difficult results from the checker where it is not obvious what the problem is. One type is this case where a negative index is found (any of these results, or check the first one): https://codechecker-demo.eastus.cloudapp.azure.com/Default/reports?run=curl_curl-7_66_0_p

[clang] [llvm] security check cookie execute only when needed (PR #95904)

2024-06-18 Thread via cfe-commits
https://github.com/mahesh-attarde created https://github.com/llvm/llvm-project/pull/95904 For windows __security_check_cookie call gets call everytime function is return without fixup. Since this function is defined in runtime library, it incures cost of call in dll which simply does comparison

[clang] [llvm] security check cookie execute only when needed (PR #95904)

2024-06-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-clang-codegen Author: None (mahesh-attarde) Changes For windows __security_check_cookie call gets call everytime function is return without fixup. Since this function is defined in runtime library, it incures cost of call

[clang] [Sema][CTAD] Allow user defined conversion for copy-list-initialization (PR #94752)

2024-06-18 Thread Gábor Spaits via cfe-commits
https://github.com/spaits updated https://github.com/llvm/llvm-project/pull/94752 From 8e1f3aa676b891c9566344ad2be046898df34a3a Mon Sep 17 00:00:00 2001 From: Gabor Spaits Date: Fri, 7 Jun 2024 14:38:08 +0200 Subject: [PATCH 1/4] [CTAD] Allow user defined conversion --- clang/include/clang/Se

[clang] [clang-format] Handle function try block with ctor-initializer (PR #95878)

2024-06-18 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. https://github.com/llvm/llvm-project/pull/95878 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 20d3cab - [clang][NFC] Take const pointers in Sema::DiagnoseAutoDeductionFailure

2024-06-18 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-06-18T12:48:38+02:00 New Revision: 20d3cab85258198d262eea05fae6292a2666d6ae URL: https://github.com/llvm/llvm-project/commit/20d3cab85258198d262eea05fae6292a2666d6ae DIFF: https://github.com/llvm/llvm-project/commit/20d3cab85258198d262eea05fae6292a2666d6ae.diff LO

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2024-06-18 Thread Paul Heidekrüger via cfe-commits
PBHDK wrote: > Btw, I realize that this check is part of the [bounds > profile](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#SS-bounds) > (Bounds.4), so for consistency it should probably be named > `cppcoreguidelines-pro-bounds-...`. This becomes then the last remaining > che

[clang] [clang-format] Handle function try block with ctor-initializer (PR #95878)

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

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-06-18 Thread Mariya Podchishchaeva via cfe-commits
@@ -118,6 +124,37 @@ llvm::Type *CodeGenTypes::ConvertTypeForMem(QualType T, bool ForBitField) { return R; } +bool CodeGenTypes::LLVMTypeLayoutMatchesAST(QualType ASTTy, +llvm::Type *LLVMTy) { + CharUnits ASTSize = Context.getTyp

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

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

[clang] [llvm] [analyzer][NFC] Reorganize Z3 report refutation (PR #95128)

2024-06-18 Thread Mikael Holmén via cfe-commits
mikaelholmen wrote: Hi @steakhal and @NagyDonat , Does this patch have requirements on the Z3 version? I get ```LLVM ERROR: Z3 error: unknown parameter 'timeout'``` for the following testcases ``` Failed Tests (3): Clang-Unit :: StaticAnalyzer/./StaticAnalysisTests/24/188 Clang-Unit :: Stat

[clang] [llvm] [analyzer][NFC] Reorganize Z3 report refutation (PR #95128)

2024-06-18 Thread Balazs Benics via cfe-commits
steakhal wrote: > Hi @steakhal and @NagyDonat , > > Does this patch have requirements on the Z3 version? > > I get > ```LLVM ERROR: Z3 error: unknown parameter 'timeout'``` > for the following testcases > ``` > Failed Tests (3): > Clang-Unit :: StaticAnalyzer/./StaticAnalysisTests/24/188 >

  1   2   3   4   5   >