[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-11-07 Thread Pavel Yaskevich via cfe-commits
xedin wrote: I think if `noderef` attribute instantiations in your example are considered unique when they appear in different spots then we should have two distinct attributed types but it sounds like both of `noderef` should have one `Attr *` instantiation... https://github.com/llvm/llvm-pr

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-10-30 Thread Pavel Yaskevich via cfe-commits
xedin wrote: @erichkeane CI are green, could you please merge since I don't have permissions?... https://github.com/llvm/llvm-project/pull/108631 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-10-30 Thread Pavel Yaskevich via cfe-commits
https://github.com/xedin updated https://github.com/llvm/llvm-project/pull/108631 >From a66d820647c927dee23498cd12338748f4079688 Mon Sep 17 00:00:00 2001 From: Pavel Yaskevich Date: Wed, 20 Dec 2023 14:04:22 -0800 Subject: [PATCH] [clang/AST] Make it possible to use SwiftAttr in type context S

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-10-30 Thread Pavel Yaskevich via cfe-commits
https://github.com/xedin updated https://github.com/llvm/llvm-project/pull/108631 >From a66d820647c927dee23498cd12338748f4079688 Mon Sep 17 00:00:00 2001 From: Pavel Yaskevich Date: Wed, 20 Dec 2023 14:04:22 -0800 Subject: [PATCH] [clang/AST] Make it possible to use SwiftAttr in type context S

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-10-30 Thread Pavel Yaskevich via cfe-commits
https://github.com/xedin updated https://github.com/llvm/llvm-project/pull/108631 >From a66d820647c927dee23498cd12338748f4079688 Mon Sep 17 00:00:00 2001 From: Pavel Yaskevich Date: Wed, 20 Dec 2023 14:04:22 -0800 Subject: [PATCH] [clang/AST] Make it possible to use SwiftAttr in type context S

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-10-30 Thread Pavel Yaskevich via cfe-commits
xedin wrote: No worries, I can just rebase and push force, that should do it :) https://github.com/llvm/llvm-project/pull/108631 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-10-30 Thread Pavel Yaskevich via cfe-commits
xedin wrote: @erichkeane I don't think swift_attr is intended in that context but I don't see how these changes regress existing uses. https://github.com/llvm/llvm-project/pull/108631 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-10-30 Thread Pavel Yaskevich via cfe-commits
xedin wrote: @erichkeane friendly ping about this, I replied to your last question wondering if it would be okay to land this or should I close since it has been awhile now. https://github.com/llvm/llvm-project/pull/108631 ___ cfe-commits mailing list

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-09-26 Thread Pavel Yaskevich via cfe-commits
xedin wrote: Updated release notes and added block tests requested by @Xazax-hun. https://github.com/llvm/llvm-project/pull/108631 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-09-26 Thread Pavel Yaskevich via cfe-commits
@@ -7147,6 +7147,60 @@ static bool HandleWebAssemblyFuncrefAttr(TypeProcessingState &State, return false; } +static void HandleSwiftAttr(TypeProcessingState &State, TypeAttrLocation TAL, +QualType &QT, ParsedAttr &PAttr) { + if (TAL == TAL_DeclN

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-09-26 Thread Pavel Yaskevich via cfe-commits
https://github.com/xedin updated https://github.com/llvm/llvm-project/pull/108631 >From c8784f8c9b0d7c66d924736476e7e112a92cf20a Mon Sep 17 00:00:00 2001 From: Pavel Yaskevich Date: Wed, 20 Dec 2023 14:04:22 -0800 Subject: [PATCH] [clang/AST] Make it possible to use SwiftAttr in type context S

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-09-26 Thread Pavel Yaskevich via cfe-commits
xedin wrote: > That being said, one question is whether we actually need type attributes to > be propagated in this case for Swift's interop. I don't think we do, we need swift_attr to help us augment Objective-C APIs to make existing frameworks pray well with Swift concurrency. I think C++ I

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-09-20 Thread Pavel Yaskevich via cfe-commits
xedin wrote: I addressed most of the comments. A few points to add: - I'm not sure what to make of the comment regarding templates if somebody could point me to the right direction I can make appropriate changes - I'd need some guidance regarding release note - I'd prefer to keep AttributedType

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-09-20 Thread Pavel Yaskevich via cfe-commits
@@ -6037,13 +6038,24 @@ class AttributedType : public Type, public llvm::FoldingSetNode { private: friend class ASTContext; // ASTContext creates these + const Attr *Attribute; + QualType ModifiedType; QualType EquivalentType; AttributedType(QualType canon, attr

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-09-20 Thread Pavel Yaskevich via cfe-commits
@@ -7163,7 +7217,8 @@ static QualType rebuildAttributedTypeWithoutNullability(ASTContext &Ctx, Ctx, Attributed->getModifiedType()); assert(Modified.getTypePtr() != Attributed->getModifiedType().getTypePtr()); return Ctx.getAttributedType(Attributed->getAttrKind(), Mo

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-09-20 Thread Pavel Yaskevich via cfe-commits
@@ -8732,6 +8786,11 @@ static void processTypeAttrs(TypeProcessingState &state, QualType &type, case ParsedAttr::AT_HLSLParamModifier: { HandleHLSLParamModifierAttr(state, type, attr, state.getSema()); attr.setUsedAsTypeAttr(); + break; +

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-09-20 Thread Pavel Yaskevich via cfe-commits
@@ -5125,24 +5127,54 @@ QualType ASTContext::getUnresolvedUsingType( QualType ASTContext::getAttributedType(attr::Kind attrKind, QualType modifiedType, - QualType equivalentType) const { +

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-09-20 Thread Pavel Yaskevich via cfe-commits
https://github.com/xedin updated https://github.com/llvm/llvm-project/pull/108631 >From bd447428181ec9ab38679625fd3b3b422eb18446 Mon Sep 17 00:00:00 2001 From: Pavel Yaskevich Date: Wed, 20 Dec 2023 14:04:22 -0800 Subject: [PATCH] [clang/AST] Make it possible to use SwiftAttr in type context S

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-09-20 Thread Pavel Yaskevich via cfe-commits
@@ -7147,6 +7147,60 @@ static bool HandleWebAssemblyFuncrefAttr(TypeProcessingState &State, return false; } +static void HandleSwiftAttr(TypeProcessingState &State, TypeAttrLocation TAL, +QualType &QT, ParsedAttr &PAttr) { + if (TAL == TAL_DeclN

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-09-20 Thread Pavel Yaskevich via cfe-commits
@@ -6037,13 +6038,24 @@ class AttributedType : public Type, public llvm::FoldingSetNode { private: friend class ASTContext; // ASTContext creates these + const Attr *Attribute; + QualType ModifiedType; QualType EquivalentType; AttributedType(QualType canon, attr

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-09-18 Thread Pavel Yaskevich via cfe-commits
@@ -6037,13 +6038,24 @@ class AttributedType : public Type, public llvm::FoldingSetNode { private: friend class ASTContext; // ASTContext creates these + const Attr *Attribute; + QualType ModifiedType; QualType EquivalentType; AttributedType(QualType canon, attr

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-09-17 Thread Pavel Yaskevich via cfe-commits
@@ -8732,6 +8786,11 @@ static void processTypeAttrs(TypeProcessingState &state, QualType &type, case ParsedAttr::AT_HLSLParamModifier: { HandleHLSLParamModifierAttr(state, type, attr, state.getSema()); attr.setUsedAsTypeAttr(); + break; +

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-09-17 Thread Pavel Yaskevich via cfe-commits
@@ -6037,13 +6038,24 @@ class AttributedType : public Type, public llvm::FoldingSetNode { private: friend class ASTContext; // ASTContext creates these + const Attr *Attribute; + QualType ModifiedType; QualType EquivalentType; AttributedType(QualType canon, attr

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-09-17 Thread Pavel Yaskevich via cfe-commits
@@ -5125,24 +5127,54 @@ QualType ASTContext::getUnresolvedUsingType( QualType ASTContext::getAttributedType(attr::Kind attrKind, QualType modifiedType, - QualType equivalentType) const { +

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-09-13 Thread Pavel Yaskevich via cfe-commits
https://github.com/xedin created https://github.com/llvm/llvm-project/pull/108631 Swift ClangImporter now supports concurrency annotations on imported declarations and their parameters/results, to make it possible to use imported APIs in Swift safely there has to be a way to annotate individua