[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

[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] [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] [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] [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] [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
@@ -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
@@ -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
@@ -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
@@ -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
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
@@ -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
@@ -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
@@ -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
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] [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] [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/3] [Concepts] Avoid substituting into constraints for invalid Te

[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] [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] [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] 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] 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] [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] [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] [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] [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] [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] [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] 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] 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 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] [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] [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
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] [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] 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-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] [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
@@ -0,0 +1,335 @@ +//===- ModulesBuilder.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[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
@@ -0,0 +1,335 @@ +//===- ModulesBuilder.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[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
@@ -0,0 +1,335 @@ +//===- ModulesBuilder.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[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
@@ -0,0 +1,335 @@ +//===- ModulesBuilder.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[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
@@ -0,0 +1,335 @@ +//===- ModulesBuilder.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[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
@@ -0,0 +1,411 @@ +//===--- PrerequisiteModulesTests.cpp ---*- C++ +//-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifi

[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
@@ -0,0 +1,335 @@ +//===- ModulesBuilder.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[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
@@ -0,0 +1,199 @@ +//===-- ProjectModules.h -*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[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
@@ -318,6 +309,10 @@ bool StandalonePrerequisiteModules::canReuse( Clang.getHeaderSearchOpts().ForceCheckCXX20ModulesInputFiles = true; Clang.getHeaderSearchOpts().ValidateASTInputFilesContent = true; + // Following the practice of clang's driver to suppres the checking f

[clang] [compiler-rt] [libcxx] [cmake] Add hexagon-linux cmake cache files (PR #98712)

2024-07-16 Thread Brian Cain via cfe-commits
@@ -0,0 +1,25 @@ + +set(CMAKE_EXE_LINKER_FLAGS "-lclang_rt.builtins-hexagon -nostdlib" CACHE STRING "") +set(CMAKE_SHARED_LINKER_FLAGS "-lclang_rt.builtins-hexagon -nostdlib" CACHE STRING "") androm3da wrote: Thanks for the suggestion, it looks like this uncove

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

2024-07-16 Thread via cfe-commits
vfdff wrote: Oh, different targets may have different flag for argument, so should add target triple ? ``` +++ b/clang/test/CodeGen/math-libcalls-tbaa.cpp @@ -1,14 +1,14 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 -// RUN: %clang_c

[clang] [clang] Extend lifetime analysis to support assignments for pointer-like objects. (PR #99032)

2024-07-16 Thread Shafik Yaghmour via cfe-commits
@@ -1284,16 +1294,26 @@ void checkExprLifetime(Sema &SemaRef, const InitializedEntity &Entity, auto LTResult = getEntityLifetime(&Entity); LifetimeKind LK = LTResult.getInt(); const InitializedEntity *ExtendingEntity = LTResult.getPointer(); - checkExprLifetimeImpl(Sema

[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-linux-multistage` running on `ppc64le-clang-multistage-test` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/76/builds/1076 Here is the

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

2024-07-16 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > @ChuanqiXu9 > > I was trying to find a stack review solution. See > https://reviewstack.dev/llvm/llvm-project/pull/98974 > > You can compare between commits on this UI. What's the stacked PRs approach > you were talking about? For example, you have 2 patches A and B, and

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

2024-07-16 Thread Yuxuan Chen via cfe-commits
yuxuanchen1997 wrote: @ChuanqiXu9 I was trying to find a stack review solution. See https://reviewstack.dev/llvm/llvm-project/pull/98974 You can compare between commits on this UI. What's the stacked PRs approach you were talking about? https://github.com/llvm/llvm-project/pull/98974 ___

[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-solaris11-sparcv9` running on `solaris11-sparcv9` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/13/builds/838 Here is the relevant piece of the

[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 1/6] [RISCV] Add groupid/bitmask for RISC-V extension Base on https://git

[clang] [llvm] [SPIRV][HLSL] Add lowering of frac to SPIR-V (PR #97111)

2024-07-16 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/97111 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-16 Thread via cfe-commits
vfdff wrote: hi @llvm-ci , would you tell the difference between **clang-armv8-quick** and **linaro-clang-armv8-quick** ? I don't reproduce the issue when I rebase this PR to the top upstream with following instruction (I works on tsv110 server, which is a armv8 target). > llvm/utils/update_

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

2024-07-16 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: It looks like the diff has some problems (it contains clang's change). And how do you think about the suggestion to split the middle end patch? https://github.com/llvm/llvm-project/pull/98974 ___ cfe-commits mailing list cfe-commits@

[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-linux-test-suite` running on `ppc64le-clang-test-suite` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/95/builds/138

[clang] [clang][driver] Support `--precompile` and `-fmodule-*` options in Clang-CL (PR #98761)

2024-07-16 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,65 @@ +// REQUIRES: system-windows + +// RUN: rm -rf %t +// RUN: mkdir -p %t +// RUN: split-file %s %t + +// RUN: %clang_cl /std:c++20 --precompile "%/t/Hello.cppm" "/Fo%/t/Hello.pcm" ChuanqiXu9 wrote: We don't need to do that in the test of Drivers. W

[clang] [clang][driver] Support `--precompile` and `-fmodule-*` options in Clang-CL (PR #98761)

2024-07-16 Thread Chuanqi Xu via cfe-commits
@@ -242,7 +242,7 @@ bool types::isCXX(ID Id) { case TY_CXXHUHeader: case TY_PP_CXXHeaderUnit: case TY_ObjCXXHeader: case TY_PP_ObjCXXHeader: - case TY_CXXModule: case TY_PP_CXXModule: + case TY_CXXModule: case TY_PP_CXXModule: case TY_ModuleFile: Chuanq

[clang] [clang][driver] Support `--precompile` and `-fmodule-*` options in Clang-CL (PR #98761)

2024-07-16 Thread Chuanqi Xu via cfe-commits
@@ -398,6 +398,13 @@ BMIs cannot be shipped in an archive to create a module library. Instead, the BMIs(``*.pcm``) are compiled into object files(``*.o``) and those object files are added to the archive instead. +clang-cl + + +``clang-cl`` supports the same options as

[clang] [clang][driver] Support `--precompile` and `-fmodule-*` options in Clang-CL (PR #98761)

2024-07-16 Thread Chuanqi Xu via cfe-commits
@@ -1176,12 +1183,12 @@ have ``.cppm`` (or ``.ccm``, ``.cxxm``, ``.c++m``) as the file extension. However, the behavior is inconsistent with other compilers. This is tracked by `#57416 `_. -clang-cl is not compatible with sta

[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-armv8-quick` running on `linaro-clang-armv8-quick` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/154/builds/1496 Here is the relevant piece of

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-16 Thread Akira Hatanaka via cfe-commits
@@ -0,0 +1,55 @@ +// RUN: %clang_cc1 %s -triple arm64e-apple-ios13 -fptrauth-calls -fptrauth-intrinsics -emit-llvm -o- -fptrauth-function-pointer-type-discrimination | FileCheck %s ahatanak wrote: Thanks! Please add a line to test linux after this PR is merged

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-16 Thread Akira Hatanaka via cfe-commits
@@ -351,3 +434,125 @@ CodeGenModule::getVTablePointerAuthInfo(CodeGenFunction *CGF, /* IsIsaPointer */ false, /* AuthenticatesNullValues */ false, Discriminator); } + +llvm::Value *CodeGenFunction::AuthPointerToPointerCast(

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-16 Thread Akira Hatanaka via cfe-commits
@@ -0,0 +1,77 @@ +// RUN: %clang_cc1 -fptrauth-function-pointer-type-discrimination -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics -emit-llvm %s -o - | FileCheck -check-prefix=CHECK -check-prefix=NOPCH %s ahatanak wrote: Sorry, I just realized th

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

2024-07-16 Thread via cfe-commits
@@ -0,0 +1,43 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// The test may fail as time out on windows +// REQUIRES: system-linux + +// RUN: %clang -S -O3 -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefixes=CHECK,

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-16 Thread Akira Hatanaka via cfe-commits
@@ -165,6 +166,88 @@ CGPointerAuthInfo CodeGenModule::getPointerAuthInfoForType(QualType T) { return ::getPointerAuthInfoForType(*this, T); } +static bool isZeroConstant(llvm::Value *value) { + if (auto ci = dyn_cast(value)) +return ci->isZero(); + return false; +} +

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

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

[clang] b042af3 - [clang codegen] Precommit tests for PR96025, NFC (#98704)

2024-07-16 Thread via cfe-commits
Author: Allen Date: 2024-07-17T09:01:42+08:00 New Revision: b042af363bcdfa5e7e3d7dd424a561a041ac8f02 URL: https://github.com/llvm/llvm-project/commit/b042af363bcdfa5e7e3d7dd424a561a041ac8f02 DIFF: https://github.com/llvm/llvm-project/commit/b042af363bcdfa5e7e3d7dd424a561a041ac8f02.diff LOG: [c

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-16 Thread Akira Hatanaka via cfe-commits
@@ -165,6 +166,88 @@ CGPointerAuthInfo CodeGenModule::getPointerAuthInfoForType(QualType T) { return ::getPointerAuthInfoForType(*this, T); } +static bool isZeroConstant(llvm::Value *value) { + if (auto ci = dyn_cast(value)) +return ci->isZero(); + return false; +} +

[clang] [clang] Implement function pointer signing and authenticated function calls (PR #93906)

2024-07-16 Thread Anton Korobeynikov via cfe-commits
@@ -14,10 +14,144 @@ #ifndef LLVM_CLANG_BASIC_POINTERAUTHOPTIONS_H #define LLVM_CLANG_BASIC_POINTERAUTHOPTIONS_H +#include "clang/Basic/LLVM.h" +#include "clang/Basic/LangOptions.h" +#include "llvm/ADT/STLForwardCompat.h" +#include "llvm/Support/ErrorHandling.h" +#include "llv

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

2024-07-16 Thread via cfe-commits
vfdff wrote: > LGTM > > Please don't use `[test]` as a prefix in commit messages; just use the same > prefix you'd use for the code change, e.g. `[clang codegen]` Thanks, I'll change it when land it . https://github.com/llvm/llvm-project/pull/98704

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-16 Thread Akira Hatanaka via cfe-commits
@@ -165,6 +166,88 @@ CGPointerAuthInfo CodeGenModule::getPointerAuthInfoForType(QualType T) { return ::getPointerAuthInfoForType(*this, T); } +static bool isZeroConstant(llvm::Value *value) { ahatanak wrote: I fixed the names of variables and functions add

[clang] [llvm] [APFloat] Add support for f8E4M3 IEEE 754 type (PR #97179)

2024-07-16 Thread Thomas Raoux via cfe-commits
https://github.com/ThomasRaoux approved this pull request. Looks good to me https://github.com/llvm/llvm-project/pull/97179 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] replaced the usage of `asctime` with `strftime` (PR #99075)

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

[clang] [clang] replaced the usage of `asctime` with `strftime` (PR #99075)

2024-07-16 Thread Yi-Chi Lee via cfe-commits
@@ -1722,10 +1722,12 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { // MSVC, ICC, GCC, VisualAge C++ extension. The generated string should be // of the form "Ddd Mmm dd hh::mm::ss ", which is returned by asctime. const char *Result; +char TimeStrin

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

2024-07-16 Thread Joshua Batista via cfe-commits
@@ -459,7 +467,475 @@ void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(HLSLResourceClassAttr::Create(getASTContext(), RC, ArgLoc)); } -void SemaHLSL::handleResourceBindingAttr(Decl *D, const ParsedAttr &AL) { +struct RegisterBindingFlags {

[clang-tools-extra] [clang-tools-extra] Fix typos in Modularize.rst (PR #99256)

2024-07-16 Thread via cfe-commits
Abe149 wrote: > We don't have to wait for Linux CI to finish to merge this, but private > e-mail is an issue. I think I fixed it. Please let me know if it`s good now or if I need to make more changes to my GitHub profile. https://github.com/llvm/llvm-project/pull/99256 __

[clang] [clang] Implement function pointer signing and authenticated function calls (PR #93906)

2024-07-16 Thread Mike Rice via cfe-commits
@@ -14,10 +14,144 @@ #ifndef LLVM_CLANG_BASIC_POINTERAUTHOPTIONS_H #define LLVM_CLANG_BASIC_POINTERAUTHOPTIONS_H +#include "clang/Basic/LLVM.h" +#include "clang/Basic/LangOptions.h" +#include "llvm/ADT/STLForwardCompat.h" +#include "llvm/Support/ErrorHandling.h" +#include "llv

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

2024-07-16 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/99258 >From 142a3a454fdbb3665d8b286e5ca6025f183bfa9d Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Tue, 16 Jul 2024 18:34:35 -0400 Subject: [PATCH] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.ptr.

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

2024-07-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Shilei Tian (shiltian) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/99258.diff 4 Files Affected: - (modified) clang/include/clang/Basic/BuiltinsAMDGPU.def (+6) - (modified) clang/lib/CodeGen/CGBuiltin.cpp (+39) -

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

2024-07-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Shilei Tian (shiltian) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/99258.diff 4 Files Affected: - (modified) clang/include/clang/Basic/BuiltinsAMDGPU.def (+6) - (modified) clang/lib/CodeGen/CGBuiltin.cpp

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

2024-07-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Shilei Tian (shiltian) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/99258.diff 4 Files Affected: - (modified) clang/include/clang/Basic/BuiltinsAMDGPU.def (+6) - (modified) clang/lib/CodeGen/CGBuiltin.cpp (

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

2024-07-16 Thread Shilei Tian via cfe-commits
shiltian wrote: * **#99258** https://app.graphite.dev/github/pr/llvm/llvm-project/99258?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 * `main` This stack of pull requests is managed by Graphi

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

2024-07-16 Thread Shilei Tian via cfe-commits
https://github.com/shiltian ready_for_review https://github.com/llvm/llvm-project/pull/99258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-16 Thread Shilei Tian via cfe-commits
https://github.com/shiltian created https://github.com/llvm/llvm-project/pull/99258 None >From 4fc2c23a310e541c181c0934c484dc3f78510c9c Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Tue, 16 Jul 2024 18:34:35 -0400 Subject: [PATCH] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.ra

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

2024-07-16 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/98974 >From d38f0608753417c6b79e0684cb9dc23933dc957b Mon Sep 17 00:00:00 2001 From: Yuxuan Chen Date: Tue, 4 Jun 2024 23:22:00 -0700 Subject: [PATCH 1/2] [Clang] Introduce [[clang::coro_inplace_task]] Implement

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-16 Thread Akira Hatanaka via cfe-commits
@@ -3126,3 +3137,57 @@ CodeGenFunction::EmitPointerAuthAuth(const CGPointerAuthInfo &PointerAuth, return EmitPointerAuthCommon(*this, PointerAuth, Pointer, llvm::Intrinsic::ptrauth_auth); } + +llvm::Value *CodeGenFunction::EmitPointerAuthSign(Q

[clang-tools-extra] [clang-tools-extra] Fix typos in Modularize.rst (PR #99256)

2024-07-16 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: We don't have to wait for Linux CI to finish to merge this, but private e-mail is an issue. https://github.com/llvm/llvm-project/pull/99256 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [PAC] Implement function pointer re-signing (PR #98847)

2024-07-16 Thread Akira Hatanaka via cfe-commits
@@ -2373,7 +2373,9 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) { DestLV.setTBAAInfo(TBAAAccessInfo::getMayAliasInfo()); return EmitLoadOfLValue(DestLV, CE->getExprLoc()); } -return Builder.CreateBitCast(Src, DstTy); + +llvm::Value *Result =

[clang-tools-extra] [clang-tools-extra] Fix typos in Modularize.rst (PR #99256)

2024-07-16 Thread via cfe-commits
github-actions[bot] wrote: ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account. See [LLVM Discourse](https://discourse.llvm.org/t/hidden-email

[clang-tools-extra] [clang-tools-extra] Fix typos in Modularize.rst (PR #99256)

2024-07-16 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I took the liberty to rename the PR to something more typical for our repository. I hope you don't mind. https://github.com/llvm/llvm-project/pull/99256 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang-tools-extra] [clang-tools-extra] Fix typos in Modularize.rst (PR #99256)

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

  1   2   3   4   5   >