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

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

[clang] 5996496 - [clang][NFC] Use foreach loop in FinalizeDeclaratorGroup

2024-06-17 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-06-18T07:53:51+02:00 New Revision: 5996496e7f1314fb40d57657e2085b5c41916766 URL: https://github.com/llvm/llvm-project/commit/5996496e7f1314fb40d57657e2085b5c41916766 DIFF: https://github.com/llvm/llvm-project/commit/5996496e7f1314fb40d57657e2085b5c41916766.diff

[clang] d563c0f - [clang][Interp][NFC] Add source ranges to some diagnostics.

2024-06-17 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-06-18T07:53:51+02:00 New Revision: d563c0f96ca4a4160b149ce83b99c78eed865fa8 URL: https://github.com/llvm/llvm-project/commit/d563c0f96ca4a4160b149ce83b99c78eed865fa8 DIFF: https://github.com/llvm/llvm-project/commit/d563c0f96ca4a4160b149ce83b99c78eed865fa8.diff

[clang] [llvm] [SPIRV][HLSL] Add lowering of `rsqrt` to SPIRV (PR #95849)

2024-06-17 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/95849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIRV][HLSL] Add lowering of `rsqrt` to SPIRV (PR #95849)

2024-06-17 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/95849 >From b10aa2317f566febdf4cd3630a972be58fea515b Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Mon, 17 Jun 2024 14:03:03 -0700 Subject: [PATCH 1/3] [SPIRV][HLSL] Add lowering of `rsqrt` to SPIRV ---

[clang] [Clang] [Sema] Ensure noexcept(typeid(E)) checks if E throws when needed (PR #95846)

2024-06-17 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/95846 >From 89da8b3bcc678430fe4225c723e87914f2c378cd Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Mon, 17 Jun 2024 21:48:57 +0100 Subject: [PATCH 1/2] [Clang] [Sema] Ensure noexcept(typeid(E)) checks if E

[clang] [Clang] [Sema] Ensure noexcept(typeid(E)) checks if E throws when needed (PR #95846)

2024-06-17 Thread Timm Baeder via cfe-commits
@@ -,13 +,18 @@ static CanThrowResult canDynamicCastThrow(const CXXDynamicCastExpr *DC) { } static CanThrowResult canTypeidThrow(Sema , const CXXTypeidExpr *DC) { - if (DC->isTypeOperand()) + // Operand is not evaluated, cannot possibly throw + if

[clang] [Clang] [Sema] Ensure noexcept(typeid(E)) checks if E throws when needed (PR #95846)

2024-06-17 Thread Timm Baeder via cfe-commits
@@ -,13 +,18 @@ static CanThrowResult canDynamicCastThrow(const CXXDynamicCastExpr *DC) { } static CanThrowResult canTypeidThrow(Sema , const CXXTypeidExpr *DC) { - if (DC->isTypeOperand()) + // Operand is not evaluated, cannot possibly throw

[clang] [clang-format] Handle function try block with ctor-initializer (PR #95878)

2024-06-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #58987. Fixes #95679. --- Full diff: https://github.com/llvm/llvm-project/pull/95878.diff 2 Files Affected: - (modified) clang/lib/Format/UnwrappedLineParser.cpp (+11-6) - (modified)

[clang] [clang-format] Handle function try block with ctor-initializer (PR #95878)

2024-06-17 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/95878 Fixes #58987. Fixes #95679. >From 299924c9f9485e7a784ffedcb6ec4fbccf5ad6f7 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Mon, 17 Jun 2024 21:13:10 -0700 Subject: [PATCH] [clang-format] Handle function try block

[clang] [HLSL] Strict Availability Diagnostics (PR #93860)

2024-06-17 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/93860 >From 532f10f77c862f6d429366f0d6903773da8fa79b Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 30 May 2024 11:40:27 -0700 Subject: [PATCH 1/5] Implement HLSL strict diagnostic mode ---

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-06-17 Thread via cfe-commits
DEBADRIBASAK wrote: [jh7370](https://github.com/jh7370) sorry for pinging again. I will be highly grateful if you kindly review this pull request. This change will unblock some of our internal tasks and timely completion of this is crucial for us. Thank you in advance.

[clang] [llvm] [RISCV] Add processor definition for SpacemiT-X60 (PR #94564)

2024-06-17 Thread Shao-Ce SUN via cfe-commits
sunshaoce wrote: > Could you explain these numbers? It looks like data in some columns is > missing. I only ran the default `base metrics` once. The geometric mean of this `Estimated Base Ratio` column can be regarded as the comprehensive score for this item. [Q14. What is the difference

[clang] [flang] [llvm] [mlir] [Flang]Fix for changed code at the end of AllocaIP. (PR #92430)

2024-06-17 Thread Kareem Ergawy via cfe-commits
ergawy wrote: > @ergawy Could you take a look at this, given that you did something similar > [even if it was much smaller] recently? Sorry, this totally slipped my mind. I will take a look today. https://github.com/llvm/llvm-project/pull/92430 ___

[clang] [llvm] [RISCV] Add processor definition for SpacemiT-X60 (PR #94564)

2024-06-17 Thread Michael Maitland via cfe-commits
michaelmaitland wrote: Could you explain these numbers? It looks like data in some columns is missing. https://github.com/llvm/llvm-project/pull/94564 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [SPIRV][HLSL] Add lowering of `rsqrt` to SPIRV (PR #95849)

2024-06-17 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. LGTM, code looka right, just a few more tests needed. https://github.com/llvm/llvm-project/pull/95849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [SPIRV][HLSL] Add lowering of `rsqrt` to SPIRV (PR #95849)

2024-06-17 Thread Farzon Lotfi via cfe-commits
@@ -62,4 +62,5 @@ let TargetPrefix = "spv" in { def int_spv_any : DefaultAttrsIntrinsic<[llvm_i1_ty], [llvm_any_ty]>; def int_spv_lerp : Intrinsic<[LLVMMatchType<0>], [llvm_anyfloat_ty, LLVMMatchType<0>,LLVMMatchType<0>], [IntrNoMem, IntrWillReturn] >; + def

[clang] [clang-format][NFC] Add CMake target clang-format-check-format (PR #95873)

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

[clang] [Serialization] Use specialized decl hash function for GlobalDeclID (PR #95730)

2024-06-17 Thread Chuanqi Xu via cfe-commits
@@ -230,7 +230,11 @@ template <> struct DenseMapInfo { } static unsigned getHashValue(const GlobalDeclID ) { -return DenseMapInfo::getHashValue(Key.get()); +// Our default hash algorithm for 64 bits integer may not be very good. +// In GlobalDeclID's case, it

[clang] [Serialization] Use specialized decl hash function for GlobalDeclID (PR #95730)

2024-06-17 Thread Chuanqi Xu via cfe-commits
@@ -230,7 +230,11 @@ template <> struct DenseMapInfo { } static unsigned getHashValue(const GlobalDeclID ) { -return DenseMapInfo::getHashValue(Key.get()); +// Our default hash algorithm for 64 bits integer may not be very good. ChuanqiXu9 wrote:

[clang] [Serialization] Use specialized decl hash function for GlobalDeclID (PR #95730)

2024-06-17 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/95730 >From 50923aa33f09b2530cfe492a53f70296f9ce9107 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Mon, 17 Jun 2024 11:32:35 +0800 Subject: [PATCH 1/2] [Serialization] Use specialized decl hash function for

[clang] [clang-format][NFC] Add CMake target clang-format-check-format (PR #95873)

2024-06-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Adpated from polly-check-format. --- Full diff: https://github.com/llvm/llvm-project/pull/95873.diff 1 Files Affected: - (modified) clang/lib/Format/CMakeLists.txt (+24) ``diff diff --git

[clang] [clang-format][NFC] Add CMake target clang-format-check-format (PR #95873)

2024-06-17 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/95873 Adpated from polly-check-format. >From ab2a61d1939f4be4551949e979fd43b9e11c5c49 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Mon, 17 Jun 2024 18:49:22 -0700 Subject: [PATCH] [clang-format][NFC] Add CMake target

[clang] [llvm] [RISCV] Add processor definition for SpacemiT-X60 (PR #94564)

2024-06-17 Thread Shao-Ce SUN via cfe-commits
sunshaoce wrote: I've tested this patch with `spec 2006 int`. Everything seems to be running smoothly: ``` Estimated Estimated Base Base BasePeak Peak Peak Benchmarks Ref. Run Time

[clang] [Clang][AMDGPU] Add a builtin for llvm.amdgcn.make.buffer.rsrc intrinsic (PR #95276)

2024-06-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/95276 >From 013a40d474e3acaa7a090d5e279f2d8a2f18fbd8 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Mon, 17 Jun 2024 18:48:33 -0400 Subject: [PATCH 1/2] [Clang][AMDGPU] Add a new builtin type for buffer rsrc ---

[clang] [Serialization] Don't read all declaration id eagerly when merge the tables (PR #95506)

2024-06-17 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > @ChuanqiXu9 are you still planning to chase this given that fixing the > hashing function would fix performance for the aforementioned patch? > > The trade-off we are making here is hard to assess without benchmarks that > show how much latency we win and how much more

[clang] [Clang][AMDGPU] Add a builtin for llvm.amdgcn.make.buffer.rsrc intrinsic (PR #95276)

2024-06-17 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,95 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: amdgpu-registered-target +// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -cl-std=CL2.0 -target-cpu verde -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple

[clang] [Clang][AMDGPU] Add a builtin for llvm.amdgcn.make.buffer.rsrc intrinsic (PR #95276)

2024-06-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/95276 >From 013a40d474e3acaa7a090d5e279f2d8a2f18fbd8 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Mon, 17 Jun 2024 18:48:33 -0400 Subject: [PATCH 1/2] [Clang][AMDGPU] Add a new builtin type for buffer rsrc ---

[clang] [serialization] no transitive decl change (PR #92083)

2024-06-17 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Oh, I didn't realize you were eager to land this in Clang 19, thanks for > sharing that. In that case, I think a specialiazed hash function for > `GlobalDeclID` is indeed the way to go. > > I was also worried a little there are other performance implications of this >

[clang] [clang-format][NFC] Add FormatToken::isAccessSpecifierKeyword() (PR #95727)

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

[clang] 3c6a109 - [clang-format][NFC] Add FormatToken::isAccessSpecifierKeyword() (#95727)

2024-06-17 Thread via cfe-commits
Author: Owen Pan Date: 2024-06-17T18:45:01-07:00 New Revision: 3c6a1090b25ef2dda5a378182cd17aad00439d35 URL: https://github.com/llvm/llvm-project/commit/3c6a1090b25ef2dda5a378182cd17aad00439d35 DIFF: https://github.com/llvm/llvm-project/commit/3c6a1090b25ef2dda5a378182cd17aad00439d35.diff

[clang] [Serialization] No transitive identifier change (PR #92085)

2024-06-17 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Thanks. Will do when landing. https://github.com/llvm/llvm-project/pull/92085 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Strict Availability Diagnostics (PR #93860)

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

[clang] [HLSL] Strict Availability Diagnostics (PR #93860)

2024-06-17 Thread Helena Kotas via cfe-commits
@@ -536,9 +536,34 @@ DiagnoseHLSLAvailability::FindAvailabilityAttr(const Decl *D) { void DiagnoseHLSLAvailability::CheckDeclAvailability(NamedDecl *D, const AvailabilityAttr *AA,

[clang] [HLSL] Strict Availability Diagnostics (PR #93860)

2024-06-17 Thread Damyan Pepper via cfe-commits
@@ -157,6 +157,18 @@ static bool ShouldDiagnoseAvailabilityInContext( } } + // In HLSL, emit diagnostic during parsing only if the diagnostic + // mode is set to strict (-fhlsl-strict-availability), and either the decl + // availability is not restricted to a

[clang] [HLSL] Strict Availability Diagnostics (PR #93860)

2024-06-17 Thread Damyan Pepper via cfe-commits
@@ -536,9 +536,34 @@ DiagnoseHLSLAvailability::FindAvailabilityAttr(const Decl *D) { void DiagnoseHLSLAvailability::CheckDeclAvailability(NamedDecl *D, const AvailabilityAttr *AA,

[clang] [HLSL] Strict Availability Diagnostics (PR #93860)

2024-06-17 Thread Damyan Pepper via cfe-commits
@@ -157,10 +157,12 @@ static bool ShouldDiagnoseAvailabilityInContext( } } - // In HLSL, emit diagnostic during parsing only if the diagnostic - // mode is set to strict (-fhlsl-strict-availability), and either the decl - // availability is not restricted to a

[libcxx] [libcxxabi] [libunwind] [libc++] Fix deployment target Lit features (PR #94791)

2024-06-17 Thread Louis Dionne via cfe-commits
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/94791 >From 783f2820037dbe25673a67bbbf15297738466184 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Fri, 31 May 2024 10:55:53 -0700 Subject: [PATCH] [libc++] Fix deployment target Lit features We were not making

[clang] [HLSL] Strict Availability Diagnostics (PR #93860)

2024-06-17 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/93860 >From 532f10f77c862f6d429366f0d6903773da8fa79b Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 30 May 2024 11:40:27 -0700 Subject: [PATCH 1/4] Implement HLSL strict diagnostic mode ---

[clang] [HLSL] Strict Availability Diagnostics (PR #93860)

2024-06-17 Thread Helena Kotas via cfe-commits
@@ -536,9 +536,34 @@ DiagnoseHLSLAvailability::FindAvailabilityAttr(const Decl *D) { void DiagnoseHLSLAvailability::CheckDeclAvailability(NamedDecl *D, const AvailabilityAttr *AA,

[clang] [HLSL] Strict Availability Diagnostics (PR #93860)

2024-06-17 Thread Helena Kotas via cfe-commits
@@ -157,6 +157,18 @@ static bool ShouldDiagnoseAvailabilityInContext( } } + // In HLSL, emit diagnostic during parsing only if the diagnostic + // mode is set to strict (-fhlsl-strict-availability), and either the decl + // availability is not restricted to a

[clang] [HLSL] Strict Availability Diagnostics (PR #93860)

2024-06-17 Thread Helena Kotas via cfe-commits
@@ -536,9 +536,34 @@ DiagnoseHLSLAvailability::FindAvailabilityAttr(const Decl *D) { void DiagnoseHLSLAvailability::CheckDeclAvailability(NamedDecl *D, const AvailabilityAttr *AA,

[clang] [HLSL] Strict Availability Diagnostics (PR #93860)

2024-06-17 Thread Helena Kotas via cfe-commits
@@ -210,13 +222,16 @@ static bool ShouldDiagnoseAvailabilityInContext( return true; } -static bool -shouldDiagnoseAvailabilityByDefault(const ASTContext , -const VersionTuple , -const VersionTuple ) {

[clang] [HLSL] Strict Availability Diagnostics (PR #93860)

2024-06-17 Thread Helena Kotas via cfe-commits
@@ -157,6 +157,18 @@ static bool ShouldDiagnoseAvailabilityInContext( } } + // In HLSL, emit diagnostic during parsing only if the diagnostic + // mode is set to strict (-fhlsl-strict-availability), and either the decl + // availability is not restricted to a

[clang] [clang-cl][AST] Fix auto NTTP MSVC 1920+ mangling for pointer types (PR #92477)

2024-06-17 Thread Max Winkler via cfe-commits
MaxEW707 wrote: Friendly ping @rnk @efriedma-quic @zmodem https://github.com/llvm/llvm-project/pull/92477 ___ 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-17 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu approved this pull request. LGTM. Thanks 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] [SPIRV][HLSL] Add lowering of `rsqrt` to SPIRV (PR #95849)

2024-06-17 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/95849 >From b10aa2317f566febdf4cd3630a972be58fea515b Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Mon, 17 Jun 2024 14:03:03 -0700 Subject: [PATCH 1/2] [SPIRV][HLSL] Add lowering of `rsqrt` to SPIRV ---

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

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

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

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

[clang] [clang][ThreadSafety] Warn when constructor is trylock (PR #95290)

2024-06-17 Thread Dan McArdle via cfe-commits
@@ -3657,8 +3657,8 @@ class Foo { int a GUARDED_BY(mu_); bool c; - inttryLockMutexI() EXCLUSIVE_TRYLOCK_FUNCTION(1, mu_); - Mutex* tryLockMutexP() EXCLUSIVE_TRYLOCK_FUNCTION(1, mu_); + bool tryLockMutexI() EXCLUSIVE_TRYLOCK_FUNCTION(1, mu_);

[clang] [clang][ThreadSafety] Warn when constructor is trylock (PR #95290)

2024-06-17 Thread Dan McArdle via cfe-commits
dmcardle wrote: Just force-pushed what I described in the last comment. 1. Changed void-returning trylock functions to return bool in tests. (Probably needs another pass to minimize the diff and undo some unnecessary changes.) 2. Now enforcing bool/int/pointer returns from trylock-annotated

[clang] [clang][ThreadSafety] Warn when constructor is trylock (PR #95290)

2024-06-17 Thread Dan McArdle via cfe-commits
https://github.com/dmcardle updated https://github.com/llvm/llvm-project/pull/95290 >From e53ddc9e9ce0ddd8b5dfd5dfd4c8654afe643ce2 Mon Sep 17 00:00:00 2001 From: Dan McArdle Date: Mon, 17 Jun 2024 17:53:30 -0400 Subject: [PATCH] [clang][ThreadSafety] Enforce trylock function return type With

[clang] Implement PrimitivesInit refactoring (PR #95867)

2024-06-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Pavel Desyatnikov (desyatok) Changes This is a gitlab mirror (LLVM repo is too large to directly create one) --- Patch is 21.96 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/95867.diff 10

[clang] Implement PrimitivesInit refactoring (PR #95867)

2024-06-17 Thread Pavel Desyatnikov via cfe-commits
https://github.com/desyatok closed https://github.com/llvm/llvm-project/pull/95867 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Implement PrimitivesInit refactoring (PR #95867)

2024-06-17 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,

[clang] Implement PrimitivesInit refactoring (PR #95867)

2024-06-17 Thread Pavel Desyatnikov via cfe-commits
https://github.com/desyatok created https://github.com/llvm/llvm-project/pull/95867 This is a gitlab mirror (LLVM repo is too large to directly create one) >From 6ac71484e0974f6f928fcab43e02ced5f184ce3c Mon Sep 17 00:00:00 2001 From: Pavel Desyatnikov Date: Tue, 18 Jun 2024 02:41:55 +0300

[clang] [lldb] [clang][lldb] Don't assert structure layout correctness for layouts provided by LLDB (PR #93809)

2024-06-17 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: That would mean if someone wrote `struct Empty {}; struct Z { Empty a,b,c; }`, we'd lower it to `{ [3 x i8] }` instead of `{%Empty, %Empty, %Empty}`, which is a bit ugly. Other than that, sure, I guess we could do that. https://github.com/llvm/llvm-project/pull/93809

[clang] [HLSL] Strict Availability Diagnostics (PR #93860)

2024-06-17 Thread Damyan Pepper via cfe-commits
@@ -157,6 +157,18 @@ static bool ShouldDiagnoseAvailabilityInContext( } } + // In HLSL, emit diagnostic during parsing only if the diagnostic + // mode is set to strict (-fhlsl-strict-availability), and either the decl + // availability is not restricted to a

[clang] [HLSL] Strict Availability Diagnostics (PR #93860)

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

[clang] [HLSL] Strict Availability Diagnostics (PR #93860)

2024-06-17 Thread Damyan Pepper via cfe-commits
@@ -210,13 +222,16 @@ static bool ShouldDiagnoseAvailabilityInContext( return true; } -static bool -shouldDiagnoseAvailabilityByDefault(const ASTContext , -const VersionTuple , -const VersionTuple ) {

[clang] [HLSL] Strict Availability Diagnostics (PR #93860)

2024-06-17 Thread Damyan Pepper via cfe-commits
@@ -157,6 +157,18 @@ static bool ShouldDiagnoseAvailabilityInContext( } } + // In HLSL, emit diagnostic during parsing only if the diagnostic + // mode is set to strict (-fhlsl-strict-availability), and either the decl + // availability is not restricted to a

[clang] [HLSL] Strict Availability Diagnostics (PR #93860)

2024-06-17 Thread Damyan Pepper via cfe-commits
@@ -536,9 +536,34 @@ DiagnoseHLSLAvailability::FindAvailabilityAttr(const Decl *D) { void DiagnoseHLSLAvailability::CheckDeclAvailability(NamedDecl *D, const AvailabilityAttr *AA,

[clang] [HLSL] Strict Availability Diagnostics (PR #93860)

2024-06-17 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp approved this pull request. https://github.com/llvm/llvm-project/pull/93860 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] Reland [clang][Sema, Lex, Parse] Preprocessor embed in C and C++ (PR #95802)

2024-06-17 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Please don't commit binary files if it isn't absolutely necessary. You can generate whatever files you need in a RUN line. https://github.com/llvm/llvm-project/pull/95802 ___ cfe-commits

[clang] [clang-tools-extra] Reland [clang][Sema, Lex, Parse] Preprocessor embed in C and C++ (PR #95802)

2024-06-17 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,98 @@ +// RUN: %clang_cc1 %s -fsyntax-only --embed-dir=%S/Inputs -verify=expected,cxx -Wno-c23-extensions +// RUN: %clang_cc1 -x c -std=c23 %s -fsyntax-only --embed-dir=%S/Inputs -verify=expected,c +#embed +; + +void f (unsigned char x) { (void)x;} +void g () {}

[clang] [clang-tools-extra] Reland [clang][Sema, Lex, Parse] Preprocessor embed in C and C++ (PR #95802)

2024-06-17 Thread Eli Friedman via cfe-commits
@@ -2422,6 +2422,10 @@ void ExprEngine::Visit(const Stmt *S, ExplodedNode *Pred, Bldr.addNodes(Dst); break; } + +case Stmt::EmbedExprClass: + llvm_unreachable("Support for EmbedExpr is not implemented."); efriedma-quic wrote: Please

[clang] [lldb] [clang][lldb] Don't assert structure layout correctness for layouts provided by LLDB (PR #93809)

2024-06-17 Thread David Blaikie via cfe-commits
dwblaikie wrote: > Oh, in this particular case, the issue isn't the computed datasize, it's that > FieldDecl::isZeroSize() returns the wrong result. If that's the case, maybe > we can just change FieldDecl::isZeroSize() to say the field is zero size? So > essentially, we pretend all empty

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

2024-06-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/94830 >From 013a40d474e3acaa7a090d5e279f2d8a2f18fbd8 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Mon, 17 Jun 2024 18:48:33 -0400 Subject: [PATCH] [Clang][AMDGPU] Add a new builtin type for buffer rsrc ---

[clang] [clang] Fix-it hint for `++this` -> `++*this` when deref is modifiable (PR #94159)

2024-06-17 Thread Richard Smith via cfe-commits
zygoloid wrote: Perhaps we can start by supplying `CheckForModifiableLvalue` with extra information about *why* we're doing the check. The current diagnostic we get for incrementing a non-modifiable lvalue: ```console :2:3: error: cannot assign to variable 'n' with const-qualified type 'const

[clang] [llvm] [AArch64] Add ability to list extensions enabled for a target (PR #95805)

2024-06-17 Thread Jonathan Thackray via cfe-commits
jthackray wrote: This is a good idea. Happy to approve, once all the FIXMEs are removed, since others have already made many salient suggestions, which I agree with. https://github.com/llvm/llvm-project/pull/95805 ___ cfe-commits mailing list

[clang] [lldb] [clang][lldb] Don't assert structure layout correctness for layouts provided by LLDB (PR #93809)

2024-06-17 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Oh, in this particular case, the issue isn't the computed datasize, it's that FieldDecl::isZeroSize() returns the wrong result. If that's the case, maybe we can just change FieldDecl::isZeroSize() to say the field is zero size? So essentially, we pretend all empty

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

2024-06-17 Thread Yuxuan Chen via cfe-commits
@@ -0,0 +1,84 @@ +// This file tests the coro_structured_concurrency attribute semantics. +// RUN: %clang_cc1 -std=c++20 -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s + +#include "Inputs/coroutine.h" +#include "Inputs/utility.h" + +template +struct

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

2024-06-17 Thread Adrian Vogelsgesang via cfe-commits
@@ -0,0 +1,84 @@ +// This file tests the coro_structured_concurrency attribute semantics. +// RUN: %clang_cc1 -std=c++20 -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s + +#include "Inputs/coroutine.h" +#include "Inputs/utility.h" + +template +struct

[clang] [llvm] [SPIRV][HLSL] Add lowering of `rsqrt` to SPIRV (PR #95849)

2024-06-17 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,29 @@ +; RUN: llc -O0 -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o - -filetype=obj | spirv-val %} + +; CHECK: OpExtInstImport "GLSL.std.450" + +define noundef float @rsqrt_float(float

[clang] [llvm] [SPIRV][HLSL] Add lowering of `rsqrt` to SPIRV (PR #95849)

2024-06-17 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,29 @@ +; RUN: llc -O0 -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o - -filetype=obj | spirv-val %} + +; CHECK: OpExtInstImport "GLSL.std.450" + +define noundef float @rsqrt_float(float

[clang] [llvm] [SPIRV][HLSL] Add lowering of `rsqrt` to SPIRV (PR #95849)

2024-06-17 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,29 @@ +; RUN: llc -O0 -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o - -filetype=obj | spirv-val %} + +; CHECK: OpExtInstImport "GLSL.std.450" farzonl wrote: make this: `;

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

2024-06-17 Thread Yaxun Liu via cfe-commits
@@ -0,0 +1,19 @@ +// REQUIRES: amdgpu-registered-target +// RUN: %clang_cc1 -fsyntax-only -verify -triple amdgcn -Wno-unused-value %s + yxsamliu wrote: Add a run line: // RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64 -aux-triple amdgcn -Wno-unused-value

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

2024-06-17 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 converted_to_draft 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] [llvm] [Clang][Coroutines] Introducing the `[[clang::coro_inplace_task]]` attribute (PR #94693)

2024-06-17 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] [llvm] [Clang][Coroutines] Introducing the `[[clang::coro_inplace_task]]` attribute (PR #94693)

2024-06-17 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] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #93612)

2024-06-17 Thread via cfe-commits
https://github.com/earnol updated https://github.com/llvm/llvm-project/pull/93612 >From c3d5a244dc08b3e78e961f4611daaea2bbb0a682 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

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

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

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

2024-06-17 Thread via cfe-commits
@@ -3318,6 +3353,20 @@ llvm::Constant *CodeGenFunction::EmitCheckTypeDescriptor(QualType T) { DiagnosticsEngine::ak_qualtype, (intptr_t)T.getAsOpaquePtr(), StringRef(), StringRef(), std::nullopt, Buffer, std::nullopt); + if (IsBitInt) { +// The Structure

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

2024-06-17 Thread via cfe-commits
@@ -3318,6 +3353,20 @@ llvm::Constant *CodeGenFunction::EmitCheckTypeDescriptor(QualType T) { DiagnosticsEngine::ak_qualtype, (intptr_t)T.getAsOpaquePtr(), StringRef(), StringRef(), std::nullopt, Buffer, std::nullopt); + if (IsBitInt) { +// The Structure

[clang] [Clang] [Sema] Ensure noexcept(typeid(E)) checks if E throws when needed (PR #95846)

2024-06-17 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/95846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIRV][HLSL] Add lowering of `rsqrt` to SPIRV (PR #95849)

2024-06-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-hlsl Author: Helena Kotas (hekota) Changes Add lowering of `rsqrt` to SPIRV. Fixes #88949 --- Full diff: https://github.com/llvm/llvm-project/pull/95849.diff 5 Files Affected: - (modified)

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-06-17 Thread Artem Dergachev via cfe-commits
@@ -3328,3 +3300,63 @@ void clang::checkUnsafeBufferUsage(const Decl *D, } } } + +void clang::checkUnsafeBufferUsage(const Decl *D, + UnsafeBufferUsageHandler , + bool EmitSuggestions) { +#ifndef NDEBUG

[clang] [llvm] [SPIRV][HLSL] Add lowering of `rsqrt` to SPIRV (PR #95849)

2024-06-17 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/95849 Add lowering of `rsqrt` to SPIRV. Fixes #88949 >From b10aa2317f566febdf4cd3630a972be58fea515b Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Mon, 17 Jun 2024 14:03:03 -0700 Subject: [PATCH] [SPIRV][HLSL] Add

[clang] [clang] force libc linked with --no-as-needed when using compiler-rt (PR #95848)

2024-06-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ziyao (ziyao233) Changes crtbegin.o in compiler-rt contains weak reference to __cxa_finalize, which is implemented in libc. When building a shared library with --as-needed option, libc may be incorrectly marked as inactive, resulting in

[clang] [clang] force libc linked with --no-as-needed when using compiler-rt (PR #95848)

2024-06-17 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,

[clang] [clang] force libc linked with --no-as-needed when using compiler-rt (PR #95848)

2024-06-17 Thread via cfe-commits
https://github.com/ziyao233 created https://github.com/llvm/llvm-project/pull/95848 crtbegin.o in compiler-rt contains weak reference to __cxa_finalize, which is implemented in libc. When building a shared library with --as-needed option, libc may be incorrectly marked as inactive, resulting

[clang] [clang][ThreadSafety] Warn when constructor is trylock (PR #95290)

2024-06-17 Thread Dan McArdle via cfe-commits
dmcardle wrote: Thanks, @AaronBallman! I tried strictly enforcing a `bool` return type, but I ran into some interesting test failures. * A handful of functions in the parsing tests return `void` and yet are annotated as trylock functions. I don't believe this is a valid use case. What does

[clang] [Clang] [Sema] Ensure noexcept(typeid(E)) checks if E throws when needed (PR #95846)

2024-06-17 Thread Mital Ashok via cfe-commits
MitalAshok wrote: CC @Endilll @Sirraide https://github.com/llvm/llvm-project/pull/95846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Sema] Ensure noexcept(typeid(E)) checks if E throws when needed (PR #95846)

2024-06-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mital Ashok (MitalAshok) Changes 3ad31e12ccfc7db25f3cbedc4ee966e7099ac78f changed it so that not all potentially-evaluated `typeid`s were marked as potentially-throwing, but I forgot to check the subexpression if the null check of the

[clang] [Clang] [Sema] Ensure noexcept(typeid(E)) checks if E throws when needed (PR #95846)

2024-06-17 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok created https://github.com/llvm/llvm-project/pull/95846 3ad31e12ccfc7db25f3cbedc4ee966e7099ac78f changed it so that not all potentially-evaluated `typeid`s were marked as potentially-throwing, but I forgot to check the subexpression if the null check of the

[clang] [llvm] [inline] Clone return range attribute on the callsite into inlined call (PR #92666)

2024-06-17 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: for future reference, https://github.com/llvm/llvm-project/commit/3cd67eeca28ab1084d02b7976de1af4c4c8d37d5 fixes a miscompile that this patch uncovered https://github.com/llvm/llvm-project/pull/92666 ___ cfe-commits mailing list

[clang] [Clang] skip alignment checks on incomplete types to avoid an assertion failure while parsing lambda used as default argument (PR #94542)

2024-06-17 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/94542 >From da4df73607a9edefc8db721818eff50e974a0637 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 6 Jun 2024 01:55:54 +0300 Subject: [PATCH] [Clang] skip alignment checks on incomplete types to avoid an

[clang] [flang] [llvm] [mlir] [Flang]Fix for changed code at the end of AllocaIP. (PR #92430)

2024-06-17 Thread Mats Petersson via cfe-commits
Leporacanthicus wrote: > progress? I'm afraid I'm still waiting for review from some of the key people here. Apparently there was some OpenMP conference last week, which kept some people very busy, so I'm hoping by the time they've read emails and got over jet-lag, etc, they'll get round to

[clang] [clang] Fix-it hint for `++this` -> `++*this` when deref is modifiable (PR #94159)

2024-06-17 Thread via cfe-commits
@@ -13273,6 +13273,23 @@ enum { ConstUnknown, // Keep as last element }; +static void MaybeSuggestDerefFixIt(Sema , const Expr *E, SourceLocation Loc) { + ExprResult Deref; + Expr *TE = const_cast(E); + { +Sema::TentativeAnalysisScope Trap(S); +Deref =

[clang] [Clang] Implement CWG2351 `void{}` (PR #78060)

2024-06-17 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/78060 >From 6ed7cad5d4993603221c3d9a777463675d69643b Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sat, 13 Jan 2024 18:03:15 + Subject: [PATCH 1/2] [SemaCXX] Implement CWG2351 `void{}` ---

  1   2   3   4   >