[clang] [test][Driver][clang] Fix darwin-embedded-search-paths.c when CLANG_DEFAULT_CXX_STDLIB is libc++ (PR #122145)

2025-01-08 Thread Ian Anderson via cfe-commits
@@ -1,3 +1,4 @@ +// REQUIRES: default-cxx-stdlib=libstdc++ ian-twilightcoder wrote: Sometimes `default-cxx-stdlib` isn't set at all, and so the `REQUIRES` doesn't always work. `REQUIRES` doesn't have a `!=`, but you can do `!(a=b)`. You can also do `!a || a=b`,

[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

2025-01-08 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Actually, how does this interact with ASan? e.g. would "I know there is enough storage to deref, but it may be poisoned by container annotations" be a valid use-case for this, or would we have to not annotate pointers in that case? https://github.com/llvm/llvm-project/pull/12

[clang] [CUDA][HIP] improve error message for missing cmath (PR #122155)

2025-01-08 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. https://github.com/llvm/llvm-project/pull/122155 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Update OpenMPSupport.rst (PR #122174)

2025-01-08 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [clang] Infer capture_by for insert_or_assign (PR #122109)

2025-01-08 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 closed https://github.com/llvm/llvm-project/pull/122109 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Update OpenMPSupport.rst (PR #122174)

2025-01-08 Thread via cfe-commits
https://github.com/CatherineMoore created https://github.com/llvm/llvm-project/pull/122174 This patch adds a section for OpenMP 6.0 features. >From 47908c2aefc7009ccb62d4b9111fbd8d7e5ee7ad Mon Sep 17 00:00:00 2001 From: CatherineMoore Date: Wed, 8 Jan 2025 16:33:01 -0500 Subject: [PATCH] Updat

[clang] 5e9e1ff - [clang] Infer capture_by for insert_or_assign (#122109)

2025-01-08 Thread via cfe-commits
Author: Utkarsh Saxena Date: 2025-01-08T22:34:17+01:00 New Revision: 5e9e1ffe8a0909c02b0ac5a51b1856eb9516b767 URL: https://github.com/llvm/llvm-project/commit/5e9e1ffe8a0909c02b0ac5a51b1856eb9516b767 DIFF: https://github.com/llvm/llvm-project/commit/5e9e1ffe8a0909c02b0ac5a51b1856eb9516b767.diff

[clang] Update OpenMPSupport.rst (PR #122174)

2025-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (CatherineMoore) Changes This patch adds a section for OpenMP 6.0 features. --- Patch is 21.11 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/122174.diff 1 Files Affected: - (modified)

[clang] 891481e - [OpenACC] Add missing 'check' line to update-construct-ast test.

2025-01-08 Thread via cfe-commits
Author: erichkeane Date: 2025-01-08T13:35:14-08:00 New Revision: 891481ed82b8d17b9013b332754df171910fb115 URL: https://github.com/llvm/llvm-project/commit/891481ed82b8d17b9013b332754df171910fb115 DIFF: https://github.com/llvm/llvm-project/commit/891481ed82b8d17b9013b332754df171910fb115.diff LO

[clang] Pack relocations for Android API >= 28 (PR #117624)

2025-01-08 Thread Mike Hommey via cfe-commits
@@ -256,6 +256,24 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) ExtraOpts.push_back("-z"); ExtraOpts.push_back("max-page-size=16384"); } +if (Triple.isAndroidVersionLT(29)) { + // https://github.com/android/ndk/issue

[clang] [compiler-rt] [Clang] Adjust pointer-overflow sanitizer for N3322 (PR #120719)

2025-01-08 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM I don't see any reason to mess with the runtime bits: we try to keep them stable where we can. https://github.com/llvm/llvm-project/pull/120719 ___ cfe-commits mailing list cfe-commits

[clang] Remove the `CustomEntry` escape hatch from builtin TableGen (PR #120861)

2025-01-08 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/120861 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `WaveActiveSum` intrinsic (PR #118580)

2025-01-08 Thread Adam Yang via cfe-commits
https://github.com/adam-yang updated https://github.com/llvm/llvm-project/pull/118580 >From 9a1ad541ec6e2fbd72bd88727a5910da39a5b840 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Fri, 18 Oct 2024 10:49:18 -0700 Subject: [PATCH 1/5] [HLSL][SPIRV][DXIL] Implement `WaveActiveSum` intrinsic -

[clang] [flang] [lld] [llvm] [Flang][NFC] Move runtime library files to flang-rt. (PR #110298)

2025-01-08 Thread Valentin Clement バレンタイン クレメン via cfe-commits
clementval wrote: There are some missing files in in flang-rt/CUDA both headers and cpp files. https://github.com/llvm/llvm-project/pull/110298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2025-01-08 Thread A. Jiang via cfe-commits
frederick-vs-ja wrote: Do we want to add some workaround to libc++'s ``? https://github.com/llvm/llvm-project/pull/102857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers][X86] amxintrin.h - fix attributes according to Intel SDM (PR #122204)

2025-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Evgenii Kudriashov (e-kud) Changes `tileloadd`, `tileloaddt1` and `tilestored` are part of `amx-tile` feature. The problem is observed if `__tile_loadd` intrinsic is invoked, `_tile_loadd_internal` requiring `amx-int8` is inlined into `__

[clang] [flang] [lld] [Flang] Don't use FortranDecimal for runtime (PR #121997)

2025-01-08 Thread Michael Kruse via cfe-commits
Meinersbur wrote: @klausler done https://github.com/llvm/llvm-project/pull/121997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add -mcpu=sifive-p550. (PR #122164)

2025-01-08 Thread Philip Reames via cfe-commits
https://github.com/preames approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/122164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Drop emitQuaternaryBuiltin from clang (PR #122169)

2025-01-08 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec created https://github.com/llvm/llvm-project/pull/122169 It was superceeded by the emitBuiltinWithOneOverloadedType() some time ago. >From 2b14fb00e32db739ab8f3962fe5ad77e1df3ffda Mon Sep 17 00:00:00 2001 From: Stanislav Mekhanoshin Date: Wed, 8 Jan 2025 12:49:18 -0

[clang] f35b9ad - [clang] Propagate -ftime-report to offload lto (#122143)

2025-01-08 Thread via cfe-commits
Author: macurtis-amd Date: 2025-01-08T14:50:38-06:00 New Revision: f35b9ad99f549f148e6bd6b0c1bd86f4d1ced56c URL: https://github.com/llvm/llvm-project/commit/f35b9ad99f549f148e6bd6b0c1bd86f4d1ced56c DIFF: https://github.com/llvm/llvm-project/commit/f35b9ad99f549f148e6bd6b0c1bd86f4d1ced56c.diff

[clang] [clang] Propagate -ftime-report to offload lto (PR #122143)

2025-01-08 Thread via cfe-commits
https://github.com/macurtis-amd closed https://github.com/llvm/llvm-project/pull/122143 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Drop emitQuaternaryBuiltin from clang (PR #122169)

2025-01-08 Thread Stanislav Mekhanoshin via cfe-commits
rampitec wrote: * **#122169** https://app.graphite.dev/github/pr/llvm/llvm-project/122169?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/122

[clang] Drop emitQuaternaryBuiltin from clang (PR #122169)

2025-01-08 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec ready_for_review https://github.com/llvm/llvm-project/pull/122169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Drop emitQuaternaryBuiltin from clang (PR #122169)

2025-01-08 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 923675193b24d3123ece0a3504c7cd49fc7410e9 2b14fb00e32db739ab8f3962fe5ad77e1df3ffda --e

[clang] Drop emitQuaternaryBuiltin from clang (PR #122169)

2025-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Stanislav Mekhanoshin (rampitec) Changes It was superceeded by the emitBuiltinWithOneOverloadedType() some time ago. --- Full diff: https://github.com/llvm/llvm-project/pull/122169.diff 1 Files Affected: - (modified) clang/lib/CodeGen/C

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-08 Thread Vitaly Buka via cfe-commits
@@ -1154,3 +1154,56 @@ // RUN: not %clang --target=x86_64-linux-gnu -fsanitize=realtime,undefined %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-REALTIME-UBSAN // CHECK-REALTIME-UBSAN: error: invalid argument '-fsanitize=realtime' not allowed with '-fsanitize=undefined' +

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-08 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/121619 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Drop emitQuaternaryBuiltin from clang (PR #122169)

2025-01-08 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec updated https://github.com/llvm/llvm-project/pull/122169 >From cf1e4319bc0b9799d1e20b87a3aadd7cb038b736 Mon Sep 17 00:00:00 2001 From: Stanislav Mekhanoshin Date: Wed, 8 Jan 2025 12:49:18 -0800 Subject: [PATCH] Drop emitQuaternaryBuiltin from clang It was superceede

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-01-08 Thread Jonas Paulsson via cfe-commits
JonPsson1 wrote: I was hoping these added lines would enable the conversion functions, but it doesn't seem to work: ``` + if (TT.isSystemZ()) { +setLibcallName(RTLIB::FPROUND_F32_F16, "__truncsfhf2"); +setLibcallName(RTLIB::FPEXT_F16_F32, "__extendhfsf2"); + } clang -target s390x-lin

[clang] [OpenMP] Allow GPUs to be targeted directly via `-fopenmp`. (PR #122149)

2025-01-08 Thread Krzysztof Parzyszek via cfe-commits
kparzysz wrote: To me this looks like compilation for a host, except the GPU is the host. The only functions that could be called from such a CU would be the top-level ones, not any of the auto-generated one. Additionally, the host wouldn't support offload, so we'd need to do something about

[clang] [llvm] Reimplement constrained 'trunc' using operand bundles (PR #118253)

2025-01-08 Thread Kevin P. Neal via cfe-commits
@@ -86,6 +86,43 @@ IRBuilderBase::createCallHelper(Function *Callee, ArrayRef Ops, return CI; } +CallInst *IRBuilderBase::CreateCall(FunctionType *FTy, Value *Callee, +ArrayRef Args, +ArrayRef OpBundles

[clang] [llvm] Reimplement constrained 'trunc' using operand bundles (PR #118253)

2025-01-08 Thread Kevin P. Neal via cfe-commits
kpneal wrote: I do think that before we start adding in code like this ticket we need to add IR Verifier code to check for proper use of the strictfp attribute. This code never made it into the tree because there are too many broken tests already in the tree. Verifier code could be written th

[clang] [Clang] Consider preferred_type in bitfield warnings (#116760) (PR #116785)

2025-01-08 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/116785 >From 5f260726253e78a00d2dff02c22837ce02b49075 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Tue, 19 Nov 2024 11:55:11 +0100 Subject: [PATCH 1/6] [Clang] Consider preferred_type in bitfield warnings (#116760)

[clang] [C++20] Destroying delete and deleted destructors (PR #118800)

2025-01-08 Thread Richard Smith via cfe-commits
@@ -2855,6 +2855,11 @@ class CXXDestructorDecl : public CXXMethodDecl { return getCanonicalDecl()->OperatorDeleteThisArg; } + /// Will this destructor ever be called when considering which deallocation + /// function is associated with the destructor? Can optionally be

[clang] [HLSL] Implement D3DCOLORtoUBYTE4 intrinsic (PR #122202)

2025-01-08 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron created https://github.com/llvm/llvm-project/pull/122202 Fixes #99092. 1. Defines the function `D3DCOLORtoUBYTE4` in `clang/lib/Headers/hlsl/hlsl_intrinsics.h`. 2. Implements the function `D3DCOLORtoUBYTE4` as `d3d_color_to_ubyte4` in `clang/lib/Headers/hlsl/hlsl_

[clang] [HLSL] Implement D3DCOLORtoUBYTE4 intrinsic (PR #122202)

2025-01-08 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [compiler-rt] [llvm] [ASan] Add metadata to renamed instructions so ASan doesn't use the i… (PR #119387)

2025-01-08 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: I don't see (from description) why it's needed. https://github.com/llvm/llvm-project/pull/119387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] Destroying delete and deleted destructors (PR #118800)

2025-01-08 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/118800 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] Destroying delete and deleted destructors (PR #118800)

2025-01-08 Thread Richard Smith via cfe-commits
https://github.com/zygoloid approved this pull request. LG other than the function name. https://github.com/llvm/llvm-project/pull/118800 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [HLSL] Implement D3DCOLORtoUBYTE4 intrinsic (PR #122202)

2025-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Deric Cheung (Icohedron) Changes Fixes #99092. 1. Defines the function `D3DCOLORtoUBYTE4` in `clang/lib/Headers/hlsl/hlsl_intrinsics.h`. 2. Implements the function `D3DCOLORtoUBYTE4` as `d3d_color_to_ubyte4` in `clang/lib/Headers/hlsl/hl

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2025-01-08 Thread Jessica Paquette via cfe-commits
@@ -938,6 +938,37 @@ struct CounterCoverageMappingBuilder return Counter::getCounter(CounterMap[S]); } + struct BranchCounterPair { ornata wrote: Ok, annotating the members sounds fine to me. https://github.com/llvm/llvm-project/pull/112702 __

[clang] [OpenMP] Allow GPUs to be targeted directly via `-fopenmp`. (PR #122149)

2025-01-08 Thread Joseph Huber via cfe-commits
jhuber6 wrote: I guess I'll see how much I favor this approach depending on how much more difficult it is to build the DeviceRTL without OpenMP. I think the only thing we'd miss is the `#pragma omp assumes(...)` business, which might have another way to be emitted in LLVM/Clang? https://githu

[libunwind] [libunwind][cmake] Compile _Unwind* routines with -fexceptions (PR #121819)

2025-01-08 Thread via cfe-commits
Andarwinux wrote: > > > I wonder if it would be less bug-prone in the long term to just build the > > > whole library with `-fexceptions` instead of trying to apply > > > `-fexceptions` to _just_ the right files at this point in time. Feels > > > like a brittle optimization for not much gain?

[clang] [OpenMP] Allow GPUs to be targeted directly via `-fopenmp`. (PR #122149)

2025-01-08 Thread Johannes Doerfert via cfe-commits
jdoerfert wrote: > I see it in a different way. `#pragma omp target parallel` (let's just assume > this is valid code) is different from `#pragma omp parallel`, no matter what > target is. However, this patch is to say, when targeting a GPU, `#pragma omp > parallel` **is** `#pragma omp target

[clang-tools-extra] [clang-tidy] fix false positives when using name-independent variables after C++26 for bugprone-unused-local-non-trivial-variable (PR #121783)

2025-01-08 Thread Piotr Zegar via cfe-commits
@@ -29,6 +29,12 @@ static constexpr StringRef DefaultIncludeTypeRegex = AST_MATCHER(VarDecl, isLocalVarDecl) { return Node.isLocalVarDecl(); } AST_MATCHER(VarDecl, isReferenced) { return Node.isReferenced(); } +AST_MATCHER_P(VarDecl, explicitMarkUnused, LangOptions, LangOpts)

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-08 Thread via cfe-commits
GeorgeKA wrote: @Maetveis Do you have any thoughts on the following two groups of options that are unexpectedly succeeding? I'll note that I did come across some options for which the driver appears to correct user error by adding the appropriate driver option, like testing "`-fexperimental-s

[clang] [OpenMP] Allow GPUs to be targeted directly via `-fopenmp`. (PR #122149)

2025-01-08 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert approved this pull request. > We can't expect to have regular OpenMP code working in the same way as OpenMP > offloading code when targeting a GPU meanwhile the code is not wrapped into > target region or declare target The way I see this is: If the target is a GPU

[clang] [clang] Infer capture_by for insert_or_assign (PR #122109)

2025-01-08 Thread Haojian Wu via cfe-commits
https://github.com/hokein approved this pull request. https://github.com/llvm/llvm-project/pull/122109 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2c2accb - [OpenACC] Enable 'self' sema for 'update' construct

2025-01-08 Thread via cfe-commits
Author: erichkeane Date: 2025-01-08T13:19:33-08:00 New Revision: 2c2accbcc6b0f132182a35b65ac76c038912cd1e URL: https://github.com/llvm/llvm-project/commit/2c2accbcc6b0f132182a35b65ac76c038912cd1e DIFF: https://github.com/llvm/llvm-project/commit/2c2accbcc6b0f132182a35b65ac76c038912cd1e.diff LO

[clang-tools-extra] [clang-tidy][NFC] clean `LangOpts` parameter in `explicitMarkUnused` matcher (PR #122170)

2025-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Congcong Cai (HerrCai0907) Changes https://github.com/llvm/llvm-project/pull/121783#discussion_r1907847579 --- Full diff: https://github.com/llvm/llvm-project/pull/122170.diff 1 Files Affected: - (modified) clang-tools-extr

[clang-tools-extra] [clang-tidy] Filter out googletest TUs in bugprone-unchecked-optional-access (PR #115051)

2025-01-08 Thread Jan Voung via cfe-commits
@@ -40,11 +40,30 @@ void UncheckedOptionalAccessCheck::registerMatchers(MatchFinder *Finder) { this); } +void UncheckedOptionalAccessCheck::onStartOfTranslationUnit() { + // Reset the flag for each TU. + is_test_tu_ = false; +} + void UncheckedOptionalAccessCheck::ch

[clang-tools-extra] [clang-tidy] Filter out googletest TUs in bugprone-unchecked-optional-access (PR #115051)

2025-01-08 Thread Jan Voung via cfe-commits
jvoung wrote: Done (there was a false-negative example in `unchecked_value_access` but also added the ASSERT_FALSE) https://github.com/llvm/llvm-project/pull/115051 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang-tools-extra] [clang-tidy] Filter out googletest TUs in bugprone-unchecked-optional-access (PR #115051)

2025-01-08 Thread Jan Voung via cfe-commits
@@ -40,11 +40,30 @@ void UncheckedOptionalAccessCheck::registerMatchers(MatchFinder *Finder) { this); } +void UncheckedOptionalAccessCheck::onStartOfTranslationUnit() { + // Reset the flag for each TU. + is_test_tu_ = false; +} + void UncheckedOptionalAccessCheck::ch

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2025-01-08 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx edited https://github.com/llvm/llvm-project/pull/114062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC] clean `LangOpts` parameter in `explicitMarkUnused` matcher (PR #122170)

2025-01-08 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/122170 https://github.com/llvm/llvm-project/pull/121783#discussion_r1907847579 >From 4793cd64f92c6e154fb9dec6d037b33a3b5b2ad8 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 9 Jan 2025 05:18:35 +0800 Subjec

[clang] [clang][OpenMP] Add 'align' modifier for 'allocate' clause (PR #121814)

2025-01-08 Thread Alexey Bataev via cfe-commits
@@ -7924,10 +7924,12 @@ void OMPClauseWriter::VisitOMPMapClause(OMPMapClause *C) { void OMPClauseWriter::VisitOMPAllocateClause(OMPAllocateClause *C) { Record.push_back(C->varlist_size()); - Record.writeEnum(C->getAllocatorModifier()); + Record.push_back(C->getFirstAlloca

[clang-tools-extra] [clang-tidy] Filter out googletest TUs in bugprone-unchecked-optional-access (PR #115051)

2025-01-08 Thread Jan Voung via cfe-commits
@@ -27,19 +29,44 @@ class UncheckedOptionalAccessCheck : public ClangTidyCheck { UncheckedOptionalAccessCheck(StringRef Name, ClangTidyContext *Context) : ClangTidyCheck(Name, Context), ModelOptions{ -Options.getLocalOrGlobal("IgnoreSmartPointerDeref

[clang-tools-extra] [clang-tidy] Filter out googletest TUs in bugprone-unchecked-optional-access (PR #115051)

2025-01-08 Thread Jan Voung via cfe-commits
@@ -27,19 +29,44 @@ class UncheckedOptionalAccessCheck : public ClangTidyCheck { UncheckedOptionalAccessCheck(StringRef Name, ClangTidyContext *Context) : ClangTidyCheck(Name, Context), ModelOptions{ -Options.getLocalOrGlobal("IgnoreSmartPointerDeref

[clang] Allow packing fields into tail padding of record fields (PR #122197)

2025-01-08 Thread David Blaikie via cfe-commits
https://github.com/dwblaikie edited https://github.com/llvm/llvm-project/pull/122197 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Allow packing fields into tail padding of record fields (PR #122197)

2025-01-08 Thread David Blaikie via cfe-commits
https://github.com/dwblaikie commented: Thanks! Looks plausible to me, would be great to get @Michael137's take on it, since he's been looking at this sort of thing a fair bit lately. https://github.com/llvm/llvm-project/pull/122197 ___ cfe-commits ma

[clang] [flang] [lld] [Flang] Remove FortranDecimal library (PR #121997)

2025-01-08 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur updated https://github.com/llvm/llvm-project/pull/121997 >From a08aa48fb4955f9d16c6172580505c100076b5d4 Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Tue, 7 Jan 2025 17:05:39 +0100 Subject: [PATCH 1/2] Join FortranDecimal into FortranCommon --- clang/lib/Dri

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-08 Thread Bill Wendling via cfe-commits
bwendling wrote: Howdy! This is essentially a complete rewrite of 00b6d032a22196bc14e4e30e413c040eb1b65da4. The original was overly complex and fragile. The main difference with this PR is basing the calculations off of the already emitted `Expr` instead of doing it within this function. It a

[clang] [clang][OpenMP] Add 'align' modifier for 'allocate' clause (PR #121814)

2025-01-08 Thread David Pagan via cfe-commits
https://github.com/ddpagan updated https://github.com/llvm/llvm-project/pull/121814 >From c2c2c4c46c3ea615e86484b9f9a14a74fab21295 Mon Sep 17 00:00:00 2001 From: Dave Pagan Date: Fri, 22 Nov 2024 10:35:40 -0600 Subject: [PATCH 1/4] [clang][OpenMP] Add 'align' modifier for 'allocate' clause Th

[clang] Allow packing fields into tail padding of record fields (PR #122197)

2025-01-08 Thread Eli Friedman via cfe-commits
@@ -803,10 +804,16 @@ bool ConstStructBuilder::Build(const InitListExpr *ILE, bool AllowOverwrite) { if (!AppendField(Field, Layout.getFieldOffset(FieldNo), EltInit, AllowOverwrite)) return false; - // After emitting a non-empty field

[clang] Allow packing fields into tail padding of record fields (PR #122197)

2025-01-08 Thread Eli Friedman via cfe-commits
@@ -389,14 +389,28 @@ void CGRecordLowering::accumulateFields(bool isNonVirtualBaseType) { // Empty fields have no storage. ++Field; } else { - // Use base subobject layout for the potentially-overlapping field, - // as it is done in RecordLayoutBuild

[clang] Allow packing fields into tail padding of record fields (PR #122197)

2025-01-08 Thread Eli Friedman via cfe-commits
@@ -389,14 +389,28 @@ void CGRecordLowering::accumulateFields(bool isNonVirtualBaseType) { // Empty fields have no storage. ++Field; } else { - // Use base subobject layout for the potentially-overlapping field, - // as it is done in RecordLayoutBuild

[clang] [clang][OpenMP] Add 'align' modifier for 'allocate' clause (PR #121814)

2025-01-08 Thread David Pagan via cfe-commits
ddpagan wrote: Made changes requested by Alexey. https://github.com/llvm/llvm-project/pull/121814 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Update OpenMPSupport.rst (PR #122174)

2025-01-08 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. https://github.com/llvm/llvm-project/pull/122174 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add "extend lifetime" flags and release note (PR #110000)

2025-01-08 Thread David Blaikie via cfe-commits
https://github.com/dwblaikie approved this pull request. https://github.com/llvm/llvm-project/pull/11 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Update OpenMPSupport.rst (PR #122174)

2025-01-08 Thread Krzysztof Parzyszek via cfe-commits
@@ -343,6 +343,124 @@ implementation. | task | nowait clause on taskwait | :part:`partial` | parsing/sema done: D131830, D141531 | +--+---

[clang] Update OpenMPSupport.rst (PR #122174)

2025-01-08 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/122174 >From 47908c2aefc7009ccb62d4b9111fbd8d7e5ee7ad Mon Sep 17 00:00:00 2001 From: CatherineMoore Date: Wed, 8 Jan 2025 16:33:01 -0500 Subject: [PATCH 1/2] Update OpenMPSupport.rst --- clang/docs/OpenMPSupport.rst

[clang] Update OpenMPSupport.rst (PR #122174)

2025-01-08 Thread Joseph Huber via cfe-commits
@@ -343,6 +343,124 @@ implementation. | task | nowait clause on taskwait | :part:`partial` | parsing/sema done: D131830, D141531 | +--+---

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-01-08 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I think you're looking for -DLLVM_RUNTIME_TARGETS ? https://github.com/llvm/llvm-project/pull/109164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Filter out googletest TUs in bugprone-unchecked-optional-access (PR #115051)

2025-01-08 Thread Jan Voung via cfe-commits
jvoung wrote: > Sorry for the delay. > > I think, that we can probably all agree that the best solution would be to > have the model support the macros, e.g., by recognizing the patterns that are > behind these macros. However, that is currently not something that people can > find time to do

[clang] [CUDA][HIP] Fix overriding of constexpr virtual function (PR #121986)

2025-01-08 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. https://github.com/llvm/llvm-project/pull/121986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA][HIP] Fix overriding of constexpr virtual function (PR #121986)

2025-01-08 Thread Artem Belevich via cfe-commits
@@ -1309,6 +1309,13 @@ Sema::CheckOverload(Scope *S, FunctionDecl *New, const LookupResult &Old, return Ovl_Overload; } +template static bool hasExplicitAttr(const FunctionDecl *D) { + assert(D && "function delc should not be null"); Artem-B wrote: `delc

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-01-08 Thread Jonas Paulsson via cfe-commits
JonPsson1 wrote: > -DLLVM_RUNTIME_TARGETS Thanks. If I use cmake with -DLLVM_RUNTIME_TARGETS=systemz, and then rebuild, I see one more file being built: ``` ninja [6/6] Linking CXX shared library lib/clang/20/lib/s390x-unknown-linux-gnu/libclang_rt.asan.so ``` However it does not seem to be

[clang] b9c932e - [test][Driver][clang] Fix darwin-embedded-search-paths.c when CLANG_DEFAULT_CXX_STDLIB is libc++ (#122145)

2025-01-08 Thread via cfe-commits
Author: Ian Anderson Date: 2025-01-08T15:16:13-08:00 New Revision: b9c932e5d6269fb0233ad5e70084e99e36ed4472 URL: https://github.com/llvm/llvm-project/commit/b9c932e5d6269fb0233ad5e70084e99e36ed4472 DIFF: https://github.com/llvm/llvm-project/commit/b9c932e5d6269fb0233ad5e70084e99e36ed4472.diff

[clang] [test][Driver][clang] Fix darwin-embedded-search-paths.c when CLANG_DEFAULT_CXX_STDLIB is libc++ (PR #122145)

2025-01-08 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder closed https://github.com/llvm/llvm-project/pull/122145 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA][HIP] Fix overriding of constexpr virtual function (PR #121986)

2025-01-08 Thread Artem Belevich via cfe-commits
@@ -1595,8 +1606,21 @@ static bool IsOverloadOrOverrideImpl(Sema &SemaRef, FunctionDecl *New, // Allow overloading of functions with same signature and different CUDA // target attributes. -if (NewTarget != OldTarget) +if (NewTarget != OldTarg

[clang] [SYCL] Basic diagnostics for the sycl_kernel_entry_point attribute. (PR #120327)

2025-01-08 Thread Tom Honermann via cfe-commits
@@ -1550,6 +1550,8 @@ NamedDecl *Sema::ActOnNonTypeTemplateParameter(Scope *S, Declarator &D, IdResolver.AddDecl(Param); } + ProcessDeclAttributes(S, Param, D); tahonermann wrote: Thanks, @AaronBallman. See also [P3324 (Attributes for namespace alias

[clang] [FMV][AArch64] Changes in fmv-features metadata. (PR #122192)

2025-01-08 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea created https://github.com/llvm/llvm-project/pull/122192 * We want the default version to have this attribute too otherwise it becomes indistinguishable from non-versioned functions. * We don't need the '+' unlike target-features which can negate. This will allow u

[clang] [FMV][AArch64] Changes in fmv-features metadata. (PR #122192)

2025-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Alexandros Lamprineas (labrinea) Changes * We want the default version to have this attribute too otherwise it becomes indistinguishable from non-versioned functions. * We don't need the '+' unlike target-features which can negate

[clang] [FMV][AArch64] Changes in fmv-features metadata. (PR #122192)

2025-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alexandros Lamprineas (labrinea) Changes * We want the default version to have this attribute too otherwise it becomes indistinguishable from non-versioned functions. * We don't need the '+' unlike target-features which can negate. This w

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-01-08 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I think you need to do some target-specific stuff to get the builtins library to build... see, for example, https://reviews.llvm.org/D42958 . https://github.com/llvm/llvm-project/pull/109164 ___ cfe-commits mailing list cfe-commit

[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

2025-01-08 Thread Johannes Doerfert via cfe-commits
@@ -0,0 +1,36 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck %s + +// CHECK-LABEL: @test1( +// CHECK-NEXT: entry: +// CHECK-NEXT:[[A_ADDR:%.*]] = alloca ptr,

[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

2025-01-08 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert requested changes to this pull request. https://github.com/llvm/llvm-project/pull/121789 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add "extend lifetime" flags and release note (PR #110000)

2025-01-08 Thread Richard Smith via cfe-commits
@@ -412,6 +412,20 @@ New Compiler Flags only for thread-local variables, and none (which corresponds to the existing ``-fno-c++-static-destructors`` flag) skips all static destructors registration. +- The ``-fextend-variable-liveness`` flag has been added to allow for imp

[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

2025-01-08 Thread Johannes Doerfert via cfe-commits
@@ -2761,6 +2761,41 @@ etc.). Query for this feature with ``__has_builtin(__builtin_assume_separate_storage)``. +``__builtin_assume_dereferenceable`` +- + +``__builtin_assume_derefernceable`` is used to provide the optimizer with the +know

[clang] [Clang] Add "extend lifetime" flags and release note (PR #110000)

2025-01-08 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/11 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add -mcpu=sifive-p550. (PR #122164)

2025-01-08 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/122164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Don't form a type constraint if the concept is invalid (PR #122065)

2025-01-08 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/122065 >From 312776183068b84ddfea38ea7158c44c1926160a Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 8 Jan 2025 15:40:23 +0800 Subject: [PATCH 1/3] [Clang] Don't form a type constraint if the concept is invali

[clang] [llvm] [HLSL] Explicitly set the SPIR-V version with spv-target-env (PR #121961)

2025-01-08 Thread Nathan Gauër via cfe-commits
@@ -1468,9 +1468,14 @@ Compilation *Driver::BuildCompilation(ArrayRef ArgList) { // Set specific Vulkan version if applicable. if (const Arg *A = Args.getLastArg(options::OPT_fspv_target_env_EQ)) { - const llvm::StringSet<> ValidValues = {"vulkan1.2",

[clang] [clang] constexpr atomic builtins (__c11_atomic_OP and __atomic_OP) (PR #98756)

2025-01-08 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot updated https://github.com/llvm/llvm-project/pull/98756 From 7d65b133b5f04e078b3b26cee2b4be0fe78d01e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?= Date: Mon, 6 Jan 2025 21:06:10 +0100 Subject: [PATCH 1/2] [clang] implement P3309 atomic bui

[clang] [clang] constexpr atomic builtins (__c11_atomic_OP and __atomic_OP) (PR #98756)

2025-01-08 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot updated https://github.com/llvm/llvm-project/pull/98756 From 7d65b133b5f04e078b3b26cee2b4be0fe78d01e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?= Date: Mon, 6 Jan 2025 21:06:10 +0100 Subject: [PATCH 1/2] [clang] implement P3309 atomic bui

[clang] [llvm] [FMV][AArch64] Simplify version selection according to ACLE. (PR #121921)

2025-01-08 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/121921 >From 785c6eca701edbd42686a4adaa2099b55b5271a0 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Tue, 7 Jan 2025 11:37:32 + Subject: [PATCH 1/3] [FMV][AArch64] Simplify version selection according

[clang] [clang] Refine the temporay object member access filtering for GSL pointer (PR #122088)

2025-01-08 Thread Utkarsh Saxena via cfe-commits
@@ -1103,6 +1094,8 @@ shouldLifetimeExtendThroughPath(const IndirectLocalPath &Path) { for (auto Elem : Path) { if (Elem.Kind == IndirectLocalPathEntry::DefaultInit) return PathLifetimeKind::Extend; +if (Elem.Kind == IndirectLocalPathEntry::MemberExpr) + c

[clang] [clang] Refine the temporay object member access filtering for GSL pointer (PR #122088)

2025-01-08 Thread Utkarsh Saxena via cfe-commits
@@ -806,3 +806,31 @@ std::string_view test2(int c, std::string_view sv) { } } // namespace GH120206 + +namespace GH120543 { +struct S { + std::string_view sv; + std::string s; +}; +struct Q { + const S* get() const [[clang::lifetimebound]]; +}; +void test1() { + std::strin

[clang] [llvm] [FMV][AArch64] Simplify version selection according to ACLE. (PR #121921)

2025-01-08 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/121921 >From 785c6eca701edbd42686a4adaa2099b55b5271a0 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Tue, 7 Jan 2025 11:37:32 + Subject: [PATCH 1/5] [FMV][AArch64] Simplify version selection according

[clang] [llvm] [FMV][AArch64] Simplify version selection according to ACLE. (PR #121921)

2025-01-08 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/121921 >From 785c6eca701edbd42686a4adaa2099b55b5271a0 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Tue, 7 Jan 2025 11:37:32 + Subject: [PATCH 1/5] [FMV][AArch64] Simplify version selection according

<    1   2   3   4   5   6   >