[clang] [llvm] [clang][CodeGen] `used` globals are fake (PR #93601)

2024-06-07 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. LGTM with the outstanding comments addressed. https://github.com/llvm/llvm-project/pull/93601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [Driver] Remove a bunch of unnecessary REQUIRES constraints (PR #94055)

2024-06-07 Thread Melissa Hunter via cfe-commits
Mhunter15 wrote: #94843 https://github.com/llvm/llvm-project/pull/94055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-07 Thread Pranav Bhandarkar via cfe-commits
@@ -5229,13 +5362,288 @@ static void emitTargetOutlinedFunction( OMPBuilder.emitTargetRegionFunction(EntryInfo, GenerateOutlinedFunction, true, OutlinedFn, OutlinedFnID); } +OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::emitTargetTask(

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-07 Thread Pranav Bhandarkar via cfe-commits
@@ -1762,6 +1762,26 @@ class OpenMPIRBuilder { EmitFallbackCallbackTy EmitTargetCallFallbackCB, TargetKernelArgs &Args, Value *DeviceID, Value *RTLoc, InsertPointTy AllocaIP); + /// Generate a target-task for the target construct + /// + /// \param OutlinedFn Th

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-07 Thread via cfe-commits
@@ -0,0 +1,17 @@ +[ + { +"directory": "$test_dir/build", PeterChou1 wrote: I tried getting relative paths to work but it didn't seem to work https://github.com/llvm/llvm-project/pull/93928 ___ cfe-commits mailing

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-07 Thread via cfe-commits
https://github.com/PeterChou1 edited https://github.com/llvm/llvm-project/pull/93928 ___ 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 basic e2e test (PR #93928)

2024-06-07 Thread via cfe-commits
@@ -0,0 +1,361 @@ +// RUN: rm -rf %t && mkdir -p %t/build %t/include %t/src %t/docs +// RUN: sed 's|$test_dir|%/t|g' %S/Inputs/clang-doc-project1/database_template.json > %t/build/compile_commands.json +// RUN: cp %S/Inputs/clang-doc-project1/*.h %t/include +// RUN: cp %S/Input

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-07 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/93928 >From 219df1820de43696dd51268f1aa22c397846c0a6 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Fri, 7 Jun 2024 01:47:15 -0400 Subject: [PATCH 1/2] [clang-doc] add basic e2e test --- .../Inputs/clang-doc-defa

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-07 Thread Artem Yurchenko via cfe-commits
https://github.com/temyurchenko updated https://github.com/llvm/llvm-project/pull/93913 >From 410c7ba9fb7667dabdfbc48fdbda427401ca8df0 Mon Sep 17 00:00:00 2001 From: Artem Yurchenko <44875844+temyurche...@users.noreply.github.com> Date: Thu, 30 May 2024 16:18:47 -0400 Subject: [PATCH 1/2] [clang

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-07 Thread Artem Yurchenko via cfe-commits
https://github.com/temyurchenko updated https://github.com/llvm/llvm-project/pull/93913 >From f1951f3f2dd322123a1c49221c4252f4ea932242 Mon Sep 17 00:00:00 2001 From: Artem Yurchenko <44875844+temyurche...@users.noreply.github.com> Date: Thu, 30 May 2024 16:18:47 -0400 Subject: [PATCH 1/2] [clang

[clang] [llvm] [Offload][CUDA] Add initial cuda_runtime.h overlay (PR #94821)

2024-06-07 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,30 @@ +// RUN: %clang++ -foffload-via-llvm --offload-arch=native %s -o %t +// RUN: %t | %fcheck-generic + +// UNSUPPORTED: aarch64-unknown-linux-gnu +// UNSUPPORTED: aarch64-unknown-linux-gnu-LTO +// UNSUPPORTED: x86_64-pc-linux-gnu +// UNSUPPORTED: x86_64-pc-linux-gnu-

[clang] [Clang][AMDGPU] Add a new builtin type for buffer rsrc (PR #94830)

2024-06-07 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,9 @@ +// REQUIRES: amdgpu-registered-target +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple amdgcn %s -emit-llvm -o - | FileCheck %s arsenm wrote: Why do you need -fclang-abi-compat=latest https://github.com/llvm/llvm-project/pull/94830 ___

[clang] [Clang][AMDGPU] Add a new builtin type for buffer rsrc (PR #94830)

2024-06-07 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,21 @@ +//===-- AMDGPUTypes.def - Metadata about AMDGPU types ---*- 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: Apa

[clang] [Clang][AMDGPU] Add a new builtin type for buffer rsrc (PR #94830)

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

[clang] [Clang][AMDGPU] Add a new builtin type for buffer rsrc (PR #94830)

2024-06-07 Thread Matt Arsenault via cfe-commits
@@ -2200,6 +2206,9 @@ TypeInfo ASTContext::getTypeInfoImpl(const Type *T) const { Align = 8; \ break; #include "clang/Basic/WebAssemblyReferenceTypes.def" +case BuiltinType::AMDGPUBufferRsrc: + W

[clang] [Clang][AMDGPU] Add a new builtin type for buffer rsrc (PR #94830)

2024-06-07 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm commented: Need stacked PR that adds the make_buffer_rsrc builtin that shows its use https://github.com/llvm/llvm-project/pull/94830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [Clang][AMDGPU] Add a new builtin type for buffer rsrc (PR #94830)

2024-06-07 Thread Matt Arsenault via cfe-commits
@@ -1091,6 +1091,9 @@ enum PredefinedTypeIDs { // \brief WebAssembly reference types with auto numeration #define WASM_TYPE(Name, Id, SingletonId) PREDEF_TYPE_##Id##_ID, #include "clang/Basic/WebAssemblyReferenceTypes.def" +// \breif AMDGPU types with auto numeration --

[clang] [CMake] Update CMake cache file for the ARM/Aarch64 cross toolchain builds. NFC. (PR #94835)

2024-06-07 Thread Vladimir Vereschaka via cfe-commits
https://github.com/vvereschaka closed https://github.com/llvm/llvm-project/pull/94835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5aabbf0 - [CMake] Update CMake cache file for the ARM/Aarch64 cross toolchain builds. NFC. (#94835)

2024-06-07 Thread via cfe-commits
Author: Vladimir Vereschaka Date: 2024-06-07T22:05:41-07:00 New Revision: 5aabbf0602c48b67bb89fd37f95bf97c95ded488 URL: https://github.com/llvm/llvm-project/commit/5aabbf0602c48b67bb89fd37f95bf97c95ded488 DIFF: https://github.com/llvm/llvm-project/commit/5aabbf0602c48b67bb89fd37f95bf97c95ded488

[clang] [llvm] [clang] Reland Add tanf16 builtin and support for tan constrained intrinsic (PR #94559)

2024-06-07 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/94559 >From 51247e430ad49c4729e2e3664104367b13fbad9e Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Fri, 24 May 2024 10:01:52 -0400 Subject: [PATCH 1/3] [clang] Add tanf16 builtin and support for tan constrained in

[clang] [HLSL] Use llvm::Triple::EnvironmentType instead of HLSLShaderAttr::ShaderType (PR #93847)

2024-06-07 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/93847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5d87ba1 - [HLSL] Use llvm::Triple::EnvironmentType instead of HLSLShaderAttr::ShaderType (#93847)

2024-06-07 Thread via cfe-commits
Author: Helena Kotas Date: 2024-06-07T21:30:04-07:00 New Revision: 5d87ba1c1f584dfbd5afaf187099b43681b2206d URL: https://github.com/llvm/llvm-project/commit/5d87ba1c1f584dfbd5afaf187099b43681b2206d DIFF: https://github.com/llvm/llvm-project/commit/5d87ba1c1f584dfbd5afaf187099b43681b2206d.diff

[clang] [CMake] Update CMake cache file for the ARM/Aarch64 cross toolchain builds. NFC. (PR #94835)

2024-06-07 Thread Vladimir Vereschaka via cfe-commits
https://github.com/vvereschaka updated https://github.com/llvm/llvm-project/pull/94835 >From 4135be7d1e1ca702324bd8a80c20acc034b18ecb Mon Sep 17 00:00:00 2001 From: Vladimir Vereschaka Date: Fri, 7 Jun 2024 20:58:10 -0700 Subject: [PATCH] [CMake] Update CMake cache file for the ARM/Aarch64 cros

[clang] [CMake] Update CMake cache file for the ARM/Aarch64 cross toolchain builds. NFC. (PR #94835)

2024-06-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vladimir Vereschaka (vvereschaka) Changes * generate Clang configuration file with provided target sysroot (TOOLCHAIN_TARGET_SYSROOTFS) * explicitly pass provided target sysroot into the compiler-rt tests configuration. * added ability to

[clang] [CMake] Update CMake cache file for the ARM/Aarch64 cross toolchain builds. NFC. (PR #94835)

2024-06-07 Thread Vladimir Vereschaka via cfe-commits
https://github.com/vvereschaka created https://github.com/llvm/llvm-project/pull/94835 * generate Clang configuration file with provided target sysroot (TOOLCHAIN_TARGET_SYSROOTFS) * explicitly pass provided target sysroot into the compiler-rt tests configuration. * added ability to configure

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-06-07 Thread Kefu Chai via cfe-commits
https://github.com/tchaikov updated https://github.com/llvm/llvm-project/pull/93623 >From 00df70151da03f9a3d3c6ae3ee8078fd6ff654f0 Mon Sep 17 00:00:00 2001 From: martinboehme Date: Wed, 29 May 2024 07:23:35 +0800 Subject: [PATCH] [clang-tidy] Let bugprone-use-after-move ignore the moved variab

[clang] Sema: Fix CXXRecordDecl::isTriviallyCopyable() for classes with all deleted special functions. (PR #94831)

2024-06-07 Thread via cfe-commits
MagentaTreehouse wrote: #38398 https://github.com/llvm/llvm-project/pull/94831 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-06-07 Thread Kefu Chai via cfe-commits
https://github.com/tchaikov edited https://github.com/llvm/llvm-project/pull/93623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Sema: Fix CXXRecordDecl::isTriviallyCopyable() for classes with all deleted special functions. (PR #94831)

2024-06-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (pcc) Changes C++17 added the following requirement for a class to be trivially copyable: "that has at least one non-deleted copy constructor, move constructor, copy assignment operator, or move assignment operator". However, this was

[clang] Sema: Fix CXXRecordDecl::isTriviallyCopyable() for classes with all deleted special functions. (PR #94831)

2024-06-07 Thread via cfe-commits
https://github.com/pcc created https://github.com/llvm/llvm-project/pull/94831 C++17 added the following requirement for a class to be trivially copyable: "that has at least one non-deleted copy constructor, move constructor, copy assignment operator, or move assignment operator". However, this w

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-06-07 Thread Kefu Chai via cfe-commits
tchaikov wrote: @5chmidti Thanks for your thoughtful review and suggestions! I've incorporated them into the latest revision, which I'd appreciate you taking another look at. https://github.com/llvm/llvm-project/pull/93623 ___ cfe-commits mailing lis

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-06-07 Thread Kefu Chai via cfe-commits
https://github.com/tchaikov edited https://github.com/llvm/llvm-project/pull/93623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-06-07 Thread Kefu Chai via cfe-commits
https://github.com/tchaikov edited https://github.com/llvm/llvm-project/pull/93623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-06-07 Thread Kefu Chai via cfe-commits
https://github.com/tchaikov updated https://github.com/llvm/llvm-project/pull/93623 >From cb1dfa3c776e6c1c327acc6ec7f02c4bceb64069 Mon Sep 17 00:00:00 2001 From: martinboehme Date: Wed, 29 May 2024 07:23:35 +0800 Subject: [PATCH] [clang-tidy] Let bugprone-use-after-move ignore the moved variab

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-06-07 Thread Kefu Chai via cfe-commits
@@ -175,6 +218,10 @@ bool UseAfterMoveFinder::findInternal(const CFGBlock *Block, MovingCall != nullptr && Sequence->potentiallyAfter(MovingCall, Use); +// We default to false here and change this to true if required in +// find(). +

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-06-07 Thread Kefu Chai via cfe-commits
tchaikov wrote: v3: - trade `reaches()` helper for `CFGReverseBlockReachabilityAnalysis`. less repeating this way. - replace `argsContain()` helper with `llvm::is_contained()`. less repeating this way. - s/call/Call/. more consistent with the naming convention in LLVM. - initialize `Evaluation

[clang] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.buffer.store` (PR #94576)

2024-06-07 Thread Shilei Tian via cfe-commits
shiltian wrote: https://github.com/llvm/llvm-project/pull/94830 for buffer rsrc data type. Will update this patch afterwards. https://github.com/llvm/llvm-project/pull/94576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-06-07 Thread Kefu Chai via cfe-commits
@@ -69,6 +73,30 @@ class UseAfterMoveFinder { llvm::SmallPtrSet Visited; }; +/// Returns whether the `Before` block can reach the `After` block. +bool reaches(const CFGBlock *Before, const CFGBlock *After) { + llvm::SmallVector Stack; + llvm::SmallPtrSet Visited; + + Stac

[clang] [Clang][AMDGPU] Add a new builtin type for buffer rsrc (PR #94830)

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

[clang] [Clang][AMDGPU] Add a new builtin type for buffer rsrc (PR #94830)

2024-06-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Shilei Tian (shiltian) Changes --- Patch is 23.90 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/94830.diff 30 Files Affected: - (modified) clang/include/clang/AST/ASTContext.h (+2) - (mod

[clang] [Clang][AMDGPU] Add a new builtin type for buffer rsrc (PR #94830)

2024-06-07 Thread Shilei Tian via cfe-commits
https://github.com/shiltian created https://github.com/llvm/llvm-project/pull/94830 None >From 891c37a3f6002c40aa0ded803330f61c3d16e6bb Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 7 Jun 2024 22:37:13 -0400 Subject: [PATCH] [Clang][AMDGPU] Add a new builtin type for buffer rsrc ---

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-06-07 Thread Kefu Chai via cfe-commits
@@ -175,6 +218,10 @@ bool UseAfterMoveFinder::findInternal(const CFGBlock *Block, MovingCall != nullptr && Sequence->potentiallyAfter(MovingCall, Use); +// We default to false here and change this to true if required in +// find(). +

[clang] [clang] Implement -Wmissing-include-dirs (PR #94827)

2024-06-07 Thread Braden Helmer via cfe-commits
https://github.com/bradenhelmer edited https://github.com/llvm/llvm-project/pull/94827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement -Wmissing-include-dirs (PR #94827)

2024-06-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Braden Helmer (bradenhelmer) Changes Implements -Wmissing-include-dirs #92015 This is my first contribution and would love some feedback. Thanks --- Full diff: https://github.com/llvm/llvm-project/pull/94827.diff 3 Files Affecte

[clang] [clang] Implement -Wmissing-include-dirs (PR #94827)

2024-06-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Braden Helmer (bradenhelmer) Changes Implements -Wmissing-include-dirs #92015 This is my first contribution and would love some feedback. Thanks --- Full diff: https://github.com/llvm/llvm-project/pull/94827.diff 3 Files Affected: - (

[clang] [clang] Implement -Wmissing-include-dirs (PR #94827)

2024-06-07 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] Implement -Wmissing-include-dirs (PR #94827)

2024-06-07 Thread Braden Helmer via cfe-commits
https://github.com/bradenhelmer created https://github.com/llvm/llvm-project/pull/94827 Implements -Wmissing-include-dirs #92015 This is my first contribution and would love some feedback. Thanks >From 317e4c2fe7fb0ee76f7917b64ee447ba3ed838bc Mon Sep 17 00:00:00 2001 From: Braden Helmer Date

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

2024-06-07 Thread Matthew Weingarten via cfe-commits
@@ -140,12 +140,16 @@ static cl::opt ClDebugMin("memprof-debug-min", cl::desc("Debug min inst"), static cl::opt ClDebugMax("memprof-debug-max", cl::desc("Debug max inst"), cl::Hidden, cl::init(-1)); +static cl::opt ClHistogram("memprof-histogram

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

2024-06-07 Thread Matthew Weingarten via cfe-commits
https://github.com/mattweingarten updated https://github.com/llvm/llvm-project/pull/94264 error: too big or took too long to generate ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Make warning pragma override -Werror=foo and DefaultError warnings (PR #93647)

2024-06-07 Thread Fangrui Song via cfe-commits
MaskRay wrote: > I think we should update our documentation: > > https://github.com/llvm/llvm-project/blob/b01ac5137c28fa5e1b44a5d850cb7a6ace7d8799/clang/docs/UsersManual.rst?plain=1#L1186 > > Overall, this seems like a sensible improvement to me and the code changes LG. Thx. Updated UserManua

[clang] Make warning pragma override -Werror=foo and DefaultError warnings (PR #93647)

2024-06-07 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/93647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Make warning pragma override -Werror=foo and DefaultError warnings (PR #93647)

2024-06-07 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/93647 >From 9770644e7db88cff2c16109ceb8cb446741d53ea Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Tue, 28 May 2024 21:33:55 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?UTF

[clang] [llvm] Enable LLDB tests in Linux pre-merge CI (PR #94208)

2024-06-07 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @Endilll This looks good, thanks! How will this affect test capacity? Right now, the Linux bots are lagging, while the Windows bot is breezing through. This is the opposite of the usual. Are we under-provisioned on Linux CI resources? How much worse will it get when we add thi

[clang] [clang][CodeGen] Make `UnqualPtrTy` truly unqualified (PR #94388)

2024-06-07 Thread Alex Voicu via cfe-commits
AlexVlx wrote: > There are still quite a few references to UnqualPtrTy that you're not > changing yet are now wrong, no? > > ``` > $ git grep --count '\' origin/main clang > origin/main:clang/lib/CodeGen/CGAtomic.cpp:1 > origin/main:clang/lib/CodeGen/CGBlocks.cpp:1 > origin/main:clang/lib/CodeG

[clang] [clang][CodeGen] Make `UnqualPtrTy` truly unqualified (PR #94388)

2024-06-07 Thread Alex Voicu via cfe-commits
AlexVlx wrote: > And I still strongly urge renaming what this is, given it is _not_ the type > for an unqualified C `void *`, as one would normally expect given it's in > Clang. Perhaps DummyPtrTy? DummyPtrTy seems mnemonic / on point, but it might trigger antibodies from the LLVM side:) Perh

[clang] [llvm] [Offload][CUDA] Add initial cuda_runtime.h overlay (PR #94821)

2024-06-07 Thread Johannes Doerfert via cfe-commits
jdoerfert wrote: This includes the changes of #94549, I need to learn how to do stacked PRs... https://github.com/llvm/llvm-project/pull/94821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [llvm] [Offload][CUDA] Allow CUDA kernels to use LLVM/Offload (PR #94549)

2024-06-07 Thread Johannes Doerfert via cfe-commits
@@ -0,0 +1,31 @@ +/*===-- LLVM/Offload helpers for kernel languages (CUDA/HIP) -*- 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: Apach

[clang] [llvm] [Offload][CUDA] Allow CUDA kernels to use LLVM/Offload (PR #94549)

2024-06-07 Thread Johannes Doerfert via cfe-commits
jdoerfert wrote: There seems to be some trouble with NVIDIA offload (I tested mainly AMDGPU) and f128, I'll make sure that works too. The nits are easy to address, I just copied the style around. I'll also add a IR test to match the new runtime calls and kernel argument passing. > Will kernels

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

2024-06-07 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,14 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: echo "" > %t/compile_flags.txt +// RUN: cp "%s" "%t/test.cpp" +// RUN: clang-doc --format=html --executor=standalone -p %t %t/test.cpp -output=%t/docs > %t/output.txt +// RUN: cat %t/output.txt | FileCheck %s --check-

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

2024-06-07 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,14 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: echo "" > %t/compile_flags.txt +// RUN: cp "%s" "%t/test.cpp" +// RUN: clang-doc --format=html --executor=standalone -p %t %t/test.cpp -output=%t/docs > %t/output.txt +// RUN: cat %t/output.txt | FileCheck %s --check-

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

2024-06-07 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,14 @@ +// RUN: rm -rf %t +// RUN: mkdir %t ilovepi wrote: ```suggestion // RUN: rm -rf %t && mkdir %t ``` https://github.com/llvm/llvm-project/pull/94717 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [clang][CodeGen] Make `UnqualPtrTy` truly unqualified (PR #94388)

2024-06-07 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson requested changes to this pull request. Ah I did not realize there were so many uses remaining. I that case those probably need auditing/changing before this change can land. https://github.com/llvm/llvm-project/pull/94388 _

[clang] [clang] deprecate alias, class templates without arg list after template kw (PR #94789)

2024-06-07 Thread Erick Velez via cfe-commits
evelez7 wrote: Looks like this heavily affects libcxx, will a `DefaultIgnore` silence the diagnostic? https://github.com/llvm/llvm-project/pull/94789 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [llvm] [Offload][CUDA] Add initial cuda_runtime.h overlay (PR #94821)

2024-06-07 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 bd815a54899d7fa83f6fb49d86c417e1e2e4d2ef 6a6809a50ac35e12416eb0602bdb18189c3054f3 --

[clang] [llvm] [Offload][CUDA] Add initial cuda_runtime.h overlay (PR #94821)

2024-06-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Johannes Doerfert (jdoerfert) Changes This provides the header overlay for cuda_runtime.h which is found before any CUDA installation (none is necessary). Some basic APIs are defined in terms of the omp_target_* ones, but with the pe

[clang] [llvm] [Offload][CUDA] Add initial cuda_runtime.h overlay (PR #94821)

2024-06-07 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert created https://github.com/llvm/llvm-project/pull/94821 This provides the header overlay for cuda_runtime.h which is found before any CUDA installation (none is necessary). Some basic APIs are defined in terms of the omp_target_* ones, but with the pending LLVM/Offl

[clang] [clang][CodeGen] Make `UnqualPtrTy` truly unqualified (PR #94388)

2024-06-07 Thread Jessica Clarke via cfe-commits
jrtc27 wrote: And I still strongly urge renaming what this is, given it is _not_ the type for an unqualified C `void *`, as one would normally expect given it's in Clang. https://github.com/llvm/llvm-project/pull/94388 ___ cfe-commits mailing list cfe

[clang] [clang][CodeGen] Make `UnqualPtrTy` truly unqualified (PR #94388)

2024-06-07 Thread Jessica Clarke via cfe-commits
jrtc27 wrote: There are still quite a few references to UnqualPtrTy that you're not changing yet are now wrong, no? https://github.com/llvm/llvm-project/pull/94388 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [clang][ExtractAPI][NFC] pass params by const reference (PR #94820)

2024-06-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Erick Velez (evelez7) Changes Change some parameters in DeclarationFragments.h to be passed by const reference. Caught by cppcheck. Fixes #92756 but doesn't address return value `RT` for `getTopLevelRecords`. I'm not sure we'd want a con

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

2024-06-07 Thread Paul Kirth via cfe-commits
@@ -131,12 +137,55 @@ std::string GetExecutablePath(const char *Argv0, void *MainAddr) { return llvm::sys::fs::getMainExecutable(Argv0, MainAddr); } +void GetAssetFiles(clang::doc::ClangDocContext &CDCtx) { + std::error_code Code; + for (auto DirIt = llvm::sys::fs::direct

[clang] [clang][ExtractAPI][NFC] pass params by const reference (PR #94820)

2024-06-07 Thread Erick Velez via cfe-commits
https://github.com/evelez7 created https://github.com/llvm/llvm-project/pull/94820 Change some parameters in DeclarationFragments.h to be passed by const reference. Caught by cppcheck. Fixes #92756 but doesn't address return value `RT` for `getTopLevelRecords`. I'm not sure we'd want a const

[clang] [clang][CodeGen] Make `UnqualPtrTy` truly unqualified (PR #94388)

2024-06-07 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. This looks fine to me now, but I'd suggest a TODO comment that UnqualPtrTy should be removed in the future. https://github.com/llvm/llvm-project/pull/94388 ___ cfe-commits mailing list cfe-com

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

2024-06-07 Thread Paul Kirth via cfe-commits
@@ -131,12 +137,55 @@ std::string GetExecutablePath(const char *Argv0, void *MainAddr) { return llvm::sys::fs::getMainExecutable(Argv0, MainAddr); } +void GetAssetFiles(clang::doc::ClangDocContext &CDCtx) { + std::error_code Code; + for (auto DirIt = llvm::sys::fs::direct

[clang] [BitInt] Expose a _BitInt literal suffix in C++ (PR #86586)

2024-06-07 Thread via cfe-commits
@@ -1117,6 +1118,31 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling, if (isImaginary) break; // Cannot be repeated. isImaginary = true; continue; // Success. +case '_': + if (isFPConstant) +break; // Invalid for floats

[clang] [BitInt] Expose a _BitInt literal suffix in C++ (PR #86586)

2024-06-07 Thread via cfe-commits
@@ -1117,6 +1118,31 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling, if (isImaginary) break; // Cannot be repeated. isImaginary = true; continue; // Success. +case '_': + if (isFPConstant) +break; // Invalid for floats

[clang] [BitInt] Expose a _BitInt literal suffix in C++ (PR #86586)

2024-06-07 Thread Erich Keane via cfe-commits
@@ -1117,6 +1118,31 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling, if (isImaginary) break; // Cannot be repeated. isImaginary = true; continue; // Success. +case '_': + if (isFPConstant) +break; // Invalid for floats

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-06-07 Thread Julian Schmidt via cfe-commits
@@ -175,6 +218,10 @@ bool UseAfterMoveFinder::findInternal(const CFGBlock *Block, MovingCall != nullptr && Sequence->potentiallyAfter(MovingCall, Use); +// We default to false here and change this to true if required in +// find(). +

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-06-07 Thread Julian Schmidt via cfe-commits
@@ -55,12 +55,23 @@ bool isDescendantOrEqual(const Stmt *Descendant, const Stmt *Ancestor, ASTContext *Context) { if (Descendant == Ancestor) return true; - for (const Stmt *Parent : getParentStmts(Descendant, Context)) { -if (isDescendantOr

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-06-07 Thread Julian Schmidt via cfe-commits
@@ -95,9 +106,59 @@ bool ExprSequence::inSequence(const Stmt *Before, const Stmt *After) const { return true; } + SmallVector BeforeParents = getParentStmts(Before, Context); + + // Since C++17, the callee of a call expression is guaranteed to be sequenced + // bef

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-06-07 Thread Julian Schmidt via cfe-commits
@@ -95,9 +106,59 @@ bool ExprSequence::inSequence(const Stmt *Before, const Stmt *After) const { return true; } + SmallVector BeforeParents = getParentStmts(Before, Context); + + // Since C++17, the callee of a call expression is guaranteed to be sequenced + // bef

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-06-07 Thread Julian Schmidt via cfe-commits
@@ -69,6 +73,30 @@ class UseAfterMoveFinder { llvm::SmallPtrSet Visited; }; +/// Returns whether the `Before` block can reach the `After` block. +bool reaches(const CFGBlock *Before, const CFGBlock *After) { + llvm::SmallVector Stack; + llvm::SmallPtrSet Visited; + + Stac

[clang] [BitInt] Expose a _BitInt literal suffix in C++ (PR #86586)

2024-06-07 Thread via cfe-commits
@@ -1117,6 +1118,31 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling, if (isImaginary) break; // Cannot be repeated. isImaginary = true; continue; // Success. +case '_': + if (isFPConstant) +break; // Invalid for floats

[clang] [llvm] [clang] Reland Add tanf16 builtin and support for tan constrained intrinsic (PR #94559)

2024-06-07 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/94559 >From 51247e430ad49c4729e2e3664104367b13fbad9e Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Fri, 24 May 2024 10:01:52 -0400 Subject: [PATCH 1/2] [clang] Add tanf16 builtin and support for tan constrained in

[clang] [BitInt] Expose a _BitInt literal suffix in C++ (PR #86586)

2024-06-07 Thread Mike Rice via cfe-commits
@@ -1117,6 +1118,31 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling, if (isImaginary) break; // Cannot be repeated. isImaginary = true; continue; // Success. +case '_': + if (isFPConstant) +break; // Invalid for floats

[clang] [HLSL] Change default linkage of HLSL functions and `groupshared` variables (PR #93336)

2024-06-07 Thread S. Bharadwaj Yadavalli via cfe-commits
@@ -108,3 +108,16 @@ behavior between Clang and DXC. Some examples include: diagnostic notifying the user of the conversion rather than silently altering precision relative to the other overloads (as FXC does) or generating code that will fail validation (as DXC does). +

[clang] [llvm] [Clang] Introduce [[clang::coro_structured_concurrency]] (PR #94693)

2024-06-07 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/94693 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-06-07 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/90830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] c4f83a0 - [clang-tidy] new check misc-use-internal-linkage (#90830)

2024-06-07 Thread via cfe-commits
Author: Congcong Cai Date: 2024-06-08T06:46:39+08:00 New Revision: c4f83a004bf35bfc46fe89111fdca750bbc724da URL: https://github.com/llvm/llvm-project/commit/c4f83a004bf35bfc46fe89111fdca750bbc724da DIFF: https://github.com/llvm/llvm-project/commit/c4f83a004bf35bfc46fe89111fdca750bbc724da.diff

[clang] [HLSL] Use llvm::Triple::EnvironmentType instead of HLSLShaderAttr::ShaderType (PR #93847)

2024-06-07 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/93847 >From dd175a247480396b9d35cb995333fcd14152e347 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 29 May 2024 18:38:45 -0700 Subject: [PATCH 1/4] [HLSL] Use llvm::Triple::EnvironmentType instead of ShaderType

[clang] [HLSL] Change default linkage of HLSL functions and `groupshared` variables (PR #93336)

2024-06-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Helena Kotas (hekota) Changes In DXC the default linkage of HLSL function is `internal` unless it is: 1. shader entry point function 2. marked with the `export` keyword (#92812) 3. does not have a definition This PR implements D

[clang] [HLSL] Change default linkage of HLSL functions and `groupshared` variables (PR #93336)

2024-06-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Helena Kotas (hekota) Changes In DXC the default linkage of HLSL function is `internal` unless it is: 1. shader entry point function 2. marked with the `export` keyword (#92812) 3. does not have a definition This PR imp

[clang] [HLSL] Change default linkage of HLSL functions and `groupshared` variables (PR #93336)

2024-06-07 Thread Helena Kotas via cfe-commits
https://github.com/hekota ready_for_review https://github.com/llvm/llvm-project/pull/93336 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Change default linkage of HLSL functions and `groupshared` variables (PR #93336)

2024-06-07 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/93336 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix bad comment indentation before ifdef after braceless if (PR #94776)

2024-06-07 Thread Erich Reitz via cfe-commits
@@ -796,6 +796,24 @@ TEST_F(FormatTestComments, ParsesCommentsAdjacentToPPDirectives) { format("namespace {}\n /* Test */#define A")); } + +TEST_F(FormatTestComments, DeIdentsCommentBeforeIfdefAfterBracelessIf) { + EXPECT_EQ("void f() {\n"

[clang] [clang-format] Fix bad comment indentation before ifdef after braceless if (PR #94776)

2024-06-07 Thread Erich Reitz via cfe-commits
https://github.com/Erich-Reitz updated https://github.com/llvm/llvm-project/pull/94776 >From 6c910c8b40be79e3d573f6953860f60ebd27b39f Mon Sep 17 00:00:00 2001 From: Erich Reitz Date: Fri, 7 Jun 2024 13:04:33 -0400 Subject: [PATCH 1/5] delay flushing comments before ifdef after braceless if; al

[clang] [HLSL] Change default linkage of HLSL functions and `groupshared` variables (PR #93336)

2024-06-07 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/93336 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Change default linkage of HLSL functions and `groupshared` variables (PR #93336)

2024-06-07 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/93336 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Offload][CUDA] Allow CUDA kernels to use LLVM/Offload (PR #94549)

2024-06-07 Thread Artem Belevich via cfe-commits
@@ -0,0 +1,31 @@ +/*===-- LLVM/Offload helpers for kernel languages (CUDA/HIP) -*- 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: Apach

[clang] [llvm] [Offload][CUDA] Allow CUDA kernels to use LLVM/Offload (PR #94549)

2024-06-07 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. LGTM in principle. Will kernels in TUs compiled with `-foffload-via-llvm` be interoperable with code that wants to launch them from another TU compiled w/o `-foffload-via-llvm` ? E.g.: - a.cu: `__global__ void kernel() { ... }` - b.cu: `e

[clang] [llvm] [Offload][CUDA] Allow CUDA kernels to use LLVM/Offload (PR #94549)

2024-06-07 Thread Artem Belevich via cfe-commits
@@ -1125,6 +1125,22 @@ void Clang::AddPreprocessingOptions(Compilation &C, const JobAction &JA, CmdArgs.push_back("__clang_openmp_device_functions.h"); } + if (Args.hasArg(options::OPT_foffload_via_llvm)) { +// Add llvm_wrappers/* to our system include path. This

  1   2   3   4   5   >