[clang] [Clang] fix access checking inside return-type-requirement of compound requirements (PR #95651)

2024-06-21 Thread Zhikai Zeng via cfe-commits
https://github.com/Backl1ght updated https://github.com/llvm/llvm-project/pull/95651 >From 1c283900fc4bc984ebd917ead6ddd8c5d0364d80 Mon Sep 17 00:00:00 2001 From: Backl1ght Date: Sat, 15 Jun 2024 16:56:00 +0800 Subject: [PATCH] fix --- clang/docs/ReleaseNotes.rst | 1 +

[clang] Adjust MSVC version range for ARM64 build performance regression (PR #90731)

2024-06-21 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 approved this pull request. LGTM! Looks CI failed due to MSVC "fatal error C1060: compiler is out of heap space" inside a flang source file. I would try syncing upto main since I know flang has had quite of changes that overall reduce MSVC's memory usage at least

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [libunwind][libcxx][libcxxabi][compiler-rt-builtins] Fix Exception Handling build for wasm (PR #79667)

2024-06-21 Thread via cfe-commits
https://github.com/trcrsired updated https://github.com/llvm/llvm-project/pull/79667 >From d105b0c1435cb5a8cc31eadd8a92f774b440f507 Mon Sep 17 00:00:00 2001 From: cqwrteur <100043421+trcrsi...@users.noreply.github.com> Date: Sat, 1 Jun 2024 02:55:50 -0400 Subject: [PATCH]

[clang] [clang][Sema] Fix crash on atomic builtins with incomplete type args (PR #96374)

2024-06-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Takuya Shimizu (hazohelet) Changes This patch fixes the crash when pointers to incomplete type are passed to atomic builtins such as `__atomic_load`. `ASTContext::getTypeInfoInChars` assumes that the argument type is a complete type, so

[clang] [clang][Sema] Fix crash on atomic builtins with incomplete type args (PR #96374)

2024-06-21 Thread Takuya Shimizu via cfe-commits
https://github.com/hazohelet created https://github.com/llvm/llvm-project/pull/96374 This patch fixes the crash when pointers to incomplete type are passed to atomic builtins such as `__atomic_load`. `ASTContext::getTypeInfoInChars` assumes that the argument type is a complete type, so I

[clang] [clang-format] Annotate r_paren before braced list as TT_CastRParen (PR #96271)

2024-06-21 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/96271 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d69050d - [clang-format] Annotate r_paren before braced list as TT_CastRParen (#96271)

2024-06-21 Thread via cfe-commits
Author: Owen Pan Date: 2024-06-21T20:23:18-07:00 New Revision: d69050d614cc3348fb639f4a1862e8b9a9ad9885 URL: https://github.com/llvm/llvm-project/commit/d69050d614cc3348fb639f4a1862e8b9a9ad9885 DIFF: https://github.com/llvm/llvm-project/commit/d69050d614cc3348fb639f4a1862e8b9a9ad9885.diff

[clang] [llvm] [clang][Driver] Add HIPAMD Driver support for AMDGCN flavoured SPIR-V (PR #95061)

2024-06-21 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx edited https://github.com/llvm/llvm-project/pull/95061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][Driver] Add HIPAMD Driver support for AMDGCN flavoured SPIR-V (PR #95061)

2024-06-21 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. Out of curiosity, how badly does this fail when you use `--offload-new-driver` w/ HIP? I swear I'll get that passing the internal test suite eventually, there's a single case for emitting IR that comgr uses that I can't seem to fix.

[clang-tools-extra] [clang-tidy] add option to avoid "no checks enabled" error (PR #96122)

2024-06-21 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/96122 >From 41993ea6903668c41eef8a4477f5914c894f7109 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 19 Jun 2024 23:20:09 + Subject: [PATCH 1/5] [clang-tidy] add option to avoid "no checks enabled"

[clang] [compiler-rt] [libcxx] [libunwind] [llvm] [openmp] [cmake] switch to CMake's native `check_{compiler,linker}_flag` (PR #96171)

2024-06-21 Thread via cfe-commits
h-vetinari wrote: Failing bootstrap build still has: ``` from packaging import version ModuleNotFoundError: No module named 'packaging' ``` which is clearly unrelated to this PR. https://github.com/llvm/llvm-project/pull/96171 ___ cfe-commits

[clang] [llvm] [LLVM] Fix incorrect alignment on AMDGPU variadics (PR #96370)

2024-06-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Joseph Huber (jhuber6) Changes Summary: The variadics lowering for AMDGPU puts all the arguments into a void pointer struct. The current logic dictates that the minimum alignment is four regardless of what the underlying type is.

[clang] [llvm] [LLVM] Fix incorrect alignment on AMDGPU variadics (PR #96370)

2024-06-21 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/96370 Summary: The variadics lowering for AMDGPU puts all the arguments into a void pointer struct. The current logic dictates that the minimum alignment is four regardless of what the underlying type is. This is

[clang] [libc] [llvm] [libc] Implement (v|f)printf on the GPU (PR #96369)

2024-06-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libc @llvm/pr-subscribers-clang Author: Joseph Huber (jhuber6) Changes Summary: This patch implements the `printf` family of functions on the GPU using the new variadic support. This patch adapts the old handling in the `rpc_fprintf` placeholder, but

[clang] [libc] [llvm] [libc] Implement (v|f)printf on the GPU (PR #96369)

2024-06-21 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/96369 Summary: This patch implements the `printf` family of functions on the GPU using the new variadic support. This patch adapts the old handling in the `rpc_fprintf` placeholder, but adds an extra RPC call to get

[clang] [libcxx] [clang] Add builtin to clear padding bytes (prework for P0528R3) (PR #75371)

2024-06-21 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: If you want to modify part of a bitfield unit, you need to load/store the whole bitfield unit, as computed by the CGRecordLayout. This is true whether you're modifying an actual field, or padding adjacent to a field. Since any padding has to be adjacent to a bitfield,

[clang] [llvm] [Clang][ARM][AArch64] Alway emit protection attributes for functions. (PR #82819)

2024-06-21 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I'm not sure I understand the goal here. For return-address signing, each function can make its own choice about whether to sign; the function that's doing the signing is the same function that does the auth, so it doesn't directly impact any other function. For branch

[clang] [HLSL][clang] Add elementwise builtins for trig intrinsics (PR #95999)

2024-06-21 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/95999 ___ 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.store` (PR #94576)

2024-06-21 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/94576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Fix argument passing in reserved registers for preserve_nonecc (PR #96259)

2024-06-21 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM. Please don't forget about the varargs issue, though https://github.com/llvm/llvm-project/pull/96259 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] clang: Relax LangOpts checks when lexing quoted numbers during preprocessing (PR #95798)

2024-06-21 Thread Jan Svoboda via cfe-commits
@@ -2068,7 +2068,8 @@ bool Lexer::LexNumericConstant(Token , const char *CurPtr) { } // If we have a digit separator, continue. - if (C == '\'' && (LangOpts.CPlusPlus14 || LangOpts.C23)) { + if (C == '\'' && + (LangOpts.CPlusPlus14 || LangOpts.C23 ||

[clang] [Clang] Allow raw string literals in C as an extension (PR #88265)

2024-06-21 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: I assume that @benlangmuir added the scanner unit-test to demonstrate the current behavior instead of trying to make sure it's preserved. I think making it so that the test passes (actually handles raw string literals) and updating the FIXME in

[clang-tools-extra] reapply [clang-doc] Add --asset option to clang-doc" (#96354)" (PR #96358)

2024-06-21 Thread via cfe-commits
https://github.com/PeterChou1 edited https://github.com/llvm/llvm-project/pull/96358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][Coroutines] Introducing the `[[clang::coro_inplace_task]]` attribute (PR #94693)

2024-06-21 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/94693 >From 065f965d6649a56a27c39321a553188b4230f5f6 Mon Sep 17 00:00:00 2001 From: Yuxuan Chen Date: Tue, 4 Jun 2024 23:22:00 -0700 Subject: [PATCH] [Clang] Introduce [[clang::coro_inplace_task]] ---

[clang-tools-extra] reapply [clang-doc] Add --asset option to clang-doc" (#96354)" (PR #96358)

2024-06-21 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi commented: LGTM, but wait for Nico to chime in please. https://github.com/llvm/llvm-project/pull/96358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] reapply [clang-doc] Add --asset option to clang-doc" (#96354)" (PR #96358)

2024-06-21 Thread via cfe-commits
https://github.com/PeterChou1 edited https://github.com/llvm/llvm-project/pull/96358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [compiler-rt] [lldb] [llvm] [Memprof] Adds the option to collect AccessCountHistograms for memprof. (PR #94264)

2024-06-21 Thread Teresa Johnson via cfe-commits
@@ -0,0 +1,101 @@ +REQUIRES: x86_64-linux + +This is a copy of memprof-basict.test with slight changes to check that we can still read v3 of memprofraw. + +To update the inputs used below run Inputs/update_memprof_inputs.sh /path/to/updated/clang teresajohnson

[clang-tools-extra] [compiler-rt] [lldb] [llvm] [Memprof] Adds the option to collect AccessCountHistograms for memprof. (PR #94264)

2024-06-21 Thread Teresa Johnson via cfe-commits
@@ -38,4 +38,5 @@ MEMPROF_FLAG(bool, allocator_frees_and_returns_null_on_realloc_zero, true, MEMPROF_FLAG(bool, print_text, false, "If set, prints the heap profile in text format. Else use the raw binary serialization format.") MEMPROF_FLAG(bool, print_terse, false, -

[clang-tools-extra] [compiler-rt] [lldb] [llvm] [Memprof] Adds the option to collect AccessCountHistograms for memprof. (PR #94264)

2024-06-21 Thread Teresa Johnson via cfe-commits
@@ -205,8 +205,14 @@ class RawMemProfReader final : public MemProfReader { object::SectionedAddress getModuleOffset(uint64_t VirtualAddress); + llvm::SmallVector> + readMemInfoBlocks(const char *Ptr); + // The profiled binary. object::OwningBinary Binary; + //

[clang-tools-extra] [compiler-rt] [lldb] [llvm] [Memprof] Adds the option to collect AccessCountHistograms for memprof. (PR #94264)

2024-06-21 Thread Teresa Johnson via cfe-commits
@@ -610,13 +670,33 @@ RawMemProfReader::peekBuildIds(MemoryBuffer *DataBuffer) { return BuildIds.takeVector(); } +// FIXME: Add a schema for serializing similiar to IndexedMemprofReader. This +// will help being able to deserialize different versions raw memprof versions

[clang-tools-extra] [compiler-rt] [lldb] [llvm] [Memprof] Adds the option to collect AccessCountHistograms for memprof. (PR #94264)

2024-06-21 Thread Teresa Johnson via cfe-commits
@@ -610,13 +670,33 @@ RawMemProfReader::peekBuildIds(MemoryBuffer *DataBuffer) { return BuildIds.takeVector(); } +// FIXME: Add a schema for serializing similiar to IndexedMemprofReader. This +// will help being able to deserialize different versions raw memprof versions

[clang-tools-extra] [compiler-rt] [lldb] [llvm] [Memprof] Adds the option to collect AccessCountHistograms for memprof. (PR #94264)

2024-06-21 Thread Teresa Johnson via cfe-commits
@@ -0,0 +1,101 @@ +REQUIRES: x86_64-linux + +This is a copy of memprof-basict.test with slight changes to check that we can still read v3 of memprofraw. teresajohnson wrote: typo: basict https://github.com/llvm/llvm-project/pull/94264

[clang-tools-extra] [compiler-rt] [lldb] [llvm] [Memprof] Adds the option to collect AccessCountHistograms for memprof. (PR #94264)

2024-06-21 Thread Teresa Johnson via cfe-commits
@@ -216,6 +228,35 @@ u64 GetShadowCount(uptr p, u32 size) { return count; } +// Accumulates the access count from the shadow for the given pointer and size. +// See memprof_mapping.h for an overview on histogram counters. +u64 GetShadowCountHistogram(uptr p, u32 size) { +

[clang-tools-extra] [compiler-rt] [lldb] [llvm] [Memprof] Adds the option to collect AccessCountHistograms for memprof. (PR #94264)

2024-06-21 Thread Teresa Johnson via cfe-commits
@@ -124,6 +124,13 @@ struct PortableMemInfoBlock { OS << "" << #Name << ": " << Name << "\n"; #include "llvm/ProfileData/MIBEntryDef.inc" #undef MIBEntryDef +if (AccessHistogramSize > 0) { + OS << "" << "AccessHistogramValues" << ":"; + for

[clang-tools-extra] [compiler-rt] [lldb] [llvm] [Memprof] Adds the option to collect AccessCountHistograms for memprof. (PR #94264)

2024-06-21 Thread Teresa Johnson via cfe-commits
@@ -508,7 +519,26 @@ void createProfileFileNameVar(Module ) { } } +// Set MemprofHistogramFlag as a Global veriable in IR. This makes it accessible +// to teresajohnson wrote: nit: fix line wrapping https://github.com/llvm/llvm-project/pull/94264

[clang-tools-extra] [compiler-rt] [lldb] [llvm] [Memprof] Adds the option to collect AccessCountHistograms for memprof. (PR #94264)

2024-06-21 Thread Teresa Johnson via cfe-commits
@@ -96,19 +102,63 @@ llvm::SmallVector readSegmentEntries(const char *Ptr) { } llvm::SmallVector> -readMemInfoBlocks(const char *Ptr) { +readMemInfoBlocksV3(const char *Ptr) { using namespace support; const uint64_t NumItemsToRead = - endian::readNext(Ptr); +

[clang-tools-extra] [compiler-rt] [lldb] [llvm] [Memprof] Adds the option to collect AccessCountHistograms for memprof. (PR #94264)

2024-06-21 Thread Teresa Johnson via cfe-commits
@@ -20,25 +20,25 @@ CHECK-NEXT: - CHECK: Records: CHECK-NEXT: - -CHECK-NEXT:FunctionGUID: 15505678318020221912 +CHECK-NEXT:FunctionGUID: 3873612792189045660 CHECK-NEXT:AllocSites: CHECK-NEXT:- CHECK-NEXT: Callstack: CHECK-NEXT: - -CHECK-NEXT:

[clang-tools-extra] [compiler-rt] [lldb] [llvm] [Memprof] Adds the option to collect AccessCountHistograms for memprof. (PR #94264)

2024-06-21 Thread Teresa Johnson via cfe-commits
@@ -508,7 +519,26 @@ void createProfileFileNameVar(Module ) { } } +// Set MemprofHistogramFlag as a Global veriable in IR. This makes it accessible +// to +// the runtime, changing shadow count behavior. +void createMemprofHistogramFlagVar(Module ) { + const StringRef

[clang-tools-extra] [compiler-rt] [lldb] [llvm] [Memprof] Adds the option to collect AccessCountHistograms for memprof. (PR #94264)

2024-06-21 Thread Teresa Johnson via cfe-commits
@@ -216,6 +228,35 @@ u64 GetShadowCount(uptr p, u32 size) { return count; } +// Accumulates the access count from the shadow for the given pointer and size. +// See memprof_mapping.h for an overview on histogram counters. +u64 GetShadowCountHistogram(uptr p, u32 size) { +

[clang] [Clang][Parse] Fix ambiguity with nested-name-specifiers that may declarative (PR #96364)

2024-06-21 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian edited https://github.com/llvm/llvm-project/pull/96364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Parse] Fix ambiguity with nested-name-specifiers that may declarative (PR #96364)

2024-06-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Krystian Stasiowski (sdkrystian) Changes Consider the following: ```cpp templatetypename T struct A { }; templatetypename T int AT::B::* f(); // error: no member named 'B' in 'AT' ``` Although this is clearly valid, clang rejects it

[clang] [Clang][Parse] Fix ambiguity with nested-name-specifiers that may declarative (PR #96364)

2024-06-21 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/96364 Consider the following: ```cpp template struct A { }; template int A::B::* f(); // error: no member named 'B' in 'A' ``` Although this is clearly valid, clang rejects it because the _nested-name-specifier_

[clang] [clang] Improve diagnostics for constraints of inline asm (NFC) (PR #96363)

2024-06-21 Thread Evgenii Kudriashov via cfe-commits
e-kud wrote: Initially I've implemented the target errors through std::string. Then changed to diag::kind after reading InternalsManual. I'm not sure what is better. The drawback of returning diagnoistics by reference is that we can't customize them, only fixed messages. Maybe this is not a

[clang] [clang] Improve diagnostics for constraints of inline asm (NFC) (PR #96363)

2024-06-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Evgenii Kudriashov (e-kud) Changes Introduce more detailed diagnostics for the constrains. Also provide an opportunity for backends to provide detailed diagnostics for target specific constraints based on enabled features. We

[clang] [clang] Improve diagnostics for constraints of inline asm (NFC) (PR #96363)

2024-06-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang Author: Evgenii Kudriashov (e-kud) Changes Introduce more detailed diagnostics for the constrains. Also provide an opportunity for backends to provide detailed diagnostics for target specific constraints based

[clang] [clang] Improve diagnostics for constraints of inline asm (NFC) (PR #96363)

2024-06-21 Thread Evgenii Kudriashov via cfe-commits
https://github.com/e-kud created https://github.com/llvm/llvm-project/pull/96363 Introduce more detailed diagnostics for the constrains. Also provide an opportunity for backends to provide detailed diagnostics for target specific constraints based on enabled features. We provide features as a

[clang] [compiler-rt] [libcxx] [libunwind] [llvm] [openmp] [cmake] switch to CMake's native `check_{compiler,linker}_flag` (PR #96171)

2024-06-21 Thread via cfe-commits
h-vetinari wrote: The failing tests here previously were clearly unrelated (missing python module `packaging` somewhere). The failure I see now is due to a timeout (also unrelated): ``` llvm-lit: /home/runner/_work/llvm-project/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-06-21 Thread via cfe-commits
@@ -0,0 +1,19 @@ +.. title:: clang-tidy - bugprone-move-shared-pointer-contents + +bugprone-move-shared-pointer-contents += + + +Detects calls to move the contents out of a ``std::shared_ptr`` rather +than moving the pointer itself. In other

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-06-21 Thread via cfe-commits
@@ -383,7 +388,7 @@ Changes in existing checks - Improved :doc:`misc-unused-using-decls ` check to avoid false positive when - using in elaborated type and only check cpp files. pizzud wrote: Done. https://github.com/llvm/llvm-project/pull/67467

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-06-21 Thread via cfe-commits
@@ -0,0 +1,145 @@ +//===--- MoveSharedPointerContentsCheck.cpp - clang-tidy --===// +// +// 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:

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-06-21 Thread via cfe-commits
@@ -368,8 +374,7 @@ Changes in existing checks ` check to avoid false positive when using pointer to member function. Additionally, the check no longer emits a diagnostic when a variable that is not type-dependent is an operand of a - type-dependent binary operator.

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-06-21 Thread via cfe-commits
https://github.com/pizzud updated https://github.com/llvm/llvm-project/pull/67467 >From 04a3e8d8cbd6943f44a81fddb0524902202a1a78 Mon Sep 17 00:00:00 2001 From: David Pizzuto Date: Tue, 26 Sep 2023 10:45:42 -0700 Subject: [PATCH 1/6] [clang-tidy] Add bugprone-move-shared-pointer-contents

[clang] [Clang] use parent declaration context to avoid asserting cast failure in defaulted comparison method (PR #96228)

2024-06-21 Thread Shafik Yaghmour via cfe-commits
shafik wrote: There are several test failures that look related to this change, please check them out. https://github.com/llvm/llvm-project/pull/96228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang] use parent declaration context to avoid asserting cast failure in defaulted comparison method (PR #96228)

2024-06-21 Thread Shafik Yaghmour via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify %s shafik wrote: I think this is a better location for the test: https://github.com/llvm/llvm-project/blob/main/clang/test/CXX/class/class.compare/class.compare.default/p1.cpp We normally

[clang] [Clang] use parent declaration context to avoid asserting cast failure in defaulted comparison method (PR #96228)

2024-06-21 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Thank you for the fix. I am curious what specifically about this code triggers the crash. We do have a test w/ a defaulted outside the class. So there is another condition needed to trigger this. It looks like removing `constexpr` from `operator==(d h, g

[clang] [Clang] use parent declaration context to avoid asserting cast failure in defaulted comparison method (PR #96228)

2024-06-21 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/96228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [mlir] [flang] Add basic -mtune support (PR #95043)

2024-06-21 Thread Andrzej WarzyƄski via cfe-commits
banach-space wrote: > if I do so should I also move the target-features-*.f90 tests? Yes, but to me that would qualify as an "unrelated change" (i.e. sth for a separate PR, no need to worry about it here). In general, this PR is about enabling a flag in

[clang] [clang][ThreadSafety] Check trylock function success and return types (PR #95290)

2024-06-21 Thread Dan McArdle via cfe-commits
https://github.com/dmcardle edited https://github.com/llvm/llvm-project/pull/95290 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ThreadSafety] Check trylock function success and return types (PR #95290)

2024-06-21 Thread Dan McArdle via cfe-commits
https://github.com/dmcardle updated https://github.com/llvm/llvm-project/pull/95290 >From 807953fc74920e3d5ed727a00c0e1177870c56fe Mon Sep 17 00:00:00 2001 From: Dan McArdle Date: Thu, 20 Jun 2024 17:43:16 -0400 Subject: [PATCH] [clang][ThreadSafety] Check trylock function success and return

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

2024-06-21 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I can't think of any obvious reason this would cause timeouts. I mean, you're adding metadata to a bunch of functions, and if something handles that metadata inefficiently, things could easily explode. But nothing specific comes to mind.

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

2024-06-21 Thread Eli Friedman via cfe-commits
@@ -707,7 +707,34 @@ static RValue emitLibraryCall(CodeGenFunction , const FunctionDecl *FD, const CallExpr *E, llvm::Constant *calleeValue) { CodeGenFunction::CGFPOptionsRAII FPOptsRAII(CGF, E); CGCallee callee =

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

2024-06-21 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > > Can we restrict this to targets where libm actually modifies errno? > > Do you mean it is better to have a function list, which actually modifies > `errno` ? For example, we should restrict to `__exp10`, but but not a general > top call `__exp `? I said targets, not

[clang-tools-extra] Revert "Revert "[clang-doc] Add --asset option to clang-doc" (#96354)" (PR #96358)

2024-06-21 Thread via cfe-commits
PeterChou1 wrote: @ilovepi https://github.com/llvm/llvm-project/pull/96358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Revert "Revert "[clang-doc] Add --asset option to clang-doc" (#96354)" (PR #96358)

2024-06-21 Thread via cfe-commits
https://github.com/PeterChou1 edited https://github.com/llvm/llvm-project/pull/96358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [libcxx] [libunwind] [llvm] [openmp] [cmake] switch to CMake's native `check_{compiler,linker}_flag` (PR #96171)

2024-06-21 Thread via cfe-commits
https://github.com/h-vetinari updated https://github.com/llvm/llvm-project/pull/96171 >From 1df587efeb71fb1929667f008d7e9b251863d9d8 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Thu, 20 Jun 2024 21:43:31 +1100 Subject: [PATCH 1/3] [cmake] switch to CMake's native check_linker_flag,

[clang-tools-extra] Revert "Revert "[clang-doc] Add --asset option to clang-doc" (#96354)" (PR #96358)

2024-06-21 Thread via cfe-commits
https://github.com/PeterChou1 edited https://github.com/llvm/llvm-project/pull/96358 ___ 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.buffer.store` (PR #94576)

2024-06-21 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/94576 >From f16b927ab1b582d1b53c24b846618a5bb87a52e1 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 21 Jun 2024 16:58:02 -0400 Subject: [PATCH] [Clang][AMDGPU] Add builtins for instrinsic

[clang-tools-extra] Revert "Revert "[clang-doc] Add --asset option to clang-doc" (#96354)" (PR #96358)

2024-06-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: None (PeterChou1) Changes @ilovepi re-reverts clang-doc --- Full diff: https://github.com/llvm/llvm-project/pull/96358.diff 2 Files Affected: - (modified) clang-tools-extra/clang-doc/tool/ClangDocMain.cpp (+81-19) -

[clang-tools-extra] Revert "Revert "[clang-doc] Add --asset option to clang-doc" (#96354)" (PR #96358)

2024-06-21 Thread via cfe-commits
https://github.com/PeterChou1 edited https://github.com/llvm/llvm-project/pull/96358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Revert "Revert "[clang-doc] Add --asset option to clang-doc" (#96354)" (PR #96358)

2024-06-21 Thread via cfe-commits
https://github.com/PeterChou1 created https://github.com/llvm/llvm-project/pull/96358 @ilovepi re-reverts clang-doc, i think it was false alarm? >From bb407e7c6de15d7ed2f0dd645ca2a469ee1f8a8e Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Fri, 21 Jun 2024 16:57:30 -0400 Subject: [PATCH]

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-21 Thread Paul Kirth via cfe-commits
ilovepi wrote: @nico Actually, I probably shouldn't have reverted. It seems like your GN build is incorrect, and isn't copying the asset files into the right place. The patch that updated that landed in https://github.com/llvm/llvm-project/pull/95187. @PeterChou1 is going to add you as a

[clang] [ParserHLSL] Attempt to parse HLSL annotations on Field Decls. (PR #96346)

2024-06-21 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/96346 >From c267be670adf7aac050484dc1b243aa0eff60b5f Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 21 Jun 2024 11:25:22 -0700 Subject: [PATCH 1/4] parse hlsl annotations on struct, add test ---

[clang] [ParserHLSL] Attempt to parse HLSL annotations on Field Decls. (PR #96346)

2024-06-21 Thread Joshua Batista via cfe-commits
@@ -2646,6 +2646,9 @@ bool Parser::ParseCXXMemberDeclaratorBeforeInitializer( else DeclaratorInfo.SetIdentifier(nullptr, Tok.getLocation()); + if (getLangOpts().HLSL) bob80905 wrote: Though both would hit an assert if they're called outside of HLSL

[clang] [ParserHLSL] Attempt to parse HLSL annotations on Field Decls. (PR #96346)

2024-06-21 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/96346 >From c267be670adf7aac050484dc1b243aa0eff60b5f Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 21 Jun 2024 11:25:22 -0700 Subject: [PATCH 1/3] parse hlsl annotations on struct, add test ---

[clang] [llvm] [llvm][AArch64] Move Apple aliases into the CpuAlias map (PR #96249)

2024-06-21 Thread Jon Roelofs via cfe-commits
jroelofs wrote: > Can all the cpu aliases work in the same way? Or do you want them to work > different, where they are not just frontend aliases? I hadn't noticed that mechanism. There were some holes that needed to be addressed, but after fixing them, this does look like a better way to

[clang] [Clang] Replace `emitXXXBuiltin` with a unified interface (PR #96313)

2024-06-21 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/96313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e52016a - [Clang] Replace `emitXXXBuiltin` with a unified interface (#96313)

2024-06-21 Thread via cfe-commits
Author: Shilei Tian Date: 2024-06-21T16:35:53-04:00 New Revision: e52016a2361a35773e8c1ad969b4b33a2b30d018 URL: https://github.com/llvm/llvm-project/commit/e52016a2361a35773e8c1ad969b4b33a2b30d018 DIFF: https://github.com/llvm/llvm-project/commit/e52016a2361a35773e8c1ad969b4b33a2b30d018.diff

[clang] [clang][ThreadSafety] Check trylock function success and return types (PR #95290)

2024-06-21 Thread Dan McArdle via cfe-commits
https://github.com/dmcardle updated https://github.com/llvm/llvm-project/pull/95290 >From 66715ea5566946f0608d77dc4c86b23e70179760 Mon Sep 17 00:00:00 2001 From: Dan McArdle Date: Thu, 20 Jun 2024 17:43:16 -0400 Subject: [PATCH] [clang][ThreadSafety] Check trylock function success and return

[clang] [llvm] [llvm][AArch64] Move Apple aliases into the CpuAlias map (PR #96249)

2024-06-21 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs edited https://github.com/llvm/llvm-project/pull/96249 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][AArch64] Move Apple aliases into the CpuAlias map (PR #96249)

2024-06-21 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs edited https://github.com/llvm/llvm-project/pull/96249 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ThreadSafety] Check trylock function success and return types (PR #95290)

2024-06-21 Thread Dan McArdle via cfe-commits
dmcardle wrote: So... I appear to have accidentally fixed a bug. Looks like enum success values were not being evaluated, and defaulted to false. As a result, the analysis could fail to detect unguarded access [[demo on

[clang] [llvm] [llvm][AArch64][TableGen] Create a ProcessorAlias record. NFC (PR #96249)

2024-06-21 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/96249 >From ee1389a36aac9eecf00513d98cc99787b2cfe17a Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Thu, 20 Jun 2024 16:26:45 -0700 Subject: [PATCH 1/3] [llvm][AArch64][TableGen] Create a ProcessorAlias record.

[clang] [clang][modules] Fix use-after-free in header serialization (PR #96356)

2024-06-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Jan Svoboda (jansvoboda11) Changes With the pruning of unused module map files disabled (`-fno-modules-prune-non-affecting-module-map-files`), `HeaderFileInfo` no longer gets deserialized before `ASTWriter::WriteHeaderSearch()`.

[clang] [clang][modules] Fix use-after-free in header serialization (PR #96356)

2024-06-21 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/96356 With the pruning of unused module map files disabled (`-fno-modules-prune-non-affecting-module-map-files`), `HeaderFileInfo` no longer gets deserialized before `ASTWriter::WriteHeaderSearch()`. This

[clang] [llvm] [clang][OpenMP] Shorten directive classification in ParseOpenMP (PR #94691)

2024-06-21 Thread Krzysztof Parzyszek via cfe-commits
kparzysz wrote: Ping. Anyone? https://github.com/llvm/llvm-project/pull/94691 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-21 Thread Paul Kirth via cfe-commits
ilovepi wrote: > Looks Like this might break tests: http://45.33.8.238/linux/141118/step_7.txt > > Please take a look and revert for now if it takes a while to fix. Sorry for the late revert @nico. I'll have @PeterChou1 investigate before relanding.

[clang-tools-extra] Revert "[clang-doc] Add --asset option to clang-doc" (PR #96354)

2024-06-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Paul Kirth (ilovepi) Changes Reverts llvm/llvm-project#94717 This breaks on some buildbots: http://45.33.8.238/linux/141118/step_7.txt --- Full diff: https://github.com/llvm/llvm-project/pull/96354.diff 2 Files Affected: -

[clang-tools-extra] Revert "[clang-doc] Add --asset option to clang-doc" (PR #96354)

2024-06-21 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed https://github.com/llvm/llvm-project/pull/96354 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] bf824d9 - Revert "[clang-doc] Add --asset option to clang-doc" (#96354)

2024-06-21 Thread via cfe-commits
Author: Paul Kirth Date: 2024-06-21T13:18:37-07:00 New Revision: bf824d98c06099c50413cd6c957a75b894a8ac26 URL: https://github.com/llvm/llvm-project/commit/bf824d98c06099c50413cd6c957a75b894a8ac26 DIFF: https://github.com/llvm/llvm-project/commit/bf824d98c06099c50413cd6c957a75b894a8ac26.diff

[clang-tools-extra] Revert "[clang-doc] Add --asset option to clang-doc" (PR #96354)

2024-06-21 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi ready_for_review https://github.com/llvm/llvm-project/pull/96354 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Revert "[clang-doc] Add --asset option to clang-doc" (PR #96354)

2024-06-21 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/96354 Reverts llvm/llvm-project#94717 This breaks on some buildbots: http://45.33.8.238/linux/141118/step_7.txt >From d9075144100406eed753f1b7ca3df933a596bb3a Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Fri, 21

[clang] [Clang] Replace `emitXXXBuiltin` with a unified interface (PR #96313)

2024-06-21 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/96313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][Coroutines] Introducing the `[[clang::coro_inplace_task]]` attribute (PR #94693)

2024-06-21 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/94693 >From 4854a2ed15e983740c8c38c4363d7311fd46cfc7 Mon Sep 17 00:00:00 2001 From: Yuxuan Chen Date: Tue, 4 Jun 2024 23:22:00 -0700 Subject: [PATCH] [Clang] Introduce [[clang::coro_inplace_task]] ---

[clang] Enable ASAN in amdgpu toolchain for OpenCL (PR #96262)

2024-06-21 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu closed https://github.com/llvm/llvm-project/pull/96262 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 60fa7c7 - Enable ASAN in amdgpu toolchain for OpenCL (#96262)

2024-06-21 Thread via cfe-commits
Author: Yaxun (Sam) Liu Date: 2024-06-21T16:12:56-04:00 New Revision: 60fa7c7690d65f23636c5ca51e0fbfc54ed09370 URL: https://github.com/llvm/llvm-project/commit/60fa7c7690d65f23636c5ca51e0fbfc54ed09370 DIFF:

[clang] Enable ASAN in amdgpu toolchain for OpenCL (PR #96262)

2024-06-21 Thread Yaxun Liu via cfe-commits
@@ -169,6 +180,11 @@ // COMMON-UNSAFE-MATH-SAME: "-mlink-builtin-bitcode" "{{.*}}/amdgcn/bitcode/oclc_finite_only_off.bc" // COMMON-UNSAFE-MATH-SAME: "-mlink-builtin-bitcode" "{{.*}}/amdgcn/bitcode/oclc_correctly_rounded_sqrt_off.bc" +// ASAN-SAME: "-fsanitize=address" +

[clang] [PAC][clang][Driver] Add signed GOT flag (PR #96160)

2024-06-21 Thread Anton Korobeynikov via cfe-commits
asl wrote: > Do we want a lot of `-fptrauth-xxx` instead of > `-fptrauth-something=xxx,yyy,zzz`? I would lean towards a single flag. However, I do not know how this would affect Apple downstream and what are preferences there. Tagging @ahmedbougacha @ahatanak @ojhunt

[clang] [ParserHLSL] Attempt to parse HLSL annotations on Field Decls. (PR #96346)

2024-06-21 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp edited https://github.com/llvm/llvm-project/pull/96346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ParserHLSL] Attempt to parse HLSL annotations on Field Decls. (PR #96346)

2024-06-21 Thread Damyan Pepper via cfe-commits
@@ -2646,6 +2646,9 @@ bool Parser::ParseCXXMemberDeclaratorBeforeInitializer( else DeclaratorInfo.SetIdentifier(nullptr, Tok.getLocation()); + if (getLangOpts().HLSL) damyanp wrote: I'm not proposing we combine them. My observation is that one of

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #96240)

2024-06-21 Thread via cfe-commits
https://github.com/earnol updated https://github.com/llvm/llvm-project/pull/96240 >From 00fb56c674f26f6d3455d77e37f8cad35d4aa95c Mon Sep 17 00:00:00 2001 From: Vladislav Aranov Date: Fri, 24 May 2024 11:39:35 -0400 Subject: [PATCH] [ubsan] Display correct runtime messages for negative _BitInt

  1   2   3   4   >