[clang] c6bd020 - Revert "[Hexagon] NFC: Reduce the amount of version-specific code" (#146193)

2025-06-27 Thread via cfe-commits
Author: Brian Cain Date: 2025-06-27T23:13:36-05:00 New Revision: c6bd0207141f8fbd4061495b238a70e833f51cb6 URL: https://github.com/llvm/llvm-project/commit/c6bd0207141f8fbd4061495b238a70e833f51cb6 DIFF: https://github.com/llvm/llvm-project/commit/c6bd0207141f8fbd4061495b238a70e833f51cb6.diff LO

[clang] [llvm] Revert "[Hexagon] NFC: Reduce the amount of version-specific code" (PR #146193)

2025-06-27 Thread Brian Cain via cfe-commits
https://github.com/androm3da closed https://github.com/llvm/llvm-project/pull/146193 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Revert "[Hexagon] NFC: Reduce the amount of version-specific code" (PR #146193)

2025-06-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-hexagon Author: Brian Cain (androm3da) Changes Reverts llvm/llvm-project#145812 --- Patch is 22.94 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/146193.diff 7 Files Affected: - (modified) clang/l

[clang] [llvm] Revert "[Hexagon] NFC: Reduce the amount of version-specific code" (PR #146193)

2025-06-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Brian Cain (androm3da) Changes Reverts llvm/llvm-project#145812 --- Patch is 22.94 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/146193.diff 7 Files Affected: - (modified) clang/lib/Basic/T

[clang] [llvm] Revert "[Hexagon] NFC: Reduce the amount of version-specific code" (PR #146193)

2025-06-27 Thread Brian Cain via cfe-commits
https://github.com/androm3da created https://github.com/llvm/llvm-project/pull/146193 Reverts llvm/llvm-project#145812 >From 038de66cab523ad7719882a96fa51afcd8c9 Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Fri, 27 Jun 2025 21:52:11 -0500 Subject: [PATCH] Revert "[Hexagon] NFC: Reduce t

[clang] [llvm] [Hexagon] NFC: Reduce the amount of version-specific code (PR #145812)

2025-06-27 Thread Qinkun Bao via cfe-commits
qinkunbao wrote: Hi, can you take a look at the buildbot? https://lab.llvm.org/buildbot/#/builders/94/builds/8380 https://github.com/llvm/llvm-project/pull/145812 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [clang] odr-checker fix for conversion operators (PR #146153)

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

[clang] [llvm] Fix Windows EH IP2State tables (remove +1 bias) (PR #144745)

2025-06-27 Thread Matt Arsenault via cfe-commits
@@ -2660,6 +2644,122 @@ void X86AsmPrinter::emitCallInstruction(const llvm::MCInst &MCI) { OutStreamer->emitInstruction(MCI, getSubtargetInfo()); } +// Checks whether a NOP is required after a CALL and inserts the NOP, if +// necessary. +void X86AsmPrinter::maybeEmitNopAfte

[clang] [ExtractAPI] Format pointers in params correctly (PR #146182)

2025-06-27 Thread Prajwal Nadig via cfe-commits
https://github.com/snprajwal updated https://github.com/llvm/llvm-project/pull/146182 >From 885730f8653edc7bef13b3840f0c662cc354f111 Mon Sep 17 00:00:00 2001 From: Prajwal Nadig Date: Sat, 28 Jun 2025 01:33:42 +0100 Subject: [PATCH] [ExtractAPI] Format pointers in params correctly Pointer type

[clang] [ExtractAPI] Format pointers in params correctly (PR #146182)

2025-06-27 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions c,cpp -- clang/test/ExtractAPI/pointers.c clang/lib/ExtractA

[clang] [ExtractAPI] Format pointers in params correctly (PR #146182)

2025-06-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Prajwal Nadig (snprajwal) Changes Pointer types in function parameters must place the asterisk before the identifier without a space in between. This patch removes the space and also ensures that pointers to pointers are formatted correct

[clang] [ExtractAPI] Format pointers in params correctly (PR #146182)

2025-06-27 Thread Prajwal Nadig via cfe-commits
https://github.com/snprajwal created https://github.com/llvm/llvm-project/pull/146182 Pointer types in function parameters must place the asterisk before the identifier without a space in between. This patch removes the space and also ensures that pointers to pointers are formatted correctly.

[compiler-rt] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (#138571) (PR #143230)

2025-06-27 Thread Anton Korobeynikov via cfe-commits
@@ -681,7 +681,18 @@ DEFINE_LIBUNWIND_FUNCTION(__libunwind_Registers_arm64_jumpto) // context struct, because it is allocated on the stack, and an exception // could clobber the de-allocated portion of the stack after sp has been // restored. - ldrx16, [x0, #0x0

[clang] [CIR] Implement NotEqualOp for ComplexType (PR #146129)

2025-06-27 Thread Andy Kaylor via cfe-commits
andykaylor wrote: > Is there any reason why this is special a operation and not `cmp` operation > parameterized by (ne, eq) as for floats, integers? I like this suggestion. https://github.com/llvm/llvm-project/pull/146129 ___ cfe-commits mailing list

[clang] [mlir] [OpenACC][CIR] Implement 'exit data' construct + clauses (PR #146167)

2025-06-27 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/146167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [lldb] Fix object format in the Triple of Mach-O files (approach 4) (PR #145157)

2025-06-27 Thread David Peixotto via cfe-commits
@@ -642,9 +642,9 @@ bool SBDebugger::GetDefaultArchitecture(char *arch_name, size_t arch_name_len) { ArchSpec default_arch = Target::GetDefaultArchitecture(); if (default_arch.IsValid()) { - const std::string &triple_str = default_arch.GetTriple().str(); + c

[clang] [lldb] [llvm] [lldb] Fix object format in the Triple of Mach-O files (approach 4) (PR #145157)

2025-06-27 Thread David Peixotto via cfe-commits
@@ -463,6 +463,27 @@ class Triple { const std::string &str() const { return Data; } + /// Return the triple string but only keep the first \p N components. + /// + /// The returned string will preserve the first \p N components exactly the + /// same as the original (in

[clang] 32180cf - [CIR] Upstream support for operator assign (#145979)

2025-06-27 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-06-27T16:56:26-07:00 New Revision: 32180cf9f9eb921a793bb208cf3bbfb1b86ee2ae URL: https://github.com/llvm/llvm-project/commit/32180cf9f9eb921a793bb208cf3bbfb1b86ee2ae DIFF: https://github.com/llvm/llvm-project/commit/32180cf9f9eb921a793bb208cf3bbfb1b86ee2ae.diff L

[clang] [CIR] Upstream support for operator assign (PR #145979)

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

[clang] [CIR] Upstream get_bitfield operation to load bit-field members from structs (PR #145971)

2025-06-27 Thread Andy Kaylor via cfe-commits
@@ -76,3 +77,31 @@ void def() { T t; U u; } + +int load_field(S* s) { + return s->c; andykaylor wrote: Can you add a test case with an unsigned field? https://github.com/llvm/llvm-project/pull/145971 ___ cfe-co

[clang] [CIR] Upstream get_bitfield operation to load bit-field members from structs (PR #145971)

2025-06-27 Thread Andy Kaylor via cfe-commits
@@ -2244,6 +2245,54 @@ mlir::LogicalResult CIRToLLVMComplexImagOpLowering::matchAndRewrite( return mlir::success(); } +mlir::LogicalResult CIRToLLVMGetBitfieldOpLowering::matchAndRewrite( +cir::GetBitfieldOp op, OpAdaptor adaptor, +mlir::ConversionPatternRewriter &r

[clang] [CIR] Upstream get_bitfield operation to load bit-field members from structs (PR #145971)

2025-06-27 Thread Andy Kaylor via cfe-commits
@@ -65,6 +65,10 @@ struct CIROpAsmDialectInterface : public OpAsmDialectInterface { os << (boolAttr.getValue() ? "true" : "false"); return AliasResult::FinalAlias; } +if (auto bitfield = mlir::dyn_cast(attr)) { andykaylor wrote: Can you ad

[clang] [CIR] Upstream get_bitfield operation to load bit-field members from structs (PR #145971)

2025-06-27 Thread Andy Kaylor via cfe-commits
@@ -2244,6 +2245,54 @@ mlir::LogicalResult CIRToLLVMComplexImagOpLowering::matchAndRewrite( return mlir::success(); } +mlir::LogicalResult CIRToLLVMGetBitfieldOpLowering::matchAndRewrite( +cir::GetBitfieldOp op, OpAdaptor adaptor, +mlir::ConversionPatternRewriter &r

[clang] [CIR] Upstream get_bitfield operation to load bit-field members from structs (PR #145971)

2025-06-27 Thread Andy Kaylor via cfe-commits
@@ -326,13 +326,61 @@ mlir::Value CIRGenFunction::emitStoreThroughBitfieldLValue(RValue src, return {}; } +RValue CIRGenFunction::emitLoadOfBitfieldLValue(LValue lv, SourceLocation loc) { + const CIRGenBitFieldInfo &info = lv.getBitFieldInfo(); + + // Get the output type

[clang] [CIR] Upstream get_bitfield operation to load bit-field members from structs (PR #145971)

2025-06-27 Thread Andy Kaylor via cfe-commits
@@ -405,6 +406,16 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy { return createGlobal(module, loc, uniqueName, type, linkage); } + + mlir::Value createGetBitfield(mlir::Location loc, mlir::Type resultType, +mlir::Value addr, mli

[clang] [CIR] Upstream get_bitfield operation to load bit-field members from structs (PR #145971)

2025-06-27 Thread Andy Kaylor via cfe-commits
@@ -375,4 +375,42 @@ def CIR_VisibilityAttr : CIR_EnumAttr { }]; } +//===--===// +// BitfieldInfoAttr +//===--===// + +def BitfieldInfoAttr

[clang] [CIR] Upstream get_bitfield operation to load bit-field members from structs (PR #145971)

2025-06-27 Thread Andy Kaylor via cfe-commits
@@ -375,4 +375,42 @@ def CIR_VisibilityAttr : CIR_EnumAttr { }]; } +//===--===// +// BitfieldInfoAttr +//===--===// + +def BitfieldInfoAttr

[clang-tools-extra] [clang-doc] Precommit friends test (PR #146164)

2025-06-27 Thread Erick Velez via cfe-commits
https://github.com/evelez7 updated https://github.com/llvm/llvm-project/pull/146164 >From 111fe87d9a6590d4d667271f1261af04ca088723 Mon Sep 17 00:00:00 2001 From: Erick Velez Date: Thu, 26 Jun 2025 20:51:33 -0700 Subject: [PATCH] [clang-doc] Precommit friends test --- .../test/clang-doc/json/c

[clang-tools-extra] 6d81781 - [clang-doc] serialize IsBuiltIn and IsTemplate for types (#146149)

2025-06-27 Thread via cfe-commits
Author: Erick Velez Date: 2025-06-27T16:17:39-07:00 New Revision: 6d817810daa16667d8e3de5daf82f801bfba3e00 URL: https://github.com/llvm/llvm-project/commit/6d817810daa16667d8e3de5daf82f801bfba3e00 DIFF: https://github.com/llvm/llvm-project/commit/6d817810daa16667d8e3de5daf82f801bfba3e00.diff L

[clang-tools-extra] [clang-doc] Precommit friends test (PR #146164)

2025-06-27 Thread Erick Velez via cfe-commits
https://github.com/evelez7 edited https://github.com/llvm/llvm-project/pull/146164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] serialize IsBuiltIn and IsTemplate for types (PR #146149)

2025-06-27 Thread Erick Velez via cfe-commits
https://github.com/evelez7 closed https://github.com/llvm/llvm-project/pull/146149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-27 Thread via cfe-commits
@@ -7248,6 +7250,22 @@ QualType TreeTransform::TransformDependentBitIntType( return Result; } +template +QualType TreeTransform::TransformPredefinedSugarType( +TypeLocBuilder &TLB, PredefinedSugarTypeLoc TL) { + const PredefinedSugarType *EIT = TL.getTypePtr(); + Qua

[clang-tools-extra] [clang-doc] serialize IsBuiltIn and IsTemplate for types (PR #146149)

2025-06-27 Thread Erick Velez via cfe-commits
evelez7 wrote: ### Merge activity * **Jun 27, 11:16 PM UTC**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/146149). https://github.com/llvm/llvm-project/pull/146149 ___

[clang] [DebugInfo] Produce debuginfo for nested types when the outer type is [[clang::standalone_debug]] (PR #146175)

2025-06-27 Thread Kyle Huey via cfe-commits
khuey wrote: @dwblaikie could you take a look at this? https://github.com/llvm/llvm-project/pull/146175 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [DebugInfo] Produce debuginfo for nested types when the outer type is [[clang::standalone_debug]] (PR #146175)

2025-06-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-debuginfo Author: Kyle Huey (khuey) Changes Without this, it's impossible to get debuginfo for a nested type that is unused (or that clang mistakenly believes is unused due to e.g. deficiencies in -debug-info-kind=limited), e

[clang] [DebugInfo] Produce debuginfo for nested types when the outer type is [[clang::standalone_debug]] (PR #146175)

2025-06-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Kyle Huey (khuey) Changes Without this, it's impossible to get debuginfo for a nested type that is unused (or that clang mistakenly believes is unused due to e.g. deficiencies in -debug-info-kind=limited), even by marking the "unu

[clang] [DebugInfo] Produce debuginfo for nested types when the outer type is [[clang::standalone_debug]] (PR #146175)

2025-06-27 Thread Kyle Huey via cfe-commits
https://github.com/khuey created https://github.com/llvm/llvm-project/pull/146175 Without this, it's impossible to get debuginfo for a nested type that is unused (or that clang mistakenly believes is unused due to e.g. deficiencies in -debug-info-kind=limited), even by marking the "unused" nes

[clang-tools-extra] [clang-doc] serialize IsBuiltIn and IsTemplate for types (PR #146149)

2025-06-27 Thread Erick Velez via cfe-commits
https://github.com/evelez7 edited https://github.com/llvm/llvm-project/pull/146149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-27 Thread via cfe-commits
@@ -5216,6 +5237,25 @@ QualType ASTContext::getDependentBitIntType(bool IsUnsigned, return QualType(New, 0); } +QualType ASTContext::getPredefinedSugarType(uint32_t KD) const { + using Kind = PredefinedSugarType::Kind; + auto getUnderlyingType = [](const ASTContext &Ctx,

[clang] [clang-tools-extra] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-27 Thread via cfe-commits
@@ -6796,14 +6836,25 @@ QualType ASTContext::getTagDeclType(const TagDecl *Decl) const { /// getSizeType - Return the unique type for "size_t" (C99 7.17), the result /// of the sizeof operator (C99 6.5.3.4p4). The value is target dependent and /// needs to agree with the defin

[clang-tools-extra] [clang-doc] emit IsBuiltIn and IsTemplate for types (PR #146149)

2025-06-27 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. LGTM. Maybe use `[clang-doc] Serialize IsBuiltIn and IsTemplate for types` as the title? https://github.com/llvm/llvm-project/pull/146149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [clang-tools-extra] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-27 Thread Matheus Izvekov via cfe-commits
@@ -1516,6 +1516,23 @@ void ASTContext::InitBuiltinTypes(const TargetInfo &Target, MSGuidTagDecl = buildImplicitRecord("_GUID"); getTranslationUnitDecl()->addDecl(MSGuidTagDecl); } + + // size_t (C99TC3 6.5.3.4), signed size_t (C++23 5.13.2) and + // ptrdiff_t (C99

[clang] [CIR] Upstream support for operator assign (PR #145979)

2025-06-27 Thread Andy Kaylor via cfe-commits
@@ -258,6 +258,30 @@ void CIRGenFunction::emitDelegateCXXConstructorCall( /*Delegating=*/true, thisAddr, delegateArgs, loc); } +void CIRGenFunction::emitImplicitAssignmentOperatorBody(FunctionArgList &args) { + const auto *assignOp = cast(curGD.getDe

[clang] [clang-tools-extra] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-27 Thread via cfe-commits
@@ -2767,6 +2767,10 @@ class DependentBitIntTypeLoc final : public InheritingConcreteTypeLoc {}; +class PredefinedSugarTypeLoc final +: public InheritingConcreteTypeLoc {}; YexuanXiao wrote: Same as the [comment for TreeTransform.h](https://github.com

[clang] [llvm] [NFC][HLSL][DirectX] Let `HLSLRootSignature` reuse the `dxbc` defined enums (PR #145986)

2025-06-27 Thread Finn Plummer via cfe-commits
@@ -200,38 +81,38 @@ struct DescriptorTableClause { uint32_t NumDescriptors = 1; uint32_t Space = 0; uint32_t Offset = DescriptorTableOffsetAppend; - DescriptorRangeFlags Flags; + dxbc::DescriptorRangeFlags Flags; void setDefaultFlags() { switch (Type) {

[clang] [llvm] [NFC][HLSL][DirectX] Let `HLSLRootSignature` reuse the `dxbc` defined enums (PR #145986)

2025-06-27 Thread Finn Plummer via cfe-commits
@@ -205,20 +205,22 @@ TEST_F(ParseHLSLRootSignatureTest, ValidParseDTClausesTest) { ASSERT_EQ(std::get(Elem).Space, 0u); ASSERT_EQ(std::get(Elem).Offset, DescriptorTableOffsetAppend); + auto ValidDescriptorRangeFlags = llvm::dxbc::DescriptorRangeFlags(0x1000f)

[clang] [clang-tools-extra] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-27 Thread Matheus Izvekov via cfe-commits
@@ -2258,6 +2258,27 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase { unsigned NumExpansions; }; + enum class PredefinedSugarKind { +/// The "size_t" type. +SizeT, + +/// The "signed size_t" type. mizvekov wrote: Well

[clang] [llvm] [NFC][HLSL][DirectX] Let `HLSLRootSignature` reuse the `dxbc` defined enums (PR #145986)

2025-06-27 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/145986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][HLSL][DirectX] Let `HLSLRootSignature` reuse the `dxbc` defined enums (PR #145986)

2025-06-27 Thread Finn Plummer via cfe-commits
@@ -404,7 +417,7 @@ TEST_F(ParseHLSLRootSignatureTest, ValidSamplerFlagsTest) { ASSERT_TRUE(std::holds_alternative(Elem)); ASSERT_EQ(std::get(Elem).Type, ClauseType::Sampler); ASSERT_EQ(std::get(Elem).Flags, -DescriptorRangeFlags::ValidSamplerFlags); -

[clang] [CIR] Upstream support for operator assign (PR #145979)

2025-06-27 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/145979 >From af4621f2944e84801f425bba3c77313ab625e714 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Fri, 16 May 2025 14:14:21 -0700 Subject: [PATCH 1/2] [CIR] Upstream support for operator assign This adds suppo

[clang] [clang-tools-extra] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-27 Thread Matheus Izvekov via cfe-commits
@@ -6796,14 +6836,25 @@ QualType ASTContext::getTagDeclType(const TagDecl *Decl) const { /// getSizeType - Return the unique type for "size_t" (C99 7.17), the result /// of the sizeof operator (C99 6.5.3.4p4). The value is target dependent and /// needs to agree with the defin

[clang] [clang-tools-extra] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-27 Thread Matheus Izvekov via cfe-commits
@@ -1567,6 +1567,8 @@ class ASTContext : public RefCountedBase { /// and bit count. QualType getDependentBitIntType(bool Unsigned, Expr *BitsExpr) const; + QualType getPredefinedSugarType(uint32_t KD) const; mizvekov wrote: You can use enums in TypePrope

[clang] [clang-tools-extra] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-27 Thread via cfe-commits
@@ -1567,6 +1567,8 @@ class ASTContext : public RefCountedBase { /// and bit count. QualType getDependentBitIntType(bool Unsigned, Expr *BitsExpr) const; + QualType getPredefinedSugarType(uint32_t KD) const; YexuanXiao wrote: This function is used by Typ

[clang] [clang-tools-extra] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-27 Thread via cfe-commits
https://github.com/YexuanXiao deleted https://github.com/llvm/llvm-project/pull/143653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-27 Thread via cfe-commits
@@ -6796,14 +6836,25 @@ QualType ASTContext::getTagDeclType(const TagDecl *Decl) const { /// getSizeType - Return the unique type for "size_t" (C99 7.17), the result /// of the sizeof operator (C99 6.5.3.4p4). The value is target dependent and /// needs to agree with the defin

[clang] [clang-tools-extra] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-27 Thread via cfe-commits
@@ -1516,6 +1516,23 @@ void ASTContext::InitBuiltinTypes(const TargetInfo &Target, MSGuidTagDecl = buildImplicitRecord("_GUID"); getTranslationUnitDecl()->addDecl(MSGuidTagDecl); } + + // size_t (C99TC3 6.5.3.4), signed size_t (C++23 5.13.2) and + // ptrdiff_t (C99

[clang] [clang-tools-extra] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-27 Thread via cfe-commits
@@ -2258,6 +2258,27 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase { unsigned NumExpansions; }; + enum class PredefinedSugarKind { +/// The "size_t" type. +SizeT, + +/// The "signed size_t" type. YexuanXiao wrote: @fr

[clang] [mlir] [OpenACC][CIR] Implement 'exit data' construct + clauses (PR #146167)

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

[clang] [mlir] [OpenACC][CIR] Implement 'exit data' construct + clauses (PR #146167)

2025-06-27 Thread Erich Keane via cfe-commits
erichkeane wrote: Sorry for the force-push, screwed up the clang-format commit and rather than spending time backing it out, i hoped no one would be affected. https://github.com/llvm/llvm-project/pull/146167 ___ cfe-commits mailing list cfe-commits@li

[clang] [mlir] [OpenACC][CIR] Implement 'exit data' construct + clauses (PR #146167)

2025-06-27 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/146167 >From f56e646eb2739d4a254a6e9dcc3042c7d14862ea Mon Sep 17 00:00:00 2001 From: erichkeane Date: Fri, 27 Jun 2025 14:53:15 -0700 Subject: [PATCH] [OpenACC][CIR] Implement 'exit data' construct + clauses Simila

[clang] [mlir] [OpenACC][CIR] Implement 'exit data' construct + clauses (PR #146167)

2025-06-27 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions c,cpp -- clang/test/CIR/CodeGenOpenACC/exit-data.c clang/li

[clang] [mlir] [OpenACC][CIR] Implement 'exit data' construct + clauses (PR #146167)

2025-06-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clangir Author: Erich Keane (erichkeane) Changes Similar to 'enter data', except the data clauses have a 'getdeviceptr' operation before, so that they can properly use the 'exit' operation correctly. While this is a touch aw

[clang] [mlir] [OpenACC][CIR] Implement 'exit data' construct + clauses (PR #146167)

2025-06-27 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/146167 Similar to 'enter data', except the data clauses have a 'getdeviceptr' operation before, so that they can properly use the 'exit' operation correctly. While this is a touch awkward, it fits perfectly into t

[clang] [Clang][Driver][SamplePGO] Enable -fsample-profile-use-profi for SamplePGO (PR #145957)

2025-06-27 Thread Nilanjana Basu via cfe-commits
nilanjana87 wrote: > We evaluated profi internally (at Google) last year. Our configuration uses > AutoFDO with [flow-sensitive discriminators > ](https://lists.llvm.org/pipermail/llvm-dev/2020-November/146694.html) > (FS-AFDO). We found slight regressions with this configuration and didn't >

[clang] [Clang][ByteCode][NFC] Avoid copies by using move in Disasm.cpp (PR #146127)

2025-06-27 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik closed https://github.com/llvm/llvm-project/pull/146127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 8bc61cb - [Clang][ByteCode][NFC] Avoid copies by using move in Disasm.cpp (#146127)

2025-06-27 Thread via cfe-commits
Author: Shafik Yaghmour Date: 2025-06-27T14:53:20-07:00 New Revision: 8bc61cbfde28c014b8d18ae8066f1371808d2aa7 URL: https://github.com/llvm/llvm-project/commit/8bc61cbfde28c014b8d18ae8066f1371808d2aa7 DIFF: https://github.com/llvm/llvm-project/commit/8bc61cbfde28c014b8d18ae8066f1371808d2aa7.dif

[clang] [clang-tools-extra] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

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

[compiler-rt] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (#138571) (PR #143230)

2025-06-27 Thread Oliver Hunt via cfe-commits
ojhunt wrote: Re: the oracle concerns - there are some protections we have, but in general I think the current pointer auth semantics/diagnostics make it too easy to silently introduce oracles. Additionally a lot of the current unwind pointerauth work is focused on protecting the ABI boundarie

[clang] [clang-tools-extra] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-27 Thread Matheus Izvekov via cfe-commits
@@ -2258,6 +2258,27 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase { unsigned NumExpansions; }; + enum class PredefinedSugarKind { +/// The "size_t" type. +SizeT, + +/// The "signed size_t" type. mizvekov wrote: ```su

[clang] [clang-tools-extra] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-27 Thread Matheus Izvekov via cfe-commits
@@ -2767,6 +2767,10 @@ class DependentBitIntTypeLoc final : public InheritingConcreteTypeLoc {}; +class PredefinedSugarTypeLoc final +: public InheritingConcreteTypeLoc {}; mizvekov wrote: These should ideally never be used in practice, as a Predefined

[clang] [clang-tools-extra] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-27 Thread Matheus Izvekov via cfe-commits
@@ -5216,6 +5237,25 @@ QualType ASTContext::getDependentBitIntType(bool IsUnsigned, return QualType(New, 0); } +QualType ASTContext::getPredefinedSugarType(uint32_t KD) const { + using Kind = PredefinedSugarType::Kind; + auto getUnderlyingType = [](const ASTContext &Ctx,

[clang] [clang-tools-extra] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-27 Thread Matheus Izvekov via cfe-commits
@@ -1480,6 +1480,16 @@ static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, return false; break; } + case Type::PredefinedSugar: { +const auto *TP1 = cast(T1); +const auto *TP2 = cast(T2); +if (TP1->getKind() != TP2->getKind()) +

[clang] [clang-tools-extra] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-27 Thread Matheus Izvekov via cfe-commits
@@ -6796,14 +6836,25 @@ QualType ASTContext::getTagDeclType(const TagDecl *Decl) const { /// getSizeType - Return the unique type for "size_t" (C99 7.17), the result /// of the sizeof operator (C99 6.5.3.4p4). The value is target dependent and /// needs to agree with the defin

[clang] [clang-tools-extra] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-27 Thread Matheus Izvekov via cfe-commits
@@ -5622,3 +5622,15 @@ HLSLAttributedResourceType::findHandleTypeOnResource(const Type *RT) { } return nullptr; } + +StringRef PredefinedSugarType::getName() const { + switch (getKind()) { + case Kind::SizeT: +return "__size_t"; + case Kind::SignedSizeT: +return

[clang] [clang-tools-extra] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-27 Thread Matheus Izvekov via cfe-commits
@@ -8038,6 +8060,32 @@ class DependentBitIntType final : public Type, public llvm::FoldingSetNode { } }; +class PredefinedSugarType final : public Type { +public: + friend class ASTContext; + using Kind = PredefinedSugarKind; + +private: + PredefinedSugarType(Kind KD, Qu

[clang] [clang-tools-extra] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-27 Thread Matheus Izvekov via cfe-commits
@@ -1567,6 +1567,8 @@ class ASTContext : public RefCountedBase { /// and bit count. QualType getDependentBitIntType(bool Unsigned, Expr *BitsExpr) const; + QualType getPredefinedSugarType(uint32_t KD) const; mizvekov wrote: It would be more helpful and l

[clang] [clang-tools-extra] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-27 Thread Matheus Izvekov via cfe-commits
@@ -1516,6 +1516,23 @@ void ASTContext::InitBuiltinTypes(const TargetInfo &Target, MSGuidTagDecl = buildImplicitRecord("_GUID"); getTranslationUnitDecl()->addDecl(MSGuidTagDecl); } + + // size_t (C99TC3 6.5.3.4), signed size_t (C++23 5.13.2) and + // ptrdiff_t (C99

[clang] [clang-tools-extra] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-27 Thread Matheus Izvekov via cfe-commits
@@ -5216,6 +5237,25 @@ QualType ASTContext::getDependentBitIntType(bool IsUnsigned, return QualType(New, 0); } +QualType ASTContext::getPredefinedSugarType(uint32_t KD) const { + using Kind = PredefinedSugarType::Kind; + auto getUnderlyingType = [](const ASTContext &Ctx,

[clang] [clang-tools-extra] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-27 Thread Matheus Izvekov via cfe-commits
@@ -8038,6 +8060,32 @@ class DependentBitIntType final : public Type, public llvm::FoldingSetNode { } }; +class PredefinedSugarType final : public Type { +public: + friend class ASTContext; + using Kind = PredefinedSugarKind; + +private: + PredefinedSugarType(Kind KD, Qu

[clang] [clang-tools-extra] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-27 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov commented: Thanks, this looks good! It would be awesome to use these in existing cases which we handle with a builtin typedef, as this would be helpful to validate the design, but this is not required and doesn't need to be part of this PR. https://github.com/llvm/

[clang] [clang-tools-extra] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-27 Thread Matheus Izvekov via cfe-commits
@@ -7248,6 +7250,22 @@ QualType TreeTransform::TransformDependentBitIntType( return Result; } +template +QualType TreeTransform::TransformPredefinedSugarType( +TypeLocBuilder &TLB, PredefinedSugarTypeLoc TL) { + const PredefinedSugarType *EIT = TL.getTypePtr(); + Qua

[clang] [clang-tools-extra] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-27 Thread Matheus Izvekov via cfe-commits
@@ -14526,6 +14564,9 @@ static QualType getCommonSugarTypeNode(ASTContext &Ctx, const Type *X, DX->isCountInBytes(), DX->isOrNull(), CDX); } + case Type::PredefinedSugar: +// FIXME: Should this

[clang] [clang-tools-extra] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

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

[clang] [llvm] [LLVM][Clang] Enable strict mode for `getTrailingObjects` (PR #144930)

2025-06-27 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/144930 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][Clang] Enable strict mode for `getTrailingObjects` (PR #144930)

2025-06-27 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/144930 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream get_bitfield operation to load bit-field members from structs (PR #145971)

2025-06-27 Thread via cfe-commits
https://github.com/Andres-Salamanca updated https://github.com/llvm/llvm-project/pull/145971 >From d2e19a9ce2270ae9d764f1e2ba3978aaab2c1e2a Mon Sep 17 00:00:00 2001 From: Andres Salamanca Date: Thu, 26 Jun 2025 15:51:02 -0500 Subject: [PATCH 1/4] Get Lvalue for bit-field --- clang/include/cla

[clang] [llvm] [LLVM][Clang] Add and enable strict mode for `getTrailingObjects` (PR #144930)

2025-06-27 Thread Rahul Joshi via cfe-commits
jurahul wrote: That was fast! Thanks https://github.com/llvm/llvm-project/pull/144930 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream get_bitfield operation to load bit-field members from structs (PR #145971)

2025-06-27 Thread via cfe-commits
https://github.com/Andres-Salamanca updated https://github.com/llvm/llvm-project/pull/145971 >From d2e19a9ce2270ae9d764f1e2ba3978aaab2c1e2a Mon Sep 17 00:00:00 2001 From: Andres Salamanca Date: Thu, 26 Jun 2025 15:51:02 -0500 Subject: [PATCH 1/3] Get Lvalue for bit-field --- clang/include/cla

[clang] [llvm] [LLVM][Clang] Add and enable strict mode for `getTrailingObjects` (PR #144930)

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

[clang] [llvm] [LLVM][Clang] Add and enable strict mode for `getTrailingObjects` (PR #144930)

2025-06-27 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/144930 >From ee982b8b2d14b1199f051db53aea4f26899d4d77 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Thu, 19 Jun 2025 10:25:12 -0700 Subject: [PATCH] [LLVM][Clang] Add and enable strict mode for `getTrailingObjects`

[clang] [llvm] [NFC][HLSL][DirectX] Let `HLSLRootSignature` reuse the `dxbc` defined enums (PR #145986)

2025-06-27 Thread Sarah Spall via cfe-commits
@@ -404,7 +417,7 @@ TEST_F(ParseHLSLRootSignatureTest, ValidSamplerFlagsTest) { ASSERT_TRUE(std::holds_alternative(Elem)); ASSERT_EQ(std::get(Elem).Type, ClauseType::Sampler); ASSERT_EQ(std::get(Elem).Flags, -DescriptorRangeFlags::ValidSamplerFlags); -

[clang] [llvm] [NFC][HLSL][DirectX] Let `HLSLRootSignature` reuse the `dxbc` defined enums (PR #145986)

2025-06-27 Thread Sarah Spall via cfe-commits
@@ -200,38 +81,38 @@ struct DescriptorTableClause { uint32_t NumDescriptors = 1; uint32_t Space = 0; uint32_t Offset = DescriptorTableOffsetAppend; - DescriptorRangeFlags Flags; + dxbc::DescriptorRangeFlags Flags; void setDefaultFlags() { switch (Type) {

[clang] [llvm] [NFC][HLSL][DirectX] Let `HLSLRootSignature` reuse the `dxbc` defined enums (PR #145986)

2025-06-27 Thread Sarah Spall via cfe-commits
@@ -205,20 +205,22 @@ TEST_F(ParseHLSLRootSignatureTest, ValidParseDTClausesTest) { ASSERT_EQ(std::get(Elem).Space, 0u); ASSERT_EQ(std::get(Elem).Offset, DescriptorTableOffsetAppend); + auto ValidDescriptorRangeFlags = llvm::dxbc::DescriptorRangeFlags(0x1000f)

[clang] [CIR] Upstream get_bitfield operation to load bit-field members from structs (PR #145971)

2025-06-27 Thread via cfe-commits
@@ -326,13 +326,47 @@ mlir::Value CIRGenFunction::emitStoreThroughBitfieldLValue(RValue src, return {}; } +Address CIRGenFunction::getAddrOfBitFieldStorage(LValue base, + const FieldDecl *field, +

[clang] [CIR] Upstream get_bitfield operation to load bit-field members from structs (PR #145971)

2025-06-27 Thread via cfe-commits
https://github.com/Andres-Salamanca edited https://github.com/llvm/llvm-project/pull/145971 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add warning for blocks capturing {'this', raw pointers, references} (PR #144388)

2025-06-27 Thread John McCall via cfe-commits
@@ -1641,6 +1641,17 @@ def warn_implicitly_retains_self : Warning < "block implicitly retains 'self'; explicitly mention 'self' to indicate " "this is intended behavior">, InGroup>, DefaultIgnore; +def warn_blocks_capturing_this : Warning<"block implicitly captures 'this'

[clang] [Clang][ByteCode][NFC] Avoid copies by using move in Disasm.cpp (PR #146127)

2025-06-27 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr approved this pull request. https://github.com/llvm/llvm-project/pull/146127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream get_bitfield operation to load bit-field members from structs (PR #145971)

2025-06-27 Thread via cfe-commits
https://github.com/Andres-Salamanca edited https://github.com/llvm/llvm-project/pull/145971 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add support for retrieving bitfield member (PR #145971)

2025-06-27 Thread via cfe-commits
https://github.com/Andres-Salamanca updated https://github.com/llvm/llvm-project/pull/145971 >From d2e19a9ce2270ae9d764f1e2ba3978aaab2c1e2a Mon Sep 17 00:00:00 2001 From: Andres Salamanca Date: Thu, 26 Jun 2025 15:51:02 -0500 Subject: [PATCH 1/2] Get Lvalue for bit-field --- clang/include/cla

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-06-27 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > We could allow `__builtin_processor_is` as an alternative name for that > builtin if folks feel weird about having "cpu" in the name for a GPU target. We already use `-mcpu=gfx942` for targeting the GPU processor so I don't think it makes a huge difference. I've never heard of

  1   2   3   4   5   >