[clang-tools-extra] e10f67a - [clang-doc][NFC] refactor out file helpers (#134298)

2025-04-09 Thread via cfe-commits
Author: PeterChou1 Date: 2025-04-09T17:21:28-04:00 New Revision: e10f67a8270c7745b8a9306a9910b06cfc8d2c55 URL: https://github.com/llvm/llvm-project/commit/e10f67a8270c7745b8a9306a9910b06cfc8d2c55 DIFF: https://github.com/llvm/llvm-project/commit/e10f67a8270c7745b8a9306a9910b06cfc8d2c55.diff LO

[clang] [clang-format] Keep the space between `not` and a unary operator (PR #135035)

2025-04-09 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#135118 https://github.com/llvm/llvm-project/pull/135035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Improved canonicalization for template specialization types (PR #135119)

2025-04-09 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/135119 This changes the TemplateArgument representation to hold a flag indicating whether a template argument of expression type is supposed to be canonical or not. This gets one step closer to solving https://gith

[clang] [CIR] Upstream binary assignments and comma (PR #135115)

2025-04-09 Thread Erich Keane via cfe-commits
@@ -0,0 +1,53 @@ +// RUN: %clang_cc1 -std=c23 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR +// RUN: %clang_cc1 -std=c23 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-llvm %s -o

[clang] [clang-tools-extra] [clang] Improved canonicalization for template specialization types (PR #135119)

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clangd Author: Matheus Izvekov (mizvekov) Changes This changes the TemplateArgument representation to hold a flag indicating whether a template argument of expression type is supposed to be canonical or not. This gets one st

[clang] [clang-tools-extra] [clang] Improved canonicalization for template specialization types (PR #135119)

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Matheus Izvekov (mizvekov) Changes This changes the TemplateArgument representation to hold a flag indicating whether a template argument of expression type is supposed to be canonical or not. This gets one step closer to solving

[clang] [CIR] Upstream binary assignments and comma (PR #135115)

2025-04-09 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: A little more testing on comma would be nice, else seems reasonable. https://github.com/llvm/llvm-project/pull/135115 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] 98feb05 - [clang] fix unresolved dependent template specialization mangling (#135111)

2025-04-09 Thread via cfe-commits
Author: Matheus Izvekov Date: 2025-04-09T23:23:52-03:00 New Revision: 98feb05825a179c56f965d936b948a95d2a6b888 URL: https://github.com/llvm/llvm-project/commit/98feb05825a179c56f965d936b948a95d2a6b888 DIFF: https://github.com/llvm/llvm-project/commit/98feb05825a179c56f965d936b948a95d2a6b888.dif

[clang] [clang-tools-extra] [clang] Improved canonicalization for template specialization types (PR #135119)

2025-04-09 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/135119 >From 03801aef9b4f950940d33276095c14047da0a3e6 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Sat, 17 Sep 2022 18:07:28 +0200 Subject: [PATCH] [clang] Improved canonicalization for template specialization

[clang] [clang] consistently quote expressions in diagnostics (PR #134769)

2025-04-09 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. Thanks https://github.com/llvm/llvm-project/pull/134769 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [IR] Mark convergence intrins as has-side-effect (PR #134844)

2025-04-09 Thread Sameer Sahasrabuddhe via cfe-commits
ssahasra wrote: To take this to its logical conclusion, when convergence tokens are in use, the `convergent` attribute is redundant. All we need is a `noconvergent` attribute for function declarations. A function definition is convergent iff the body contains a call to the `entry` intrinsic, a

[clang] [HLSL] Add support for modulo of floating point scalar and vectors (PR #135125)

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Farzon Lotfi (farzonl) Changes fixes #135122 SemaExpr.cpp - Make all doubles fail. Add sema support for float scalars and vectors when language mode is HLSL. CGExprScalar.cpp - Allow emit frem when language mode is HLSL. --- Full

[clang] [HLSL] Add support for modulo of floating point scalar and vectors (PR #135125)

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl @llvm/pr-subscribers-clang Author: Farzon Lotfi (farzonl) Changes fixes #135122 SemaExpr.cpp - Make all doubles fail. Add sema support for float scalars and vectors when language mode is HLSL. CGExprScalar.cpp - Allow emit frem when language mode

[clang] 98ea512 - [clang][bytecode] Clear inactive union fields when copying (#134982)

2025-04-09 Thread via cfe-commits
Author: Timm Baeder Date: 2025-04-10T06:12:00+02:00 New Revision: 98ea512f720ec954a6f096dbb39534f06affa196 URL: https://github.com/llvm/llvm-project/commit/98ea512f720ec954a6f096dbb39534f06affa196 DIFF: https://github.com/llvm/llvm-project/commit/98ea512f720ec954a6f096dbb39534f06affa196.diff L

[clang] [clang][bytecode] Clear inactive union fields when copying (PR #134982)

2025-04-09 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/134982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Do not set inbounds flag in `EmitMemberDataPointerAddress` when the base pointer is null (PR #130952)

2025-04-09 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/130952 >From 0f6ff605da3cbadc5311d4bf6c08fe98970a69c3 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Thu, 10 Apr 2025 09:54:33 +0800 Subject: [PATCH 1/5] [Clang][CodeGen] Do not set inbounds flag for struct GEP wi

[clang] cuda clang: Add support for CUDA surfaces (PR #132883)

2025-04-09 Thread Artem Belevich via cfe-commits
Artem-B wrote: @AustinSchuh One thing I've missed during review is that the test clang/test/CodeGen/nvptx-surface.cu should probably go into clang/test/CodeGenCUDA This would also obviate the need for #134459. Can you send the patch to move the test to the right location? https://github.com

[clang] [CIR] Upstream binary assignments and comma (PR #135115)

2025-04-09 Thread Morris Hafner via cfe-commits
https://github.com/mmha created https://github.com/llvm/llvm-project/pull/135115 This patch adds `VisitBinAssign` and `VisitBinComma` to the ClangIR `ScalarExprEmitter` to enable assignments and the comma operator. >From bcaeadf7fff01d2d92b0d234b40f8d5884974e4c Mon Sep 17 00:00:00 2001 From: Mo

[clang] [Clang][CodeGen] Do not set inbounds flag for struct GEP with null base pointers (PR #130734)

2025-04-09 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: Rebased on the top of https://github.com/llvm/llvm-project/pull/134269 and https://github.com/llvm/llvm-project/pull/134221 https://github.com/llvm/llvm-project/pull/130734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [Clang][CodeGen] Do not set inbounds flag for struct GEP with null base pointers (PR #130734)

2025-04-09 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/130734 >From 0f6ff605da3cbadc5311d4bf6c08fe98970a69c3 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Thu, 10 Apr 2025 09:54:33 +0800 Subject: [PATCH] [Clang][CodeGen] Do not set inbounds flag for struct GEP with n

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2025-04-09 Thread Dan Liew via cfe-commits
@@ -0,0 +1,584 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fexperimental-late-parse-attributes -fsyntax-only -verify %s + +#define __counted_by(f) __attribute__((counted_by(f))) + +// =

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

2025-04-09 Thread via cfe-commits
@@ -5687,11 +5687,11 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line, if (Right.is(tok::r_brace) && Left.is(tok::l_brace) && !Left.Children.empty()) { // Support AllowShortFunctionsOnASingleLine for JavaScript. - return Style.AllowShort

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

2025-04-09 Thread via cfe-commits
@@ -611,20 +611,40 @@ TEST(ConfigParseTest, ParsesConfiguration) { CHECK_PARSE("AllowShortBlocksOnASingleLine: true", AllowShortBlocksOnASingleLine, FormatStyle::SBS_Always); - Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Inline; + // Style.Allow

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

2025-04-09 Thread via cfe-commits
https://github.com/irymarchyk edited https://github.com/llvm/llvm-project/pull/134337 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Resource initialization by constructors (PR #135120)

2025-04-09 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/135120 - Adds resource constructor that takes explicit binding for all resource classes. - Updates implementation of default resource constructor to initialize resource handle to `poison`. - Removes initialization of r

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

2025-04-09 Thread via cfe-commits
https://github.com/irymarchyk edited https://github.com/llvm/llvm-project/pull/134337 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix unresolved dependent template specialization mangling (PR #135111)

2025-04-09 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/135111 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [cfi][NFCI] Precommit tests to show nomerge functionality (PR #135104)

2025-04-09 Thread Thurston Dang via cfe-commits
https://github.com/thurstond created https://github.com/llvm/llvm-project/pull/135104 https://github.com/llvm/llvm-project/pull/120464 (and earlier CLs) added -fsanitize-merge functionality, which is intended to work for all "sanitizers". It is nearly correct for CFI. This patch precommits so

[clang] [clang] consistently quote expressions in diagnostics (PR #134769)

2025-04-09 Thread Matheus Izvekov via cfe-commits
@@ -143,8 +143,8 @@ def note_constexpr_null_subobject : Note< "access array element of|perform pointer arithmetic on|" "access real component of|" "access imaginary component of}0 null pointer">; -def note_constexpr_null_callee : Note< - "'%0' evaluates to a null functio

[clang] [clang] fix unresolved dependent template specialization mangling (PR #135111)

2025-04-09 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. https://github.com/llvm/llvm-project/pull/135111 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream binary assignments and comma (PR #135115)

2025-04-09 Thread Erich Keane via cfe-commits
@@ -807,6 +808,65 @@ class ScalarExprEmitter : public StmtVisitor { VISITCOMP(EQ) VISITCOMP(NE) #undef VISITCOMP + + mlir::Value VisitBinAssign(const BinaryOperator *e) { +const bool ignore = std::exchange(ignoreResultAssign, false); + +mlir::Value rhs; +LValu

[clang] [clang-format] Keep the space between `not` and a unary operator (PR #135035)

2025-04-09 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick f34483838937b1a01ee11ee22bdd6e13c81e9fff https://github.com/llvm/llvm-project/pull/135035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [clang] improved preservation of template keyword (PR #133610)

2025-04-09 Thread Jorge Gorbe Moya via cfe-commits
slackito wrote: > @slackito this will be fixed here: #135111 Thanks for the quick fix! https://github.com/llvm/llvm-project/pull/133610 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] 0283bb3 - [Clang][CodeGen][UBSan] Add more precise attributes to recoverable ubsan handlers (#130990)

2025-04-09 Thread via cfe-commits
Author: Yingwei Zheng Date: 2025-04-10T11:09:45+08:00 New Revision: 0283bb3afcc5dc521f6b2e7d541a830a9546ed80 URL: https://github.com/llvm/llvm-project/commit/0283bb3afcc5dc521f6b2e7d541a830a9546ed80 DIFF: https://github.com/llvm/llvm-project/commit/0283bb3afcc5dc521f6b2e7d541a830a9546ed80.diff

[clang] [Clang][CodeGen][UBSan] Add more precise attributes to recoverable ubsan handlers (PR #130990)

2025-04-09 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw closed https://github.com/llvm/llvm-project/pull/130990 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Do not set inbounds flag for struct GEP with null base pointers (PR #130734)

2025-04-09 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/130734 >From 0f6ff605da3cbadc5311d4bf6c08fe98970a69c3 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Thu, 10 Apr 2025 09:54:33 +0800 Subject: [PATCH 1/3] [Clang][CodeGen] Do not set inbounds flag for struct GEP wi

[clang] [Clang][P1061] Fix invalid pack binding crash (PR #135129)

2025-04-09 Thread Jason Rice via cfe-commits
https://github.com/ricejasonf created https://github.com/llvm/llvm-project/pull/135129 Fixes #134882 Consider ``` struct foo { char a; int b; }; constexpr foo t{'a', 1}; constexpr auto [...m] = t; ``` Without the `constexpr` qualifier, the decomposition declaration just happens to not crash i

[clang] [llvm] MCAsmStreamer: Replace the MCInstPrinter * parameter with unique_ptr (PR #135128)

2025-04-09 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/135128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Clang][CodeGen][UBSan] Add more precise attributes to recoverable ubsan handlers" (PR #135130)

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yingwei Zheng (dtcxzyw) Changes Reverts llvm/llvm-project#130990 Breaks buildbot https://lab.llvm.org/buildbot/#/builders/186/builds/8072 --- Patch is 88.85 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-p

[clang] [clang-format] Keep the space between `not` and a unary operator (PR #135035)

2025-04-09 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/135035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix NestedNameSpecifier dependency calculation (PR #135067)

2025-04-09 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/135067 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema]:Fix musttail attribute on a function with not_tail_called attribute has no warning/error (PR #134465)

2025-04-09 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: I agree that if we can't guarantee it will be tail-called, this must be an error. must_tail is not an optimization. In fact, LLVM by itself will already perform tail call optimizations, and remove them when it would not be profitable in terms of execution cost. The point of m

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

2025-04-09 Thread via cfe-commits
https://github.com/SunilKuravinakop edited https://github.com/llvm/llvm-project/pull/131838 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema]:Fix musttail attribute on a function with not_tail_called attribute has no warning/error (PR #134465)

2025-04-09 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > @AaronBallman @erichkeane Thank you for your comments. There's a question > > > here about whether to report an error or a warning here, and you're in a > > > divided opinion. My opinion is that it is better to use the error report > > > here. Because these are two mu

[clang] [llvm] [HLSL][SPIR-V] Add hlsl_private address space for SPIR-V (PR #133464)

2025-04-09 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts updated https://github.com/llvm/llvm-project/pull/133464 From 12524667594d413c93a2c88a206a930cff638da3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nathan=20Gau=C3=ABr?= Date: Thu, 28 Nov 2024 15:00:56 +0100 Subject: [PATCH 1/6] [SPIR-V] Add hlsl_private address space for

[clang] [llvm] [DirectX] Implement Shader Flags Analysis for ResMayNotAlias (PR #131070)

2025-04-09 Thread Deric C. via cfe-commits
https://github.com/Icohedron updated https://github.com/llvm/llvm-project/pull/131070 >From 81196e016dbf1209637dd13315efff7eac461d42 Mon Sep 17 00:00:00 2001 From: Icohedron Date: Fri, 14 Mar 2025 00:24:26 + Subject: [PATCH 1/8] Implement ResMayNotAlias DXIL shader flag analysis --- clang

[clang] [llvm] [DirectX] Implement Shader Flags Analysis for ResMayNotAlias (PR #131070)

2025-04-09 Thread Deric C. via cfe-commits
https://github.com/Icohedron updated https://github.com/llvm/llvm-project/pull/131070 >From 81196e016dbf1209637dd13315efff7eac461d42 Mon Sep 17 00:00:00 2001 From: Icohedron Date: Fri, 14 Mar 2025 00:24:26 + Subject: [PATCH 1/9] Implement ResMayNotAlias DXIL shader flag analysis --- clang

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-09 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper edited https://github.com/llvm/llvm-project/pull/134536 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-09 Thread Amr Hesham via cfe-commits
@@ -390,6 +391,148 @@ LValue CIRGenFunction::emitUnaryOpLValue(const UnaryOperator *e) { llvm_unreachable("Unknown unary operator kind!"); } +/// If the specified expr is a simple decay from an array to pointer, +/// return the array subexpression. +/// FIXME: this could be

[clang] [flang] [driver] Generalize the code that adds the path of libflang_rt.runtime.a. (PR #134362)

2025-04-09 Thread Daniel Chen via cfe-commits
https://github.com/DanielCChen edited https://github.com/llvm/llvm-project/pull/134362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Implement `-dump-minimization-hints` flag. (PR #133910)

2025-04-09 Thread Viktoriia Bakalova via cfe-commits
@@ -121,6 +305,25 @@ FrontendAction::CreateWrappedASTConsumer(CompilerInstance &CI, if (!Consumer) return nullptr; + std::vector> Consumers; + llvm::StringRef DumpDeserializedDeclarationRangesPath = + CI.getFrontendOpts().DumpMinimizationHintsPath; + if (!DumpDe

[clang] [CIR] Upstream initial function call support (PR #134673)

2025-04-09 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM after few extra nits https://github.com/llvm/llvm-project/pull/134673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-04-09 Thread Akira Hatanaka via cfe-commits
@@ -0,0 +1,142 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -std=c++11 -fptrauth-calls -fptrauth-intrinsics -verify -fsyntax-only %s +// RUN: %clang_cc1 -triple aarch64-linux-gnu -std=c++11 -fptrauth-calls -fptrauth-intrinsics -verify -fsyntax-only %s + +#define AQ __ptrauth

[clang] [llvm] [Clang] [OpenMP] Support NOWAIT with optional argument (PR #135030)

2025-04-09 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

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

2025-04-09 Thread via cfe-commits
@@ -5687,11 +5687,11 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line, if (Right.is(tok::r_brace) && Left.is(tok::l_brace) && !Left.Children.empty()) { // Support AllowShortFunctionsOnASingleLine for JavaScript. - return Style.AllowShort

[clang] [llvm] [HLSL][SPIR-V] Add hlsl_private address space for SPIR-V (PR #133464)

2025-04-09 Thread Helena Kotas via cfe-commits
Nathan =?utf-8?q?Gau=C3=ABr?= , Nathan =?utf-8?q?Gau=C3=ABr?= , Nathan =?utf-8?q?Gau=C3=ABr?= , Nathan =?utf-8?q?Gau=C3=ABr?= , Nathan =?utf-8?q?Gau=C3=ABr?= Message-ID: In-Reply-To: https://github.com/hekota approved this pull request. LGTM! Thanks! https://github.com/llvm/llvm-project/pull/

[clang] [llvm] [IR] Mark convergence intrins as has-side-effect (PR #134844)

2025-04-09 Thread Matt Arsenault via cfe-commits
arsenm wrote: Thinking we should remove the IR verification requirement. It's more of a lint type check and violations would be UB https://github.com/llvm/llvm-project/pull/134844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [CXX Safe Buffer] Update the safe buffer attribute documentation (PR #135087)

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Malavika Samak (malavikasamak) Changes Update the documentation for the unsafe_buffer_usage attribute to capture the new behavior introduced by https://github.com/llvm/llvm-project/pull/125671 --- Full diff: https://github.com/llvm/llvm-p

[clang] [CXX Safe Buffer] Update the safe buffer attribute documentation (PR #135087)

2025-04-09 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak created https://github.com/llvm/llvm-project/pull/135087 Update the documentation for the unsafe_buffer_usage attribute to capture the new behavior introduced by https://github.com/llvm/llvm-project/pull/125671 >From c3fbfd791d0c2f6d9ed0825fd2a043d3319da058 Mon

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

2025-04-09 Thread Alexander Richardson via cfe-commits
arichardson wrote: ping @rgwott. Any chance you will have time to update this PR and address the outstanding comments? https://github.com/llvm/llvm-project/pull/105669 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] d47401e - [OpenACC] Start enforcing 'device_type' clause values

2025-04-09 Thread via cfe-commits
Author: erichkeane Date: 2025-04-09T14:55:50-07:00 New Revision: d47401e376d458fb9bb4f4f9be0e07c0fdd7a52c URL: https://github.com/llvm/llvm-project/commit/d47401e376d458fb9bb4f4f9be0e07c0fdd7a52c DIFF: https://github.com/llvm/llvm-project/commit/d47401e376d458fb9bb4f4f9be0e07c0fdd7a52c.diff LO

[clang] [clang][index] Handle undefined function-like macros in single file parse mode (PR #135054)

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

[clang] [C11] Implement WG14 N1285 (temporary lifetimes) (PR #133472)

2025-04-09 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/133472 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C11] Implement WG14 N1285 (temporary lifetimes) (PR #133472)

2025-04-09 Thread Eli Friedman via cfe-commits
@@ -7653,8 +7653,11 @@ ExprResult Sema::TemporaryMaterializationConversion(Expr *E) { // In C++98, we don't want to implicitly create an xvalue. // FIXME: This means that AST consumers need to deal with "prvalues" that // denote materialized temporaries. Maybe we should

[clang] [C11] Implement WG14 N1285 (temporary lifetimes) (PR #133472)

2025-04-09 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/133472 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 58b91d1 - [CIR][NFC] Upstream LValueBaseInfo handling (#134928)

2025-04-09 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-04-09T15:27:50-07:00 New Revision: 58b91d10a4c9dcd71ea0bcf6ff702a46dad147cb URL: https://github.com/llvm/llvm-project/commit/58b91d10a4c9dcd71ea0bcf6ff702a46dad147cb DIFF: https://github.com/llvm/llvm-project/commit/58b91d10a4c9dcd71ea0bcf6ff702a46dad147cb.diff L

[clang] [clang] Implement CWG2803 and CWG2958 (PR #132779)

2025-04-09 Thread Vlad Serebrennikov via cfe-commits
@@ -6,6 +6,89 @@ // RUN: %clang_cc1 -std=c++23 -pedantic-errors -verify=expected,since-cxx11,cxx11-23,since-cxx20,since-cxx23 %s // RUN: %clang_cc1 -std=c++2c -pedantic-errors -verify=expected,since-cxx11,since-cxx20,since-cxx23,since-cxx26 %s +namespace cwg2803 { // cwg2803

[clang] [CIR] Upstream support for cir.get_global (PR #135095)

2025-04-09 Thread Andy Kaylor via cfe-commits
andykaylor wrote: @mmha https://github.com/llvm/llvm-project/pull/135095 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][SVE] Instcombine ptrue(all) to splat(i1) (PR #135016)

2025-04-09 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm commented: I'll take a closer look later but here are some stylistic things to streamline the patch a little. https://github.com/llvm/llvm-project/pull/135016 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [CIR][NFC] Upstream LValueBaseInfo handling (PR #134928)

2025-04-09 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/134928 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC][CIR] Implement 'data' construct lowering (PR #135038)

2025-04-09 Thread Valentin Clement バレンタイン クレメン via cfe-commits
https://github.com/clementval approved this pull request. LGTM from the OpenACC dialect point of view. https://github.com/llvm/llvm-project/pull/135038 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [llvm] [DirectX] Implement UseNativeLowPrecision shader flag analysis (PR #134288)

2025-04-09 Thread Finn Plummer via cfe-commits
@@ -0,0 +1,45 @@ +; RUN: opt -S --passes="print-dx-shader-flags" 2>&1 %s | FileCheck %s +; RUN: llc %s --filetype=obj -o - | obj2yaml | FileCheck %s --check-prefix=DXC + +target triple = "dxil-pc-shadermodel6.7-library" + +;CHECK: ; Combined Shader Flags for Module +;CHECK-NEXT: ;

[clang] [clang] fix NestedNameSpecifier dependency calculation (PR #135067)

2025-04-09 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/135067 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 154507c - [clang] fix NestedNameSpecifier dependency calculation (#135067)

2025-04-09 Thread via cfe-commits
Author: Matheus Izvekov Date: 2025-04-09T19:44:40-03:00 New Revision: 154507cf403e1859b9a81fa76af406e8489daa4b URL: https://github.com/llvm/llvm-project/commit/154507cf403e1859b9a81fa76af406e8489daa4b DIFF: https://github.com/llvm/llvm-project/commit/154507cf403e1859b9a81fa76af406e8489daa4b.dif

[clang] [CXX Safe Buffer] Update the documentation for unsafe_buffer_usage attribute (PR #135087)

2025-04-09 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak edited https://github.com/llvm/llvm-project/pull/135087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX] Implement Shader Flags Analysis for ResMayNotAlias (PR #131070)

2025-04-09 Thread Deric C. via cfe-commits
https://github.com/Icohedron updated https://github.com/llvm/llvm-project/pull/131070 >From 81196e016dbf1209637dd13315efff7eac461d42 Mon Sep 17 00:00:00 2001 From: Icohedron Date: Fri, 14 Mar 2025 00:24:26 + Subject: [PATCH 01/10] Implement ResMayNotAlias DXIL shader flag analysis --- cla

[clang-tools-extra] [clang-doc][NFC] refactor out file helpers (PR #134298)

2025-04-09 Thread Daniel Thornburgh via cfe-commits
https://github.com/mysterymath approved this pull request. https://github.com/llvm/llvm-project/pull/134298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-09 Thread Andy Kaylor via cfe-commits
@@ -390,6 +391,148 @@ LValue CIRGenFunction::emitUnaryOpLValue(const UnaryOperator *e) { llvm_unreachable("Unknown unary operator kind!"); } +/// If the specified expr is a simple decay from an array to pointer, +/// return the array subexpression. +/// FIXME: this could be

[clang] [HLSL] Implement the `lit` intrinsic (PR #134171)

2025-04-09 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/134171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream support for cir.get_global (PR #135095)

2025-04-09 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/135095 This adds basic support for referencing global variables from within functions via the cir.get_global operation. >From 43f2d5e73037559055dcbe65d8871c05c532d9f0 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Dat

[clang] [cfi][NFCI] Precommit tests to show nomerge functionality (PR #135104)

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Thurston Dang (thurstond) Changes https://github.com/llvm/llvm-project/pull/120464 (and earlier CLs) added -fsanitize-merge functionality, which is intended to work for all "sanitizers". It is nearly correct for CFI. This patch precommit

[clang] [Clang] Make enums trivially equality comparable (PR #133587)

2025-04-09 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: The summary should not merely link to an issue but describe the problem as well. Two reasons: 1) for folks reading this in git log 2) The issue may not totally explain what is going on. I actually did not get it at first b/c the issue talks about *char* and

[clang] [CIR] Upstream minimal support for structure types (PR #135105)

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes This change adds minimal support for structure types. To keep the initial change small, only incomplete declarations are being supported in this patch. More complete support will follow. --- Patch is 25.

[clang] [Clang] Handle default template arguments for alias CTAD guides (PR #134807)

2025-04-09 Thread Younan Zhang via cfe-commits
@@ -690,6 +690,23 @@ SmallVector TemplateParamsReferencedInTemplateArgumentList( SemaRef.MarkUsedTemplateParameters( DeducedArgs, TemplateParamsList->getDepth(), ReferencedTemplateParams); + auto MarkDefaultArgs = [&](auto *Param) { +if (!Param || !Param->hasDefa

[clang-tools-extra] [clang-doc][NFC] refactor out file helpers (PR #134298)

2025-04-09 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-x86_64-debian-dylib` running on `gribozavr4` while building `clang-tools-extra` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/60/builds/24310 Here is the releva

[clang] [cfi][NFCI] Precommit tests to show nomerge functionality (PR #135104)

2025-04-09 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/135104 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC][CIR] Implement 'device_type' clause lowering for 'init'/'sh… (PR #135102)

2025-04-09 Thread Valentin Clement バレンタイン クレメン via cfe-commits
@@ -4,4 +4,17 @@ void acc_init(void) { // CHECK: cir.func @acc_init() { #pragma acc init // CHECK-NEXT: acc.init loc(#{{[a-zA-Z0-9]+}}){{$}} + +#pragma acc init device_type(*) clementval wrote: What happens if you have this? ``` #pragma acc init device_type

[clang] [OpenACC][CIR] Implement 'device_type' clause lowering for 'init'/'sh… (PR #135102)

2025-04-09 Thread Valentin Clement バレンタイン クレメン via cfe-commits
https://github.com/clementval edited https://github.com/llvm/llvm-project/pull/135102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC][CIR] Implement 'device_type' clause lowering for 'init'/'sh… (PR #135102)

2025-04-09 Thread Valentin Clement バレンタイン クレメン via cfe-commits
https://github.com/clementval approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/135102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream minimal support for structure types (PR #135105)

2025-04-09 Thread Erich Keane via cfe-commits
@@ -400,13 +400,126 @@ def VoidPtr : Type< "cir::VoidType::get($_builder.getContext()))"> { } +//===--===// +// StructType +// +// The base type for all RecordDecls. +//===---

[clang] [CIR] Upstream minimal support for structure types (PR #135105)

2025-04-09 Thread Erich Keane via cfe-commits
@@ -0,0 +1,116 @@ +//===--===// +// +// 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 minimal support for structure types (PR #135105)

2025-04-09 Thread Erich Keane via cfe-commits
@@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir +// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll +// RUN: FileCheck --chec

[clang] [CIR] Upstream minimal support for structure types (PR #135105)

2025-04-09 Thread Erich Keane via cfe-commits
@@ -86,10 +86,80 @@ mlir::Type CIRGenTypes::convertFunctionTypeInternal(QualType qft) { return cir::FuncType::get(SmallVector{}, cgm.VoidTy); } +// This is CIR's version of CodeGenTypes::addRecordTypeName. It isn't shareable +// because CIR has different uniquing requiremen

[clang] [CIR] Upstream minimal support for structure types (PR #135105)

2025-04-09 Thread Erich Keane via cfe-commits
@@ -400,13 +400,126 @@ def VoidPtr : Type< "cir::VoidType::get($_builder.getContext()))"> { } +//===--===// +// StructType +// +// The base type for all RecordDecls. +//===---

[clang] [CIR] Upstream minimal support for structure types (PR #135105)

2025-04-09 Thread Erich Keane via cfe-commits
@@ -37,6 +50,32 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy { llvm_unreachable("Unsupported format for long double"); } + /// Get a CIR record kind from a AST declaration tag. + cir::StructType::RecordKind getRecordKind(const clang::TagTypeKind kind) { +

[clang] 75cbb1f - [clang-format][NFC] Add FormatToken::is(tok::ObjCKeywordKind) (#134973)

2025-04-09 Thread via cfe-commits
Author: Owen Pan Date: 2025-04-09T17:49:26-07:00 New Revision: 75cbb1f0fa734efb79c1a1233f1aba377dfad9e1 URL: https://github.com/llvm/llvm-project/commit/75cbb1f0fa734efb79c1a1233f1aba377dfad9e1 DIFF: https://github.com/llvm/llvm-project/commit/75cbb1f0fa734efb79c1a1233f1aba377dfad9e1.diff LOG:

[clang] [Clang] Make enums trivially equality comparable (PR #133587)

2025-04-09 Thread Shafik Yaghmour via cfe-commits
@@ -5240,9 +5249,13 @@ static bool HasNonDeletedDefaultedEqualityComparison(Sema &S, static bool isTriviallyEqualityComparableType(Sema &S, QualType Type, SourceLocation KeyLoc) { QualType CanonicalType = Type.getCanonicalType(); if (CanonicalType->isIncompleteType() || C

[clang] [clang-format] Keep the space between `not` and a unary operator (PR #135035)

2025-04-09 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/135035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Keep the space between `not` and a unary operator (PR #135035)

2025-04-09 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/135035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream minimal support for structure types (PR #135105)

2025-04-09 Thread Erich Keane via cfe-commits
@@ -37,6 +50,32 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy { llvm_unreachable("Unsupported format for long double"); } + /// Get a CIR record kind from a AST declaration tag. + cir::StructType::RecordKind getRecordKind(const clang::TagTypeKind kind) { +

  1   2   3   4   5   >