https://github.com/egorzhdan closed
https://github.com/llvm/llvm-project/pull/122516
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -19493,7 +19493,11 @@ void Sema::ActOnFields(Scope *S, SourceLocation
RecLoc, Decl *EnclosingDecl,
CDecl->setIvarRBraceLoc(RBrac);
}
}
- ProcessAPINotes(Record);
+
+ // If this is a class template instantiation, its API Notes attributes were
+ // added to the
https://github.com/egorzhdan edited
https://github.com/llvm/llvm-project/pull/122516
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/egorzhdan updated
https://github.com/llvm/llvm-project/pull/122516
>From 689b28a653eeed50a04a2fbd9286831ddfa1018b Mon Sep 17 00:00:00 2001
From: Egor Zhdan
Date: Fri, 10 Jan 2025 19:41:02 +
Subject: [PATCH] [APINotes] Avoid duplicated attributes for class template
instan
https://github.com/egorzhdan approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/118938
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -600,6 +603,15 @@ class FunctionInfo : public CommonEntityInfo {
friend bool operator==(const FunctionInfo &, const FunctionInfo &);
+ FunctionInfo &operator|=(const FunctionInfo &RHS) {
egorzhdan wrote:
Are we using this function somewhere? I can't se
@@ -24,7 +24,7 @@ const uint16_t VERSION_MAJOR = 0;
/// API notes file minor version number.
///
/// When the format changes IN ANY WAY, this number should be incremented.
-const uint16_t VERSION_MINOR = 33; // SwiftEscapable
+const uint16_t VERSION_MINOR = 34; // SwiftEscapabl
https://github.com/egorzhdan commented:
Please remember to increment the APINotes serialization version since the
format is changing in this patch.
https://github.com/llvm/llvm-project/pull/118938
___
cfe-commits mailing list
cfe-commits@lists.llvm.or
@@ -36,3 +42,29 @@
// CHECK-ESCAPABLE: Dumping EscapableType:
// CHECK-ESCAPABLE-NEXT: CXXRecordDecl {{.+}} imported in SwiftImportAs {{.+}}
struct EscapableType
// CHECK-ESCAPABLE: SwiftAttrAttr {{.+}} "Escapable"
+
+//CHECK-FUNCTION-RETURNING-FRT: Dumping functionReturningFr
https://github.com/egorzhdan edited
https://github.com/llvm/llvm-project/pull/118938
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/egorzhdan edited
https://github.com/llvm/llvm-project/pull/118938
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3,6 +3,12 @@ Name: SwiftImportAs
Tags:
- Name: ImmortalRefType
SwiftImportAs: reference
+ Methods:
+- Name: methodReturningFrt__
+- Name: methodReturningFrt_returns_unretained
+ SwiftReturnOwnership: 'returns_unretained'
+- Name: methodReturningFrt_retur
@@ -511,6 +511,10 @@ static void ProcessAPINotes(Sema &S, FunctionOrMethod
AnyFunc,
AnyTypeChanged = true;
}
+ // returns_(un)retained
+ if (!Info.SwiftReturnOwnership.empty())
+D->addAttr(SwiftAttrAttr::Create(S.Context, Info.SwiftReturnOwnership));
---
@@ -3,6 +3,12 @@ Name: SwiftImportAs
Tags:
- Name: ImmortalRefType
SwiftImportAs: reference
+ Methods:
+- Name: methodReturningFrt__
+- Name: methodReturningFrt_returns_unretained
+ SwiftReturnOwnership: 'returns_unretained'
+- Name: methodReturningFrt_retur
@@ -600,6 +603,13 @@ class FunctionInfo : public CommonEntityInfo {
friend bool operator==(const FunctionInfo &, const FunctionInfo &);
+ FunctionInfo &operator|=(const FunctionInfo &RHS) {
egorzhdan wrote:
This function needs to invoke the overload from
@@ -542,6 +542,9 @@ class FunctionInfo : public CommonEntityInfo {
/// The result type of this function, as a C type.
std::string ResultType;
+ /// Swift name of this entity.
+ std::string SwiftReturnOwnership;
egorzhdan wrote:
I think it's fine to repr
https://github.com/egorzhdan approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/117194
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/egorzhdan approved this pull request.
This seems totally reasonable.
https://github.com/llvm/llvm-project/pull/115482
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/egorzhdan edited
https://github.com/llvm/llvm-project/pull/115336
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/egorzhdan created
https://github.com/llvm/llvm-project/pull/115336
This fixes an issue where overriding
`clang::ConstTemplateArgumentVisitor::VisitTemplateArgument` in an
implementation visitor class did not have the desired effect: the overload was
not invoked when one of
@@ -132,6 +132,14 @@ Compiler options
| jan_svoboda\@apple.com (email), jansvoboda11 (Phabricator), jansvoboda11
(GitHub)
+API Notes
+
+| Egor Zhdan
+| e_zhdan\@apple.com (email), egorzhdan (GitHub), egor.zhdan (Discourse)
+
+| Saleem Abdulrasool
+| compnerd\
https://github.com/egorzhdan updated
https://github.com/llvm/llvm-project/pull/114981
>From 1bf3932e901177518632eeaa05b21a05f3d43880 Mon Sep 17 00:00:00 2001
From: Egor Zhdan
Date: Mon, 4 Nov 2024 19:52:37 +
Subject: [PATCH 1/2] Nominate Saleem and myself as maintainers for API Notes
---
https://github.com/egorzhdan updated
https://github.com/llvm/llvm-project/pull/114981
>From 1bf3932e901177518632eeaa05b21a05f3d43880 Mon Sep 17 00:00:00 2001
From: Egor Zhdan
Date: Mon, 4 Nov 2024 19:52:37 +
Subject: [PATCH] Nominate Saleem and myself as maintainers for API Notes
---
clan
https://github.com/egorzhdan created
https://github.com/llvm/llvm-project/pull/114981
Saleem has upstreamed a large chunk of API Notes infrastructure from the Apple
fork, and over the past year I've upstreamed the remaining part of API Notes,
added new annotations and improved C++ language sup
https://github.com/egorzhdan approved this pull request.
LGTM, thanks!
https://github.com/llvm/llvm-project/pull/114830
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/egorzhdan closed
https://github.com/llvm/llvm-project/pull/114042
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/egorzhdan created
https://github.com/llvm/llvm-project/pull/114042
API Notes allow annotating a C++ reference type with its retain/release
operations. These are honored by the Swift compiler when the type is used from
Swift. Apart from names of C++ functions that need to be
https://github.com/egorzhdan closed
https://github.com/llvm/llvm-project/pull/110768
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/egorzhdan approved this pull request.
https://github.com/llvm/llvm-project/pull/110768
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/egorzhdan approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/107959
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/egorzhdan closed
https://github.com/llvm/llvm-project/pull/104088
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -793,6 +827,16 @@ class YAMLConverter {
SwiftVersion);
}
+ template
+ void convertVariable(const T &Entity, VariableInfo &VI) {
egorzhdan wrote:
The existing methods that do the same thing for classes, methods, etc. are
calle
@@ -858,6 +867,62 @@ void APINotesWriter::Implementation::writeCXXMethodBlock(
}
}
+namespace {
+/// Used to serialize the on-disk C field table.
+class FieldTableInfo
+: public VersionedTableInfo
{
+public:
+ unsigned getKeyLength(key_type_ref) {
+return sizeof(ui
@@ -1252,6 +1282,81 @@ bool APINotesReader::Implementation::readCXXMethodBlock(
return false;
}
+bool APINotesReader::Implementation::readFieldBlock(
+llvm::BitstreamCursor &Cursor, llvm::SmallVectorImpl &Scratch) {
+ if (Cursor.EnterSubBlock(FIELD_BLOCK_ID))
+retur
https://github.com/egorzhdan updated
https://github.com/llvm/llvm-project/pull/104088
>From 1f41cef4dfbf19517c67586945ad9885f48a7150 Mon Sep 17 00:00:00 2001
From: Egor Zhdan
Date: Wed, 14 Aug 2024 18:37:25 +0100
Subject: [PATCH] [APINotes] Support fields of C/C++ structs
This allows annotatin
https://github.com/egorzhdan updated
https://github.com/llvm/llvm-project/pull/104088
>From 3e4c23b5cdfba147bf6598822ca4d9174c984a05 Mon Sep 17 00:00:00 2001
From: Egor Zhdan
Date: Wed, 14 Aug 2024 18:37:25 +0100
Subject: [PATCH] [APINotes] Support fields of C/C++ structs
This allows annotatin
https://github.com/egorzhdan created
https://github.com/llvm/llvm-project/pull/104088
This allows annotating fields of C/C++ structs using API Notes.
Previously API Notes supported Objective-C properties, but not fields.
rdar://131548377
>From cefe51c59177d4c69a1d556408e6a69301c07326 Mon Sep
https://github.com/egorzhdan closed
https://github.com/llvm/llvm-project/pull/102664
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1230,6 +1231,12 @@ class TagTableInfo : public
CommonTypeTableInfo {
} else {
writer.write(0);
}
+if (auto ConformsTo = TI.SwiftConformsTo) {
+ writer.write(ConformsTo->size() + 1);
+ OS.write(ConformsTo->c_str(), ConformsTo->size());
--
@@ -572,6 +572,13 @@ class TagTableInfo
ReleaseOpLength - 1);
Data += ReleaseOpLength - 1;
}
+unsigned ConformsToLength =
+endian::readNext(Data);
+if (ConformsToLength > 0) {
egorzhdan wrote:
D
https://github.com/egorzhdan updated
https://github.com/llvm/llvm-project/pull/102664
>From 4735b4c7bad13dee4bbeb819aba8ac555f842322 Mon Sep 17 00:00:00 2001
From: Egor Zhdan
Date: Fri, 9 Aug 2024 20:08:43 +0100
Subject: [PATCH] [APINotes] Support C++ tag conformances to Swift protocols
This a
https://github.com/egorzhdan created
https://github.com/llvm/llvm-project/pull/102664
This allows adding a Clang attribute
`swift_attr("conforms_to:ModuleName.ProtocolName")` to C++ structs via API
Notes.
The Swift compiler respects this attribute when importing C++ types into Swift
by autom
https://github.com/egorzhdan closed
https://github.com/llvm/llvm-project/pull/101001
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1044,11 +1044,13 @@ void Sema::ProcessAPINotes(Decl *D) {
if (auto TagContext = dyn_cast(D->getDeclContext())) {
if (auto CXXMethod = dyn_cast(D)) {
- for (auto Reader : APINotes.findAPINotes(D->getLocation())) {
-if (auto Context = UnwindTagContext(TagC
https://github.com/egorzhdan updated
https://github.com/llvm/llvm-project/pull/101001
>From 63e76d8e6576f651b7a2aa6358444e82e8a1b662 Mon Sep 17 00:00:00 2001
From: Egor Zhdan
Date: Mon, 29 Jul 2024 13:01:18 +0100
Subject: [PATCH] [APINotes] Do not crash for C++ operators
This fixes a crash dur
@@ -1044,11 +1044,13 @@ void Sema::ProcessAPINotes(Decl *D) {
if (auto TagContext = dyn_cast(D->getDeclContext())) {
if (auto CXXMethod = dyn_cast(D)) {
- for (auto Reader : APINotes.findAPINotes(D->getLocation())) {
-if (auto Context = UnwindTagContext(TagC
@@ -1044,11 +1044,13 @@ void Sema::ProcessAPINotes(Decl *D) {
if (auto TagContext = dyn_cast(D->getDeclContext())) {
if (auto CXXMethod = dyn_cast(D)) {
- for (auto Reader : APINotes.findAPINotes(D->getLocation())) {
-if (auto Context = UnwindTagContext(TagC
https://github.com/egorzhdan created
https://github.com/llvm/llvm-project/pull/101001
This fixes a crash during `CXXMethod->getName()` in `Sema::ProcessAPINotes`: we
were trying to get the name of a C++ method as a string, which fails with an
assertion if the name is not a simple identifier.
@@ -783,51 +783,76 @@ static void ProcessVersionedAPINotes(
}
}
+static std::optional
+UnwindNamespaceContext(DeclContext *DC, api_notes::APINotesManager &APINotes) {
+ if (auto NamespaceContext = dyn_cast(DC)) {
+for (auto Reader : APINotes.findAPINotes(NamespaceContex
@@ -456,6 +458,7 @@ template <> struct MappingTraits {
IO.mapOptional("EnumKind", T.EnumConvenienceKind);
IO.mapOptional("SwiftCopyable", T.SwiftCopyable);
IO.mapOptional("Methods", T.Methods);
+IO.mapOptional("Tags", T.Tags);
egorzhdan wrote:
https://github.com/egorzhdan updated
https://github.com/llvm/llvm-project/pull/99655
>From f1e3a236ca5dbc64913b0d44bdf92a30d38b8277 Mon Sep 17 00:00:00 2001
From: Egor Zhdan
Date: Fri, 19 Jul 2024 15:24:10 +0100
Subject: [PATCH] [APINotes] Support nested tags
This allows annotating C/C++ struc
@@ -783,51 +783,76 @@ static void ProcessVersionedAPINotes(
}
}
+static std::optional
+UnwindNamespaceContext(DeclContext *DC, api_notes::APINotesManager &APINotes) {
+ if (auto NamespaceContext = dyn_cast(DC)) {
+for (auto Reader : APINotes.findAPINotes(NamespaceContex
@@ -456,6 +458,7 @@ template <> struct MappingTraits {
IO.mapOptional("EnumKind", T.EnumConvenienceKind);
IO.mapOptional("SwiftCopyable", T.SwiftCopyable);
IO.mapOptional("Methods", T.Methods);
+IO.mapOptional("Tags", T.Tags);
egorzhdan wrote:
@@ -783,51 +783,76 @@ static void ProcessVersionedAPINotes(
}
}
+static std::optional
+UnwindNamespaceContext(DeclContext *DC, api_notes::APINotesManager &APINotes) {
+ if (auto NamespaceContext = dyn_cast(DC)) {
+for (auto Reader : APINotes.findAPINotes(NamespaceContex
@@ -421,9 +424,8 @@ struct Tag {
std::optional EnumConvenienceKind;
std::optional SwiftCopyable;
FunctionsSeq Methods;
+ TagsSeq Tags;
egorzhdan wrote:
These are, in fact, child tags – I can add a comment here describing the
meaning of this field.
htt
@@ -958,12 +961,18 @@ class YAMLConverter {
ContextInfo CI;
auto TagCtxID = Writer.addContext(ParentContextID, T.Name,
ContextKind::Tag,
CI, SwiftVersion);
+Context TagCtx(TagCtxID, ContextKind::Tag);
for (const auto &CX
@@ -899,6 +924,10 @@ void Sema::ProcessAPINotes(Decl *D) {
}
for (auto Reader : APINotes.findAPINotes(D->getLocation())) {
+if (Tag->getName() == "inner_char_box")
+ llvm::errs();
egorzhdan wrote:
My bad! Removed this.
https://gi
https://github.com/egorzhdan updated
https://github.com/llvm/llvm-project/pull/99655
>From 824de086ec1e3208fce111a3cfacc971dc032b60 Mon Sep 17 00:00:00 2001
From: Egor Zhdan
Date: Fri, 19 Jul 2024 15:24:10 +0100
Subject: [PATCH] [APINotes] Support nested tags
This allows annotating C/C++ struc
@@ -456,6 +458,7 @@ template <> struct MappingTraits {
IO.mapOptional("EnumKind", T.EnumConvenienceKind);
IO.mapOptional("SwiftCopyable", T.SwiftCopyable);
IO.mapOptional("Methods", T.Methods);
+IO.mapOptional("Tags", T.Tags);
egorzhdan wrote:
https://github.com/egorzhdan created
https://github.com/llvm/llvm-project/pull/99655
This allows annotating C/C++ structs declared within other structs using API
Notes.
rdar://132083354
>From 8ee14d729d996a9414438a64ecc789082c421bd0 Mon Sep 17 00:00:00 2001
From: Egor Zhdan
Date: Fri, 19 Jul
https://github.com/egorzhdan closed
https://github.com/llvm/llvm-project/pull/99512
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -794,6 +831,33 @@ void APINotesWriter::Implementation::writeObjCMethodBlock(
}
}
+void APINotesWriter::Implementation::writeCXXMethodBlock(
+llvm::BitstreamWriter &Stream) {
+ llvm::BCBlockRAII Scope(Stream, CXX_METHOD_BLOCK_ID, 3);
+
+ if (CXXMethods.empty())
+
https://github.com/egorzhdan updated
https://github.com/llvm/llvm-project/pull/99512
>From 117596b16e143e44c2b6c17184840490490e16a7 Mon Sep 17 00:00:00 2001
From: Egor Zhdan
Date: Thu, 18 Jul 2024 15:49:24 +0100
Subject: [PATCH] [APINotes] Support annotating C++ methods
This adds support for a
https://github.com/egorzhdan updated
https://github.com/llvm/llvm-project/pull/99512
>From 0a0dbf24c096c4fc0be973fb03bb48688afa447b Mon Sep 17 00:00:00 2001
From: Egor Zhdan
Date: Thu, 18 Jul 2024 15:49:24 +0100
Subject: [PATCH] [APINotes] Support annotating C++ methods
This adds support for a
https://github.com/egorzhdan created
https://github.com/llvm/llvm-project/pull/99512
This adds support for adding Clang attributes to C++ methods declared within
C++ records by using API Notes.
For instance:
```
Tags:
- Name: IntWrapper
Methods:
- Name: getIncremented
Availability: non
https://github.com/egorzhdan closed
https://github.com/llvm/llvm-project/pull/99358
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -286,6 +280,31 @@ inline bool operator==(const ContextTableKey &lhs, const
ContextTableKey &rhs) {
lhs.contextKind == rhs.contextKind && lhs.contextID == rhs.contextID;
}
+/// A stored Objective-C or C++ declaration, represented by the ID of its
parent
+/// conte
egorzhdan wrote:
Yeap, exactly, we weren't actually using the context kind, so this patch
basically just removes it.
https://github.com/llvm/llvm-project/pull/99358
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin
https://github.com/egorzhdan updated
https://github.com/llvm/llvm-project/pull/99358
>From 8fcad7fee075e59dcf38716f19de738f51d85d82 Mon Sep 17 00:00:00 2001
From: Egor Zhdan
Date: Wed, 17 Jul 2024 18:13:34 +0100
Subject: [PATCH] [APINotes] Reduce memory footprint for Obj-C/C++ contexts
We were
@@ -269,12 +269,6 @@ struct ContextTableKey {
: parentContextID(parentContextID), contextKind(contextKind),
contextID(contextID) {}
- ContextTableKey(std::optional context, IdentifierID nameID)
- : parentContextID(context ? context->id.Value : (uint32_t)-1)
https://github.com/egorzhdan created
https://github.com/llvm/llvm-project/pull/99358
We were storing extraneous data for certain Objective-C/C++ entities.
Specifically, for declarations that can be nested in another context (such as
functions) we were storing the kind of the parent context in
https://github.com/egorzhdan closed
https://github.com/llvm/llvm-project/pull/98943
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
egorzhdan wrote:
Yeah, I can't see any usages of this in the past few years. It was probably
used a long while ago.
https://github.com/llvm/llvm-project/pull/98943
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/
https://github.com/egorzhdan created
https://github.com/llvm/llvm-project/pull/98943
This method is not actually used anywhere.
>From 4010859ca13a79d55a7b47f9363ee32870b7f1ef Mon Sep 17 00:00:00 2001
From: Egor Zhdan
Date: Mon, 15 Jul 2024 19:37:13 +0100
Subject: [PATCH] [APINotes] Remove unus
https://github.com/egorzhdan closed
https://github.com/llvm/llvm-project/pull/98201
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/egorzhdan updated
https://github.com/llvm/llvm-project/pull/98201
>From d90ff1e2ff914a6086fe06578594de7cfc11b2af Mon Sep 17 00:00:00 2001
From: Egor Zhdan
Date: Tue, 9 Jul 2024 19:53:08 +0100
Subject: [PATCH] [APINotes] Refactor: remove references to `ObjCContext...`
API Not
https://github.com/egorzhdan created
https://github.com/llvm/llvm-project/pull/98201
API Notes now support in C++. In preparation for supporting C++ methods in API
Notes, this change renames the remaining usages of `ObjCContextABC` into
`ContextABC` to make it clear that those contexts might a
https://github.com/egorzhdan closed
https://github.com/llvm/llvm-project/pull/95162
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
egorzhdan wrote:
The test failures are unrelated to this change.
https://github.com/llvm/llvm-project/pull/95162
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/egorzhdan updated
https://github.com/llvm/llvm-project/pull/95162
>From c9d9d115118471f0ca6a311e44b366ef9fe4fb2b Mon Sep 17 00:00:00 2001
From: Egor Zhdan
Date: Tue, 11 Jun 2024 19:58:53 +0100
Subject: [PATCH 1/2] [APINotes] Update the documentation with new features
This ad
https://github.com/egorzhdan created
https://github.com/llvm/llvm-project/pull/95162
This adds the documentation for a few recently added Clang API Notes features:
C++ namespaces, `SwiftImportAs` and `SwiftCopyable`.
>From c9d9d115118471f0ca6a311e44b366ef9fe4fb2b Mon Sep 17 00:00:00 2001
From:
https://github.com/egorzhdan approved this pull request.
Thank you, LGTM!
https://github.com/llvm/llvm-project/pull/92027
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/egorzhdan closed
https://github.com/llvm/llvm-project/pull/89977
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/egorzhdan edited
https://github.com/llvm/llvm-project/pull/89977
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/egorzhdan edited
https://github.com/llvm/llvm-project/pull/89977
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/egorzhdan closed
https://github.com/llvm/llvm-project/pull/90064
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
egorzhdan wrote:
The test failure on Windows is not related to this PR.
https://github.com/llvm/llvm-project/pull/90064
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/egorzhdan updated
https://github.com/llvm/llvm-project/pull/90064
>From 60191f2bc6cb191b5b256d220a8b1d07093bddd1 Mon Sep 17 00:00:00 2001
From: Egor Zhdan
Date: Thu, 25 Apr 2024 15:19:09 +0100
Subject: [PATCH] [APINotes] Allow annotating a C++ type as non-copyable in
Swift
https://github.com/egorzhdan ready_for_review
https://github.com/llvm/llvm-project/pull/90064
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1146,6 +1146,12 @@ class TagTableInfo : public
CommonTypeTableInfo {
writer.write(Flags);
+if (auto Copyable = TI.isSwiftCopyable()) {
egorzhdan wrote:
Fixed
https://github.com/llvm/llvm-project/pull/90064
__
@@ -527,6 +527,13 @@ class TagTableInfo
Info.EnumExtensibility =
static_cast((Payload & 0x3) - 1);
+uint8_t Copyable =
+endian::readNext(Data);
+if (Copyable == 1)
+ Info.setSwiftCopyable(std::optional(false));
+else if (Copyable == 2)
https://github.com/egorzhdan updated
https://github.com/llvm/llvm-project/pull/90064
>From f0394cfaf4df3881809fdce7882bda3006951805 Mon Sep 17 00:00:00 2001
From: Egor Zhdan
Date: Thu, 25 Apr 2024 15:19:09 +0100
Subject: [PATCH] [APINotes] Allow annotating a C++ type as non-copyable in
Swift
@@ -1125,10 +1125,10 @@ class CommonTypeTableInfo
class TagTableInfo : public CommonTypeTableInfo {
public:
unsigned getUnversionedInfoSize(const TagInfo &TI) {
-return 2 + (TI.SwiftImportAs ? TI.SwiftImportAs->size() : 0) +
- 2 + (TI.SwiftRetainOp ? TI.SwiftRet
https://github.com/egorzhdan updated
https://github.com/llvm/llvm-project/pull/90064
>From 9eac3a34aa9c48e1ddc715ca04c4380f1d78a876 Mon Sep 17 00:00:00 2001
From: Egor Zhdan
Date: Thu, 25 Apr 2024 15:19:09 +0100
Subject: [PATCH] [APINotes] Allow annotating a C++ type as non-copyable in
Swift
https://github.com/egorzhdan created
https://github.com/llvm/llvm-project/pull/90064
Certain C++ types, such as `std::chrono::tzdb` in libstdc++, are non-copyable,
but don't explicitly delete their copy constructor. Instead, they trigger
template instantiation errors when trying to call their
https://github.com/egorzhdan closed
https://github.com/llvm/llvm-project/pull/87006
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/egorzhdan created
https://github.com/llvm/llvm-project/pull/87006
This upstreams https://github.com/apple/llvm-project/pull/7930.
This adds a test to verify that we can apply attributes to C++ class templates
using API Notes. Doing the same for function templates is not curr
https://github.com/egorzhdan closed
https://github.com/llvm/llvm-project/pull/86820
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/egorzhdan created
https://github.com/llvm/llvm-project/pull/86820
This upstreams https://github.com/apple/llvm-project/pull/8063.
If module FooCore is re-exported through module Foo (by using `export_as` in
the modulemap), look for attributes of FooCore symbols in Foo.apinot
https://github.com/egorzhdan closed
https://github.com/llvm/llvm-project/pull/84773
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
1 - 100 of 327 matches
Mail list logo