[clang] [clang] Add 'instantiated_from' for enums to the output of TextNodeDumper (PR #124409)

2025-02-18 Thread via cfe-commits
=?utf-8?q?André?= Brand , =?utf-8?q?André?= Brand , =?utf-8?q?André?= Brand , =?utf-8?q?André?= Brand Message-ID: In-Reply-To: Sirraide wrote: > @Sirraide I just rebased the branch on main and ran the unit tests locally in > case you'd like to merge it now. Ah, sorry, I’ve been a bit busy so

[clang] [clang] Lower non-builtin sincos[f|l] calls to llvm.sincos.* when -fno-math-errno is set (PR #121763)

2025-02-18 Thread Benjamin Maxwell via cfe-commits
MacDue wrote: > I'm a hard no on making this a target dependent option. Just enable it > unconditionally and take the regression Fine, I don't mind the regression as it does not affect targets I work on, I just wanted to make the changes needed for AArch64 without knowingly slightly regressin

[clang] [clang][analyzer] Add checker 'alpha.core.FixedAddressDereference' (PR #127191)

2025-02-18 Thread Balázs Kéri via cfe-commits
https://github.com/balazske updated https://github.com/llvm/llvm-project/pull/127191 From 1f2ad6d5ce6f11fb031ec2175527f56ea86761ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Mon, 3 Feb 2025 15:35:31 +0100 Subject: [PATCH 1/4] [clang][analyzer] Add checker 'alpha.c

[clang-tools-extra] [clang-tidy] Add bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2025-02-18 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,239 @@ +// RUN: %check_clang_tidy %s readability-ambiguous-smartptr-reset-call %t --fix-notes -- + +namespace std { + +template +struct unique_ptr { + T& operator*() const; + T* operator->() const; + void reset(T* p = nullptr); +}; + +template +struct shared_ptr {

[clang] [Clang][doc] -ffp-contract options and standard compliance (PR #127621)

2025-02-18 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/127621 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [MLIR][OpenMP] Add LLVM translation support for OpenMP UserDefinedMappers (PR #124746)

2025-02-18 Thread Akash Banerjee via cfe-commits
https://github.com/TIFitis updated https://github.com/llvm/llvm-project/pull/124746 >From 610953fa4f0b6b93549bdaf1ac6e317a34551f93 Mon Sep 17 00:00:00 2001 From: Akash Banerjee Date: Tue, 28 Jan 2025 13:38:13 + Subject: [PATCH 1/8] [MLIR][OpenMP] Add LLVM translation support for OpenMP Use

[libclc] [libclc] Improve nextafter behaviour around zero (PR #127469)

2025-02-18 Thread Matt Arsenault via cfe-commits
@@ -13,19 +13,25 @@ const UINT_TYPE sign_bit = (UINT_TYPE)1 \ << (sizeof(INT_TYPE_SCALAR) * 8 - 1); \ const UINT_TYPE sign_bit_mask = sign_bit - (UINT_TYPE)1; \ -INT_TYP

[libclc] [libclc] Improve nextafter behaviour around zero (PR #127469)

2025-02-18 Thread Matt Arsenault via cfe-commits
@@ -13,19 +13,25 @@ const UINT_TYPE sign_bit = (UINT_TYPE)1 \ << (sizeof(INT_TYPE_SCALAR) * 8 - 1); \ const UINT_TYPE sign_bit_mask = sign_bit - (UINT_TYPE)1; \ -INT_TYP

[libclc] [libclc] Improve nextafter behaviour around zero (PR #127469)

2025-02-18 Thread Matt Arsenault via cfe-commits
@@ -13,19 +13,25 @@ const UINT_TYPE sign_bit = (UINT_TYPE)1 \ << (sizeof(INT_TYPE_SCALAR) * 8 - 1); \ const UINT_TYPE sign_bit_mask = sign_bit - (UINT_TYPE)1; \ -INT_TYP

[libclc] [libclc] Improve nextafter behaviour around zero (PR #127469)

2025-02-18 Thread Matt Arsenault via cfe-commits
@@ -13,19 +13,25 @@ const UINT_TYPE sign_bit = (UINT_TYPE)1 \ << (sizeof(INT_TYPE_SCALAR) * 8 - 1); \ const UINT_TYPE sign_bit_mask = sign_bit - (UINT_TYPE)1; \ -INT_TYP

[clang] [llvm] [mlir] [MLIR][OpenMP] Add LLVM translation support for OpenMP UserDefinedMappers (PR #124746)

2025-02-18 Thread Akash Banerjee via cfe-commits
https://github.com/TIFitis closed https://github.com/llvm/llvm-project/pull/124746 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA] Increment VTable index for device thunks (PR #124989)

2025-02-18 Thread Anshil Gandhi via cfe-commits
gandhi56 wrote: ping https://github.com/llvm/llvm-project/pull/124989 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Combine fallout warnings to just one warning (PR #127546)

2025-02-18 Thread via cfe-commits
foxtran wrote: > Will it have redefinition problem since I need to share this enum between two > diagnostics? Unfortunately, yes... https://github.com/llvm/llvm-project/blob/785a5b4676e7aa77904babb9f66e862b5fc39295/clang/test/TableGen/select-enum-errors.td#L15-L20 https://github.com/llvm/llv

[clang] [clang-format] Fix a bug in annotating StartOfName (PR #127545)

2025-02-18 Thread via cfe-commits
https://github.com/mydeveloperday commented: Looks good to me https://github.com/llvm/llvm-project/pull/127545 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Combine fallout warnings to just one warning (PR #127546)

2025-02-18 Thread via cfe-commits
foxtran wrote: > I think this might be a good candidate for the new %enum_select thingy that > @erichkeane added recently (see > https://clang.llvm.org/docs/InternalsManual.html#formatting-a-diagnostic-argument > for documentation if you’re not familiar w/ it). Yep, thank you! Will it have r

[clang] [clang][Sema] Combine fallout warnings to just one warning (PR #127546)

2025-02-18 Thread via cfe-commits
@@ -588,42 +579,26 @@ struct CheckFallThroughDiagnostics { static CheckFallThroughDiagnostics MakeForCoroutine(const Decl *Func) { CheckFallThroughDiagnostics D; D.FuncLoc = Func->getLocation(); -D.diag_MaybeFallThrough_HasNoReturn = 0; -D.diag_MaybeFallThroug

[clang] [llvm] [HLSL] Use hlsl_device address space for getpointer. (PR #127675)

2025-02-18 Thread Steven Perron via cfe-commits
https://github.com/s-perron created https://github.com/llvm/llvm-project/pull/127675 We add the hlsl_device address space to represent the device memory space as defined in section 1.7.1.3 of the [HLSL spec](https://microsoft.github.io/hlsl-specs/specs/hlsl.pdf). Fixes https://github.com/llvm/l

[clang] [HLSL] Bug fix crash using Array Parameters when De-sugaring is the same as canonicalizing (PR #127670)

2025-02-18 Thread Sarah Spall via cfe-commits
spall wrote: > Looks fine to me, but this change doesn't only affect HLSL does it? The > function `getArrayParameterType` in `ASTContext.cpp` doesn't look like it is > HLSL-specific. I wonder if a similar bug occurs within C/C++. I believe this function is only called in an HLSL context. http

[clang] [flang] [flang][Driver] Add support of -fd-lines-as-comments and -fd-lines-as-code flags (PR #127605)

2025-02-18 Thread Kelvin Li via cfe-commits
@@ -6747,8 +6747,18 @@ defm backtrace : BooleanFFlag<"backtrace">, Group; defm bounds_check : BooleanFFlag<"bounds-check">, Group; defm check_array_temporaries : BooleanFFlag<"check-array-temporaries">, Group; defm cray_pointer : BooleanFFlag<"cray-pointer">, Group; -defm d_l

[clang] [clang] Lower non-builtin sincos[f|l] calls to llvm.sincos.* when -fno-math-errno is set (PR #121763)

2025-02-18 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/121763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Add support of -fd-lines-as-comments and -fd-lines-as-code flags (PR #127605)

2025-02-18 Thread Kelvin Li via cfe-commits
@@ -6747,8 +6747,18 @@ defm backtrace : BooleanFFlag<"backtrace">, Group; defm bounds_check : BooleanFFlag<"bounds-check">, Group; defm check_array_temporaries : BooleanFFlag<"check-array-temporaries">, Group; defm cray_pointer : BooleanFFlag<"cray-pointer">, Group; -defm d_l

[clang] [llvm] [HLSL] Use hlsl_device address space for getpointer. (PR #127675)

2025-02-18 Thread Steven Perron via cfe-commits
@@ -94,6 +94,11 @@ bool Qualifiers::isTargetAddressSpaceSupersetOf(LangAS A, LangAS B, (A == LangAS::Default && (B == LangAS::cuda_constant || B == LangAS::cuda_device || B == LangAS::cuda_shared)) || + // In HLSL, the this pointer for mem

[clang] [HLSL] Bug fix crash using Array Parameters when De-sugaring is the same as canonicalizing (PR #127670)

2025-02-18 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron edited https://github.com/llvm/llvm-project/pull/127670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [AMDGPU] Generalize amdgcn.make.buffer.rsrc to fat pointers (PR #126828)

2025-02-18 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/126828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Disallow virtual inheritance and functions (PR #127346)

2025-02-18 Thread Ashley Coleman via cfe-commits
https://github.com/V-FEXrt approved this pull request. https://github.com/llvm/llvm-project/pull/127346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] add -Wshift-bool warning to handle shifting of bool (PR #127336)

2025-02-18 Thread Mariya Podchishchaeva via cfe-commits
@@ -11246,6 +11246,12 @@ static void DiagnoseBadShiftValues(Sema& S, ExprResult &LHS, ExprResult &RHS, if (S.getLangOpts().OpenCL) return; + if (LHS.get()->IgnoreParenImpCasts()->getType()->isBooleanType()) { +S.Diag(Loc, diag::warn_shift_bool) +<< (Opc ==

[clang] [Clang] add -Wshift-bool warning to handle shifting of bool (PR #127336)

2025-02-18 Thread Mariya Podchishchaeva via cfe-commits
@@ -7115,6 +7115,9 @@ def warn_shift_result_sets_sign_bit : Warning< "signed shift result (%0) sets the sign bit of the shift expression's " "type (%1) and becomes negative">, InGroup>, DefaultIgnore; +def warn_shift_bool : Warning< + "%select{left|right}0 shifting a `bo

[clang] [Feature]: merge host and kernel dependencies for heterogeneous compilation (PR #119513)

2025-02-18 Thread via cfe-commits
https://github.com/zhouronghua updated https://github.com/llvm/llvm-project/pull/119513 >From 2daff934319a2cd654c0bc27d168e3c3d2f8d902 Mon Sep 17 00:00:00 2001 From: "ronghua.zhou" Date: Fri, 14 Feb 2025 01:04:51 + Subject: [PATCH] [Feature]: support for the BC library file into the compile

[clang] [Clang] Forward `-Xarch_ -Wl,foo` for GPU toolchains (PR #126248)

2025-02-18 Thread via cfe-commits
dyung wrote: > > I'm seeing our internal downstream builder hit the exact same error in this > > test, but that is building a Windows hosted compiler targeting Windows. > > Looking at our runs, it seems to have started appearing after your change > > [479ffe8](https://github.com/llvm/llvm-proj

[clang] [clang][bytecode] Allow up/down casts of nullptr (PR #127615)

2025-02-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes If the target type is a pointer type. --- Full diff: https://github.com/llvm/llvm-project/pull/127615.diff 5 Files Affected: - (modified) clang/lib/AST/ByteCode/Compiler.cpp (+4-2) - (modified) clang/lib/

[clang] [Clang][CodeGen] Bail out on constexpr unknown values in ConstantEmitter (PR #127525)

2025-02-18 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/127525 >From d931667e3b7e18f8ba6f054405ffc5fe2fac36b4 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Tue, 18 Feb 2025 01:26:26 +0800 Subject: [PATCH 1/2] [Clang][CodeGen] Bail out on constexpr unknown values in Co

[libclc] [libclc] Use CLC conversion builtins in CLC functions (PR #127628)

2025-02-18 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/127628 This commit is a broad update across libclc to use the CLC conversion builtins in CLC functions, even those with a '__clc' prefix in the generic folder. This better prepares them for an official move to the

[clang] [clang] Introduce "binary" StringLiteral for #embed data (PR #127629)

2025-02-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mariya Podchishchaeva (Fznamznon) Changes StringLiteral is used as internal data of EmbedExpr and we directly use it as an initializer if a single EmbedExpr appears in the initializer list of a char array. It is fast and convenient, but i

[clang] [clang] Introduce "binary" StringLiteral for #embed data (PR #127629)

2025-02-18 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/127629 StringLiteral is used as internal data of EmbedExpr and we directly use it as an initializer if a single EmbedExpr appears in the initializer list of a char array. It is fast and convenient, but it is causing

[clang] [clang-repl] fix error recovery while parsing completely fails (PR #127087)

2025-02-18 Thread Vipul Cariappa via cfe-commits
Vipul-Cariappa wrote: My theory with limited testing: The crash is caused by assertion failure at https://github.com/llvm/llvm-project/blob/eb7c947272952d40d3235d89652a10da52cb2b4d/clang/lib/AST/DeclBase.cpp#L1757C1-L1758C54. So if we disable assertions it does not crash, and crashes otherwise.

[clang] [clang] Introduce "binary" StringLiteral for #embed data (PR #127629)

2025-02-18 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/127629 >From 700ec6f78c0a24729801bea381bafbcafb06826b Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Tue, 18 Feb 2025 05:12:07 -0800 Subject: [PATCH 1/2] [clang] Introduce "binary" StringLiteral for #e

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

2025-02-18 Thread Ulrich Weigand via cfe-commits
@@ -3830,6 +3876,14 @@ SDValue SystemZTargetLowering::lowerSELECT_CC(SDValue Op, ISD::CondCode CC = cast(Op.getOperand(4))->get(); SDLoc DL(Op); + // SELECT_CC involving f16 will not have the cmp-ops promoted by the + // legalizer, as it will be handled according to the

[clang] [Clang][CodeGen] Bail out on constexpr unknown values in ConstantEmitter (PR #127525)

2025-02-18 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw ready_for_review https://github.com/llvm/llvm-project/pull/127525 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][doc] -ffp-contract options and standard compliance (PR #127621)

2025-02-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sjoerd Meijer (sjoerdmeijer) Changes We had an internal discussion about -ffp-contract, how it compared to GCC which defaults to fast, and standard compliance. Looking at our docs, I think most information is there, but also thought it co

[clang] [Clang][CodeGen] Bail out on constexpr unknown values in ConstantEmitter (PR #127525)

2025-02-18 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw edited https://github.com/llvm/llvm-project/pull/127525 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Bail out on constexpr unknown values in ConstantEmitter (PR #127525)

2025-02-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Yingwei Zheng (dtcxzyw) Changes After https://github.com/llvm/llvm-project/pull/95474, unknown references are valid in constant expressions. However, constexpr-unknown values are not allowed in CodeGen. This patch bails out on con

[clang] [llvm] [AArch64] Add optional extensions enabled on Grace (PR #127620)

2025-02-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Elvina Yakubova (ElvinaYakubova) Changes Enable optional ISA extensions on Grace when mcpu=grace is used --- Full diff: https://github.com/llvm/llvm-project/pull/127620.diff 5 Files Affected: - (modified) clang/test/Driver/aarch6

[clang] [llvm] [AArch64] Add optional extensions enabled on Grace (PR #127620)

2025-02-18 Thread Sjoerd Meijer via cfe-commits
https://github.com/sjoerdmeijer edited https://github.com/llvm/llvm-project/pull/127620 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Add optional extensions enabled on Grace (PR #127620)

2025-02-18 Thread Sjoerd Meijer via cfe-commits
@@ -92,7 +92,7 @@ // COBALT-100: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-cpu" "neoverse-n2" // RUN: %clang --target=aarch64 -mcpu=grace -### -c %s 2>&1 | FileCheck -check-prefix=GRACE %s -// GRACE: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-cpu" "neoverse-v2" --

[clang] [llvm] [AArch64] Add optional extensions enabled on Grace (PR #127620)

2025-02-18 Thread Sjoerd Meijer via cfe-commits
https://github.com/sjoerdmeijer commented: It would be good to mention in the description: - that Grace is no longer an alias, but is a separate CPU definition. - which optional extensions are now enabled. https://github.com/llvm/llvm-project/pull/127620 ___

[libclc] [libclc] Suppress data-layout warnings during linking (PR #127532)

2025-02-18 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/127532 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Warn about `[[noreturn]]` on coroutines (PR #127623)

2025-02-18 Thread via cfe-commits
https://github.com/Nerixyz created https://github.com/llvm/llvm-project/pull/127623 Declaring a coroutine `[[noreturn]]` doesn't make sense, because it will always return its handle. Clang previously crashed when trying to warn about this (diagnostic ID was 0). This PR adds a warning specific

[clang] [Clang] Do not try to transform invalid bindings (PR #125658)

2025-02-18 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/125658 >From 70d7bd8fe791210a6e83389c7e33e17d1fed0c77 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Tue, 4 Feb 2025 10:14:12 +0100 Subject: [PATCH] [Clang] Do not try to transform invalid bindings In the presen

[libclc] 1c6cecd - [libclc] Suppress data-layout warnings during linking (#127532)

2025-02-18 Thread via cfe-commits
Author: Fraser Cormack Date: 2025-02-18T12:06:14Z New Revision: 1c6cecdbdd2470292ce0b508922d807e3100f85c URL: https://github.com/llvm/llvm-project/commit/1c6cecdbdd2470292ce0b508922d807e3100f85c DIFF: https://github.com/llvm/llvm-project/commit/1c6cecdbdd2470292ce0b508922d807e3100f85c.diff LOG

[clang] [Clang] Warn about `[[noreturn]]` on coroutines (PR #127623)

2025-02-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: nerix (Nerixyz) Changes Declaring a coroutine `[[noreturn]]` doesn't make sense, because it will always return its handle. Clang previously crashed when trying to warn about this (diagnostic ID was 0). This PR adds a warning specific to

[clang] [Clang] add -Wshift-bool warning to handle shifting of bool (PR #127336)

2025-02-18 Thread Oleksandr T. via cfe-commits
@@ -7115,6 +7115,9 @@ def warn_shift_result_sets_sign_bit : Warning< "signed shift result (%0) sets the sign bit of the shift expression's " "type (%1) and becomes negative">, InGroup>, DefaultIgnore; +def warn_shift_bool : Warning< + "%select{left|right}0 shifting a `bo

[clang] [Clang] emit -Wunused-variable warning for unused structured bindings without the [[maybe_unused]] attribute (PR #127061)

2025-02-18 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/127061 >From a76ee008bdb87655da465e21d09c840edecc2b1b Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 13 Feb 2025 15:24:09 +0200 Subject: [PATCH 1/2] [Clang] emit -Wunused-variable warning for unused structur

[clang] [llvm] [AArch64] Add optional extensions enabled on Grace (PR #127620)

2025-02-18 Thread Elvina Yakubova via cfe-commits
https://github.com/ElvinaYakubova edited https://github.com/llvm/llvm-project/pull/127620 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Move bases and virtual bases in moveRecord (PR #127627)

2025-02-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes The fixme comment turned out to be true. --- Full diff: https://github.com/llvm/llvm-project/pull/127627.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/Descriptor.cpp (+24-2) - (modified) clan

[clang] [clang][bytecode] Move bases and virtual bases in moveRecord (PR #127627)

2025-02-18 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/127627 The fixme comment turned out to be true. >From 7fec903e68bc8a2803b2bfd51d47cc4723e24234 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 18 Feb 2025 14:02:58 +0100 Subject: [PATCH] [clan

[clang] [flang] [flang] Add -f[no-]vectorize flags (PR #119718)

2025-02-18 Thread David Truby via cfe-commits
@@ -3986,11 +3986,15 @@ defm assumptions : BoolFOption<"assumptions", "Disable codegen and compile-time checks for C++23's [[assume]] attribute">, PosFlag>; + +let Visibility = [ClangOption, FlangOption] in { DavidTruby wrote: The docs [here](ht

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

2025-02-18 Thread Jonas Paulsson via cfe-commits
JonPsson1 wrote: Updated per review. - Wrapping all isel handlings of FP with !useSoftFloat to make sure no custom lowerering may ever use an FP reg. I am not really sure this is needed as the type-legalizer is run before any lowering, but maybe do it just to be sure. - Also found out that a

[clang-tools-extra] [clang-tidy] Add new check `readability-use-numeric-limits` (PR #127430)

2025-02-18 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,134 @@ +//===--- UseNumericLimitsCheck.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: Ap

[clang] [clang] Lower non-builtin sincos[f|l] calls to llvm.sincos.* when -fno-math-errno is set (PR #121763)

2025-02-18 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm requested changes to this pull request. I'm a hard no on making this a target dependent option. Just enable it unconditionally and take the regression https://github.com/llvm/llvm-project/pull/121763 ___ cfe-commits mailing

[clang] [CIR] Upstream simple function bodies (PR #127674)

2025-02-18 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,203 @@ +//===--===// +// +// 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] [CIR] Upstream simple function bodies (PR #127674)

2025-02-18 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,53 @@ +// Simple functions +// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o - | FileCheck %s + +void empty() { } +// CHECK: cir.func @empty() -> !cir.void { andykaylor wrote: Why aren't the function names mang

[clang] [Clang] Warn about `[[noreturn]]` on coroutines (PR #127623)

2025-02-18 Thread via cfe-commits
@@ -3910,8 +3910,13 @@ StmtResult Sema::BuildReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, FnRetType = FD->getReturnType(); if (FD->hasAttrs()) Attrs = &FD->getAttrs(); -if (FD->isNoReturn()) - Diag(ReturnLoc, diag::warn_noreturn_function_has_ret

[clang] [compiler-rt] [Clang] Make `-Wreturn-type` default to an error in all language modes (PR #123470)

2025-02-18 Thread via cfe-commits
foxtran wrote: > Would you be interested in collaborating on a paper? Yep. Sure. Let's make C/C++ safer! https://github.com/llvm/llvm-project/pull/123470 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [llvm] [RISCV] Assembler support for XRivosVizip (PR #127694)

2025-02-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Philip Reames (preames) Changes This implements assembler support for the XRivosVizip custom/vendor extension from Rivos Inc. which is defined in: https://github.com/rivosinc/rivos-custom-extensions (See src/xrivosvizip.adoc) Codeg

[clang] [clang][Sema] Combine fallout warnings to just one warning (PR #127546)

2025-02-18 Thread via cfe-commits
@@ -544,25 +544,17 @@ static ControlFlowKind CheckFallThrough(AnalysisDeclContext &AC) { namespace { struct CheckFallThroughDiagnostics { - unsigned diag_MaybeFallThrough_HasNoReturn; - unsigned diag_MaybeFallThrough_ReturnsNonVoid; - unsigned diag_AlwaysFallThrough_HasNoR

[clang] [clang][Sema] Combine fallout warnings to just one warning (PR #127546)

2025-02-18 Thread via cfe-commits
@@ -696,47 +665,41 @@ static void CheckFallThroughForBody(Sema &S, const Decl *D, const Stmt *Body, if (CD.checkDiagnostics(Diags, ReturnsVoid, HasNoReturn)) return; SourceLocation LBrace = Body->getBeginLoc(), RBrace = Body->getEndLoc(); - auto EmitDiag = [&](Sourc

[clang] [clang][Sema] Combine fallout warnings to just one warning (PR #127546)

2025-02-18 Thread via cfe-commits
@@ -544,25 +544,17 @@ static ControlFlowKind CheckFallThrough(AnalysisDeclContext &AC) { namespace { struct CheckFallThroughDiagnostics { - unsigned diag_MaybeFallThrough_HasNoReturn; - unsigned diag_MaybeFallThrough_ReturnsNonVoid; - unsigned diag_AlwaysFallThrough_HasNoR

[clang] [llvm] [RISCV] Assembler support for XRivosVizip (PR #127694)

2025-02-18 Thread Philip Reames via cfe-commits
@@ -721,6 +721,8 @@ DecodeStatus RISCVDisassembler::getInstruction32(MCInst &MI, uint64_t &Size, "Qualcomm uC Conditional Move custom opcode table"); TRY_TO_DECODE_FEATURE(RISCV::FeatureVendorXqciint, DecoderTableXqciint32, "Qu

[clang] [llvm] [RISCV] Assembler support for XRivosVizip (PR #127694)

2025-02-18 Thread Philip Reames via cfe-commits
https://github.com/preames edited https://github.com/llvm/llvm-project/pull/127694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Assembler support for XRivosVizip (PR #127694)

2025-02-18 Thread Philip Reames via cfe-commits
https://github.com/preames commented: (inline comments on possible discussion points) https://github.com/llvm/llvm-project/pull/127694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Combine fallout warnings to just one warning (PR #127546)

2025-02-18 Thread via cfe-commits
@@ -696,47 +665,41 @@ static void CheckFallThroughForBody(Sema &S, const Decl *D, const Stmt *Body, if (CD.checkDiagnostics(Diags, ReturnsVoid, HasNoReturn)) return; SourceLocation LBrace = Body->getBeginLoc(), RBrace = Body->getEndLoc(); - auto EmitDiag = [&](Sourc

[clang] [llvm] [RISCV] Assembler support for XRivosVizip (PR #127694)

2025-02-18 Thread Philip Reames via cfe-commits
@@ -202,6 +202,7 @@ // CHECK-NEXT: xqcilo 0.2 'Xqcilo' (Qualcomm uC Large Offset Load Store Extension) // CHECK-NEXT: xqcilsm 0.2 'Xqcilsm' (Qualcomm uC Load Store Multiple Extension) // CHECK-NEXT: xqcisls 0.2

[clang] [Clang] Warn about `[[noreturn]]` on coroutines (PR #127623)

2025-02-18 Thread via cfe-commits
https://github.com/Nerixyz updated https://github.com/llvm/llvm-project/pull/127623 >From 62ca537167467947d37174ee822c67a0d44a3bf0 Mon Sep 17 00:00:00 2001 From: Nerixyz Date: Tue, 18 Feb 2025 12:56:05 +0100 Subject: [PATCH] [Clang] Warn about `[[noreturn]]` on coroutines --- .../clang/Basic/

[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

2025-02-18 Thread Michael Kenzel via cfe-commits
@@ -381,24 +381,22 @@ typename A::pint_t DwarfInstructions::evaluateExpression(pint_t expression, A &addressSpace, const R ®isters, pint_t initialStackValue) { - const bool log = false;

[clang] [compiler-rt] [Clang] Make `-Wreturn-type` default to an error in all language modes (PR #123470)

2025-02-18 Thread Jeremy Rifkin via cfe-commits
jeremy-rifkin wrote: Hi @foxtran, I have been working on a proposal on the C++ side. Extensive justification is needed to justify breakage here and I have been attempting to survey the extent of potential breakage. The wording is also tricky especially since attributes are designed to be ignor

[clang] f7d0370 - [AMDGPU] Generalize amdgcn.make.buffer.rsrc to fat pointers (#126828)

2025-02-18 Thread via cfe-commits
Author: Krzysztof Drewniak Date: 2025-02-18T14:15:28-06:00 New Revision: f7d03707d1f59cddab98d49fe55d8946477f87c8 URL: https://github.com/llvm/llvm-project/commit/f7d03707d1f59cddab98d49fe55d8946477f87c8 DIFF: https://github.com/llvm/llvm-project/commit/f7d03707d1f59cddab98d49fe55d8946477f87c8.

[clang] [llvm] [mlir] [AMDGPU] Generalize amdgcn.make.buffer.rsrc to fat pointers (PR #126828)

2025-02-18 Thread Krzysztof Drewniak via cfe-commits
https://github.com/krzysz00 closed https://github.com/llvm/llvm-project/pull/126828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Warn about `[[noreturn]]` on coroutines (PR #127623)

2025-02-18 Thread via cfe-commits
https://github.com/Sirraide commented: I still think it makes more sense to diagnose this when the FunctionDecl is created rather than when we try and return from it. https://github.com/llvm/llvm-project/pull/127623 ___ cfe-commits mailing list cfe-co

[clang] [CodeGen] Ensure relative vtables use llvm.type.checked.load.relative (PR #126785)

2025-02-18 Thread via cfe-commits
https://github.com/PiJoules updated https://github.com/llvm/llvm-project/pull/126785 >From 4642bdb03543cca1ee9d1bbd70cb53b2d76b4e8c Mon Sep 17 00:00:00 2001 From: Leonard Chan Date: Tue, 11 Feb 2025 11:31:17 -0800 Subject: [PATCH] [CodeGen] Ensure relative vtables use llvm.type.checked.load.re

[clang] [Clang] Warn about `[[noreturn]]` on coroutines (PR #127623)

2025-02-18 Thread via cfe-commits
@@ -3910,8 +3910,13 @@ StmtResult Sema::BuildReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, FnRetType = FD->getReturnType(); if (FD->hasAttrs()) Attrs = &FD->getAttrs(); -if (FD->isNoReturn()) - Diag(ReturnLoc, diag::warn_noreturn_function_has_ret

[clang] [Clang] Warn about `[[noreturn]]` on coroutines (PR #127623)

2025-02-18 Thread via cfe-commits
Sirraide wrote: > I still think it makes more sense to diagnose this when the FunctionDecl is > created rather than when we try and return from it. Huh, weird, github went ahead and posted that comment anyway even though it was complaining about the review message being empty. This was suppose

[clang] [Clang] Warn about `[[noreturn]]` on coroutines (PR #127623)

2025-02-18 Thread via cfe-commits
https://github.com/Nerixyz updated https://github.com/llvm/llvm-project/pull/127623 >From 51d7ebdd37013c3d90d2720952c712815fb49525 Mon Sep 17 00:00:00 2001 From: Nerixyz Date: Tue, 18 Feb 2025 12:56:05 +0100 Subject: [PATCH] [Clang] Warn about `[[noreturn]]` on coroutines --- .../clang/Basic/

[clang] [Clang] Warn about `[[noreturn]]` on coroutines (PR #127623)

2025-02-18 Thread via cfe-commits
@@ -3910,8 +3910,13 @@ StmtResult Sema::BuildReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, FnRetType = FD->getReturnType(); if (FD->hasAttrs()) Attrs = &FD->getAttrs(); -if (FD->isNoReturn()) - Diag(ReturnLoc, diag::warn_noreturn_function_has_ret

[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

2025-02-18 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

2025-02-18 Thread Michael Kenzel via cfe-commits
@@ -223,6 +221,41 @@ } while (0) #endif +#define _LIBUNWIND_TRACING_COMPACT_UNWIND (0) +#if !_LIBUNWIND_TRACING_COMPACT_UNWIND +#define _LIBUNWIND_TRACE_COMPACT_UNWIND0(msg) +#define _LIBUNWIND_TRACE_COMPACT_UNWIND(msg, ...) +#else +#define _LIBUNWIND_TRACE_COMPACT_UNWIND0

[clang] [llvm] [CaptureTracking][FunctionAttrs] Add support for CaptureInfo (PR #125880)

2025-02-18 Thread via cfe-commits
Prabhuk wrote: @joaosaffran apologies. It was relanded by @nikic in https://github.com/llvm/llvm-project/commit/7e3735d1a1b85cea48feb45cb7c2b5d8eaa216ae We were able to verify that reverting this patch locally resolves the windows builder failure that we are facing. We will try to dig deeper

[clang] [llvm] Template as type (PR #127654)

2025-02-18 Thread Steve Merritt via cfe-commits
@@ -0,0 +1,124 @@ +; RUN: llc -mtriple=x86_64-unknown-linux-gnu %s -o %t -filetype=obj +; RUN:llvm-dwarfdump %t | FileCheck %s stevemerr wrote: I'd recommend adding spaces to make this look more like the other tests. So change to "RUN: " and "; CHECK:" for exa

[clang] [llvm] [RISCV] Assembler support for XRivosVizip (PR #127694)

2025-02-18 Thread Philip Reames via cfe-commits
https://github.com/preames created https://github.com/llvm/llvm-project/pull/127694 This implements assembler support for the XRivosVizip custom/vendor extension from Rivos Inc. which is defined in: https://github.com/rivosinc/rivos-custom-extensions (See src/xrivosvizip.adoc) Codegen support

[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

2025-02-18 Thread Michael Kenzel via cfe-commits
@@ -223,6 +221,41 @@ } while (0) #endif +#define _LIBUNWIND_TRACING_COMPACT_UNWIND (0) +#if !_LIBUNWIND_TRACING_COMPACT_UNWIND +#define _LIBUNWIND_TRACE_COMPACT_UNWIND0(msg) +#define _LIBUNWIND_TRACE_COMPACT_UNWIND(msg, ...) +#else +#define _LIBUNWIND_TRACE_COMPACT_UNWIND0

[clang] [llvm] [RISCV] Assembler support for XRivosVizip (PR #127694)

2025-02-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Philip Reames (preames) Changes This implements assembler support for the XRivosVizip custom/vendor extension from Rivos Inc. which is defined in: https://github.com/rivosinc/rivos-custom-extensions (See src/xrivosvizip.adoc) Codegen supp

[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

2025-02-18 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

2025-02-18 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Combine fallout warnings to just one warning (PR #127546)

2025-02-18 Thread via cfe-commits
@@ -544,25 +544,17 @@ static ControlFlowKind CheckFallThrough(AnalysisDeclContext &AC) { namespace { struct CheckFallThroughDiagnostics { - unsigned diag_MaybeFallThrough_HasNoReturn; - unsigned diag_MaybeFallThrough_ReturnsNonVoid; - unsigned diag_AlwaysFallThrough_HasNoR

[clang] [Clang] Warn about `[[noreturn]]` on coroutines (PR #127623)

2025-02-18 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/127623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Warn about `[[noreturn]]` on coroutines (PR #127623)

2025-02-18 Thread via cfe-commits
@@ -1176,6 +1176,10 @@ void Sema::CheckCompletedCoroutineBody(FunctionDecl *FD, Stmt *&Body) { for (AddrLabelExpr *ALE : Fn->AddrLabels) Diag(ALE->getBeginLoc(), diag::err_coro_invalid_addr_of_label); + // Coroutines always return a handle, so they can't be [[noreturn]

[clang] [Clang] Warn about `[[noreturn]]` on coroutines (PR #127623)

2025-02-18 Thread via cfe-commits
@@ -1176,6 +1176,10 @@ void Sema::CheckCompletedCoroutineBody(FunctionDecl *FD, Stmt *&Body) { for (AddrLabelExpr *ALE : Fn->AddrLabels) Diag(ALE->getBeginLoc(), diag::err_coro_invalid_addr_of_label); + // Coroutines always return a handle, so they can't be [[noreturn]

[clang] [clang][Sema] Combine fallout warnings to just one warning (PR #127546)

2025-02-18 Thread via cfe-commits
@@ -696,47 +665,41 @@ static void CheckFallThroughForBody(Sema &S, const Decl *D, const Stmt *Body, if (CD.checkDiagnostics(Diags, ReturnsVoid, HasNoReturn)) return; SourceLocation LBrace = Body->getBeginLoc(), RBrace = Body->getEndLoc(); - auto EmitDiag = [&](Sourc

[clang] [Clang] Warn about `[[noreturn]]` on coroutines (PR #127623)

2025-02-18 Thread via cfe-commits
@@ -1176,6 +1176,10 @@ void Sema::CheckCompletedCoroutineBody(FunctionDecl *FD, Stmt *&Body) { for (AddrLabelExpr *ALE : Fn->AddrLabels) Diag(ALE->getBeginLoc(), diag::err_coro_invalid_addr_of_label); + // Coroutines always return a handle, so they can't be [[noreturn]

[clang] [clang][Sema] Combine fallout warnings to just one warning (PR #127546)

2025-02-18 Thread via cfe-commits
@@ -544,25 +544,17 @@ static ControlFlowKind CheckFallThrough(AnalysisDeclContext &AC) { namespace { struct CheckFallThroughDiagnostics { - unsigned diag_MaybeFallThrough_HasNoReturn; - unsigned diag_MaybeFallThrough_ReturnsNonVoid; - unsigned diag_AlwaysFallThrough_HasNoR

[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

2025-02-18 Thread Michael Kenzel via cfe-commits
michael-kenzel wrote: > @michael-kenzel Was there a reason why this never got merged? I don't think there was, I guess this just fell through the cracks… https://github.com/llvm/llvm-project/pull/72040 ___ cfe-commits mailing list cfe-commits@lists.ll

<    1   2   3   4   5   6   >