[clang] [clang][docs] Add note about `-Wms-bitfield-padding` in MSVC compatibility docs (PR #155770)

2025-08-29 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/155770 >From cc25a94f6f2e28e386b00ca8feee4d2c53c1ee01 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Thu, 28 Aug 2025 00:01:13 -0700 Subject: [PATCH] [clang][docs] Add note about `-Wms-bitfield-padding` in MSVC compa

[clang] Add pointer auth documentation to contents (PR #155763)

2025-08-28 Thread Oliver Hunt via cfe-commits
ojhunt wrote: (oh yay, you don't have to create a separate issue \o/ ) https://github.com/llvm/llvm-project/pull/155763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add pointer auth documentation to contents (PR #155763)

2025-08-28 Thread Oliver Hunt via cfe-commits
ojhunt wrote: /cherry-pick 6394c58 https://github.com/llvm/llvm-project/pull/155763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add pointer auth documentation to contents (PR #155763)

2025-08-28 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt milestoned https://github.com/llvm/llvm-project/pull/155763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add pointer auth documentation to contents (PR #155763)

2025-08-28 Thread Oliver Hunt via cfe-commits
ojhunt wrote: Checked with Aaron and he feels this is ok :D https://github.com/llvm/llvm-project/pull/155763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add pointer auth documentation to contents (PR #155763)

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

[clang] Add pointer auth documentation to contents (PR #155763)

2025-08-28 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt edited https://github.com/llvm/llvm-project/pull/155763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][docs] Add note about `-Wms-bitfield-padding` in MSVC compatibility docs (PR #155770)

2025-08-28 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt created https://github.com/llvm/llvm-project/pull/155770 None >From 8e0f9dc43fd6ae669659932cf8d6ced62db6532b Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Thu, 28 Aug 2025 00:01:13 -0700 Subject: [PATCH] [clang][docs] Add note about `-Wms-bitfield-padding` in MSVC

[clang] [clang][docs] Add note about `-Wms-bitfield-padding` in MSVC compatibility docs (PR #155770)

2025-08-28 Thread Oliver Hunt via cfe-commits
ojhunt wrote: I wasn't sure if this was warranted, but given little effort to add the note I figured that I could create it an ping the last person to touch it :D https://github.com/llvm/llvm-project/pull/155770 ___ cfe-commits mailing list cfe-commit

[clang] [clang][PAC] Fix builtins that claim address discriminated types are bitwise compatible (PR #154490)

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

[clang] [clang][PAC] Fix builtins that claim address discriminated types are bitwise compatible (PR #154490)

2025-08-25 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/154490 >From 689d70c706546a5b0b2ee00ebe7e030041d6fb2b Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Wed, 20 Aug 2025 01:28:29 -0700 Subject: [PATCH 1/4] [clang][PAC] Fix builtins that claim Address discriminated typ

[clang] [clang][PAC] Enable the PAC dynamic_cast to final class optimization (PR #152601)

2025-08-25 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/152601 >From 0603664d1637ea7fc729486dec97c5f3292cddaa Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Mon, 4 Aug 2025 20:54:46 -0700 Subject: [PATCH] [clang][PAC] Enable the PAC dynamic_cast to final class optimizatio

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

2025-08-25 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/143230 >From 27fb74cf3545cedab4e1c7fa6f42b935b5f345c0 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Tue, 5 Aug 2025 18:16:32 -0700 Subject: [PATCH 1/8] [runtimes][PAC] Harden unwinding when possible (#138571) This h

[clang] [PAC] Fix codegen for polymorphic class variables with consteval constructors (PR #154858)

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

[clang] [clang][PAC] Fix builtins that claim address discriminated types are bitwise compatible (PR #154490)

2025-08-24 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/154490 >From 689d70c706546a5b0b2ee00ebe7e030041d6fb2b Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Wed, 20 Aug 2025 01:28:29 -0700 Subject: [PATCH 1/3] [clang][PAC] Fix builtins that claim Address discriminated typ

[clang] [PAC] Fix codegen for polymorphic class variables with consteval constructors (PR #154858)

2025-08-23 Thread Oliver Hunt via cfe-commits
@@ -876,8 +876,9 @@ bool ConstStructBuilder::Build(const APValue &Val, const RecordDecl *RD, for (const BaseInfo &Base : Bases) { bool IsPrimaryBase = Layout.getPrimaryBase() == Base.Decl; - Build(Val.getStructBase(Base.Index), Base.Decl, IsPrimaryBase, -

[clang] [WebKit checkers] Treat asm brk as trivial (PR #155046)

2025-08-23 Thread Oliver Hunt via cfe-commits
@@ -666,6 +666,10 @@ class TrivialFunctionAnalysisVisitor return IsFunctionTrivial(Callee); } + bool VisitGCCAsmStmt(const GCCAsmStmt *AS) { +return AS->getAsmString() == "brk #0xc471"; ojhunt wrote: does this need to be restricted to a specific br

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-08-23 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt requested changes to this pull request. https://github.com/llvm/llvm-project/pull/152488 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-08-23 Thread Oliver Hunt via cfe-commits
@@ -2639,6 +2642,87 @@ static void DiagnoseNonStandardLayoutReason(Sema &SemaRef, SourceLocation Loc, SemaRef.Diag(D->getLocation(), diag::note_defined_here) << D; } +static void DiagnoseNonAggregateReason(Sema &SemaRef, SourceLocation Loc, +

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-08-23 Thread Oliver Hunt via cfe-commits
@@ -2639,6 +2642,87 @@ static void DiagnoseNonStandardLayoutReason(Sema &SemaRef, SourceLocation Loc, SemaRef.Diag(D->getLocation(), diag::note_defined_here) << D; } +static void DiagnoseNonAggregateReason(Sema &SemaRef, SourceLocation Loc, +

[clang] [clang][PAC] Fix builtins that claim address discriminated types are bitwise compatible (PR #154490)

2025-08-23 Thread Oliver Hunt via cfe-commits
@@ -1438,6 +1438,10 @@ void CXXRecordDecl::addedMember(Decl *D) { data().StructuralIfLiteral = false; } +if (!data().HasTrivialSpecialMembers && +T.hasAddressDiscriminatedPointerAuth()) + data().HasTrivialSpecialMembers = true; ojh

[clang] [clang][PAC] Fix builtins that claim address discriminated types are bitwise compatible (PR #154490)

2025-08-22 Thread Oliver Hunt via cfe-commits
@@ -74,7 +74,7 @@ static_assert(__is_trivially_destructible(S3)); static_assert(!__is_trivially_copyable(S3)); static_assert(!__is_trivially_relocatable(S3)); // expected-warning{{deprecated}} //FIXME -static_assert(__builtin_is_cpp_trivially_relocatable(S3)); +static_assert(!

[clang] [clang][PAC] Fix builtins that claim address discriminated types are bitwise compatible (PR #154490)

2025-08-21 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/154490 >From 689d70c706546a5b0b2ee00ebe7e030041d6fb2b Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Wed, 20 Aug 2025 01:28:29 -0700 Subject: [PATCH 1/2] [clang][PAC] Fix builtins that claim Address discriminated typ

[clang] [clang][PAC] Fix builtins that claim address discriminated types are bitwise compatible (PR #154490)

2025-08-21 Thread Oliver Hunt via cfe-commits
@@ -1438,6 +1438,10 @@ void CXXRecordDecl::addedMember(Decl *D) { data().StructuralIfLiteral = false; } +if (!data().HasTrivialSpecialMembers && +T.hasAddressDiscriminatedPointerAuth()) + data().HasTrivialSpecialMembers = true; ojh

[clang] [clang][PAC] Fix builtins that claim address discriminated types are bitwise compatible (PR #154490)

2025-08-21 Thread Oliver Hunt via cfe-commits
@@ -1438,6 +1438,10 @@ void CXXRecordDecl::addedMember(Decl *D) { data().StructuralIfLiteral = false; } +if (!data().HasTrivialSpecialMembers && +T.hasAddressDiscriminatedPointerAuth()) + data().HasTrivialSpecialMembers = true; ojh

[clang] [clang][PAC] Fix builtins that claim address discriminated types are bitwise compatible (PR #154490)

2025-08-21 Thread Oliver Hunt via cfe-commits
@@ -1438,6 +1438,10 @@ void CXXRecordDecl::addedMember(Decl *D) { data().StructuralIfLiteral = false; } +if (!data().HasTrivialSpecialMembers && +T.hasAddressDiscriminatedPointerAuth()) + data().HasTrivialSpecialMembers = true; ojh

[clang] [clang][PAC] Fix builtins that claim address discriminated types are bitwise compatible (PR #154490)

2025-08-21 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt ready_for_review https://github.com/llvm/llvm-project/pull/154490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PAC] Fix builtins that claim address discriminated types are bitwise compatible (PR #154490)

2025-08-21 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/154490 >From 689d70c706546a5b0b2ee00ebe7e030041d6fb2b Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Wed, 20 Aug 2025 01:28:29 -0700 Subject: [PATCH] [clang][PAC] Fix builtins that claim Address discriminated types a

[clang] [clang][PAC] Fix builtins that claim address discriminated types are bitwise compatible (PR #154490)

2025-08-21 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/154490 >From b0ac8bf69e8075d9241707afaf45aba2bf20d392 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Wed, 20 Aug 2025 01:28:29 -0700 Subject: [PATCH] [clang][PAC] Fix builtins that claim Address discriminated types a

[clang] [clang][PAC] Fix builtins that claim address discriminated types are bitwise compatible (PR #154490)

2025-08-20 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt converted_to_draft https://github.com/llvm/llvm-project/pull/154490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PAC] Fix builtins that claim address discriminated types are bitwise compatible (PR #154490)

2025-08-20 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt created https://github.com/llvm/llvm-project/pull/154490 A number of builtins report some variation of "this type is compatibile with some bitwise equivalent operation", but this is not true for address discriminated values. We had address a number of cases, but not a

[clang] [clang][PAC][darwin] Set correct default ptrauth features for arm64e-darwin (PR #153722)

2025-08-19 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/153722 >From 0cbb0846f270c6d6cb15492ba34ff9ae2ed33f67 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Thu, 14 Aug 2025 17:43:03 -0700 Subject: [PATCH 1/8] [clang][PAC][darwin] Set correct default ptrauth features for

[clang] [clang][PAC][darwin] Set correct default ptrauth features for arm64e-darwin (PR #153722)

2025-08-19 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/153722 >From 0cbb0846f270c6d6cb15492ba34ff9ae2ed33f67 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Thu, 14 Aug 2025 17:43:03 -0700 Subject: [PATCH 1/7] [clang][PAC][darwin] Set correct default ptrauth features for

[clang] [clang][PAC][darwin] Set correct default ptrauth features for arm64e-darwin (PR #153722)

2025-08-18 Thread Oliver Hunt via cfe-commits
@@ -3291,6 +3291,39 @@ void Darwin::addClangTargetOptions( if (!RequiresSubdirectorySearch) CC1Args.push_back("-fno-modulemap-allow-subdirectory-search"); } + + if (getTriple().isArm64e()) { +auto EnsureDefaultPtrauthFlag = [&](OptSpecifier Pos, OptSpecifier Ne

[clang] [clang][PAC] ptrauth_qualifier and ptrauth_intrinsic should only be available on Darwin (PR #153912)

2025-08-18 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt auto_merge_enabled https://github.com/llvm/llvm-project/pull/153912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PAC] ptrauth_qualifier and ptrauth_intrinsic should only be available on Darwin (PR #153912)

2025-08-18 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/153912 >From ea731927d6bdf85a3cdb333b756447658f2c2ea6 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Fri, 15 Aug 2025 18:40:12 -0700 Subject: [PATCH 1/6] [clang][PAC] Make ptrauth_qualifier and ptrauth_intrinsic Darw

[clang] [clang][PAC] ptrauth_qualifier and ptrauth_intrinsic should only be available on Darwin (PR #153912)

2025-08-18 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/153912 >From ea731927d6bdf85a3cdb333b756447658f2c2ea6 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Fri, 15 Aug 2025 18:40:12 -0700 Subject: [PATCH 1/5] [clang][PAC] Make ptrauth_qualifier and ptrauth_intrinsic Darw

[clang] [clang][PAC] ptrauth_qualifier and ptrauth_intrinsic should only be available on Darwin (PR #153912)

2025-08-18 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/153912 >From ea731927d6bdf85a3cdb333b756447658f2c2ea6 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Fri, 15 Aug 2025 18:40:12 -0700 Subject: [PATCH 1/4] [clang][PAC] Make ptrauth_qualifier and ptrauth_intrinsic Darw

[clang] [clang][PAC] ptrauth_qualifier and ptrauth_intrinsic should only be available on Darwin (PR #153912)

2025-08-18 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/153912 >From ea731927d6bdf85a3cdb333b756447658f2c2ea6 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Fri, 15 Aug 2025 18:40:12 -0700 Subject: [PATCH 1/3] [clang][PAC] Make ptrauth_qualifier and ptrauth_intrinsic Darw

[clang] [clang][PAC] ptrauth_qualifier and ptrauth_intrinsic should only be available on Darwin (PR #153912)

2025-08-18 Thread Oliver Hunt via cfe-commits
@@ -1528,6 +1528,9 @@ static void InitializePredefinedMacros(const TargetInfo &TI, #undef TARGET_OS } + if (LangOpts.PointerAuthIntrinsics) +Builder.defineMacro("__PTRAUTH__"); ojhunt wrote: I think the complexity of the ptrauth abi surface area means

[clang] [clang][PAC] ptrauth_qualifier and ptrauth_intrinsic should only be available on Darwin (PR #153912)

2025-08-18 Thread Oliver Hunt via cfe-commits
@@ -1089,6 +1089,7 @@ static void ComputeDATE_TIME(SourceLocation &DATELoc, SourceLocation &TIMELoc, /// specified by the identifier as a standard language feature. static bool HasFeature(const Preprocessor &PP, StringRef Feature) { const LangOptions &LangOpts = PP.getLangOp

[clang] [clang][ObjC] Fix incorrect return type inference for discarded blocks (PR #154109)

2025-08-18 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt created https://github.com/llvm/llvm-project/pull/154109 When parsing a block expression we were not entering a new eval context and as a result when parsing the block body we continue to treat any return statements as discarded so infer a `void` result. This fixes t

[clang] [clang] return type not correctly deduced for discarded lambdas (PR #153921)

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

[clang] [clang] Add an ABI_EXTENSION concept that is testable under -pedantic… (PR #153506)

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

[clang] [clang] Add an ABI_EXTENSION concept that is testable under -pedantic… (PR #153506)

2025-08-17 Thread Oliver Hunt via cfe-commits
ojhunt wrote: Closing, as for the current critical case (ptrauth) we're keeping the tests as a feature when the target is arm64e, and adding a ``__PTRAUTH__`` define that will be the correct test going forward. https://github.com/llvm/llvm-project/pull/153506 __

[clang] [clang][PAC] ptrauth_qualifier and ptrauth_intrinsic should only be available on Darwin (PR #153912)

2025-08-17 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/153912 >From ea731927d6bdf85a3cdb333b756447658f2c2ea6 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Fri, 15 Aug 2025 18:40:12 -0700 Subject: [PATCH 1/2] [clang][PAC] Make ptrauth_qualifier and ptrauth_intrinsic Darw

[clang] [clang][PAC] ptrauth_qualifier and ptrauth_intrinsic should only be available on Darwin (PR #153912)

2025-08-17 Thread Oliver Hunt via cfe-commits
ojhunt wrote: I realized that this can't be made to work nicely and automatically no matter how much I would like it to as of course the macro based version of `__has_ptrauth_feature` can't check for a macro being defined in expression contexts. Oh well, I guess that dream is over. I'll just s

[clang] [clang] return type not correctly deduced for discarded lambdas (PR #153921)

2025-08-17 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/153921 >From cee36b9d023f97b55bf01220ccd6f404311db339 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Fri, 15 Aug 2025 21:04:07 -0700 Subject: [PATCH 1/2] [clang] return type not correctly deduced for discarded lambda

[clang] [clang] return type not correctly deduced for discarded lambdas (PR #153921)

2025-08-17 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt ready_for_review https://github.com/llvm/llvm-project/pull/153921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] return type not correctly deduced for discarded lambdas (PR #153921)

2025-08-17 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt edited https://github.com/llvm/llvm-project/pull/153921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] return type not correctly deduced for discarded lambdas (PR #153921)

2025-08-17 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/153921 >From cee36b9d023f97b55bf01220ccd6f404311db339 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Fri, 15 Aug 2025 21:04:07 -0700 Subject: [PATCH 1/2] [clang] return type not correctly deduced for discarded lambda

[clang] [clang] return type not correctly deduced for discarded lambdas (PR #153921)

2025-08-17 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/153921 >From cee36b9d023f97b55bf01220ccd6f404311db339 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Fri, 15 Aug 2025 21:04:07 -0700 Subject: [PATCH] [clang] return type not correctly deduced for discarded lambdas T

[clang] [clang][PAC][darwin] Set correct default ptrauth features for arm64e-darwin (PR #153722)

2025-08-17 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/153722 >From 0cbb0846f270c6d6cb15492ba34ff9ae2ed33f67 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Thu, 14 Aug 2025 17:43:03 -0700 Subject: [PATCH 1/5] [clang][PAC][darwin] Set correct default ptrauth features for

[clang] [clang][PAC][darwin] Set correct default ptrauth features for arm64e-darwin (PR #153722)

2025-08-17 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/153722 >From 0cbb0846f270c6d6cb15492ba34ff9ae2ed33f67 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Thu, 14 Aug 2025 17:43:03 -0700 Subject: [PATCH 1/4] [clang][PAC][darwin] Set correct default ptrauth features for

[clang] [clang][PAC][darwin] Set correct default ptrauth features for arm64e-darwin (PR #153722)

2025-08-17 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/153722 >From 0cbb0846f270c6d6cb15492ba34ff9ae2ed33f67 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Thu, 14 Aug 2025 17:43:03 -0700 Subject: [PATCH 1/3] [clang][PAC][darwin] Set correct default ptrauth features for

[clang] [clang][PAC] ptrauth_qualifier and ptrauth_intrinsic should only be available on Darwin (PR #153912)

2025-08-17 Thread Oliver Hunt via cfe-commits
ojhunt wrote: Today, in the correct PR: @AaronBallman @cor3ntin I have an idea, and I'd like to see what you think. We currently have the misery of these has_feature checks, I'm wondering if we can make them _all_ darwin only, so for each one, say ptrauth_calls we add a predefined macro like

[clang] [clang] return type not correctly deduced for discarded lambdas (PR #153921)

2025-08-16 Thread Oliver Hunt via cfe-commits
ojhunt wrote: @AaronBallman @cor3ntin I have an idea, and I'd like to see what you think. We currently have the misery of these has_feature checks, I'm wondering if we can make them _all_ darwin only, so for each one, say ptrauth_calls we add a predefined macro like `__PTRAUTH_ABI_PTRAUTH_CALL

[clang] [clang] return type not correctly deduced for discarded lambdas (PR #153921)

2025-08-16 Thread Oliver Hunt via cfe-commits
ojhunt wrote: > ```c++ > auto x = [](U, U = U::bar) {}; > ``` I think I technically knew you could have templated lambdas, but I certainly forgot about it entirely :D What I'm trying to construct is something that would not trigger an error if it was wrapped in an `if constexpr(0)` inside t

[clang] [clang] return type not correctly deduced for discarded lambdas (PR #153921)

2025-08-16 Thread Oliver Hunt via cfe-commits
ojhunt wrote: > This should work > > ```diff > diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp > b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp > index f02a295220ef..6b423ce06523 100644 > --- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp > +++ b/clang/lib/Sema/SemaTemplateInsta

[clang] [clang][PAC][darwin] Set correct default ptrauth features for arm64e-darwin (PR #153722)

2025-08-16 Thread Oliver Hunt via cfe-commits
@@ -0,0 +1,85 @@ +// RUN: %clang -target arm64 -DNO_DEFAULT_PTRAUTH %s -fsyntax-only -Xclang -verify=no_default_ptrauth +// RUN: %clang -target arm64-apple-macosx -DNO_DEFAULT_PTRAUTH %s -fsyntax-only -Xclang -verify=no_default_ptrauth +// RUN: %cl

[clang] [clang][PAC][darwin] Set correct default ptrauth features for arm64e-darwin (PR #153722)

2025-08-16 Thread Oliver Hunt via cfe-commits
@@ -0,0 +1,85 @@ +// RUN: %clang -target arm64 -DNO_DEFAULT_PTRAUTH %s -fsyntax-only -Xclang -verify=no_default_ptrauth +// RUN: %clang -target arm64-apple-macosx -DNO_DEFAULT_PTRAUTH %s -fsyntax-only -Xclang -verify=no_default_ptrauth +// RUN: %cl

[clang] [clang][PAC][darwin] Set correct default ptrauth features for arm64e-darwin (PR #153722)

2025-08-16 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt edited https://github.com/llvm/llvm-project/pull/153722 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PAC][darwin] Set correct default ptrauth features for arm64e-darwin (PR #153722)

2025-08-16 Thread Oliver Hunt via cfe-commits
@@ -3291,6 +3291,39 @@ void Darwin::addClangTargetOptions( if (!RequiresSubdirectorySearch) CC1Args.push_back("-fno-modulemap-allow-subdirectory-search"); } + + if (getTriple().isArm64e()) { ojhunt wrote: I've done this - the out of date-ness was

[clang] [clang][PAC][darwin] Set correct default ptrauth features for arm64e-darwin (PR #153722)

2025-08-16 Thread Oliver Hunt via cfe-commits
@@ -3291,6 +3291,39 @@ void Darwin::addClangTargetOptions( if (!RequiresSubdirectorySearch) CC1Args.push_back("-fno-modulemap-allow-subdirectory-search"); } + + if (getTriple().isArm64e()) { +auto EnsureDefaultPtrauthFlag = [&](OptSpecifier Pos, OptSpecifier Ne

[clang] [clang][PAC] ptrauth_qualifier and ptrauth_intrinsic should only be available on Darwin (PR #153912)

2025-08-16 Thread Oliver Hunt via cfe-commits
@@ -1528,6 +1528,9 @@ static void InitializePredefinedMacros(const TargetInfo &TI, #undef TARGET_OS } + if (LangOpts.PointerAuthIntrinsics) +Builder.defineMacro("__PTRAUTH__"); ojhunt wrote: I think @AaronBallman had an opinion on the `__` suffix - I

[clang] [clang][PAC] ptrauth_qualifier and ptrauth_intrinsic should only be available on Darwin (PR #153912)

2025-08-16 Thread Oliver Hunt via cfe-commits
@@ -1528,6 +1528,9 @@ static void InitializePredefinedMacros(const TargetInfo &TI, #undef TARGET_OS } + if (LangOpts.PointerAuthIntrinsics) +Builder.defineMacro("__PTRAUTH__"); ojhunt wrote: (we have __ARM_FEATURE_PAUTH already) https://github.com/ll

[clang] [clang][PAC] ptrauth_qualifier and ptrauth_intrinsic should only be available on Darwin (PR #153912)

2025-08-16 Thread Oliver Hunt via cfe-commits
@@ -1528,6 +1528,9 @@ static void InitializePredefinedMacros(const TargetInfo &TI, #undef TARGET_OS } + if (LangOpts.PointerAuthIntrinsics) +Builder.defineMacro("__PTRAUTH__"); ojhunt wrote: Ok, so there's an existing `__ARM_FEATURE_PAUTH` but that do

[clang] [clang][PAC] ptrauth_qualifier and ptrauth_intrinsic should only be available on Darwin (PR #153912)

2025-08-16 Thread Oliver Hunt via cfe-commits
@@ -1528,6 +1528,9 @@ static void InitializePredefinedMacros(const TargetInfo &TI, #undef TARGET_OS } + if (LangOpts.PointerAuthIntrinsics) +Builder.defineMacro("__PTRAUTH__"); ojhunt wrote: I don't believe gcc has any support as yet? I recall talking

[clang] [clang][PAC] ptrauth_qualifier and ptrauth_intrinsic should only be available on Darwin (PR #153912)

2025-08-16 Thread Oliver Hunt via cfe-commits
@@ -147,8 +147,8 @@ FEATURE(type_sanitizer, LangOpts.Sanitize.has(SanitizerKind::Type)) FEATURE(thread_sanitizer, LangOpts.Sanitize.has(SanitizerKind::Thread)) FEATURE(dataflow_sanitizer, LangOpts.Sanitize.has(SanitizerKind::DataFlow)) FEATURE(scudo, LangOpts.Sanitize.hasOneOf

[clang] [clang][PAC] ptrauth_qualifier and ptrauth_intrinsic should only be available on Darwin (PR #153912)

2025-08-16 Thread Oliver Hunt via cfe-commits
@@ -1089,6 +1089,7 @@ static void ComputeDATE_TIME(SourceLocation &DATELoc, SourceLocation &TIMELoc, /// specified by the identifier as a standard language feature. static bool HasFeature(const Preprocessor &PP, StringRef Feature) { const LangOptions &LangOpts = PP.getLangOp

[clang] [clang] return type not correctly deduced for discarded lambdas (PR #153921)

2025-08-15 Thread Oliver Hunt via cfe-commits
ojhunt wrote: @mizvekov @cor3ntin ok, I think the actual issue is in `Sema::PushExpressionEvaluationContext`. When pushing a new evaluation context down we all set the new context's `InDiscardedStatement` state to its parent's state. I think for lambda expressions that is incorrect as it mean

[clang] [clang] return type not correctly deduced for discarded lambdas (PR #153921)

2025-08-15 Thread Oliver Hunt via cfe-commits
ojhunt wrote: > Yes the correct behavior for return type deduction for a function with no > non-discarded return statements is for it to be deduced as void: > https://godbolt.org/z/qaYebb5q9 Right, once you pointed it out I remembered that not all of the semantic/erroneous code in discarded s

[clang] [clang] return type not correctly deduced for discarded lambdas (PR #153921)

2025-08-15 Thread Oliver Hunt via cfe-commits
ojhunt wrote: Out of curiosity I looked at this, and here we do end up doing the right thing, though I assume in the case of an inferred return we end up simply ignoring the interior branch of the `if(0)` entirely: ```cpp auto f() { auto l = [](auto) { return true; }; if constexpr (0)

[clang] [clang] return type not correctly deduced for discarded lambdas (PR #153921)

2025-08-15 Thread Oliver Hunt via cfe-commits
ojhunt wrote: > Yeah this is not correct, simply removing that return statement will cause us > to attempt to use a discarded return statement for return type deduction > purposes, but that is not supposed to happen. Ah yeah, I had misunderstood (again) the rules for when otherwise discarded

[clang] [clang] return type not correctly deduced for discarded lambdas (PR #153921)

2025-08-15 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt converted_to_draft https://github.com/llvm/llvm-project/pull/153921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] return type not correctly deduced for discarded lambdas (PR #153921)

2025-08-15 Thread Oliver Hunt via cfe-commits
ojhunt wrote: @cor3ntin This is not actually correct as it fails to handle the not all paths return case. The problem here is that I don't really know just how the full deduction path handles that? (I'll continue to prod around but this area is not familiar to me) https://github.com/llvm/llvm

[clang] [clang] return type not correctly deduced for discarded lambdas (PR #153921)

2025-08-15 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt created https://github.com/llvm/llvm-project/pull/153921 The early return for lamda expressions with deduced return types in Sema::ActOnCapScopeReturnStmt meant that we were not actually perform the required return type deduction for such lambdas when in a discarded c

[clang] [clang-tools-extra] [flang] [lldb] [llvm] [mlir] [openmp] [Clang] unrecognized html tag causing undesirable comment lexing (PR #152944)

2025-08-15 Thread Oliver Hunt via cfe-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?=,Zhaoxuan Jiang ,Bill Wendling ,Morris Hafner ,David Green , Valentin Clement =?utf-8?b?KOODkOODrOODsw=?=,Alex Bradbury ,DeanSturtevant1 ,Valentin Clement =?utf-8?b?KOODkOODrOODsw=?=,Craig Topper ,DeanSturtevant1 , Valentin Clement =?utf-8?b?KOODkOOD

[clang] [clang-tools-extra] [flang] [lldb] [llvm] [mlir] [openmp] [Clang] unrecognized html tag causing undesirable comment lexing (PR #152944)

2025-08-15 Thread Oliver Hunt via cfe-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw==?=,Zhaoxuan Jiang ,Bill Wendling ,Morris Hafner ,David Green , Valentin Clement =?utf-8?b?KOODkOODrOODsw==?=,Alex Bradbury ,DeanSturtevant1 ,Valentin Clement =?utf-8?b?KOODkOODrOODsw==?=,Craig Topper ,DeanSturtevant1 , Valentin Clement =?utf-8?b?KOODk

[clang] [NFC][Clang][Docs] Update Pointer Authentication documentation (PR #152596)

2025-08-15 Thread Oliver Hunt via cfe-commits
@@ -255,33 +260,160 @@ signing schema breaks down even more simply: It is important that the signing schema be independently derived at all signing and authentication sites. Preferably, the schema should be hard-coded everywhere it is needed, but at the very least, it must not

[clang] [NFC][Clang][Docs] Update Pointer Authentication documentation (PR #152596)

2025-08-15 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/152596 >From 8776323a7ef1dd625f1fbd02fab912a2dc8e2081 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Thu, 7 Aug 2025 13:42:48 -0700 Subject: [PATCH 1/5] [NFC][Clang][Docs] Update Pointer Authentication documentation

[clang] [clang][PAC] ptrauth_qualifier and ptrauth_intrinsic should only be available on Darwin (PR #153912)

2025-08-15 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt edited https://github.com/llvm/llvm-project/pull/153912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PAC] ptrauth_qualifier and ptrauth_intrinsic should only be available on Darwin (PR #153912)

2025-08-15 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt created https://github.com/llvm/llvm-project/pull/153912 For backwards compatibility reasons the ptrauth_qualifier and ptrauth_intrinsic features need to be testable with __has_feature() on Apple platforms, but for other platforms this backwards compatibility issue do

[clang] [clang][PAC][darwin] Set correct default ptrauth features for arm64e-darwin (PR #153722)

2025-08-15 Thread Oliver Hunt via cfe-commits
@@ -0,0 +1,85 @@ +// RUN: %clang -target arm64 -DNO_DEFAULT_PTRAUTH %s -fsyntax-only -Xclang -verify=no_default_ptrauth +// RUN: %clang -target arm64-apple-macosx -DNO_DEFAULT_PTRAUTH %s -fsyntax-only -Xclang -verify=no_default_ptrauth +// RUN: %cl

[clang] [clang][PAC][darwin] Set correct default ptrauth features for arm64e-darwin (PR #153722)

2025-08-15 Thread Oliver Hunt via cfe-commits
@@ -0,0 +1,85 @@ +// RUN: %clang -target arm64 -DNO_DEFAULT_PTRAUTH %s -fsyntax-only -Xclang -verify=no_default_ptrauth +// RUN: %clang -target arm64-apple-macosx -DNO_DEFAULT_PTRAUTH %s -fsyntax-only -Xclang -verify=no_default_ptrauth +// RUN: %cl

[clang] [clang][PAC][darwin] Set correct default ptrauth features for arm64e-darwin (PR #153722)

2025-08-15 Thread Oliver Hunt via cfe-commits
@@ -3291,6 +3291,39 @@ void Darwin::addClangTargetOptions( if (!RequiresSubdirectorySearch) CC1Args.push_back("-fno-modulemap-allow-subdirectory-search"); } + + if (getTriple().isArm64e()) { +auto EnsureDefaultPtrauthFlag = [&](OptSpecifier Pos, OptSpecifier Ne

[clang] [clang][PAC][darwin] Set correct default ptrauth features for arm64e-darwin (PR #153722)

2025-08-15 Thread Oliver Hunt via cfe-commits
@@ -0,0 +1,85 @@ +// RUN: %clang -target arm64 -DNO_DEFAULT_PTRAUTH %s -fsyntax-only -Xclang -verify=no_default_ptrauth +// RUN: %clang -target arm64-apple-macosx -DNO_DEFAULT_PTRAUTH %s -fsyntax-only -Xclang -verify=no_default_ptrauth +// RUN: %cl

[clang] [clang][Diagnostic] Clarify error message for auto (PR #149781)

2025-08-15 Thread Oliver Hunt via cfe-commits
@@ -8229,24 +8229,37 @@ Sema::CheckTemplateDeclScope(Scope *S, TemplateParameterList *TemplateParams) { // C++ [temp.class.spec]p6: [P2096] // A partial specialization may be declared in any scope in which the // corresponding primary template may be defined. + auto

[clang] [clang][Diagnostic] Clarify error message for auto (PR #149781)

2025-08-15 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt edited https://github.com/llvm/llvm-project/pull/149781 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Diagnostic] Clarify error message for auto (PR #149781)

2025-08-15 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt requested changes to this pull request. minor style nits, but needs some more tests added https://github.com/llvm/llvm-project/pull/149781 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [clang][Diagnostic] Clarify error message for auto (PR #149781)

2025-08-15 Thread Oliver Hunt via cfe-commits
@@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +void foo() { + struct Local { +template // expected-error {{member templates are not allowed inside local classes}} ojhunt wrote: Given the original issue, there should be a test for a functio

[clang] [Clang] unrecognized html tag causing undesirable comment lexing (PR #152944)

2025-08-15 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt commented: The html tag updates looks good to me - tags are correctly described. There should be tests for each tag however. As @cor3ntin has reviewed previously, I'd like his sign off - but as a question to him: do we expect tests for invalid/unclosed tags? my defau

[clang] [clang] Add an ABI_EXTENSION concept that is testable under -pedantic… (PR #153506)

2025-08-15 Thread Oliver Hunt via cfe-commits
ojhunt wrote: @AaronBallman I'm not sure this is the correct approach but will leave it up for now https://github.com/llvm/llvm-project/pull/153506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [Clang][Bytecode][NFC] Move Result into APSInt constructor (PR #153664)

2025-08-15 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt approved this pull request. Looks fine to me - really falls into the bucket of things it would be nice to be able to somehow turn into a (locally determinable) warning rather than depending on static analysis. https://github.com/llvm/llvm-project/pull/153664 _

[clang] [NFC][Clang][Docs] Update Pointer Authentication documentation (PR #152596)

2025-08-14 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/152596 >From 8776323a7ef1dd625f1fbd02fab912a2dc8e2081 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Thu, 7 Aug 2025 13:42:48 -0700 Subject: [PATCH 1/4] [NFC][Clang][Docs] Update Pointer Authentication documentation

[clang] [NFC][Clang][Docs] Update Pointer Authentication documentation (PR #152596)

2025-08-14 Thread Oliver Hunt via cfe-commits
@@ -255,33 +260,160 @@ signing schema breaks down even more simply: It is important that the signing schema be independently derived at all signing and authentication sites. Preferably, the schema should be hard-coded everywhere it is needed, but at the very least, it must not

[clang] [NFC][Clang][Docs] Update Pointer Authentication documentation (PR #152596)

2025-08-14 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/152596 >From 8776323a7ef1dd625f1fbd02fab912a2dc8e2081 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Thu, 7 Aug 2025 13:42:48 -0700 Subject: [PATCH 1/3] [NFC][Clang][Docs] Update Pointer Authentication documentation

[clang] [clang][PAC][darwin] Set correct default ptrauth features for arm64e-darwin (PR #153722)

2025-08-14 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt created https://github.com/llvm/llvm-project/pull/153722 This PR makes sure that when targeting arm64e on darwin platforms the correct flags are set for the userspace platform ABI. >From eaeb3b514f56bb7f638712cb938c72de4b17dc14 Mon Sep 17 00:00:00 2001 From: Oliver Hu

[clang] [clang][Obj-C][PAC] Make block descriptor pointer signing configurable (PR #153700)

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

[clang] [clang][Obj-C][PAC] Make block descriptor pointer signing configurable (PR #153700)

2025-08-14 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/153700 >From 0ec32635312dd35a38d75df53d58541817a25c17 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Sat, 9 Aug 2025 21:28:40 -0700 Subject: [PATCH 1/2] [clang][Obj-C][PAC] Make block descriptor pointer signing confi

  1   2   3   4   5   6   7   8   >