[clang] [test] Precommit tests for PR96025, NFC (PR #98704)

2024-07-16 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ppc64le-rhel` running on `ppc64le-clang-rhel-test` while building `clang` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/145/builds/610 Here is th

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-07-16 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > thanks a lot, LGTM! > > i think the only big item remaining is injecting resource-dir correctly when > running clang-scan-deps. > > the most important follow up (for functionality, rather than optimizations > and usability) is indexing the PCMs as we build them (similar to

[clang] Implement resource binding type prefix mismatch diagnostic infrastructure (PR #97103)

2024-07-16 Thread Xiang Li via cfe-commits
https://github.com/python3kgae approved this pull request. https://github.com/llvm/llvm-project/pull/97103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang codegen] Fix the ci fail for PR96025 (PR #99267)

2024-07-16 Thread via cfe-commits
https://github.com/vfdff created https://github.com/llvm/llvm-project/pull/99267 Different targets may have different flag on arguments, so restrict the triple to avoid ci fail. >From 9a7cad22652e476edddedc9308663fc0e45e705c Mon Sep 17 00:00:00 2001 From: Zhongyunde Date: Wed, 17 Jul 2024 11:0

[clang] [clang codegen] Fix the ci fail for PR96025 (PR #99267)

2024-07-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Allen (vfdff) Changes Different targets may have different flag on arguments, so restrict the triple to avoid ci fail. --- Full diff: https://github.com/llvm/llvm-project/pull/99267.diff 1 Files Affected: - (modified) clang/test/CodeGe

[clang] [test] Precommit tests for PR96025, NFC (PR #98704)

2024-07-16 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-armv7-global-isel` running on `linaro-clang-armv7-global-isel` while building `clang` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/39/builds/569 Here is the relevan

[clang] [clang codegen] Fix the ci fail for PR96025 (PR #99267)

2024-07-16 Thread via cfe-commits
vfdff wrote: try to fix https://github.com/llvm/llvm-project/pull/98704 https://github.com/llvm/llvm-project/pull/99267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang codegen] Fix the ci fail for PR98704 (PR #99267)

2024-07-16 Thread via cfe-commits
https://github.com/vfdff edited https://github.com/llvm/llvm-project/pull/99267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 484fdb9 - [clang codegen] Fix the ci fail for PR98704 (#99267)

2024-07-16 Thread via cfe-commits
Author: Allen Date: 2024-07-17T11:44:06+08:00 New Revision: 484fdb901f2cc39b122489508009947910001213 URL: https://github.com/llvm/llvm-project/commit/484fdb901f2cc39b122489508009947910001213 DIFF: https://github.com/llvm/llvm-project/commit/484fdb901f2cc39b122489508009947910001213.diff LOG: [c

[clang] [clang codegen] Fix the ci fail for PR98704 (PR #99267)

2024-07-16 Thread via cfe-commits
https://github.com/vfdff closed https://github.com/llvm/llvm-project/pull/99267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-07-16 Thread Hubert Tong via cfe-commits
@@ -5813,6 +5813,27 @@ static TypoCorrection TryTypoCorrectionForCall(Sema &S, Expr *Fn, return TypoCorrection(); } +// [C++26][[expr.unary.op]/p4 +// A pointer to member is only formed when an explicit & +// is used and its operand is a qualified-id not enclosed in parenth

[clang] [flang] [llvm] [OpenMPIRBuilder] Emit __atomic_load and __atomic_compare_exchange libcalls for complex types in atomic update (PR #92364)

2024-07-16 Thread via cfe-commits
NimishMishra wrote: RFC for refactoring CGAtomic: https://discourse.llvm.org/t/rfc-refactoring-cgatomic-into-llvmfrontend/80168 https://github.com/llvm/llvm-project/pull/92364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.ptr.buffer.load` (PR #99258)

2024-07-16 Thread Matt Arsenault via cfe-commits
@@ -19177,6 +19177,45 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, case AMDGPU::BI__builtin_amdgcn_raw_buffer_store_b128: return emitBuiltinWithOneOverloadedType<5>( *this, E, Intrinsic::amdgcn_raw_ptr_buffer_store); + case AMDGPU::BI__bu

[clang] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.ptr.buffer.load` (PR #99258)

2024-07-16 Thread Matt Arsenault via cfe-commits
@@ -155,6 +155,12 @@ BUILTIN(__builtin_amdgcn_raw_buffer_store_b32, "viQbiiIi", "n") BUILTIN(__builtin_amdgcn_raw_buffer_store_b64, "vV2iQbiiIi", "n") BUILTIN(__builtin_amdgcn_raw_buffer_store_b96, "vV3iQbiiIi", "n") BUILTIN(__builtin_amdgcn_raw_buffer_store_b128, "vV4iQbiiIi"

[clang] [llvm] AMDGPU: Handle remote/fine-grained memory in atomicrmw fmin/fmax lowering (PR #96759)

2024-07-16 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/96759 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Handle remote/fine-grained memory in atomicrmw fmin/fmax lowering (PR #96759)

2024-07-16 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm commented: ping https://github.com/llvm/llvm-project/pull/96759 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Ensure pointers passed to runtime support functions are correctly signed (PR #98276)

2024-07-16 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 approved this pull request. https://github.com/llvm/llvm-project/pull/98276 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b330d80 - Reapply [Clang][C++26] Implement "Ordering of constraints involving fold expressions (#99022)

2024-07-16 Thread via cfe-commits
Author: cor3ntin Date: 2024-07-17T07:52:40+02:00 New Revision: b330d800cb7917e537b05a23febfe188401c5628 URL: https://github.com/llvm/llvm-project/commit/b330d800cb7917e537b05a23febfe188401c5628 DIFF: https://github.com/llvm/llvm-project/commit/b330d800cb7917e537b05a23febfe188401c5628.diff LOG:

[clang] Reapply [Clang][C++26] Implement "Ordering of constraints involving fold expressions (PR #99022)

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

[clang] [llvm] [RISCV][FMV] Support target_clones (PR #85786)

2024-07-16 Thread Piyou Chen via cfe-commits
https://github.com/BeMg edited https://github.com/llvm/llvm-project/pull/85786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang codegen] Emit int TBAA metadata on FP math libcall expf (PR #96025)

2024-07-16 Thread via cfe-commits
https://github.com/vfdff edited https://github.com/llvm/llvm-project/pull/96025 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][Coroutines] Perform HALO on "coro_must_elide" coroutines (PR #98974)

2024-07-16 Thread Yuxuan Chen via cfe-commits
yuxuanchen1997 wrote: > how do you think about the suggestion to split the middle end patch? Can do that sure. I will send out new stacked PRs. https://github.com/llvm/llvm-project/pull/98974 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [Concepts] Avoid substituting into constraints for invalid TemplateDecls (PR #75697)

2024-07-16 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/75697 >From a6e01586f5d406b51492d973cb693ba32cc63d99 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sat, 16 Dec 2023 18:49:59 +0800 Subject: [PATCH 1/3] [Concepts] Avoid substituting into constraints for invalid Te

[clang] [Concepts] Avoid substituting into constraints for invalid TemplateDecls (PR #75697)

2024-07-16 Thread Younan Zhang via cfe-commits
zyn0217 wrote: @cor3ntin I moved the check to `CheckConstraintSatisfaction` so we don't end up with many substitution failure notes. Can you check it out again? https://github.com/llvm/llvm-project/pull/75697 ___ cfe-commits mailing list cfe-commits@l

[clang] [Concepts] Avoid substituting into constraints for invalid TemplateDecls (PR #75697)

2024-07-16 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/75697 >From a6e01586f5d406b51492d973cb693ba32cc63d99 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sat, 16 Dec 2023 18:49:59 +0800 Subject: [PATCH 1/4] [Concepts] Avoid substituting into constraints for invalid Te

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

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

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-16 Thread Balazs Benics via cfe-commits
@@ -103,14 +103,46 @@ using namespace std::placeholders; namespace { // Used to check correspondence between allocators and deallocators. -enum AllocationFamily { +enum AllocationFamilyKind { AF_None, AF_Malloc, AF_CXXNew, AF_CXXNewArray, AF_IfNameIndex, AF_A

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-16 Thread Balazs Benics via cfe-commits
@@ -14,6 +14,13 @@ void free(void *); void __attribute((ownership_takes(malloc, 1))) my_free(void *); +void __attribute((ownership_returns(malloc1))) *my_malloc1(size_t); +void __attribute((ownership_takes(malloc1, 1))) my_free1(void *); + +void __attribute((ownership_returns(

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-16 Thread Balazs Benics via cfe-commits
@@ -1918,26 +1982,54 @@ static bool printMemFnName(raw_ostream &os, CheckerContext &C, const Expr *E) { static void printExpectedAllocName(raw_ostream &os, AllocationFamily Family) { - switch(Family) { -case AF_Malloc: os << "malloc()"; return; -case AF_CXXNew: os <

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-16 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. Looks pretty good. Thanks for working on the issue. I didn't see any major blocking issue with the PR, so good job on that! Overall, be sure to follow the llvm [coding style](https://llvm.org/docs/CodingStandards.html#name-type

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-16 Thread Balazs Benics via cfe-commits
@@ -194,7 +226,7 @@ class RefState { void Profile(llvm::FoldingSetNodeID &ID) const { ID.AddInteger(K); ID.AddPointer(S); -ID.AddInteger(Family); +ID.AddInteger(Family.kind()); steakhal wrote: This Profile wouldn't take the custom allocation

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-16 Thread Balazs Benics via cfe-commits
@@ -1877,6 +1914,33 @@ static bool didPreviousFreeFail(ProgramStateRef State, return false; } +static void printOwnershipTakesList(raw_ostream &os, CheckerContext &C, +const Expr *E) { + if (const CallExpr *CE = dyn_cast(E)) { +const

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-16 Thread Balazs Benics via cfe-commits
@@ -103,14 +103,46 @@ using namespace std::placeholders; namespace { // Used to check correspondence between allocators and deallocators. -enum AllocationFamily { +enum AllocationFamilyKind { AF_None, AF_Malloc, AF_CXXNew, AF_CXXNewArray, AF_IfNameIndex, AF_A

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-16 Thread Balazs Benics via cfe-commits
@@ -1918,26 +1982,54 @@ static bool printMemFnName(raw_ostream &os, CheckerContext &C, const Expr *E) { static void printExpectedAllocName(raw_ostream &os, AllocationFamily Family) { - switch(Family) { -case AF_Malloc: os << "malloc()"; return; -case AF_CXXNew: os <

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-16 Thread Balazs Benics via cfe-commits
@@ -103,14 +103,46 @@ using namespace std::placeholders; namespace { // Used to check correspondence between allocators and deallocators. -enum AllocationFamily { +enum AllocationFamilyKind { AF_None, AF_Malloc, AF_CXXNew, AF_CXXNewArray, AF_IfNameIndex, AF_A

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-16 Thread Balazs Benics via cfe-commits
@@ -14,6 +14,13 @@ void free(void *); void __attribute((ownership_takes(malloc, 1))) my_free(void *); +void __attribute((ownership_returns(malloc1))) *my_malloc1(size_t); +void __attribute((ownership_takes(malloc1, 1))) my_free1(void *); + +void __attribute((ownership_returns(

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-16 Thread Balazs Benics via cfe-commits
@@ -14,6 +14,13 @@ void free(void *); void __attribute((ownership_takes(malloc, 1))) my_free(void *); +void __attribute((ownership_returns(malloc1))) *my_malloc1(size_t); steakhal wrote: What happens if you have a forward declaration to a malloc function with

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-16 Thread Balazs Benics via cfe-commits
@@ -1877,6 +1914,33 @@ static bool didPreviousFreeFail(ProgramStateRef State, return false; } +static void printOwnershipTakesList(raw_ostream &os, CheckerContext &C, +const Expr *E) { + if (const CallExpr *CE = dyn_cast(E)) { +const

[clang] [Clang SA]: add support for mismatched ownership_returns+ownership_takes calls for custom allocation classes (PR #98941)

2024-07-16 Thread Balazs Benics via cfe-commits
@@ -3483,53 +3578,54 @@ PathDiagnosticPieceRef MallocBugVisitor::VisitNode(const ExplodedNode *N, Sym, "Returned allocated memory"); } else if (isReleased(RSCurr, RSPrev, S)) { const auto Family = RSCurr->getAllocationFamily(); - switch (Family) { -

[clang] [Concepts] Avoid substituting into constraints for invalid TemplateDecls (PR #75697)

2024-07-16 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/75697 >From a6e01586f5d406b51492d973cb693ba32cc63d99 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sat, 16 Dec 2023 18:49:59 +0800 Subject: [PATCH 1/5] [Concepts] Avoid substituting into constraints for invalid Te

[clang] [llvm] [RISCV][FMV] Support target_clones (PR #85786)

2024-07-16 Thread Piyou Chen via cfe-commits
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/85786 >From 38e5bef5d20d7e81170720eb56354c0392f5c902 Mon Sep 17 00:00:00 2001 From: Piyou Chen Date: Wed, 5 Jun 2024 01:17:03 -0700 Subject: [PATCH 01/10] [RISCV] Add groupid/bitmask for RISC-V extension Base on https://g

[clang] [CMake][Fuchsia] Include new/delete in baremetal targets (PR #99279)

2024-07-16 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek created https://github.com/llvm/llvm-project/pull/99279 These don't include libcxxabi yet so we need new/delete in libcxx. >From 9bf2e8ae0deeb04aaf85f35f5c15ebe8f85d71a7 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Tue, 16 Jul 2024 23:50:54 -0700 Subject: [PATCH

[clang] [CMake][Fuchsia] Include new/delete in baremetal targets (PR #99279)

2024-07-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Petr Hosek (petrhosek) Changes These don't include libcxxabi yet so we need new/delete in libcxx. --- Full diff: https://github.com/llvm/llvm-project/pull/99279.diff 1 Files Affected: - (modified) clang/cmake/caches/Fuchsia-stage2.cmake

<    1   2   3   4   5