[clang] 8a05c20 - Add an off-by-default warning to complain about MSVC bitfield padding (#117428)

2025-05-13 Thread via cfe-commits
Author: Oliver Hunt Date: 2025-05-13T14:00:20-07:00 New Revision: 8a05c20c963db27db0c93b422dab061a0d53a91f URL: https://github.com/llvm/llvm-project/commit/8a05c20c963db27db0c93b422dab061a0d53a91f DIFF: https://github.com/llvm/llvm-project/commit/8a05c20c963db27db0c93b422dab061a0d53a91f.diff L

[clang] 989a40c - [clang][modules] Invalidate module cache when SDKSettings.json changes (#139751)

2025-05-13 Thread via cfe-commits
Author: Jan Svoboda Date: 2025-05-13T14:00:31-07:00 New Revision: 989a40cba889630a916a4f815a8cabca1e14242a URL: https://github.com/llvm/llvm-project/commit/989a40cba889630a916a4f815a8cabca1e14242a DIFF: https://github.com/llvm/llvm-project/commit/989a40cba889630a916a4f815a8cabca1e14242a.diff L

[clang] Add an off-by-default warning to complain about MSVC bitfield padding (PR #117428)

2025-05-13 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt closed https://github.com/llvm/llvm-project/pull/117428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add PointerLikeType interface support for cir::PointerType (PR #139768)

2025-05-13 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,160 @@ +//===--===// +// +// 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][OpenMP] Treat "workshare" as unknown OpenMP directive (PR #139793)

2025-05-13 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/139793 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add PointerLikeType interface support for cir::PointerType (PR #139768)

2025-05-13 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,36 @@ +//===--===// +// +// 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: Apac

[clang] [clang][modules] Invalidate module cache when SDKSettings.json changes (PR #139751)

2025-05-13 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/139751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][SelectionDAG] Add CodeGen support for scalar FEAT_CPA (PR #105669)

2025-05-13 Thread Alexander Richardson via cfe-commits
arichardson wrote: > Hi @rgwott, I'm working on changes in the AMDGPU backend that would benefit > from the PTRADD SelectionDAG opcode that this PR adds. I understand that this > PR is low priority for you right now, so I'd like to suggest extracting the > relevant changes to enable PTRADD nod

[clang] [CIR] Add PointerLikeType interface support for cir::PointerType (PR #139768)

2025-05-13 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I am not a good reviewer for this, hopefully @razvanlupusoru and @clementval can affirm this is right. https://github.com/llvm/llvm-project/pull/139768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] [C++20] Fix a crash with spaceship and vector types (PR #139767)

2025-05-13 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/139767 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add PointerLikeType interface support for cir::PointerType (PR #139768)

2025-05-13 Thread Razvan Lupusoru via cfe-commits
@@ -0,0 +1,41 @@ +//===--===// +// +// 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: Apac

[clang] 4122958 - [analyzer] Fix crashing __builtin_bit_cast (#139188)

2025-05-13 Thread via cfe-commits
Author: Ziqing Luo Date: 2025-05-13T10:24:02-07:00 New Revision: 41229581a456619c341daca8354b8c9ae1b150df URL: https://github.com/llvm/llvm-project/commit/41229581a456619c341daca8354b8c9ae1b150df DIFF: https://github.com/llvm/llvm-project/commit/41229581a456619c341daca8354b8c9ae1b150df.diff LO

[clang] [analyzer] Fix crashing __builtin_bit_cast (PR #139188)

2025-05-13 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 closed https://github.com/llvm/llvm-project/pull/139188 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add PointerLikeType interface support for cir::PointerType (PR #139768)

2025-05-13 Thread Erich Keane via cfe-commits
@@ -0,0 +1,36 @@ +//===--===// +// +// 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: Apac

[clang] [clang-tools-extra] [Clang] Add builtins that deduplicate and sort types (PR #106730)

2025-05-13 Thread Younan Zhang via cfe-commits
@@ -1666,6 +1685,21 @@ namespace { return inherited::TransformTemplateArgument(Input, Output, Uneval); } +using TreeTransform::TransformTemplateSpecializationType; +QualType +TransformTemplateSpecializationType(TypeLocBuilder &TLB, +

[clang] [Clang] Add a builtin for efficient type deduplication (PR #139730)

2025-05-13 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov created https://github.com/llvm/llvm-project/pull/139730 Deduplicating types via standard C++ can be a huge compile-time hog, we have observed that on some of the large targets we have internally this can be up to 25%. This builtin can be used to improve compi

[clang] [clang][modules] Invalidate module cache when SDKSettings.json changes (PR #139751)

2025-05-13 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/139751 This PR adds the `%sdk/SDKSettings.json` file to the PCM input file table, so that the PCM gets invalidated when the file changes. This is necessary for availability checks to work correctly.

[clang] [Clang] Fix Sema::checkArgCount for 0-arg functions (PR #139638)

2025-05-13 Thread Hood Chatham via cfe-commits
hoodmane wrote: > are we sure they weren't intentionally skipping diagnostic there? The behavior before was ``` error: cannot compile this scalar expression yet 2 | __externref_t ref = __builtin_wasm_ref_null_extern(0); | ^ PLEAS

[clang] [clang-tools-extra] [Clang] Add builtins that deduplicate and sort types (PR #106730)

2025-05-13 Thread Erich Keane via cfe-commits
@@ -3331,6 +3343,65 @@ checkBuiltinTemplateIdType(Sema &SemaRef, BuiltinTemplateDecl *BTD, QualType HasNoTypeMember = Converted[2].getAsType(); return HasNoTypeMember; } + case BTK__builtin_dedup_pack: { +assert(Converted.size() == 1 && "__builtin_dedup_pack sho

[clang] [clang-tools-extra] [Clang] Add builtins that deduplicate and sort types (PR #106730)

2025-05-13 Thread Erich Keane via cfe-commits
@@ -3331,6 +3343,65 @@ checkBuiltinTemplateIdType(Sema &SemaRef, BuiltinTemplateDecl *BTD, QualType HasNoTypeMember = Converted[2].getAsType(); return HasNoTypeMember; } + case BTK__builtin_dedup_pack: { +assert(Converted.size() == 1 && "__builtin_dedup_pack sho

[clang] [clang][modules] Invalidate module cache when SDKSettings.json changes (PR #139751)

2025-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Jan Svoboda (jansvoboda11) Changes This PR adds the `%sdk/SDKSettings.json` file to the PCM input file table, so that the PCM gets invalidated when the file changes. This is necessary for availability checks to work correctly. --

[clang] [clang-tools-extra] [Clang] Add builtins that deduplicate and sort types (PR #106730)

2025-05-13 Thread Ilya Biryukov via cfe-commits
@@ -5054,95 +5089,128 @@ bool TreeTransform::TransformTemplateArguments( } if (In.getArgument().isPackExpansion()) { - // We have a pack expansion, for which we will be substituting into - // the pattern. - SourceLocation Ellipsis; - UnsignedOrNone

[clang] [Clang] Fix Sema::checkArgCount for 0-arg functions (PR #139638)

2025-05-13 Thread Derek Schuff via cfe-commits
https://github.com/dschuff approved this pull request. LGTM from the wasm side. As @hoodmane noted, the underlying wasm instruction has no arguments. https://github.com/llvm/llvm-project/pull/139638 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [NFC][Clang] Add `setExprs` overload to reduce some code duplication (PR #139749)

2025-05-13 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/139749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] Fix a crash with spaceship and vector types (PR #139767)

2025-05-13 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. Do we want to issue a diagnostic for this? I would imagine that users could get confused about this if they don’t know *why* the operator is marked as deleted. https://github.com/llvm/llvm-project/pull/139767 __

[clang] [clang-format] Add IndentPPDirectives Leave option (PR #139750)

2025-05-13 Thread Gedare Bloom via cfe-commits
https://github.com/gedare edited https://github.com/llvm/llvm-project/pull/139750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add PointerLikeType interface support for cir::PointerType (PR #139768)

2025-05-13 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/139768 This adds code to attach the OpenACC PointerLikeType interface to cir::PointerType, along with a unit test for the interface. >From 6edf90c7beca34320ae53e3984f68e001aee6498 Mon Sep 17 00:00:00 2001 From: And

[clang] [C++20] Fix a crash with spaceship and vector types (PR #139767)

2025-05-13 Thread Aaron Ballman via cfe-commits
@@ -8651,6 +8651,11 @@ class DefaultedComparisonAnalyzer assert(Best->BuiltinParamTypes[2].isNull() && "invalid builtin comparison"); +// FIXME: If the type we deduced is a vector type, we mark the +// comparison as deleted because we don

[clang] [C++20] Fix a crash with spaceship and vector types (PR #139767)

2025-05-13 Thread via cfe-commits
Sirraide wrote: GCC does print a note explaining that this is not implemented apparently. https://github.com/llvm/llvm-project/pull/139767 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [C++20] Fix a crash with spaceship and vector types (PR #139767)

2025-05-13 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Do we want to issue a diagnostic for this? I would imagine that users could > get confused about this if they don’t know _why_ the operator is marked as > deleted. Yeah, I missed that part of the patch. More changes coming. https://github.com/llvm/llvm-project/pull/13976

[clang] [CIR] Add PointerLikeType interface support for cir::PointerType (PR #139768)

2025-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes This adds code to attach the OpenACC PointerLikeType interface to cir::PointerType, along with a unit test for the interface. --- Full diff: https://github.com/llvm/llvm-project/pull/139768.diff 11 Fil

[clang] [CIR] Add PointerLikeType interface support for cir::PointerType (PR #139768)

2025-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes This adds code to attach the OpenACC PointerLikeType interface to cir::PointerType, along with a unit test for the interface. --- Full diff: https://github.com/llvm/llvm-project/pull/139768.diff 11 Files

[clang] 377cb7f - [CIR] Upstream shift operators for VectorType (#139465)

2025-05-13 Thread via cfe-commits
Author: Amr Hesham Date: 2025-05-13T20:17:51+02:00 New Revision: 377cb7fb267031e8815c37fa0e5cadd36d227b11 URL: https://github.com/llvm/llvm-project/commit/377cb7fb267031e8815c37fa0e5cadd36d227b11 DIFF: https://github.com/llvm/llvm-project/commit/377cb7fb267031e8815c37fa0e5cadd36d227b11.diff LO

[clang] [CIR] Upstream shift operators for VectorType (PR #139465)

2025-05-13 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/139465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [cfi] Enable -fsanitize-annotate-debug-info functionality for CFI checks (PR #139809)

2025-05-13 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/139809 >From ead256dfd33d04877766ddb26830f264682e9b48 Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Wed, 7 May 2025 23:33:21 + Subject: [PATCH 1/4] [cfi] Enable -fsanitize-annotate-debug-info functionality

[clang] [cfi] Enable -fsanitize-annotate-debug-info functionality for CFI checks (PR #139809)

2025-05-13 Thread Thurston Dang via cfe-commits
thurstond wrote: > > > I am not a fan of the change to the function used for array-bounds. > > > > > > More specific? I like it in general. It's about just about the name of a > > new fake function? > > Sorry, I meant the new name. > > I don't like that it has a `-` in it, and I don't like t

[clang] [cfi] Enable -fsanitize-annotate-debug-info functionality for CFI checks (PR #139809)

2025-05-13 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/139809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [cfi] Enable -fsanitize-annotate-debug-info functionality for CFI checks (PR #139809)

2025-05-13 Thread Thurston Dang via cfe-commits
@@ -89,7 +89,7 @@ double f1(int b, int i) { // CHECK-TRAP: [[DBG21]] = !DILocation(line: 65, column: 3, scope: [[DBG4]]) // CHECK-TRAP: [[DBG22]] = !DILocation(line: 66, column: 12, scope: [[DBG4]]) // CHECK-TRAP: [[DBG23]] = !DILocation(line: 0, scope: [[META24:![0-9]+]], inl

[clang] [cfi] Enable -fsanitize-annotate-debug-info functionality for CFI checks (PR #139809)

2025-05-13 Thread Thurston Dang via cfe-commits
@@ -3353,6 +3353,17 @@ class CodeGenFunction : public CodeGenTypeCache { SanitizerSet SkippedChecks = SanitizerSet(), llvm::Value *ArraySize = nullptr); + /// Returns debug info, with additional annotation if enabled by + /// CGM.get

[clang] [cfi] Enable -fsanitize-annotate-debug-info functionality for CFI checks (PR #139809)

2025-05-13 Thread Thurston Dang via cfe-commits
@@ -2779,13 +2779,47 @@ void CodeGenFunction::EmitTypeMetadataCodeForVCall(const CXXRecordDecl *RD, } } +void CodeGenFunction::ParseCFITypeCheckKind(CFITypeCheckKind TCK, thurstond wrote: Fixed in https://github.com/llvm/llvm-project/pull/139809/commits/f

[clang] [cfi] Enable -fsanitize-annotate-debug-info functionality for CFI checks (PR #139809)

2025-05-13 Thread Florian Mayer via cfe-commits
fmayer wrote: > > I am not a fan of the change to the function used for array-bounds. > > More specific? I like it in general. It's about just about the name of a new > fake function? Sorry, I meant the new name. I don't like that it has a `-` in it, and I don't like that it changed for no g

[clang] [HLSL] Add various overloads for MiniEngine (PR #139800)

2025-05-13 Thread Sarah Spall via cfe-commits
@@ -158,6 +158,42 @@ namespace hlsl { return fn((float4)V1, (float4)V2, (float4)V3); \ } +#define _DXC_COMPAT_BINARY_VECTOR_SCALAR_OVERLOADS(fn) \ + template \ + cons

[clang] [cfi] Enable -fsanitize-annotate-debug-info functionality for CFI checks (PR #139809)

2025-05-13 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > I am not a fan of the change to the function used for array-bounds. More specific? I like it in general. It's about just about the name of a new fake function? https://github.com/llvm/llvm-project/pull/139809 ___ cfe-commits mailin

[clang] Implement src:*=sanitize for UBSan (PR #139772)

2025-05-13 Thread Vitaly Buka via cfe-commits
@@ -44,7 +44,8 @@ bool NoSanitizeList::containsFunction(SanitizerMask Mask, bool NoSanitizeList::containsFile(SanitizerMask Mask, StringRef FileName, StringRef Category) const { - return SSCL->inSection(Mask, "src", FileName, Category); + bo

[clang] [cfi] Enable -fsanitize-annotate-debug-info functionality for CFI checks (PR #139809)

2025-05-13 Thread Florian Mayer via cfe-commits
@@ -68,9 +68,9 @@ double f1(int b, int i) { //. // CHECK-TRAP: [[META0:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C11, file: [[META1:![0-9]+]], isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) -// CHEC

[clang] [cfi] Enable -fsanitize-annotate-debug-info functionality for CFI checks (PR #139809)

2025-05-13 Thread Florian Mayer via cfe-commits
@@ -96,9 +96,9 @@ double f1(int b, int i) { // CHECK-TRAP: [[DBG28]] = !DILocation(line: 66, column: 3, scope: [[DBG4]]) //. // CHECK-NOTRAP: [[META0:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C11, file: [[META1:![0-9]+]], isOptimized: false, runtimeVersion: 0, emi

[clang] [clang][analyzer] Fix a nullptr dereference when `-ftime-trace` is used (PR #139820)

2025-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 @llvm/pr-subscribers-clang Author: Fangyi Zhou (fangyi-zhou) Changes Fixes #139779. The bug was introduced in #137355 in `SymbolConjured::getStmt`, when trying to obtain a statement for a CFG initializer without an initializer.

[clang] [clang][analyzer] Fix a nullptr dereference when `-ftime-trace` is used (PR #139820)

2025-05-13 Thread Fangyi Zhou via cfe-commits
https://github.com/fangyi-zhou created https://github.com/llvm/llvm-project/pull/139820 Fixes #139779. The bug was introduced in #137355 in `SymbolConjured::getStmt`, when trying to obtain a statement for a CFG initializer without an initializer. This commit adds a null check before access.

[clang] [llvm] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-05-13 Thread via cfe-commits
https://github.com/irymarchyk updated https://github.com/llvm/llvm-project/pull/134337 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,san

[clang] [clang-format] Add IndentPPDirectives Leave option (PR #139750)

2025-05-13 Thread Gedare Bloom via cfe-commits
https://github.com/gedare created https://github.com/llvm/llvm-project/pull/139750 Allow an option to leave preprocessor directive indenting as-is. This simplifies handling mixed styles of CPP directive indentation. Fixes #38511 Rate limit · GitHub bod

[clang] [HIP] change default offload archs (PR #139281)

2025-05-13 Thread Alex Voicu via cfe-commits
AlexVlx wrote: I think that in general we also need to decide on what happens when you pick an amdgcn— triple. IMHO for that case we should probably error out if no mcpu is provided, since there’s no reasonable default, except for “all”, but that would be incredibly disruptive. https://github

[clang] [clang][modules] Invalidate module cache when SDKSettings.json changes (PR #139751)

2025-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jan Svoboda (jansvoboda11) Changes This PR adds the `%sdk/SDKSettings.json` file to the PCM input file table, so that the PCM gets invalidated when the file changes. This is necessary for availability checks to work correctly. --- Full d

[clang] [clang-tools-extra] [Clang] Add builtins that deduplicate and sort types (PR #106730)

2025-05-13 Thread Erich Keane via cfe-commits
@@ -3331,6 +3343,65 @@ checkBuiltinTemplateIdType(Sema &SemaRef, BuiltinTemplateDecl *BTD, QualType HasNoTypeMember = Converted[2].getAsType(); return HasNoTypeMember; } + case BTK__builtin_dedup_pack: { +assert(Converted.size() == 1 && "__builtin_dedup_pack sho

[clang] [clang-tools-extra] [Clang] Add builtins that deduplicate and sort types (PR #106730)

2025-05-13 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/106730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] Add builtins that deduplicate and sort types (PR #106730)

2025-05-13 Thread Erich Keane via cfe-commits
@@ -3331,6 +3343,65 @@ checkBuiltinTemplateIdType(Sema &SemaRef, BuiltinTemplateDecl *BTD, QualType HasNoTypeMember = Converted[2].getAsType(); return HasNoTypeMember; } + case BTK__builtin_dedup_pack: { +assert(Converted.size() == 1 && "__builtin_dedup_pack sho

[libclc] [libclc] Add (fast) normalize to CLC; add half overloads (PR #139759)

2025-05-13 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/139759 For simplicity the half overloads just call into the float versions of the builtin. Note that in the move some floating-point constants were combined. The vector2 versions of normalize used slightly differ

[clang] [NFC][Clang] Add `setExprs` overload to reduce some code duplication (PR #139749)

2025-05-13 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Would like the parameters renamed, else lgtm. https://github.com/llvm/llvm-project/pull/139749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [NFC][Clang] Add `setExprs` overload to reduce some code duplication (PR #139749)

2025-05-13 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/139749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Add `setExprs` overload to reduce some code duplication (PR #139749)

2025-05-13 Thread Erich Keane via cfe-commits
@@ -506,6 +506,14 @@ class OpenACCClauseWithExprs : public OpenACCClauseWithParams { Exprs = NewExprs; } + /// Used only for initialization, the leaf class can initialize this to + /// trailing storage, and initialize the data in the trailing storage as well. + void

[clang] [C++20] Fix a crash with spaceship and vector types (PR #139767)

2025-05-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/139767 Vector types cannot be directly compared, you get an error when you try to do so. This patch causes the explicitly defaulted spaceship operator to be implicitly deleted. Fixes #137452

[clang] [C++20] Fix a crash with spaceship and vector types (PR #139767)

2025-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes Vector types cannot be directly compared, you get an error when you try to do so. This patch causes the explicitly defaulted spaceship operator to be implicitly deleted. Fixes #137452 --- Full diff:

[clang] [C++20] Fix a crash with spaceship and vector types (PR #139767)

2025-05-13 Thread Erich Keane via cfe-commits
@@ -8651,6 +8651,11 @@ class DefaultedComparisonAnalyzer assert(Best->BuiltinParamTypes[2].isNull() && "invalid builtin comparison"); +// FIXME: If the type we deduced is a vector type, we mark the +// comparison as deleted because we don

[clang] [RISCV] Improve casting between i1 scalable vectors and i8 fixed vectors for -mrvv-vector-bits (PR #139190)

2025-05-13 Thread Craig Topper via cfe-commits
@@ -1366,19 +1366,29 @@ static llvm::Value *CreateCoercedLoad(Address Src, llvm::Type *Ty, // If we are casting a fixed i8 vector to a scalable i1 predicate // vector, use a vector insert and bitcast the result. if (ScalableDstTy->getElementType()->isIntegerT

[clang] [llvm] Add support for Windows hot-patching (PR #138972)

2025-05-13 Thread via cfe-commits
@@ -807,6 +809,32 @@ void CodeViewDebug::emitObjName() { endSymbolRecord(CompilerEnd); } +void CodeViewDebug::emitHotPatchInformation() { sivadeilra wrote: > Would that tooling remain proprietary, or is it something that will be > open-sourced as well, for

[clang] [llvm] Add support for Windows hot-patching (PR #138972)

2025-05-13 Thread via cfe-commits
https://github.com/sivadeilra updated https://github.com/llvm/llvm-project/pull/138972 >From 18bcf7a9da1b0698b6e7b9808edf4f12d0db16aa Mon Sep 17 00:00:00 2001 From: Arlie Davis Date: Thu, 3 Apr 2025 16:10:50 -0700 Subject: [PATCH 1/4] Windows hotpatching support Address PR feedback * Simply u

[clang] Implement src:*=sanitize for UBSan (PR #139772)

2025-05-13 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao edited https://github.com/llvm/llvm-project/pull/139772 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][LLVMLowering] Upstream unary operators for VectorType (PR #139444)

2025-05-13 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/139444 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[clang-tools-extra] [clangd] Add CodePatterns config option under Completion (PR #137613)

2025-05-13 Thread via cfe-commits
Noustaa wrote: > @Noustaa if you'd like to also submit a documentation patch for > https://clangd.llvm.org/config.html (source at > https://github.com/llvm/clangd-www/blob/main/config.md), that would be > appreciated! Sure, i'm gonna do it tomorrow 🙂 https://github.com/llvm/llvm-project/pull

[clang] d9380ec - [CIR] Implement folder for VecExtractOp (#139304)

2025-05-13 Thread via cfe-commits
Author: Amr Hesham Date: 2025-05-13T11:01:48-07:00 New Revision: d9380ec63707be2cf0b0010220e4a34d2dbd107b URL: https://github.com/llvm/llvm-project/commit/d9380ec63707be2cf0b0010220e4a34d2dbd107b DIFF: https://github.com/llvm/llvm-project/commit/d9380ec63707be2cf0b0010220e4a34d2dbd107b.diff LO

[clang] [CIR] Implement folder for VecExtractOp (PR #139304)

2025-05-13 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes closed https://github.com/llvm/llvm-project/pull/139304 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add hasAnyNameInVector matcher (PR #139594)

2025-05-13 Thread Florian Mayer via cfe-commits
fmayer wrote: > > > Are there any planned in-tree uses for this matcher? > > > > > > I had a downstream use planned. Does this mean I will have to reimplement > > `internal::HasNameMatcher`? > > Can you adapt the code to use `hasAnyName()` instead, as that can accept a > variadic number of `

[clang] [CIR] Implement folder for VecExtractOp (PR #139304)

2025-05-13 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM, thanks https://github.com/llvm/llvm-project/pull/139304 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream unary operators for VectorType (PR #139444)

2025-05-13 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/139444 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream unary operators for VectorType (PR #139444)

2025-05-13 Thread Bruno Cardoso Lopes via cfe-commits
@@ -54,10 +54,10 @@ namespace direct { namespace { /// If the given type is a vector type, return the vector's element type. /// Otherwise return the given type unchanged. -// TODO(cir): Return the vector element type once we have support for vectors -// instead of the identity

[clang] [CIR] Upstream unary operators for VectorType (PR #139444)

2025-05-13 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM after minor nit https://github.com/llvm/llvm-project/pull/139444 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][LLVMLowering] Upstream unary operators for VectorType (PR #139444)

2025-05-13 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/139444 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Implement src:*=sanitize for UBSan (PR #139772)

2025-05-13 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao created https://github.com/llvm/llvm-project/pull/139772 It is a draft implementation for "src:*=sanitize". It should be applied to all sanitizers. Any srcs assigned to the sanitize category will have their sanitizer instrumentation remained ignored by "src:". Fo

[clang] Implement src:*=sanitize for UBSan (PR #139772)

2025-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Qinkun Bao (qinkunbao) Changes It is a draft implementation for "src:*=sanitize". It should be applied to all sanitizers. Any srcs assigned to the sanitize category will have their sanitizer instrumentation remained ignored by "src:". F

[clang] [CIR] Upstream shift operators for VectorType (PR #139465)

2025-05-13 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. Nothing to add on top of Andy's review. LGTM https://github.com/llvm/llvm-project/pull/139465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [CIR] Add PointerLikeType interface support for cir::PointerType (PR #139768)

2025-05-13 Thread Razvan Lupusoru via cfe-commits
razvanlupusoru wrote: I just had one concern - otherwise looks great! Nice job! https://github.com/llvm/llvm-project/pull/139768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][PGO][UserManual] Specify usage of -b flag (PR #139763)

2025-05-13 Thread Tim Creech via cfe-commits
https://github.com/tcreech-intel approved this pull request. Thanks! Looks good to me. Step 2 mentions `-b`, but makes it sound optional because it was optional with AutoFDO. Llvm-profgen doesn't have a mode to not require LBRs and this is good to point out. https://github.com/llvm/llvm-proje

[clang] [llvm] [RISCV] Xqci Extensions v0.11.0 (PR #137881)

2025-05-13 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `arc-builder` running on `arc-worker` while building `clang,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/3/builds/15875 Here is the relevant pie

[clang] [HLSL] Update Sema Checking Diagnostics for builtins (PR #138429)

2025-05-13 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/138429 >From 1139101e277f8f4d327fd7b422959dc4a3a43dbe Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Tue, 18 Mar 2025 11:04:11 -0700 Subject: [PATCH 1/2] update error messaging --- .../clang/Basic/DiagnosticSemaKinds

[clang] [llvm] Add support for Windows hot-patching (PR #138972)

2025-05-13 Thread via cfe-commits
@@ -0,0 +1,18 @@ +// This verifies that hotpatch function attributes are correctly propagated through LLVM IR when compiling with LTO. +// +// RUN: %clang_cl -c --target=x86_64-windows-msvc -O2 /Z7 -fms-hotpatch-functions-file=%S/ms-hotpatch-functions.txt -flto /Fo%t.bc %s -

[clang] [NFC][Clang] Add `setExprs` overload to reduce some code duplication (PR #139749)

2025-05-13 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/139749 >From cddc08de74e539c47e93efc4eb65cb4417b747de Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Tue, 13 May 2025 08:04:08 -0700 Subject: [PATCH] [NFC][Clang] Add `setExprs` overload to reduce some code duplicat

[clang] [NFC][Clang] Add `setExprs` overload to reduce some code duplication (PR #139749)

2025-05-13 Thread Rahul Joshi via cfe-commits
@@ -506,6 +506,14 @@ class OpenACCClauseWithExprs : public OpenACCClauseWithParams { Exprs = NewExprs; } + /// Used only for initialization, the leaf class can initialize this to + /// trailing storage, and initialize the data in the trailing storage as well. + void

[clang] [NFC][Clang] Add `setExprs` overload to reduce some code duplication (PR #139749)

2025-05-13 Thread Erich Keane via cfe-commits
@@ -501,20 +501,28 @@ class OpenACCClauseWithExprs : public OpenACCClauseWithParams { /// Used only for initialization, the leaf class can initialize this to /// trailing storage. - void setExprs(MutableArrayRef NewExprs) { -assert(Exprs.empty() && "Cannot change Exp

[clang] [NFC][Clang] Add `setExprs` overload to reduce some code duplication (PR #139749)

2025-05-13 Thread Erich Keane via cfe-commits
@@ -492,7 +492,7 @@ class OpenACCSelfClause final /// Represents a clause that has one or more expressions associated with it. class OpenACCClauseWithExprs : public OpenACCClauseWithParams { - MutableArrayRef Exprs; + MutableArrayRef Storage; erichkeane wrot

[clang] [NFC][Clang] Add `setExprs` overload to reduce some code duplication (PR #139749)

2025-05-13 Thread Erich Keane via cfe-commits
@@ -501,20 +501,28 @@ class OpenACCClauseWithExprs : public OpenACCClauseWithParams { /// Used only for initialization, the leaf class can initialize this to /// trailing storage. - void setExprs(MutableArrayRef NewExprs) { -assert(Exprs.empty() && "Cannot change Exp

[clang] [NFC][Clang] Add `setExprs` overload to reduce some code duplication (PR #139749)

2025-05-13 Thread Rahul Joshi via cfe-commits
@@ -501,20 +501,28 @@ class OpenACCClauseWithExprs : public OpenACCClauseWithParams { /// Used only for initialization, the leaf class can initialize this to /// trailing storage. - void setExprs(MutableArrayRef NewExprs) { -assert(Exprs.empty() && "Cannot change Exp

[clang] [llvm] [NVPTX] Add errors for incorrect CUDA addrpaces (PR #138706)

2025-05-13 Thread Artem Belevich via cfe-commits
@@ -1399,19 +1399,27 @@ void NVPTXAsmPrinter::emitFunctionParamList(const Function *F, raw_ostream &O) { if (PTy) { O << "\t.param .u" << PTySizeInBits << " .ptr"; +bool IsCUDA = static_cast(TM).getDrvInterface() == + NVPTX::CUDA;

[clang] [NFC][Clang] Add `setExprs` overload to reduce some code duplication (PR #139749)

2025-05-13 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/139749 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-s

[clang] [NFC][Clang] Add `setExprs` overload to reduce some code duplication (PR #139749)

2025-05-13 Thread Rahul Joshi via cfe-commits
@@ -501,20 +501,28 @@ class OpenACCClauseWithExprs : public OpenACCClauseWithParams { /// Used only for initialization, the leaf class can initialize this to /// trailing storage. - void setExprs(MutableArrayRef NewExprs) { -assert(Exprs.empty() && "Cannot change Exp

[clang] [NFC][Clang] Add `setExprs` overload to reduce some code duplication (PR #139749)

2025-05-13 Thread Rahul Joshi via cfe-commits
@@ -501,20 +501,28 @@ class OpenACCClauseWithExprs : public OpenACCClauseWithParams { /// Used only for initialization, the leaf class can initialize this to /// trailing storage. - void setExprs(MutableArrayRef NewExprs) { -assert(Exprs.empty() && "Cannot change Exp

[clang] [NFC][Clang] Add `setExprs` overload to reduce some code duplication (PR #139749)

2025-05-13 Thread Rahul Joshi via cfe-commits
@@ -492,7 +492,7 @@ class OpenACCSelfClause final /// Represents a clause that has one or more expressions associated with it. class OpenACCClauseWithExprs : public OpenACCClauseWithParams { - MutableArrayRef Exprs; + MutableArrayRef Storage; jurahul wrote:

[clang] [NFC][Clang] Add `setExprs` overload to reduce some code duplication (PR #139749)

2025-05-13 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Fantastic, thank you so much for this change! https://github.com/llvm/llvm-project/pull/139749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [Clang][NFC] Introduce no local variable to avoid use after move (PR #139784)

2025-05-13 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik created https://github.com/llvm/llvm-project/pull/139784 Static analysis flagged the use of Left.size() because we just moved out of Left and that would be undefined behavior. Fix is to take the size and store it in a local variable instead. >From df92525e63ff7c8953c

[clang] [Clang][NFC] Introduce no local variable to avoid use after move (PR #139784)

2025-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Shafik Yaghmour (shafik) Changes Static analysis flagged the use of Left.size() because we just moved out of Left and that would be undefined behavior. Fix is to take the size and store it in a local variable instead. --- Full diff: http

[libclc] [libclc] Move cross to CLC library; add missing half overloads (PR #139713)

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

[clang] [HIP] change default offload archs (PR #139281)

2025-05-13 Thread Matt Arsenault via cfe-commits
arsenm wrote: > It's just the AMDGCN target without any `+features`, right? The only issue I > was aware of was assuming w64 when unspecified but you fixed that previously. Almost, but it's problematic in several ways. The problems multiply once you start adding in manually specified target_fe

<    1   2   3   4   5   6   >