[clang] [clang][ASTImporter] IdentifierInfo of Attribute should be set using 'ToASTContext' (PR #73290)

2023-11-24 Thread Balázs Kéri via cfe-commits
https://github.com/balazske requested changes to this pull request. I think it is better to add the import of AttrName to the attribute import code (function `Import(const Attr *FromAttr)` and what is called from it). Probably it works to add it to `AttrImporter::cloneAttr` and do it like `cons

[clang] dd0b3c2 - [clang][analyzer] Support `fprintf` in the SecuritySyntaxChecker (#73247)

2023-11-24 Thread via cfe-commits
Author: Ben Shi Date: 2023-11-24T16:23:56+08:00 New Revision: dd0b3c2fa62786d9e1fd8d70cdcfe778c74c0a7d URL: https://github.com/llvm/llvm-project/commit/dd0b3c2fa62786d9e1fd8d70cdcfe778c74c0a7d DIFF: https://github.com/llvm/llvm-project/commit/dd0b3c2fa62786d9e1fd8d70cdcfe778c74c0a7d.diff LOG:

[clang] [clang][analyzer] Support `fprintf` in the SecuritySyntaxChecker (PR #73247)

2023-11-24 Thread Ben Shi via cfe-commits
https://github.com/benshi001 closed https://github.com/llvm/llvm-project/pull/73247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fixes compile error that double colon operator cannot resolve macro with parentheses. (PR #68618)

2023-11-24 Thread Yonggang Luo via cfe-commits
lygstate wrote: @AaronBallman is this OK ? https://github.com/llvm/llvm-project/pull/68618 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTImporter] IdentifierInfo of Attribute should be set using 'ToASTContext' (PR #73290)

2023-11-24 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/73290 >From 20aab6095691f3de5568bc61c83427f380e28350 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Fri, 24 Nov 2023 13:55:45 +0800 Subject: [PATCH] [clang][ASTImporter] IdentifierInfo of Attribute should be set using To

[clang] [clang][ASTImporter] IdentifierInfo of Attribute should be set using 'ToASTContext' (PR #73290)

2023-11-24 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > I think it is better to add the import of AttrName to the attribute import > code (function `Import(const Attr *FromAttr)` and what is called from it). > Probably it works to add it to `AttrImporter::cloneAttr` and do it like > `const IdentifierInfo *ToAttrName = > Importer.Im

[clang] b98a594 - [clang][analyzer] Move `security.cert.env.InvalidPtr` out of `alpha` (#71912)

2023-11-24 Thread via cfe-commits
Author: Endre Fülöp Date: 2023-11-24T10:02:56+01:00 New Revision: b98a594977f25e555822e5ceef457f69c73cce45 URL: https://github.com/llvm/llvm-project/commit/b98a594977f25e555822e5ceef457f69c73cce45 DIFF: https://github.com/llvm/llvm-project/commit/b98a594977f25e555822e5ceef457f69c73cce45.diff L

[clang] [clang][analyzer] Move `security.cert.env.InvalidPtr` out of `alpha` (PR #71912)

2023-11-24 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 closed https://github.com/llvm/llvm-project/pull/71912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add missing LinkageSpec case to getCursorKindForDecl (PR #72401)

2023-11-24 Thread Sebastian Poeplau via cfe-commits
https://github.com/sebastianpoeplau updated https://github.com/llvm/llvm-project/pull/72401 >From df8bfc2cdb1488d3ad037ea26bad48e658e5d3c8 Mon Sep 17 00:00:00 2001 From: Matthieu Eyraud Date: Wed, 17 Aug 2022 19:22:53 +0200 Subject: [PATCH] [clang] Add missing LinkageSpec case to getCursorKindF

[clang] [clang] Add missing LinkageSpec case to getCursorKindForDecl (PR #72401)

2023-11-24 Thread Sebastian Poeplau via cfe-commits
sebastianpoeplau wrote: I've added an entry to the release notes. https://github.com/llvm/llvm-project/pull/72401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Classify vector types in __builtin_classify_type (PR #73299)

2023-11-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/73299 None >From 6cfc5a63c2f8c3346fa3272c826074fa74da5e3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 24 Nov 2023 10:09:12 +0100 Subject: [PATCH] [clang] Classify vector types in __builtin

[clang] [clang] Classify vector types in __builtin_classify_type (PR #73299)

2023-11-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/73299.diff 5 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+2-2) - (modified) clang/lib/AST/ExprConstShared.h (+2-1) - (modified) cla

[clang] [clang] Print static_assert values of arithmetic binary operators (PR #71671)

2023-11-24 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/71671 >From 0724e6cdf2cc532a7b29eff9162265b6845ffef4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 8 Nov 2023 13:32

[clang] 25b5e5c - Update links in AttrDocs.td for coro_lifetimebound

2023-11-24 Thread via cfe-commits
Author: Utkarsh Saxena Date: 2023-11-24T10:18:24+01:00 New Revision: 25b5e5c4e9a39a86ca3c1a05ad6eae33771ab052 URL: https://github.com/llvm/llvm-project/commit/25b5e5c4e9a39a86ca3c1a05ad6eae33771ab052 DIFF: https://github.com/llvm/llvm-project/commit/25b5e5c4e9a39a86ca3c1a05ad6eae33771ab052.diff

[clang] 59edb43 - clang/APINotes: squelch a -Wparantheses warning (NFC)

2023-11-24 Thread Ramkumar Ramachandra via cfe-commits
Author: Ramkumar Ramachandra Date: 2023-11-24T09:43:37Z New Revision: 59edb432256064ee4f66c3a30fd4875030c5166b URL: https://github.com/llvm/llvm-project/commit/59edb432256064ee4f66c3a30fd4875030c5166b DIFF: https://github.com/llvm/llvm-project/commit/59edb432256064ee4f66c3a30fd4875030c5166b.dif

[clang] [analyzer] Switch to PostStmt callbacks in ArrayBoundV2 (PR #72107)

2023-11-24 Thread via cfe-commits
@@ -34,20 +34,37 @@ using llvm::formatv; namespace { enum OOB_Kind { OOB_Precedes, OOB_Exceeds, OOB_Taint }; -class ArrayBoundCheckerV2 : -public Checker { +struct Messages { + std::string Short, Full; +}; + +class ArrayBoundCheckerV2 : public Checker, +

[clang] [llvm] [SME2] Add LUTI2 and LUTI4 single Builtins and Intrinsics (PR #73304)

2023-11-24 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau created https://github.com/llvm/llvm-project/pull/73304 See https://github.com/ARM-software/acle/pull/217 Patch by: Hassnaa Hamdi >From bca5297fe897edf6faf51ffde3e8fe1baa26b148 Mon Sep 17 00:00:00 2001 From: Matt Devereau Date: Mon, 20 Nov 2023 15:50:28 + Sub

[clang] [llvm] [SME2] Add LUTI2 and LUTI4 single Builtins and Intrinsics (PR #73304)

2023-11-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: Matthew Devereau (MDevereau) Changes See https://github.com/ARM-software/acle/pull/217 Patch by: Hassnaa Hamdi --- Patch is 24.66 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm

[clang] [llvm] [SME2] Add LUTI2 and LUTI4 single Builtins and Intrinsics (PR #73304)

2023-11-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir @llvm/pr-subscribers-clang Author: Matthew Devereau (MDevereau) Changes See https://github.com/ARM-software/acle/pull/217 Patch by: Hassnaa Hamdi --- Patch is 24.66 KiB, truncated to 20.00 KiB below, full version: http

[clang] [llvm] [SME2] Add LUTI2 and LUTI4 double Builtins and Intrinsics (PR #73305)

2023-11-24 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau created https://github.com/llvm/llvm-project/pull/73305 See https://github.com/ARM-software/acle/pull/217 Patch by: Hassnaa Hamdi >From 5aba2f1d2fe34f721a8e85eef6eecc25cb60851f Mon Sep 17 00:00:00 2001 From: Matt Devereau Date: Mon, 20 Nov 2023 15:50:28 + Sub

[clang] [llvm] [SME2] Add LUTI2 and LUTI4 double Builtins and Intrinsics (PR #73305)

2023-11-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Matthew Devereau (MDevereau) Changes See https://github.com/ARM-software/acle/pull/217 Patch by: Hassnaa Hamdi --- Patch is 39.12 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-pr

[clang] [llvm] [SME2] Add LUTI2 and LUTI4 double Builtins and Intrinsics (PR #73305)

2023-11-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matthew Devereau (MDevereau) Changes See https://github.com/ARM-software/acle/pull/217 Patch by: Hassnaa Hamdi --- Patch is 39.12 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-proj

[llvm] [clang] [SME2] Add LUTI2 and LUTI4 double Builtins and Intrinsics (PR #73305)

2023-11-24 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 6b87d84ff45d03c244e7511fba9359776ce27977 5aba2f1d2fe34f721a8e85eef6eecc25cb60851f --

[clang] [analyzer] Switch to PostStmt callbacks in ArrayBoundV2 (PR #72107)

2023-11-24 Thread via cfe-commits
DonatNagyE wrote: > Note that &array[idx] is perfectly valid code when `idx == number of > elements`. And it is relatively common to do that when one is using STL > algorithms on arrays: > > ``` > auto it = std::find(&array[0], &array[size], foo); > ``` > > Of course, one could use the `begin/

[clang] [analyzer] Switch to PostStmt callbacks in ArrayBoundV2 (PR #72107)

2023-11-24 Thread via cfe-commits
@@ -64,6 +100,28 @@ double arrayInStructPtr(struct vec *pv) { // expected-note@-2 {{Access of the field 'elems' at index 64, while it holds only 64 'double' elements}} } +struct item { + int a, b; +} itemArray[20] = {0}; + +int structOfArrays(void) { Donat

[clang] [clang] Classify vector types in __builtin_classify_type (PR #73299)

2023-11-24 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/73299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 076ec9f - Fix build failure on certain bots

2023-11-24 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2023-11-24T11:39:16+01:00 New Revision: 076ec9f5f5bf03983f43f703e3f9d4600bad9653 URL: https://github.com/llvm/llvm-project/commit/076ec9f5f5bf03983f43f703e3f9d4600bad9653 DIFF: https://github.com/llvm/llvm-project/commit/076ec9f5f5bf03983f43f703e3f9d4600bad9653.dif

[clang] [llvm] [SME2] Add LUTI2 and LUTI4 quad Builtins and Intrinsics (PR #73317)

2023-11-24 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau created https://github.com/llvm/llvm-project/pull/73317 See https://github.com/ARM-software/acle/pull/217 Patch by: Hassnaa Hamdi >From f5b909e24e3cea49d98b40797880e4329a7a1e4f Mon Sep 17 00:00:00 2001 From: Matt Devereau Date: Mon, 20 Nov 2023 15:50:28 + Sub

[clang] [llvm] [SME2] Add LUTI2 and LUTI4 quad Builtins and Intrinsics (PR #73317)

2023-11-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-backend-aarch64 Author: Matthew Devereau (MDevereau) Changes See https://github.com/ARM-software/acle/pull/217 Patch by: Hassnaa Hamdi --- Patch is 51.35 KiB, truncated to 20.00 KiB below, full versio

[clang] [clang][ASTImporter] Fix import of SubstTemplateTypeParmType in return type of function. (PR #69724)

2023-11-24 Thread via cfe-commits
=?utf-8?q?Bal=C3=A1zs_K=C3=A9ri?= Message-ID: In-Reply-To: https://github.com/DonatNagyE approved this pull request. LGTM, congratulations for catching this corner case! https://github.com/llvm/llvm-project/pull/69724 ___ cfe-commits mailing list cf

[clang] [clang][Interp] Implement __builtin_bit_cast (PR #68288)

2023-11-24 Thread via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -73,6 +73,74 @@ template class OptionScope final { } // namespace interp }

[clang] [clang][Interp] Implement __builtin_bit_cast (PR #68288)

2023-11-24 Thread via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -1561,6 +1576,59 @@ template bool Cast(InterpState &S, CodePtr OpPC) { r

[clang] [clang][Interp] Implement __builtin_bit_cast (PR #68288)

2023-11-24 Thread via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: @@ -134,6 +141,10 @@ class Floating final {

[clang] [clang][Interp] Implement __builtin_bit_cast (PR #68288)

2023-11-24 Thread via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -0,0 +1,455 @@ +//===--- InterpBitcast.cpp - Interpreter for the constexpr VM

[clang] [clang][Interp] Implement __builtin_bit_cast (PR #68288)

2023-11-24 Thread via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -0,0 +1,455 @@ +//===--- InterpBitcast.cpp - Interpreter for the constexpr VM

[clang] [clang][Interp] Implement __builtin_bit_cast (PR #68288)

2023-11-24 Thread via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -66,6 +67,12 @@ class Boolean final { Boolean toUnsigned() const { return

[clang] [clang][Interp] Implement __builtin_bit_cast (PR #68288)

2023-11-24 Thread via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: @@ -9,14 +9,15 @@ #ifndef LLVM_CLANG_AST_INT

[clang] [clang][Interp] Implement __builtin_bit_cast (PR #68288)

2023-11-24 Thread via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -0,0 +1,455 @@ +//===--- InterpBitcast.cpp - Interpreter for the constexpr VM

[clang] [clang][Interp] Implement __builtin_bit_cast (PR #68288)

2023-11-24 Thread via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -0,0 +1,455 @@ +//===--- InterpBitcast.cpp - Interpreter for the constexpr VM

[clang] [llvm] [SME2] Add LUTI2 and LUTI4 double Builtins and Intrinsics (PR #73305)

2023-11-24 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau updated https://github.com/llvm/llvm-project/pull/73305 >From 5aba2f1d2fe34f721a8e85eef6eecc25cb60851f Mon Sep 17 00:00:00 2001 From: Matt Devereau Date: Mon, 20 Nov 2023 15:50:28 + Subject: [PATCH 1/2] [SME2] Add LUTI2 and LUTI4 double Builtins and Intrinsics

[clang] [clang][ASTImporter] Improve structural equivalence of overloadable operators. (PR #72242)

2023-11-24 Thread via cfe-commits
https://github.com/DonatNagyE commented: As you write that unifying these different but equivalent expressions could've unintended consequences, perhaps you should check the effects of this change on CTU analysis of modern (a.k.a. crazy) C++ projects (or publish the results if you already did

[clang] [clang][ASTImporter] Improve structural equivalence of overloadable operators. (PR #72242)

2023-11-24 Thread via cfe-commits
@@ -437,12 +439,67 @@ class StmtComparer { }; } // namespace +static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, + const UnaryOperator *E1, + const CXXOperatorCallExpr *E2) { + re

[clang] [clang][ASTImporter] Improve structural equivalence of overloadable operators. (PR #72242)

2023-11-24 Thread via cfe-commits
@@ -2252,6 +2252,176 @@ TEST_F(StructuralEquivalenceStmtTest, UnaryOperatorDifferentOps) { EXPECT_FALSE(testStructuralMatch(t)); } +TEST_F(StructuralEquivalenceStmtTest, + CXXOperatorCallExprVsUnaryBinaryOperator) { + auto t = makeNamedDecls( + R"( + templa

[clang] [clang][ASTImporter] Improve structural equivalence of overloadable operators. (PR #72242)

2023-11-24 Thread via cfe-commits
https://github.com/DonatNagyE edited https://github.com/llvm/llvm-project/pull/72242 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Add -Wswitch-default warning option (PR #73077)

2023-11-24 Thread via cfe-commits
cor3ntin wrote: I'd like other to weight in on that but even though GCC has that flag (which clang recognizes and ignores), I'm, a bit reluctant to add a warning for it. We have a policy to avoid off-by-default warnings most of the time... but more importantly, whether switch statements should

[clang] [analyzer] Use AllocaRegion in MallocChecker (PR #72402)

2023-11-24 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: DonatNagyE wrote: > I think the original `alloca(0)` warning message might be clearer/easier to > understand. The difficulty is that we switch from the `SymbolicRegion` that represents the heap allocation to an `AllocaRegion` that doesn't have

[clang] cf1bde3 - [clang] Fix sorting module headers (#73146)

2023-11-24 Thread via cfe-commits
Author: Tulio Magno Quites Machado Filho Date: 2023-11-24T09:17:21-03:00 New Revision: cf1bde33423da5eb9b7dc95daac4aada3167de3c URL: https://github.com/llvm/llvm-project/commit/cf1bde33423da5eb9b7dc95daac4aada3167de3c DIFF: https://github.com/llvm/llvm-project/commit/cf1bde33423da5eb9b7dc95daac

[clang] [clang] Fix sorting module headers (PR #73146)

2023-11-24 Thread Tulio Magno Quites Machado Filho via cfe-commits
https://github.com/tuliom closed https://github.com/llvm/llvm-project/pull/73146 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Add fix vector types to header into SVE (PR #73258)

2023-11-24 Thread Paul Walker via cfe-commits
paulwalker-arm wrote: Bike shedding here but shouldn't the header be arm_vector_types.h (i.e. plural)? or even arm_acle_types.h if we think it might grow more uses. https://github.com/llvm/llvm-project/pull/73258 ___ cfe-commits mailing list cfe-commi

[clang] [analyzer] Use AllocaRegion in MallocChecker (PR #72402)

2023-11-24 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: https://github.com/DonatNagyE updated https://github.com/llvm/llvm-project/pull/72402 >From 703c06e2d6781c45e55d7021929a06cdb0275a14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Wed, 15 Nov 2023 16

[clang] [llvm] [SVE2.1][Clang][LLVM]Int/FP reduce builtin in Clang and LLVM intrinsic (PR #69926)

2023-11-24 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 d95d1c382bfc6abdf4b7764d57ba7e6098e98f5b 436743700c92fc301a0d7df8b92d8a03cd28eecb --

[clang] [clang] Fix sorting header paths (PR #73323)

2023-11-24 Thread Tulio Magno Quites Machado Filho via cfe-commits
https://github.com/tuliom created https://github.com/llvm/llvm-project/pull/73323 This code was initially written in commit 7ff29148ac7883881e62dc9e1714057c68ad4436 with the intention of sorting headers according to their path. At the time, the path was saved in field NameAsWritten of Module::

[clang] [clang] Fix sorting header paths (PR #73323)

2023-11-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules @llvm/pr-subscribers-clang Author: Tulio Magno Quites Machado Filho (tuliom) Changes This code was initially written in commit 7ff29148ac7883881e62dc9e1714057c68ad4436 with the intention of sorting headers according to their path. At the t

[llvm] [clang] [SystemZ] Properly support 16 byte atomic int/fp types and ops. (PR #73134)

2023-11-24 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand commented: Not sure about the is_lock_free results, see inline comments. What does recent GCC return for those? https://github.com/llvm/llvm-project/pull/73134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[llvm] [clang] [SystemZ] Properly support 16 byte atomic int/fp types and ops. (PR #73134)

2023-11-24 Thread Ulrich Weigand via cfe-commits
@@ -0,0 +1,71 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// RUN: %clang_cc1 -triple s390x-linux-gnu -O1 -emit-llvm %s -o - | FileCheck %s +// +// Test __atomic_is_lock_free() for __int128 with default alignment (8 +// bytes), atomic alignme

[clang] [llvm] [SystemZ] Properly support 16 byte atomic int/fp types and ops. (PR #73134)

2023-11-24 Thread Ulrich Weigand via cfe-commits
@@ -0,0 +1,71 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// RUN: %clang_cc1 -triple s390x-linux-gnu -O1 -emit-llvm %s -o - | FileCheck %s +// +// Test __atomic_is_lock_free() for __int128 with default alignment (8 +// bytes), atomic alignme

[clang] [llvm] [SystemZ] Properly support 16 byte atomic int/fp types and ops. (PR #73134)

2023-11-24 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand edited https://github.com/llvm/llvm-project/pull/73134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SystemZ] Properly support 16 byte atomic int/fp types and ops. (PR #73134)

2023-11-24 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand edited https://github.com/llvm/llvm-project/pull/73134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fix: C++ empty record with align lead to va_list out of sync (PR #72197)

2023-11-24 Thread via cfe-commits
@@ -307,7 +307,12 @@ AArch64ABIInfo::classifyArgumentType(QualType Ty, bool IsVariadic, // 0. if (IsEmpty && Size == 0) return ABIArgInfo::getIgnore(); -return ABIArgInfo::getDirect(llvm::Type::getInt8Ty(getVMContext())); +// An empty struct can have size

[clang] fix: C++ empty record with align lead to va_list out of sync (PR #72197)

2023-11-24 Thread via cfe-commits
https://github.com/hstk30-hw edited https://github.com/llvm/llvm-project/pull/72197 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e8cd401 - Remove extraneous ` in AttrDocs.td

2023-11-24 Thread via cfe-commits
Author: Utkarsh Saxena Date: 2023-11-24T14:21:45+01:00 New Revision: e8cd401eaefe8113cae4b4f85ee78600925a9481 URL: https://github.com/llvm/llvm-project/commit/e8cd401eaefe8113cae4b4f85ee78600925a9481 DIFF: https://github.com/llvm/llvm-project/commit/e8cd401eaefe8113cae4b4f85ee78600925a9481.diff

[clang] [llvm] [SystemZ] Properly support 16 byte atomic int/fp types and ops. (PR #73134)

2023-11-24 Thread Jonas Paulsson via cfe-commits
@@ -0,0 +1,71 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// RUN: %clang_cc1 -triple s390x-linux-gnu -O1 -emit-llvm %s -o - | FileCheck %s +// +// Test __atomic_is_lock_free() for __int128 with default alignment (8 +// bytes), atomic alignme

[clang] [llvm] [SystemZ] Properly support 16 byte atomic int/fp types and ops. (PR #73134)

2023-11-24 Thread Jonas Paulsson via cfe-commits
@@ -0,0 +1,71 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// RUN: %clang_cc1 -triple s390x-linux-gnu -O1 -emit-llvm %s -o - | FileCheck %s +// +// Test __atomic_is_lock_free() for __int128 with default alignment (8 +// bytes), atomic alignme

[clang] [Driver] Support -mcmodel= for LoongArch (PR #72514)

2023-11-24 Thread Lu Weining via cfe-commits
https://github.com/SixWeining edited https://github.com/llvm/llvm-project/pull/72514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Emit TBAA info for enums in C (PR #73326)

2023-11-24 Thread David Sherwood via cfe-commits
https://github.com/david-arm created https://github.com/llvm/llvm-project/pull/73326 When emitting TBAA information for enums in C code we currently just treat the data as an 'omnipotent char'. However, with C strict aliasing this means we fail to optimise certain cases. For example, in the SP

[clang] [Clang] Emit TBAA info for enums in C (PR #73326)

2023-11-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: David Sherwood (david-arm) Changes When emitting TBAA information for enums in C code we currently just treat the data as an 'omnipotent char'. However, with C strict aliasing this means we fail to optimise certain cases. For exam

[clang] [Clang] Emit TBAA info for enums in C (PR #73326)

2023-11-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: David Sherwood (david-arm) Changes When emitting TBAA information for enums in C code we currently just treat the data as an 'omnipotent char'. However, with C strict aliasing this means we fail to optimise certain cases. For example, in

[clang] [Clang] Emit TBAA info for enums in C (PR #73326)

2023-11-24 Thread David Sherwood via cfe-commits
https://github.com/david-arm edited https://github.com/llvm/llvm-project/pull/73326 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Emit TBAA info for enums in C (PR #73326)

2023-11-24 Thread David Sherwood via cfe-commits
@@ -196,11 +196,14 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) { // Enum types are distinct types. In C++ they have "underlying types", // however they aren't related for TBAA. if (const EnumType *ETy = dyn_cast(Ty)) { +if (!Features.CPlusPlus) +

[clang] 3d8a910 - [clang][ASTImporter] Fix import of SubstTemplateTypeParmType in return type of function. (#69724)

2023-11-24 Thread via cfe-commits
Author: Balázs Kéri Date: 2023-11-24T14:35:10+01:00 New Revision: 3d8a9105d7e0e4baa744428e55d1c2462803118a URL: https://github.com/llvm/llvm-project/commit/3d8a9105d7e0e4baa744428e55d1c2462803118a DIFF: https://github.com/llvm/llvm-project/commit/3d8a9105d7e0e4baa744428e55d1c2462803118a.diff L

[clang] [clang][ASTImporter] Fix import of SubstTemplateTypeParmType in return type of function. (PR #69724)

2023-11-24 Thread Balázs Kéri via cfe-commits
https://github.com/balazske closed https://github.com/llvm/llvm-project/pull/69724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SystemZ] Properly support 16 byte atomic int/fp types and ops. (PR #73134)

2023-11-24 Thread Jonas Paulsson via cfe-commits
@@ -0,0 +1,71 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// RUN: %clang_cc1 -triple s390x-linux-gnu -O1 -emit-llvm %s -o - | FileCheck %s +// +// Test __atomic_is_lock_free() for __int128 with default alignment (8 +// bytes), atomic alignme

[clang] [analyzer] Switch to PostStmt callbacks in ArrayBoundV2 (PR #72107)

2023-11-24 Thread via cfe-commits
@@ -34,20 +34,37 @@ using llvm::formatv; namespace { enum OOB_Kind { OOB_Precedes, OOB_Exceeds, OOB_Taint }; -class ArrayBoundCheckerV2 : -public Checker { +struct Messages { + std::string Short, Full; +}; + +class ArrayBoundCheckerV2 : public Checker, +

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-24 Thread Michael Klemm via cfe-commits
@@ -0,0 +1,13 @@ +! RUN: %clang -x c -o %t.c-part -c %s.c-part mjklemm wrote: That has worked. I haven't thought about that at all, so many thanks for the suggestion. This greatly simplifies things! https://github.com/llvm/llvm-project/pull/73124

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-24 Thread Michael Klemm via cfe-commits
https://github.com/mjklemm updated https://github.com/llvm/llvm-project/pull/73124 >From ba38aec7ac04c63fd5167908fe7f91d6ac7bceed Mon Sep 17 00:00:00 2001 From: Michael Klemm Date: Wed, 22 Nov 2023 14:22:20 +0100 Subject: [PATCH 1/9] Let the linker fail on multiple definitions of main() --- c

[clang] [clang] Classify vector types in __builtin_classify_type (PR #73299)

2023-11-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/73299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a79a561 - [clang] Classify vector types in __builtin_classify_type (#73299)

2023-11-24 Thread via cfe-commits
Author: Timm Baeder Date: 2023-11-24T14:40:58+01:00 New Revision: a79a5611bd18baab02ea6ad31f7b6b767f4028a7 URL: https://github.com/llvm/llvm-project/commit/a79a5611bd18baab02ea6ad31f7b6b767f4028a7 DIFF: https://github.com/llvm/llvm-project/commit/a79a5611bd18baab02ea6ad31f7b6b767f4028a7.diff L

[clang] [flang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-24 Thread Michael Klemm via cfe-commits
@@ -122,6 +122,7 @@ # the build directory holding that tool. tools = [ ToolSubst("%flang", command=FindTool("flang-new"), unresolved="fatal"), +ToolSubst("%clang", command=FindTool("clang"), unresolved="fatal"), mjklemm wrote: I have removed this in fa

[clang] [clang][ASTImporter] Improve structural equivalence of overloadable operators. (PR #72242)

2023-11-24 Thread Balázs Kéri via cfe-commits
@@ -437,12 +439,67 @@ class StmtComparer { }; } // namespace +static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, + const UnaryOperator *E1, + const CXXOperatorCallExpr *E2) { + re

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-24 Thread Michael Klemm via cfe-commits
@@ -0,0 +1,8 @@ +#include + +int main(int argc, char * argv[]) { +// Irrelevant what to do in here. +// Test is supposed to fail at link time. +printf("Hello from C [%s]\n", __FUNCTION__); mjklemm wrote: This is also gone with the move to an LL file.

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-24 Thread Michael Klemm via cfe-commits
@@ -0,0 +1,15 @@ +! UNSUPPORTED: system-windows + +! RUN: %clang -o %t.c-object -c %S/Inputs/main_dupes.c mjklemm wrote: This change is also gone now and has been removed. https://github.com/llvm/llvm-project/pull/73124 __

[clang] [clang] Avoid memcopy for small structure with padding under -ftrivial-auto-var-init (PR #71677)

2023-11-24 Thread via cfe-commits
serge-sans-paille wrote: > @serge-sans-paille those test failures were also highlighted by the precommit > checks, would be good to check those before landing I did validate locally, but I forgot I had some targets disabled :-/ https://github.com/llvm/llvm-project/pull/71677 __

[clang] [clang][ASTImporter] Improve structural equivalence of overloadable operators. (PR #72242)

2023-11-24 Thread Balázs Kéri via cfe-commits
https://github.com/balazske edited https://github.com/llvm/llvm-project/pull/72242 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTImporter] Improve structural equivalence of overloadable operators. (PR #72242)

2023-11-24 Thread Balázs Kéri via cfe-commits
@@ -2252,6 +2252,176 @@ TEST_F(StructuralEquivalenceStmtTest, UnaryOperatorDifferentOps) { EXPECT_FALSE(testStructuralMatch(t)); } +TEST_F(StructuralEquivalenceStmtTest, + CXXOperatorCallExprVsUnaryBinaryOperator) { + auto t = makeNamedDecls( + R"( + templa

[llvm] [clang] ms inline asm: Fix {call,jmp} fptr (PR #73207)

2023-11-24 Thread Shengchen Kan via cfe-commits
https://github.com/KanRobert approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/73207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64][SME2] Add PEXT, PSEL builtins for SME2 (PR #72827)

2023-11-24 Thread Matthew Devereau via cfe-commits
@@ -1,10 +1,17 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py // REQUIRES: aarch64-registered-target -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -O1 -Werror -emit-llvm -o - %s | FileCheck %s -// RUN: %clang_cc1

[clang] [AArch64][SME2] Add PEXT, PSEL builtins for SME2 (PR #72827)

2023-11-24 Thread Matthew Devereau via cfe-commits
@@ -1859,19 +1859,28 @@ def SVBGRP : SInst<"svbgrp[_{d}]", "ddd", "UcUsUiUl", MergeNone, "aarch64_sv def SVBGRP_N : SInst<"svbgrp[_n_{d}]", "dda", "UcUsUiUl", MergeNone, "aarch64_sve_bgrp_x">; } +let TargetGuard = "sve2p1|sme" in { MDevereau wrote: ```s

[clang] [AArch64][SME2] Add PEXT, PSEL builtins for SME2 (PR #72827)

2023-11-24 Thread Matthew Devereau via cfe-commits
@@ -5,6 +5,11 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64-none-linux-gnu \ // RUN: -target-feature +sve2p1 -S -O1 -Werror -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64-none-li

[llvm] [clang] [SystemZ] Properly support 16 byte atomic int/fp types and ops. (PR #73134)

2023-11-24 Thread Jonas Paulsson via cfe-commits
https://github.com/JonPsson1 updated https://github.com/llvm/llvm-project/pull/73134 >From bf9b6b735c131833ec9457f23b72322fd50ef821 Mon Sep 17 00:00:00 2001 From: Jonas Paulsson Date: Fri, 3 Feb 2023 14:32:58 +0100 Subject: [PATCH 1/2] [SystemZ] Improve support for 16 byte atomic int/fp types

[llvm] [clang] [SystemZ] Properly support 16 byte atomic int/fp types and ops. (PR #73134)

2023-11-24 Thread Jonas Paulsson via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: %clang_cc1 -triple s390x-linux-gnu -O1 -emit-llvm %s -o - | FileCheck %s +// +// Test __atomic_is_lock_free() and __atomic_always_lock_free() for __int128 +// with 16 byte alignment. + +#include +#include + JonPsson1 wrote: The first

[llvm] [clang] [SystemZ] Properly support 16 byte atomic int/fp types and ops. (PR #73134)

2023-11-24 Thread Jonas Paulsson via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: %clang_cc1 -triple s390x-linux-gnu -O1 -emit-llvm %s -o - | FileCheck %s +// +// Test __atomic_is_lock_free() and __atomic_always_lock_free() for __int128 +// with 16 byte alignment. + +#include +#include + +__int128 Int128_Al16 __attribute__((aligned(

[llvm] [clang] [SystemZ] Properly support 16 byte atomic int/fp types and ops. (PR #73134)

2023-11-24 Thread Jonas Paulsson via cfe-commits
JonPsson1 wrote: Not sure about GCC here, as far as I can see, it is returning true for both of the 8-byte aligned cases in gnu-atomic_is_lock_free-i128-8Al.c, also now that the alignment is actually 8... GCC is returning true for all in gnu-atomic_is_lock_free-i128-16Al.c, except for except

[clang] [clang] Add missing LinkageSpec case to getCursorKindForDecl (PR #72401)

2023-11-24 Thread Sebastian Poeplau via cfe-commits
sebastianpoeplau wrote: By the way, I don't have permission to merge, so feel free to do it when you think it's ready. https://github.com/llvm/llvm-project/pull/72401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] [Clang] Emit TBAA info for enums in C (PR #73326)

2023-11-24 Thread Momchil Velikov via cfe-commits
@@ -196,11 +196,14 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) { // Enum types are distinct types. In C++ they have "underlying types", // however they aren't related for TBAA. if (const EnumType *ETy = dyn_cast(Ty)) { +if (!Features.CPlusPlus) +

[flang] [clang] [Flang][Clang] Add support for frame pointers in Flang Driver (PR #72146)

2023-11-24 Thread Kiran Chandramohan via cfe-commits
@@ -49,6 +49,26 @@ class CodeGenOptionsBase { class CodeGenOptions : public CodeGenOptionsBase { public: + /// The type of frame pointer used + enum class FramePointerKind { +None,// Omit all frame pointers. +NonLeaf, // Keep non-leaf frame pointers. +All,

[clang] [clang][analyzer] Support `fputs` in the StreamChecker (PR #73335)

2023-11-24 Thread Ben Shi via cfe-commits
https://github.com/benshi001 created https://github.com/llvm/llvm-project/pull/73335 None >From c59788f4b918c5335efe7444b8d588878565cb26 Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Fri, 24 Nov 2023 22:51:27 +0800 Subject: [PATCH] [clang][analyzer] Support `fputs` in the StreamChecker --- ..

[clang] [analyzer] Switch to PostStmt callbacks in ArrayBoundV2 (PR #72107)

2023-11-24 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: https://github.com/DonatNagyE updated https://github.com/llvm/llvm-project/pull/72107 >From ab102e949994a4462382e4c10c0153d61fb00306 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Mon, 13 Nov 2023 11

[clang] [clang][analyzer] Support `fputs` in the StreamChecker (PR #73335)

2023-11-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 @llvm/pr-subscribers-clang Author: Ben Shi (benshi001) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/73335.diff 4 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp (+43-18) -

[clang] [analyzer] Switch to PostStmt callbacks in ArrayBoundV2 (PR #72107)

2023-11-24 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: https://github.com/DonatNagyE edited https://github.com/llvm/llvm-project/pull/72107 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [Clang] Fix `-Wdocumentation` warning (NFC) (PR #73243)

2023-11-24 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/73243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   >