[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] 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] [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 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 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] [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] [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] [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 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

[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] [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] 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] [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] 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] [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] [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

[clang] 18a5ca1 - [Clang] Fix `-Wdocumentation` warning (NFC)

2023-11-24 Thread via cfe-commits
Author: Egor Zhdan Date: 2023-11-24T15:41:37Z New Revision: 18a5ca14d16e6e5142fc5527accdfb10c1a22820 URL: https://github.com/llvm/llvm-project/commit/18a5ca14d16e6e5142fc5527accdfb10c1a22820 DIFF: https://github.com/llvm/llvm-project/commit/18a5ca14d16e6e5142fc5527accdfb10c1a22820.diff LOG: [C

[clang] 7091ca1 - [clang] Add missing LinkageSpec case to getCursorKindForDecl (#72401)

2023-11-24 Thread via cfe-commits
Author: Sebastian Poeplau Date: 2023-11-24T21:41:17+05:30 New Revision: 7091ca1ae3a87479b6febdf1c3a324d707c633d9 URL: https://github.com/llvm/llvm-project/commit/7091ca1ae3a87479b6febdf1c3a324d707c633d9 DIFF: https://github.com/llvm/llvm-project/commit/7091ca1ae3a87479b6febdf1c3a324d707c633d9.d

[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 , =?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?=

[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 , =?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-

[clang] [clang] Use the materialized temporary's type while creating the APValue (PR #73355)

2023-11-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes See https://github.com/llvm/llvm-project/issues/72025 for the bug and its diagnosis. --- Full diff: https://github.com/llvm/llvm-project/pull/73355.diff 3 Files Affected: - (modified) clang/docs/ReleaseNo

[clang] [clang] Use the materialized temporary's type while creating the APValue (PR #73355)

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 d896b1f5a614daef1c3aa65cb3521ec82bc728d5 3ff1b189cf55d3705b2823dc39eaaf710fa26541 --

[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 , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: DonatNagyE wrote: I updated the PR to allow `&array[size]` for creating the after-the-end pointer of an array. My implementation interprets this corner case narrowly to l

[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][NFC] Adjust TBAA Base Info API (PR #73263)

2023-11-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nathan Sidwell (urnathan) Changes I noticed a couple of minor issues with CodeGenTBAA::getBaseTypeInfo. 1) isValidBaseType explicitly checks for a reference type to return false, but then also returns false for all non-record types. Just

[clang] [clang][NFC] Adjust TBAA Base Info API (PR #73263)

2023-11-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Nathan Sidwell (urnathan) Changes I noticed a couple of minor issues with CodeGenTBAA::getBaseTypeInfo. 1) isValidBaseType explicitly checks for a reference type to return false, but then also returns false for all non-record type

[clang] [clang] Avoid recalculating TBAA base type info (PR #73264)

2023-11-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: Nathan Sidwell (urnathan) Changes I noticed that TBAA BaseTypeMetadataCache can legitimately store null values, but it also uses that to mean 'no entry'. Thus nullptr entries get continually recalculated

[clang] [clang][ExtractAPI] Add support for blocks in declaration fragments (PR #73369)

2023-11-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Daniel Grumberg (daniel-grumberg) Changes Ensure that block types get represented correctly in declaration fragments, as block parameter names are important for documentation clients we need a separate system from getFragmentsForType in o

[clang] 85b2e9c - [Clang][OpenMP] Emit unsupported directive error (#70233)

2023-11-24 Thread via cfe-commits
Author: Raymond Chang Date: 2023-11-24T16:28:32-05:00 New Revision: 85b2e9c02295a54100d41207cddce5908b8c513f URL: https://github.com/llvm/llvm-project/commit/85b2e9c02295a54100d41207cddce5908b8c513f DIFF: https://github.com/llvm/llvm-project/commit/85b2e9c02295a54100d41207cddce5908b8c513f.diff

[clang] [clang-linker-wrapper] Re-use type returned from 'PointerType::getUnqual(C)' (NFC) (PR #73374)

2023-11-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Youngsuk Kim (JOE1994) Changes Multiple calls to `PointerType::getUnqual(C)`, and calls to `Type::getPointerTo(AddrSpace=0)` on them all result in the same type. Clean them up to re-use the same `PtrTy` variable within function `createRe

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

2023-11-24 Thread via cfe-commits
Author: serge-sans-paille Date: 2023-11-25T00:11:20+01:00 New Revision: afe8b93ffdfef5d8879e1894b9d7dda40dee2b8d URL: https://github.com/llvm/llvm-project/commit/afe8b93ffdfef5d8879e1894b9d7dda40dee2b8d DIFF: https://github.com/llvm/llvm-project/commit/afe8b93ffdfef5d8879e1894b9d7dda40dee2b8d.d

[clang] [clang][ASTMatcher] Add matchers for CXXFoldExpr (PR #71245)

2023-11-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Julian Schmidt (5chmidti) Changes Adds support for the following matchers related to `CXXFoldExpr`: `cxxFoldExpr`, `callee`, `hasInit`, `hasPattern`, `isRightFold`, `isLeftFold`, `isUnaryFold`, `isBinaryFold`, `hasOperator`, `hasLHS`,

[clang] [clang-linker-wrapper] Re-use type returned from 'PointerType::getUnqual(C)' (NFC) (PR #73374)

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 12563ea6403f6f5a467862732b92db3517626cd2 3d46f90bc8cf5d94ea5adae80bc9c96e11958b32 --

[clang] bc85284 - [clang-linker-wrapper] Re-use type returned from 'PointerType::getUnqual(C)' (NFC) (#73374)

2023-11-24 Thread via cfe-commits
Author: Youngsuk Kim Date: 2023-11-24T19:22:02-05:00 New Revision: bc85284273ea1e6efbf7367f736f7982459c652b URL: https://github.com/llvm/llvm-project/commit/bc85284273ea1e6efbf7367f736f7982459c652b DIFF: https://github.com/llvm/llvm-project/commit/bc85284273ea1e6efbf7367f736f7982459c652b.diff

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

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 5ac5c0e7d1007745456329dbcf05aa15b50c08c8 c015c1aa18e1048071dc59e637b7e20707b9ae83 --

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2023-11-24 Thread via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/73376 This is a fairly simple extension, but makes the life for people who have to support C++03 a lot easier. As a nice bonus, this also improves diagnostics, since lambdas are now properly recognized when parsing C

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2023-11-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (philnik777) Changes This is a fairly simple extension, but makes the life for people who have to support C++03 a lot easier. As a nice bonus, this also improves diagnostics, since lambdas are now properly recognized when parsing C++03

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2023-11-24 Thread via cfe-commits
@@ -1030,6 +1030,7 @@ def err_capture_default_first : Error< def ext_decl_attrs_on_lambda : ExtWarn< "%select{an attribute specifier sequence|%0}1 in this position " "is a C++23 extension">, InGroup; +def ext_lambda : ExtWarn<"lambdas are a C++11 extension">, InGroup; -

[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 updated https://github.com/llvm/llvm-project/pull/72197 >From 2c8d9c8dcd9780749b788bc3029fc45373007ae0 Mon Sep 17 00:00:00 2001 From: hstk30-hw Date: Sat, 18 Nov 2023 11:00:29 + Subject: [PATCH] fix: empty record size > 64 with align let va_list get out of sync

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

2023-11-25 Thread via cfe-commits
hstk30-hw wrote: > For example, Folks at google advise against using `default` when switching > over an enum https://abseil.io/tips/147. > Misra requires a default statement, but makes an exception for enums. (6.4.6 > in misra 2008) I see it's easy to implement in LLVM like clang tidy (not war

[clang] [clang-format] Fix a bug in formating `#define A x:` (PR #73220)

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

[clang] Do not report -Wasm-operand-widths for Aarch64 ilp32 operands (PR #73385)

2023-11-25 Thread via cfe-commits
https://github.com/joyhou-hw created https://github.com/llvm/llvm-project/pull/73385 Since width of pointer type is 32 bits in ILP32 while memory instruction shall 'x' registers. msr/mrs likewise. Now Wasm-operand-widths in ILP32 will warning below asm code with a WRONG massage. ``` void a

[clang] Do not report -Wasm-operand-widths for Aarch64 ilp32 operands (PR #73385)

2023-11-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-backend-aarch64 Author: None (joyhou-hw) Changes Since width of pointer type is 32 bits in ILP32 while memory instruction shall 'x' registers. msr/mrs likewise. Now Wasm-operand-widths in ILP32 will warning below asm code wit

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2023-11-25 Thread via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/73376 >From a53b7e23c8e37227cda1cea8d87800ca7ac432d1 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Sat, 25 Nov 2023 04:00:57 +0100 Subject: [PATCH] [clang] Accept lambdas in C++03 as an extensions This is a

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2023-11-25 Thread via cfe-commits
@@ -3,8 +3,8 @@ extern groupshared float f; extern float groupshared f; // Ok, redeclaration? -// NOTE:lambda is not enabled except for hlsl202x. -// expected-error@+2 {{expected expression}} +// expected-warning@+3 {{lambdas are a C++11 extension}} +// expected-error@+2 {{

[clang] [Driver] Remove support for FreeBSD 11.x (PR #73392)

2023-11-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Brad Smith (brad0) Changes Now that FreeBSD 14.0 has been released make the 12.x branch the oldest supported releases. -fuse-init-array defaults to on. DWARF 4 is now the default. --- Full diff: https://github.com/llvm/llvm-project/

[clang-tools-extra] [clang] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-11-25 Thread via cfe-commits
=?utf-8?q?F=C3=A9lix-Antoine?= Constantin, =?utf-8?q?F=C3=A9lix-Antoine?= Constantin, =?utf-8?q?F=C3=A9lix-Antoine?= Constantin, =?utf-8?q?F=C3=A9lix-Antoine?= Constantin Message-ID: In-Reply-To: Cj09PT09PT09PT09PT09PT0KQEAgLTAsMCArMSwyNSBAQAorLi4gdGl0bGU6OiBjbGFuZy10aWR5 IC0gcmVhZGFiaWxpdHktcmVk

[clang] Reland "[clang][Sema] Use original template pattern when declaring implicit deduction guides for nested template classes" (PR #73087)

2023-11-25 Thread via cfe-commits
https://github.com/antangelo closed https://github.com/llvm/llvm-project/pull/73087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] bee78b8 - Reland "[clang][Sema] Use original template pattern when declaring implicit deduction guides for nested template classes" (#73087)

2023-11-25 Thread via cfe-commits
Author: antangelo Date: 2023-11-25T14:26:44-05:00 New Revision: bee78b88f8effdb378a809e0416988ce9c37f5ac URL: https://github.com/llvm/llvm-project/commit/bee78b88f8effdb378a809e0416988ce9c37f5ac DIFF: https://github.com/llvm/llvm-project/commit/bee78b88f8effdb378a809e0416988ce9c37f5ac.diff LOG

[clang-tools-extra] [llvm] [clang] Fix #35272: Don't replace typedefs in extern c scope (PR #69102)

2023-11-25 Thread via cfe-commits
https://github.com/Da-Viper updated https://github.com/llvm/llvm-project/pull/69102 >From 21156656433fb8d2dc5a805d97cbd20fa916fff9 Mon Sep 17 00:00:00 2001 From: Ezike Ebuka Date: Sun, 15 Oct 2023 11:39:42 +0100 Subject: [PATCH 1/8] Fix #35272: Don't replace typedefs in extern c scope --- ...

[libc] [llvm] [flang] [lld] [libcxx] [lldb] [libcxxabi] [clang] [flang] Pass Argv0 to getIntriniscDir and getOpenMPHeadersDir (PR #73254)

2023-11-25 Thread via cfe-commits
https://github.com/madanial0 updated https://github.com/llvm/llvm-project/pull/73254 >From 81d1e05dd084dd5bb88dab88d2f23008b8dc6cfb Mon Sep 17 00:00:00 2001 From: Mark Danial Date: Tue, 21 Nov 2023 12:18:40 -0500 Subject: [PATCH] Pass the correct path to getIntriniscDir and getOpenMPHeadersDir

[clang-tools-extra] [llvm] [clang] Fix #41439: Update the documentation with the correct information. (PR #69377)

2023-11-25 Thread via cfe-commits
https://github.com/Da-Viper updated https://github.com/llvm/llvm-project/pull/69377 >From 0e0a3e7ad1a0a7098e05a5164413369eaa58c55b Mon Sep 17 00:00:00 2001 From: Ezike Ebuka Date: Tue, 17 Oct 2023 20:49:47 +0100 Subject: [PATCH 1/2] Fix #41439: Update the documentation with the correct informa

[clang] [clang-format] Add BreakConcatenatedStrings option (PR #73432)

2023-11-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Closes #70451. --- Full diff: https://github.com/llvm/llvm-project/pull/73432.diff 7 Files Affected: - (modified) clang/docs/ClangFormatStyleOptions.rst (+15) - (modified) clang/docs/ReleaseNotes.rst (+

[clang-tools-extra] [llvm] [clang] Fix #41439: Update the documentation with the correct information. (PR #69377)

2023-11-26 Thread via cfe-commits
https://github.com/Da-Viper updated https://github.com/llvm/llvm-project/pull/69377 >From 0e0a3e7ad1a0a7098e05a5164413369eaa58c55b Mon Sep 17 00:00:00 2001 From: Ezike Ebuka Date: Tue, 17 Oct 2023 20:49:47 +0100 Subject: [PATCH 1/4] Fix #41439: Update the documentation with the correct informa

[clang] [clang] Non-object types are non-trivially relocatable (PR #69734)

2023-11-26 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/69734 ___ 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-26 Thread via cfe-commits
hstk30-hw wrote: OK, just delete the `return ABIArgInfo::getDirect(llvm::Type::getInt8Ty(getVMContext()));` from the empty struct codepath, let it fall through to the main path. Check it again, plz. https://github.com/llvm/llvm-project/pull/72197 ___

[clang] [clang-format] Add BreakConcatenatedStrings option (PR #73432)

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

[clang] [compiler-rt] [llvm] [flang] [clang-tools-extra] [Bazel][Clang Tidy] Include builtin headers with clang-tidy (PR #67626)

2023-11-26 Thread via cfe-commits
jathu wrote: @chapuni can you help my understand what you mean by those two suggestions by providing some examples? > construct the symlink-ed tree for one's convenience Isn't that what we are doing in this diff? We are producing the symlinked tree for the tool. https://github.com/llvm/llvm-

[clang] [Clang] Eagerly instantiate used constexpr function upon definition. (PR #73463)

2023-11-26 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/73463 Despite CWG2497 not being resolved, it is reasonable to expect the following code to compile (and which is supported by other compilers) ```cpp template constexpr T f(); constexpr int g() { return f(); } //

[clang] [Clang] Eagerly instantiate used constexpr function upon definition. (PR #73463)

2023-11-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes Despite CWG2497 not being resolved, it is reasonable to expect the following code to compile (and which is supported by other compilers) ```cpp template constexpr T f(); constexpr int g() { retu

[libc] [libcxx] [clang] [llvm] [compiler-rt] [flang] [Clang] Use correct base expression for counted_by field (#73168) (PR #73465)

2023-11-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Bill Wendling (bwendling) Changes I'll add some testcases later today. --- Patch is 31.10 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/73465.diff 4 Files Affected: - (modified) cla

[clang] a369a59 - [clang-format] Fix a bug in formating `#define A x:` (#73220)

2023-11-26 Thread via cfe-commits
Author: Owen Pan Date: 2023-11-26T16:20:19-08:00 New Revision: a369a5946f99254d56455f3deb0031199562c1dd URL: https://github.com/llvm/llvm-project/commit/a369a5946f99254d56455f3deb0031199562c1dd DIFF: https://github.com/llvm/llvm-project/commit/a369a5946f99254d56455f3deb0031199562c1dd.diff LOG:

[clang] 282201d - [Driver] Allow -e entry but reject -eentry (#72804)

2023-11-26 Thread via cfe-commits
Author: Fangrui Song Date: 2023-11-27T11:04:29+08:00 New Revision: 282201dc633e164042df0ae726a804c0aad46e50 URL: https://github.com/llvm/llvm-project/commit/282201dc633e164042df0ae726a804c0aad46e50 DIFF: https://github.com/llvm/llvm-project/commit/282201dc633e164042df0ae726a804c0aad46e50.diff

[clang-tools-extra] [clangd] Introduce reusable modules builder (PR #73483)

2023-11-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules @llvm/pr-subscribers-clangd Author: Chuanqi Xu (ChuanqiXu9) Changes This is a draft based on https://github.com/llvm/llvm-project/pull/66462. The main goal of the patch is to implement the TODO step 1: "reuse module files" across source

[clang-tools-extra] [clangd] Introduce reusable modules builder (PR #73483)

2023-11-26 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 e89324219acf3d799a86fed5651e492bbab4867c 052e2da0ede8cc72e22ad9ba75ddf2868e5fffe1 --

[clang] [clang][dataflow] Strengthen widening of boolean values. (PR #73484)

2023-11-26 Thread via cfe-commits
https://github.com/martinboehme created https://github.com/llvm/llvm-project/pull/73484 Before we widen to top, we now check if both values can be proved either true or false in their respective environments; if so, widening returns a true or false literal. The idea is that we avoid losing infor

[clang] [clang][dataflow] Strengthen widening of boolean values. (PR #73484)

2023-11-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (martinboehme) Changes Before we widen to top, we now check if both values can be proved either true or false in their respective environments; if so, widening returns a true or false literal. The idea is that we avoid losing informati

[clang] [Clang] Eagerly instantiate used constexpr function upon definition. (PR #73463)

2023-11-27 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/73463 >From 80fc2336d14e6929c67f2e67d8bb2469fa48cbc4 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Sun, 26 Nov 2023 22:47:51 +0100 Subject: [PATCH] [Clang] Eagerly instantiate used constexpr function upon defin

[clang] [llvm] [clang][RISCV] Change default abi when only have f extension but no d extension (PR #73489)

2023-11-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-support @llvm/pr-subscribers-clang @llvm/pr-subscribers-backend-risc-v Author: Jianjian Guan (jacquesguan) Changes Now we have default abi lp64 for rv64if and ilp32 for rv32if, which is different with riscv-gnu-toolchain. In https://github.com/ris

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

2023-11-27 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?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: github-actions[bot] wrote: :warning: C/C++

[clang] Improve clang-format-diff help output (PR #73491)

2023-11-27 Thread via cfe-commits
https://github.com/serge-sans-paille created https://github.com/llvm/llvm-project/pull/73491 It is quite common to symlink clang-format-diff.py to clang-format-diff, and in that case the help output still refers to the .py version. Compute it instead to work in both setup. >From 788d03126f95f

<    32   33   34   35   36   37   38   39   40   41   >