[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-16 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan updated https://github.com/llvm/llvm-project/pull/73017 >From 447aabfbf20c8d286caf6ad3f2e30da116592860 Mon Sep 17 00:00:00 2001 From: Egor Zhdan Date: Mon, 20 Nov 2023 18:03:18 + Subject: [PATCH 1/3] [APINotes] Upstream attributes that are created implicitly

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-16 Thread Egor Zhdan via cfe-commits
egorzhdan wrote: > Do we want to submit the first three in the series and then take on the > topmost commit? Sounds good, let me remove the 4th commit from this PR https://github.com/llvm/llvm-project/pull/73017 ___ cfe-commits mailing list

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-16 Thread Saleem Abdulrasool via cfe-commits
compnerd wrote: Do we want to submit the first three in the series and then take on the topmost commit? https://github.com/llvm/llvm-project/pull/73017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-16 Thread Saleem Abdulrasool via cfe-commits
@@ -7539,74 +7559,65 @@ static NullabilityKind mapNullabilityAttrKind(ParsedAttr::Kind kind) { } } -/// Applies a nullability type specifier to the given type, if possible. -/// -/// \param state The type processing state. -/// -/// \param type The type to which the

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-16 Thread Saleem Abdulrasool via cfe-commits
@@ -2601,6 +2604,22 @@ def SwiftError : InheritableAttr { let Documentation = [SwiftErrorDocs]; } +def SwiftImportAsNonGeneric : InheritableAttr { compnerd wrote: Ah, okay. https://github.com/llvm/llvm-project/pull/73017

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-15 Thread Egor Zhdan via cfe-commits
@@ -7539,74 +7559,65 @@ static NullabilityKind mapNullabilityAttrKind(ParsedAttr::Kind kind) { } } -/// Applies a nullability type specifier to the given type, if possible. -/// -/// \param state The type processing state. -/// -/// \param type The type to which the

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-15 Thread Egor Zhdan via cfe-commits
@@ -7519,6 +7519,26 @@ static bool HandleWebAssemblyFuncrefAttr(TypeProcessingState , return false; } +/// Rebuild an attributed type without the nullability attribute on it. +static QualType rebuildAttributedTypeWithoutNullability(ASTContext , +

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-15 Thread Egor Zhdan via cfe-commits
@@ -7519,6 +7519,26 @@ static bool HandleWebAssemblyFuncrefAttr(TypeProcessingState , return false; } +/// Rebuild an attributed type without the nullability attribute on it. +static QualType rebuildAttributedTypeWithoutNullability(ASTContext , +

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-15 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan updated https://github.com/llvm/llvm-project/pull/73017 >From 447aabfbf20c8d286caf6ad3f2e30da116592860 Mon Sep 17 00:00:00 2001 From: Egor Zhdan Date: Mon, 20 Nov 2023 18:03:18 + Subject: [PATCH 1/4] [APINotes] Upstream attributes that are created implicitly

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-15 Thread Egor Zhdan via cfe-commits
@@ -15139,6 +15139,37 @@ void Sema::DiagnoseSizeOfParametersAndReturnValue( } } +QualType Sema::AdjustParameterTypeForObjCAutoRefCount(QualType T, + SourceLocation NameLoc, +

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-15 Thread Egor Zhdan via cfe-commits
@@ -7539,74 +7559,65 @@ static NullabilityKind mapNullabilityAttrKind(ParsedAttr::Kind kind) { } } -/// Applies a nullability type specifier to the given type, if possible. -/// -/// \param state The type processing state. -/// -/// \param type The type to which the

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-15 Thread Egor Zhdan via cfe-commits
@@ -2622,6 +2641,31 @@ def SwiftPrivate : InheritableAttr { let SimpleHandler = 1; } +def SwiftVersioned : Attr { + // This attribute has no spellings as it is only ever created implicitly + // from API notes. + let Spellings = []; + let Args =

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-15 Thread Egor Zhdan via cfe-commits
@@ -2622,6 +2641,31 @@ def SwiftPrivate : InheritableAttr { let SimpleHandler = 1; } +def SwiftVersioned : Attr { egorzhdan wrote: Done, renamed it https://github.com/llvm/llvm-project/pull/73017 ___ cfe-commits

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-15 Thread Egor Zhdan via cfe-commits
@@ -2601,6 +2604,22 @@ def SwiftError : InheritableAttr { let Documentation = [SwiftErrorDocs]; } +def SwiftImportAsNonGeneric : InheritableAttr { egorzhdan wrote: It is still used for `NSDictionary`, `NSSet` and friends in Foundation.

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-15 Thread Egor Zhdan via cfe-commits
@@ -301,6 +301,9 @@ class VariadicEnumArgument values, bit IsExternalType = isExternalType; } +// Represents an attribute wrapped by another attribute. +class AttrArgument : Argument; egorzhdan wrote: Makes sense to me! Renamed to `WrappedAttr` to match

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-15 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan updated https://github.com/llvm/llvm-project/pull/73017 >From 447aabfbf20c8d286caf6ad3f2e30da116592860 Mon Sep 17 00:00:00 2001 From: Egor Zhdan Date: Mon, 20 Nov 2023 18:03:18 + Subject: [PATCH 1/4] [APINotes] Upstream attributes that are created implicitly

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-15 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan updated https://github.com/llvm/llvm-project/pull/73017 >From 0cbb267cd3b18308acd3fc0b3b68132a2090b5b6 Mon Sep 17 00:00:00 2001 From: Egor Zhdan Date: Mon, 20 Nov 2023 18:03:18 + Subject: [PATCH 1/4] [APINotes] Upstream attributes that are created implicitly

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-12 Thread Saleem Abdulrasool via cfe-commits
@@ -7519,6 +7519,26 @@ static bool HandleWebAssemblyFuncrefAttr(TypeProcessingState , return false; } +/// Rebuild an attributed type without the nullability attribute on it. +static QualType rebuildAttributedTypeWithoutNullability(ASTContext , +

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-12 Thread Saleem Abdulrasool via cfe-commits
@@ -7539,74 +7559,65 @@ static NullabilityKind mapNullabilityAttrKind(ParsedAttr::Kind kind) { } } -/// Applies a nullability type specifier to the given type, if possible. -/// -/// \param state The type processing state. -/// -/// \param type The type to which the

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-12 Thread Saleem Abdulrasool via cfe-commits
@@ -7519,6 +7519,26 @@ static bool HandleWebAssemblyFuncrefAttr(TypeProcessingState , return false; } +/// Rebuild an attributed type without the nullability attribute on it. +static QualType rebuildAttributedTypeWithoutNullability(ASTContext , +

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-12 Thread Saleem Abdulrasool via cfe-commits
@@ -15139,6 +15139,37 @@ void Sema::DiagnoseSizeOfParametersAndReturnValue( } } +QualType Sema::AdjustParameterTypeForObjCAutoRefCount(QualType T, + SourceLocation NameLoc, +

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-12 Thread Saleem Abdulrasool via cfe-commits
@@ -7539,74 +7559,65 @@ static NullabilityKind mapNullabilityAttrKind(ParsedAttr::Kind kind) { } } -/// Applies a nullability type specifier to the given type, if possible. -/// -/// \param state The type processing state. -/// -/// \param type The type to which the

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-12 Thread Saleem Abdulrasool via cfe-commits
@@ -15139,6 +15139,37 @@ void Sema::DiagnoseSizeOfParametersAndReturnValue( } } +QualType Sema::AdjustParameterTypeForObjCAutoRefCount(QualType T, + SourceLocation NameLoc, +

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-12 Thread Saleem Abdulrasool via cfe-commits
@@ -2622,6 +2641,31 @@ def SwiftPrivate : InheritableAttr { let SimpleHandler = 1; } +def SwiftVersioned : Attr { compnerd wrote: I think that we should name this `SwiftVersionedAddition` to match the `SwiftVersionedRemoval`.

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-12 Thread Saleem Abdulrasool via cfe-commits
@@ -2601,6 +2604,22 @@ def SwiftError : InheritableAttr { let Documentation = [SwiftErrorDocs]; } +def SwiftImportAsNonGeneric : InheritableAttr { compnerd wrote: Wasn't this attribute dropped? I thought that the last usage of this was removed from the

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-12 Thread Saleem Abdulrasool via cfe-commits
@@ -301,6 +301,9 @@ class VariadicEnumArgument values, bit IsExternalType = isExternalType; } +// Represents an attribute wrapped by another attribute. +class AttrArgument : Argument; compnerd wrote: Does it make sense to name this `WrappedAttribute`

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-12 Thread Saleem Abdulrasool via cfe-commits
@@ -2622,6 +2641,31 @@ def SwiftPrivate : InheritableAttr { let SimpleHandler = 1; } +def SwiftVersioned : Attr { + // This attribute has no spellings as it is only ever created implicitly + // from API notes. + let Spellings = []; + let Args =

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-10 Thread Egor Zhdan via cfe-commits
egorzhdan wrote: @compnerd pinging again :) https://github.com/llvm/llvm-project/pull/73017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-02 Thread Egor Zhdan via cfe-commits
egorzhdan wrote: @compnerd ping ;) https://github.com/llvm/llvm-project/pull/73017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2023-12-15 Thread Egor Zhdan via cfe-commits
egorzhdan wrote: @compnerd ping :) https://github.com/llvm/llvm-project/pull/73017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2023-11-27 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan updated https://github.com/llvm/llvm-project/pull/73017 >From 4f7e29fe46a011153b3fbeee4d93875bb1a1a233 Mon Sep 17 00:00:00 2001 From: Egor Zhdan Date: Mon, 20 Nov 2023 18:03:18 + Subject: [PATCH 1/4] [APINotes] Upstream attributes that are created implicitly

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2023-11-21 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan updated https://github.com/llvm/llvm-project/pull/73017 >From cea6998f68ffca08edb8bed555df093c8fe48d1c Mon Sep 17 00:00:00 2001 From: Egor Zhdan Date: Mon, 20 Nov 2023 18:03:18 + Subject: [PATCH 1/4] [APINotes] Upstream attributes that are created implicitly

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2023-11-21 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan updated https://github.com/llvm/llvm-project/pull/73017 >From d7d8e8520681b6a71fda9848b18828cff8ed7415 Mon Sep 17 00:00:00 2001 From: Egor Zhdan Date: Mon, 20 Nov 2023 18:03:18 + Subject: [PATCH 1/4] [APINotes] Upstream attributes that are created implicitly

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2023-11-21 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan updated https://github.com/llvm/llvm-project/pull/73017 >From ae8c604e9333b1ea54fc6e80134bdba948eeecb7 Mon Sep 17 00:00:00 2001 From: Egor Zhdan Date: Mon, 20 Nov 2023 18:03:18 + Subject: [PATCH 1/4] [APINotes] Upstream attributes that are created implicitly

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2023-11-21 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan updated https://github.com/llvm/llvm-project/pull/73017 >From ae8c604e9333b1ea54fc6e80134bdba948eeecb7 Mon Sep 17 00:00:00 2001 From: Egor Zhdan Date: Mon, 20 Nov 2023 18:03:18 + Subject: [PATCH 1/4] [APINotes] Upstream attributes that are created implicitly

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2023-11-21 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan updated https://github.com/llvm/llvm-project/pull/73017 >From ae8c604e9333b1ea54fc6e80134bdba948eeecb7 Mon Sep 17 00:00:00 2001 From: Egor Zhdan Date: Mon, 20 Nov 2023 18:03:18 + Subject: [PATCH 1/4] [APINotes] Upstream attributes that are created implicitly

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2023-11-21 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 2fe24fdc94cb10795a196eadcf3eed8055ea4000 b3b1a6c3c6774bc4158d7e273abcfbac5b5db02d --

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2023-11-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Egor Zhdan (egorzhdan) Changes This upstreams more of the Clang API Notes functionality that is currently implemented in the Apple fork: https://github.com/apple/llvm-project/tree/next/clang/lib/APINotes This is the largest chunk of the

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2023-11-21 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan created https://github.com/llvm/llvm-project/pull/73017 This upstreams more of the Clang API Notes functionality that is currently implemented in the Apple fork: https://github.com/apple/llvm-project/tree/next/clang/lib/APINotes This is the largest chunk of the