[clang] [APINotes] Document immortal reference type annotation (PR #114042)

2024-11-04 Thread Egor Zhdan via 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

[clang] Add preliminary lifetimebound support to APINotes (PR #114830)

2024-11-04 Thread Egor Zhdan via cfe-commits
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

[clang] Nominate Saleem and myself as maintainers for API Notes (PR #114981)

2024-11-05 Thread Egor Zhdan via cfe-commits
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

[clang] Nominate Saleem and myself as maintainers for API Notes (PR #114981)

2024-11-05 Thread Egor Zhdan via cfe-commits
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

[clang] Nominate Saleem and myself as maintainers for API Notes (PR #114981)

2024-11-05 Thread Egor Zhdan via cfe-commits
@@ -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\

[clang] Nominate Saleem and myself as maintainers for API Notes (PR #114981)

2024-11-05 Thread Egor Zhdan via cfe-commits
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 ---

[clang] Allow tag-based API notes on anonymous tag decls with typedef names (PR #110768)

2024-10-02 Thread Egor Zhdan via 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

[clang] [Clang] Dispatch default overloads of `TemplateArgumentVisitor` to the implementation (PR #115336)

2024-11-07 Thread Egor Zhdan via 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

[clang] [clang] Dispatch default overloads of `TemplateArgumentVisitor` to the implementation (PR #115336)

2024-11-07 Thread Egor Zhdan via 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

[clang] [clang] Permit lifetimebound in all language modes (PR #115482)

2024-11-08 Thread Egor Zhdan via 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

[clang] [APINotes] Add SWIFT_RETURNS_(UN)RETAINED support to APINotes (PR #118938)

2024-12-06 Thread Egor Zhdan via cfe-commits
@@ -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

[clang] [APINotes] Add SWIFT_RETURNS_(UN)RETAINED support to APINotes (PR #118938)

2024-12-06 Thread Egor Zhdan via cfe-commits
@@ -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

[clang] [clang][APINotes] Do not add duplicate lifetimebound annotation (PR #117194)

2024-11-21 Thread Egor Zhdan via cfe-commits
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

[clang] [APINotes] Add SWIFT_RETURNS_(UN)RETAINED support (PR #118938)

2024-12-06 Thread Egor Zhdan via 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

[clang] [APINotes] Add SWIFT_RETURNS_(UN)RETAINED support to APINotes (PR #118938)

2024-12-06 Thread Egor Zhdan via 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

[clang] [APINotes] Add SWIFT_RETURNS_(UN)RETAINED support to APINotes (PR #118938)

2024-12-06 Thread Egor Zhdan via 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

[clang] [APINotes] Add SWIFT_RETURNS_(UN)RETAINED support to APINotes (PR #118938)

2024-12-06 Thread Egor Zhdan via cfe-commits
@@ -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)); ---

[clang] [APINotes] Add SWIFT_RETURNS_(UN)RETAINED support (PR #118938)

2024-12-06 Thread Egor Zhdan via 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

[clang] [APINotes] Add SWIFT_RETURNS_(UN)RETAINED support (PR #118938)

2024-12-06 Thread Egor Zhdan via cfe-commits
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

[clang] [APINotes] Add SWIFT_RETURNS_(UN)RETAINED support (PR #118938)

2024-12-06 Thread Egor Zhdan via cfe-commits
@@ -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

[clang] [APINotes] Add SWIFT_RETURNS_(UN)RETAINED support (PR #118938)

2024-12-06 Thread Egor Zhdan via 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

[clang] [APINotes] Add SWIFT_RETURNS_(UN)RETAINED support (PR #118938)

2024-12-06 Thread Egor Zhdan via cfe-commits
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

[clang] [APINotes] Add SWIFT_RETURNS_(UN)RETAINED support (PR #118938)

2024-12-06 Thread Egor Zhdan via cfe-commits
@@ -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

[clang] [APINotes] Avoid duplicated attributes for class template instantiations (PR #122516)

2025-01-15 Thread Egor Zhdan via 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

[clang] [APINotes] Avoid duplicated attributes for class template instantiations (PR #122516)

2025-01-15 Thread Egor Zhdan via cfe-commits
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

[clang] [APINotes] Avoid duplicated attributes for class template instantiations (PR #122516)

2025-01-15 Thread Egor Zhdan via 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

[clang] [APINotes] Avoid duplicated attributes for class template instantiations (PR #122516)

2025-01-15 Thread Egor Zhdan via cfe-commits
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

[clang] [libclang] Replace createRef with createDup (PR #126683)

2025-02-13 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan approved this pull request. I'm not an expert in the area, but this change LGTM. https://github.com/llvm/llvm-project/pull/126683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

<    1   2   3   4