[clang] [clang][ExtractAPI] fix a couple crashes when used via libclang (PR #132297)

2025-03-26 Thread Daniel Grumberg via cfe-commits
@@ -0,0 +1,41 @@ +// Test is line- and column-sensitive. Run lines are below + +template +class basic_vector { +public: +T x; +T y; +}; + +using my_vec = basic_vector; + +class MyClass { +my_vec myVec; +}; + +struct OuterStruct { +struct InnerStruct; +int oute

[clang] [clang][ExtractAPI] Fix up casting from CXXClassRecord (PR #110983)

2024-10-03 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg created https://github.com/llvm/llvm-project/pull/110983 `RecordRecord::classOfKind` and `TagRecord::classofKind` didn't correctly capture `RK_CXXClass` and derived variants, e.g. `RK_ClassTemplate`. This materialized by anonymous C++ tag types not being corr

[clang] [clang][ExtractAPI] Generate subheading for typedef'd anonymous types (PR #110689)

2024-10-02 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/110689 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Generate subheading for typedef'd anonymous types (PR #110689)

2024-10-02 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg updated https://github.com/llvm/llvm-project/pull/110689 >From 30e06bed5b8ba378b2b43f0706617f6978f4be6c Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Tue, 1 Oct 2024 16:29:30 +0100 Subject: [PATCH] [clang][ExtractAPI] Generate subheading for typedef'd

[clang] [clang][ExtractAPI] Generate subheading for typedef'd anonymous types (PR #110689)

2024-10-02 Thread Daniel Grumberg via cfe-commits
@@ -1621,6 +1621,9 @@ DeclarationFragmentsBuilder::getSubHeading(const NamedDecl *Decl) { cast(Decl)->isOverloadedOperator()) { Fragments.append(Decl->getNameAsString(), DeclarationFragments::FragmentKind::Identifier); + } else if (dyn_ca

[clang] [clang][ExtractAPI] Generate subheading for typedef'd anonymous types (PR #110689)

2024-10-01 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg created https://github.com/llvm/llvm-project/pull/110689 When an anonymous type has a typedef we normally use the typedef's name in places where we expect a named identifier in the symbol graph. This extends this logic to apply to subheadings. rdar://1366906

[clang] [clang][ExtractAPI] Handle AttributedType fragments transparently (PR #107262)

2024-09-05 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/107262 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Handle AttributedType fragments transparently (PR #107262)

2024-09-04 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg updated https://github.com/llvm/llvm-project/pull/107262 >From 17a956e118879df9ce1431c41f580108b92b6784 Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Tue, 3 Sep 2024 16:27:36 +0100 Subject: [PATCH] [clang][ExtractAPI] Handle AttributedType fragments tr

[clang] [clang][ExtractAPI] Handle AttributedType fragments transparently (PR #107262)

2024-09-04 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg created https://github.com/llvm/llvm-project/pull/107262 rdar://131958623 >From 71011c910b218c4817872dee91499e60bd771e07 Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Tue, 3 Sep 2024 16:27:36 +0100 Subject: [PATCH] [clang][ExtractAPI] Handle Attributed

[clang] [clang][ExtractAPI] Remove erroneous module name check in MacroCallbacks (PR #107059)

2024-09-03 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/107059 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Remove erroneous module name check in MacroCallbacks (PR #107059)

2024-09-03 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg created https://github.com/llvm/llvm-project/pull/107059 rdar://135044923 >From caf560529093f80b5b6e6220ec19e244f57779d3 Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Mon, 2 Sep 2024 18:47:40 +0100 Subject: [PATCH] [clang][ExtractAPI] Remove erroneous

[clang] [clang][ExtractAPI] Fix iteration order of TopLevelRecords (PR #106411)

2024-08-29 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/106411 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Fix iteration order of TopLevelRecords (PR #106411)

2024-08-28 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg created https://github.com/llvm/llvm-project/pull/106411 Fixes #106355 >From 5b47537dd49e79e102f7a809b434c18086274b4b Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Wed, 28 Aug 2024 17:03:22 +0100 Subject: [PATCH] [clang][ExtractAPI] Fix iteration order

[clang] [clang][ExtractAPI] Fix quirks in interaction with submodules (PR #105868)

2024-08-27 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/105868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Fix quirks in interaction with submodules (PR #105868)

2024-08-23 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg updated https://github.com/llvm/llvm-project/pull/105868 >From b687c9512b748ee593eedd5e06d04d2a40197ec3 Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Fri, 23 Aug 2024 10:02:42 +0100 Subject: [PATCH 1/5] [clang][ExtractAPI] Use top level module name for

[clang] [clang][ExtractAPI] Fix quirks in interaction with submodules (PR #105868)

2024-08-23 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg created https://github.com/llvm/llvm-project/pull/105868 Extension SGFs require the module system to be enabled in order to discover which module defines the extended external type. This patch ensures the following: - Associate symbols with their top level mod

[clang] Reenable anon structs (PR #104922)

2024-08-20 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/104922 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b18b454 - Revert "[clang][ExtractAPI] Stop dropping fields of nested anonymous record types when they aren't attached to variable declaration (#104600)"

2024-08-19 Thread Daniel Grumberg via cfe-commits
Author: Daniel Grumberg Date: 2024-08-19T16:06:43+01:00 New Revision: b18b4547f1bfaf6da37b29440a96176e807c2e6c URL: https://github.com/llvm/llvm-project/commit/b18b4547f1bfaf6da37b29440a96176e807c2e6c DIFF: https://github.com/llvm/llvm-project/commit/b18b4547f1bfaf6da37b29440a96176e807c2e6c.dif

[clang] [clang][ExtractAPI] Stop dropping fields of nested anonymous record types when they aren't attached to variable declaration (PR #104600)

2024-08-19 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/104600 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Stop dropping fields of nested anonymous record types when they aren't attached to variable declaration (PR #104600)

2024-08-19 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg updated https://github.com/llvm/llvm-project/pull/104600 >From 8e3909ecb1bfe6aec6344cd89cbe1798d6cde7da Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Thu, 15 Aug 2024 17:42:02 +0100 Subject: [PATCH 1/4] [clang][ExtractAPI] Implement Record removal from

[clang] [clang][ExtractAPI] Stop dropping fields of nested anonymous record types when they aren't attached to variable declaration (PR #104600)

2024-08-16 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg updated https://github.com/llvm/llvm-project/pull/104600 >From 61b8014d418867e0108bf4513227d9a8fdad63f8 Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Thu, 15 Aug 2024 17:42:02 +0100 Subject: [PATCH 1/4] [clang][ExtractAPI] Implement Record removal from

[clang] [clang][ExtractAPI] Stop dropping fields of nested anonymous record types when they aren't attached to variable declaration (PR #104600)

2024-08-16 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg created https://github.com/llvm/llvm-project/pull/104600 - Introduce primitives for removing records from `APISet` and managing the record chain of `RecordContext` - Detect nested anonymous record types and remove them from the `APISet` after they have been f

[clang] [clang][ExtractAPI] Emit environment component of target triple in SGF (PR #103273)

2024-08-15 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/103273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Compute inherited availability information (PR #103040)

2024-08-15 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/103040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Compute inherited availability information (PR #103040)

2024-08-14 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg updated https://github.com/llvm/llvm-project/pull/103040 >From cd38c476336ea90e4d080638d028dda203b52ac4 Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Tue, 13 Aug 2024 11:30:18 +0100 Subject: [PATCH 1/5] [clang][ExtractAPI] Compute inherited availability

[clang] [clang][ExtractAPI] Compute inherited availability information (PR #103040)

2024-08-14 Thread Daniel Grumberg via cfe-commits
@@ -16,33 +16,101 @@ #include "clang/AST/Decl.h" #include "clang/Basic/TargetInfo.h" -namespace clang { +namespace { + +struct AvailabilitySet { + llvm::SmallVector Availabilities; + bool UnconditionallyDeprecated = false; + bool UnconditionallyUnavailable = false; -Avail

[clang] [clang][ExtractAPI] Compute inherited availability information (PR #103040)

2024-08-14 Thread Daniel Grumberg via cfe-commits
@@ -0,0 +1,149 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -extract-api --pretty-sgf --emit-sgf-symbol-labels-for-testing -triple arm64-apple-macosx \ +// RUN: -x objective-c-header %s -o %t/output.symbols.json -verify + + +// RUN: FileCheck %s --input-file %t/output.symbols.json

[clang] [clang][ExtractAPI] Compute inherited availability information (PR #103040)

2024-08-14 Thread Daniel Grumberg via cfe-commits
daniel-grumberg wrote: > > Additionally this computes availability information for all platforms ahead > > Can you add a test for this? The behavior is not exposed yet so I can't add a test, will do when I start exposing the behavior. https://github.com/llvm/llvm-project/pull/103040 _

[clang] [clang][ExtractAPI] Emit environment component of target triple in SGF (PR #103273)

2024-08-13 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg created https://github.com/llvm/llvm-project/pull/103273 rdar://133533830 >From 6c9fdf64b14c14db00fbf4ba8ec4103b14ddb72d Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Tue, 13 Aug 2024 16:09:58 +0100 Subject: [PATCH] [clang][ExtractAPI] Emit environment

[clang] [clang][ExtractAPI] Compute inherited availability information (PR #103040)

2024-08-13 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg created https://github.com/llvm/llvm-project/pull/103040 Additionally this computes availability information for all platforms ahead of possibly introducing a flag to enable this behavior. rdar://123513706 >From cd38c476336ea90e4d080638d028dda203b52ac4 Mon S

[clang] [clang][ExtractAPI][NFC] Remove some nullptr dereference problems (PR #98914)

2024-07-16 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/98914 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI][NFC] Remove some nullptr dereference problems (PR #98914)

2024-07-15 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg created https://github.com/llvm/llvm-project/pull/98914 A places try to get a NamedDecl's name using getName when it isn't a simple identifier, migrate these areas to getNameAsString. rdar://125315602 >From 20a72b3170d284f1f984d1dc7c868fe5632df510 Mon Sep 17

[clang] [clang][ExtractAPI][NFC] pass params by const reference (PR #94820)

2024-06-10 Thread Daniel Grumberg via cfe-commits
daniel-grumberg wrote: Thanks for looking at these, I think it would be best to try and leverage move semantics where possible if we are going to change this code. https://github.com/llvm/llvm-project/pull/94820 ___ cfe-commits mailing list cfe-commit

[clang] [clang][ExtractAPI][NFC] pass params by const reference (PR #94820)

2024-06-10 Thread Daniel Grumberg via cfe-commits
@@ -240,7 +241,7 @@ class DeclarationFragments { class AccessControl { public: - AccessControl(std::string Access) : Access(Access) {} daniel-grumberg wrote: Again I would prefer if we kept the value semantic ones and use `std::move` https://github.com/llvm

[clang] [clang][ExtractAPI][NFC] pass params by const reference (PR #94820)

2024-06-10 Thread Daniel Grumberg via cfe-commits
@@ -199,7 +199,8 @@ class DeclarationFragments { return *this; } - DeclarationFragments &replace(std::string NewSpelling, unsigned Position) { daniel-grumberg wrote: I would prefer to keep the value semantics version and instead move assign the value,

[clang] [clang][ExtractAPI] Flatten all enum cases from anonymous enums at top level (PR #93559)

2024-05-29 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/93559 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Flatten all enum cases from anonymous enums at top level (PR #93559)

2024-05-28 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg updated https://github.com/llvm/llvm-project/pull/93559 >From 5c8258fb2bcc102d431af9f3ae41cf72ecc335b6 Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Tue, 28 May 2024 15:43:45 +0100 Subject: [PATCH] [clang][ExtractAPI] Flatten all enum cases from anonymo

[clang] [clang][ExtractAPI] Flatten all enum cases from anonymous enums at top level (PR #93559)

2024-05-28 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg created https://github.com/llvm/llvm-project/pull/93559 rdar://128863241 >From d453e5b21d369d8c2b1d06c640887ec81ace Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Tue, 28 May 2024 15:43:45 +0100 Subject: [PATCH] [clang][ExtractAPI] Flatten all enum

[clang] [clang][ExtractAPI] Ensure TemplateArgumentLocations are only accessed if available (PR #93205)

2024-05-24 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/93205 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Ensure TemplateArgumentLocations are only accessed if available (PR #93205)

2024-05-23 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg created https://github.com/llvm/llvm-project/pull/93205 None >From d4e7e838fcbdf1645e5e31cefb462d53e59361d4 Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Thu, 23 May 2024 15:24:53 +0100 Subject: [PATCH] [clang][ExtractAPI] Ensure TemplateArgumentLocati

[clang] [clang][ExtractAPI] Remove symbols defined in categories to external types unless requested (PR #92522)

2024-05-20 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/92522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Remove symbols defined in categories to external types unless requested (PR #92522)

2024-05-17 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg created https://github.com/llvm/llvm-project/pull/92522 rdar://128259890 >From 7650c18c883bb14e5a4b17d6b6d61297f2fa3c44 Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Fri, 17 May 2024 11:58:18 +0100 Subject: [PATCH] [clang][ExtractAPI] Remove symbols de

[clang] [clang][ExtractAPI] Correctly generate declaration fragments for non-type template parameters (PR #91958)

2024-05-17 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/91958 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ExtractAPI,test] fix filecheck annotation (PR #92231)

2024-05-15 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg approved this pull request. LGTM! Thanks for doing this! https://github.com/llvm/llvm-project/pull/92231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [clang][ExtractAPI] Correctly generate declaration fragments for non-type template parameters (PR #91958)

2024-05-13 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg created https://github.com/llvm/llvm-project/pull/91958 Previously we only generated declaration fragments for template type parameters/arguments, this adds supports for most other possible template parameters/arguments. rdar://127732598 >From d86e4256da574

[clang] [clang][ExtractAPI] Distinguish between record kind for display and for RTTI (PR #91466)

2024-05-13 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/91466 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [flang] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-13 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg approved this pull request. LGTM to me for the ExtractAPI one. https://github.com/llvm/llvm-project/pull/91854 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [clang][ExtractAPI] Distinguish between record kind for display and for RTTI (PR #91466)

2024-05-09 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg updated https://github.com/llvm/llvm-project/pull/91466 >From a8c7763ed5f36e4faeba5eece2827b2dec010734 Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Wed, 8 May 2024 11:55:15 +0100 Subject: [PATCH] [clang][ExtractAPI] Distinguish between record kind for

[clang] [clang][ExtractAPI] Distinguish between record kind for display and for RTTI (PR #91466)

2024-05-08 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg created https://github.com/llvm/llvm-project/pull/91466 rdar://127732562 >From d1118a8552d84e044cd0f22cd8b46e5e65b43cae Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Wed, 8 May 2024 11:55:15 +0100 Subject: [PATCH] [clang][ExtractAPI] Distinguish betwee

[clang] [clang][ExtractAPI] Fix handling of anonymous TagDecls (PR #87772)

2024-04-24 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/87772 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Fix handling of anonymous TagDecls (PR #87772)

2024-04-23 Thread Daniel Grumberg via cfe-commits
@@ -54,6 +54,20 @@ RecordContext *APIRecord::castToRecordContext(const APIRecord *Record) { } } +void RecordContext::stealRecordChain(RecordContext &Other) { + // If we don't have an empty chain append Other's chain into ours. + if (First) +Last->NextInContext = Other

[clang] [clang][ExtractAPI] Fix handling of anonymous TagDecls (PR #87772)

2024-04-23 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg updated https://github.com/llvm/llvm-project/pull/87772 >From 18912352db31406c7c5b530d6e22f77e775fbf38 Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Thu, 4 Apr 2024 18:33:25 +0100 Subject: [PATCH 1/3] [clang][ExtractAPI] Fix handling of anonymous TagDec

[clang] [clang][ExtractAPI] Fix handling of anonymous TagDecls (PR #87772)

2024-04-23 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg updated https://github.com/llvm/llvm-project/pull/87772 >From 18912352db31406c7c5b530d6e22f77e775fbf38 Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Thu, 4 Apr 2024 18:33:25 +0100 Subject: [PATCH 1/2] [clang][ExtractAPI] Fix handling of anonymous TagDec

[clang] [clang][ExtractAPI] Serialize platform specific unavailable attribute in symbol graphs (PR #89277)

2024-04-23 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/89277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Fix handling of anonymous TagDecls (PR #87772)

2024-04-16 Thread Daniel Grumberg via cfe-commits
@@ -54,6 +54,13 @@ RecordContext *APIRecord::castToRecordContext(const APIRecord *Record) { } } +void RecordContext::stealRecordChain(RecordContext &Other) { + First = Other.First; + Last = Other.Last; + Other.First = nullptr; + Other.Last = nullptr; +}

[clang] Update ExtractAPIConsumer.cpp (PR #88285)

2024-04-10 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/88285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Fix handling of anonymous TagDecls (PR #87772)

2024-04-10 Thread Daniel Grumberg via cfe-commits
@@ -54,6 +54,13 @@ RecordContext *APIRecord::castToRecordContext(const APIRecord *Record) { } } +void RecordContext::stealRecordChain(RecordContext &Other) { + First = Other.First; + Last = Other.Last; + Other.First = nullptr; + Other.Last = nullptr; +}

[clang] [clang][ExtractAPI] Fix handling of anonymous TagDecls (PR #87772)

2024-04-05 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg created https://github.com/llvm/llvm-project/pull/87772 This changes the handling of anonymous TagDecls to the following rules: - If the TagDecl is embedded in the declaration for some VarDecl (this is the only possibility for RecordDecls), then pretend the ch

[clang] [clang][ExtractAPI] Add ability to create multiple symbol graphs (PR #86676)

2024-04-02 Thread Daniel Grumberg via cfe-commits
daniel-grumberg wrote: Just reverted this due to buildbot failures in `Misc/warning-flags.c` will reenable shortly. https://github.com/llvm/llvm-project/pull/86676 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [clang][ExtractAPI] improve template argument name deduction (PR #77716)

2024-04-02 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg approved this pull request. https://github.com/llvm/llvm-project/pull/77716 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Add ability to create multiple symbol graphs (PR #86676)

2024-04-02 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/86676 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Add ability to create multiple symbol graphs (PR #86676)

2024-03-27 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg deleted https://github.com/llvm/llvm-project/pull/86676 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Add ability to create multiple symbol graphs (PR #86676)

2024-03-26 Thread Daniel Grumberg via cfe-commits
@@ -119,20 +78,12 @@ static void WalkupFromMostDerivedType(LibClangExtractAPIVisitor &Visitor, break; #include "clang/AST/DeclNodes.inc" } - - for (auto *Parent = D->getDeclContext(); Parent != nullptr; - Parent = Parent->getParent()) { -if (WalkupParentContex

[clang] [clang][ExtractAPI] Add ability to create multiple symbol graphs (PR #86676)

2024-03-26 Thread Daniel Grumberg via cfe-commits
@@ -54,63 +55,21 @@ struct LibClangExtractAPIVisitor if (!shouldDeclBeIncluded(Decl)) return true; -const ObjCInterfaceDecl *Interface = Decl->getClassInterface(); -StringRef Name = Interface->getName(); -StringRef USR = API.recordUSR(Decl); -Presumed

[clang] [clang][ExtractAPI] Add ability to create multiple symbol graphs (PR #86676)

2024-03-26 Thread Daniel Grumberg via cfe-commits
@@ -50,17 +51,20 @@ TypedefUnderlyingTypeResolver::getSymbolReferenceForType(QualType Type, SmallString<128> TypeUSR; const NamedDecl *TypeDecl = getUnderlyingTypeDecl(Type); const TypedefType *TypedefTy = Type->getAs(); + StringRef OwningModuleName; if (TypeDecl)

[clang] [clang][ExtractAPI] improve template argument name deduction (PR #77716)

2024-03-26 Thread Daniel Grumberg via cfe-commits
@@ -1127,7 +1096,7 @@ DeclarationFragmentsBuilder::getFragmentsForVarTemplatePartialSpecialization( .append("<", DeclarationFragments::FragmentKind::Text) .append(getFragmentsForTemplateArguments( Decl->getTemplateArgs().asArray(), Decl->getASTContext(),

[clang] [clang][ExtractAPI] Ensure typedef to pointer types are preserved (PR #78584)

2024-01-22 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/78584 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Add support C unions in non C++ parsing mode (PR #77451)

2024-01-22 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/77451 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Add support C unions in non C++ parsing mode (PR #77451)

2024-01-22 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg updated https://github.com/llvm/llvm-project/pull/77451 >From 8ff189e707a909f5228bce2042812a45a98d1e6c Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Tue, 9 Jan 2024 12:06:14 + Subject: [PATCH] [clang][ExtractAPI] Add support C unions in non C++ pars

[clang] [clang][ExtractAPI] Record availability information only for the target platform (PR #76823)

2024-01-19 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/76823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Ensure typedef to pointer types are preserved (PR #78584)

2024-01-18 Thread Daniel Grumberg via cfe-commits
daniel-grumberg wrote: That and the typedef case before the pointer case. The pointer check would lead to extraneous desugaring in the fragments, i.e. you would get something like `struct Bar * value`, because the typedefs are also pointer types and therefore the typedef name would get bypasse

[clang] [clang][ExtractAPI] Ensure typedef to pointer types are preserved (PR #78584)

2024-01-18 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg created https://github.com/llvm/llvm-project/pull/78584 When generating declaration fragments for types that use typedefs to pointer types ensure that we keep the user-defined typedef form instead of desugaring the typedef. rdar://102137655 >From d3c4ca8092

[clang] [clang][ExtractAPI] Record availability information only for the target platform (PR #76823)

2024-01-17 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg approved this pull request. https://github.com/llvm/llvm-project/pull/76823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Record availability information only for the target platform (PR #76823)

2024-01-17 Thread Daniel Grumberg via cfe-commits
@@ -16,67 +16,61 @@ #define LLVM_CLANG_EXTRACTAPI_AVAILABILITY_INFO_H #include "clang/AST/Decl.h" -#include "llvm/ADT/SmallVector.h" #include "llvm/Support/Error.h" #include "llvm/Support/VersionTuple.h" #include "llvm/Support/raw_ostream.h" - -using llvm::VersionTuple; +#i

[clang] [clang][ExtractAPI] Add support C unions in non C++ parsing mode (PR #77451)

2024-01-11 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg updated https://github.com/llvm/llvm-project/pull/77451 >From 9ed6ab49d39df12b95c65d48d065e82672dba48f Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Tue, 9 Jan 2024 12:06:14 + Subject: [PATCH] [clang][ExtractAPI] Add support C unions in non C++ pars

[clang] [clang][ExtractAPI] improve template argument name deduction (PR #77716)

2024-01-11 Thread Daniel Grumberg via cfe-commits
@@ -196,8 +196,7 @@ template class Foo {}; "spelling": "<" }, { - "kind": "typeIdentifier", - "preciseIdentifier": "c:t0.0", + "kind": "genericArgument", daniel-grumberg wrote: might be best to leave these a

[clang] [clang][ExtractAPI] Record availability information only for the target platform (PR #76823)

2024-01-09 Thread Daniel Grumberg via cfe-commits
@@ -1,50 +1,33 @@ #include "clang/ExtractAPI/AvailabilityInfo.h" +#include "clang/AST/ASTContext.h" #include "clang/AST/Attr.h" +#include "clang/Basic/TargetInfo.h" #include "llvm/ADT/STLExtras.h" using namespace clang; using namespace extractapi; -AvailabilitySet::Availa

[clang] [clang][ExtractAPI] Add support C unions in non C++ parsing mode (PR #77451)

2024-01-09 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg created https://github.com/llvm/llvm-project/pull/77451 Ensure that we generate correct symbol kinds and declaration fragments for unions in C and Objective-C parsing modes. rdar://120544091 >From 23d0713ba8003731cf03d2226c2cb3000411554f Mon Sep 17 00:00:00

[clang] [clang][ExtractAPI] Record availability information only for the target platform (PR #76823)

2024-01-05 Thread Daniel Grumberg via cfe-commits
@@ -256,14 +256,14 @@ struct APIRecord { APIRecord() = delete; APIRecord(RecordKind Kind, StringRef USR, StringRef Name, -PresumedLoc Location, AvailabilitySet Availabilities, +PresumedLoc Location, const AvailabilityInfo &Availability,

[clang] [clang][ExtractAPI] Record availability information only for the target platform (PR #76823)

2024-01-05 Thread Daniel Grumberg via cfe-commits
@@ -61,17 +61,17 @@ APISet::addNamespace(APIRecord *Parent, StringRef Name, StringRef USR, GlobalVariableRecord * APISet::addGlobalVar(StringRef Name, StringRef USR, PresumedLoc Loc, - AvailabilitySet Availabilities, LinkageInfo Linkage, +

[clang] [clang][ExtractAPI] Record availability information only for the target platform (PR #76823)

2024-01-05 Thread Daniel Grumberg via cfe-commits
@@ -45,7 +45,7 @@ RecordTy *addTopLevelRecord(DenseMap &USRLookupTable, NamespaceRecord * APISet::addNamespace(APIRecord *Parent, StringRef Name, StringRef USR, - PresumedLoc Loc, AvailabilitySet Availability, + PresumedLoc Loc, const A

[clang] [clang][ExtractAPI] Allow serialization for ObjC++ headers (PR #74733)

2023-12-07 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/74733 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Allow serialization for ObjC++ headers (PR #74733)

2023-12-07 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg created https://github.com/llvm/llvm-project/pull/74733 rdar://79874441 >From 87d6b0fca621bae69102161fa4c3ebc003ae27bc Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Thu, 7 Dec 2023 14:52:47 + Subject: [PATCH] [clang][ExtractAPI] Allow serialization

[clang] [clang][ExtractAPI] Ensure LocationFileChecker doesn't try to traverse VFS when determining file path (PR #74071)

2023-12-01 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/74071 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Ensure LocationFileChecker doesn't try to traverse VFS when determining file path (PR #74071)

2023-12-01 Thread Daniel Grumberg via cfe-commits
daniel-grumberg wrote: Awesome! Let me know if you need any clarification as the semantic is now different from what it was originally and what it was after your patch. https://github.com/llvm/llvm-project/pull/74071 ___ cfe-commits mailing list cfe-c

[clang] [clang][ExtractAPI] Ensure LocationFileChecker doesn't try to traverse VFS when determining file path (PR #74071)

2023-12-01 Thread Daniel Grumberg via cfe-commits
daniel-grumberg wrote: Adding @compnerd since he committed (on behalf of someone else) the patch that caused this subtle problem in the first place. Do you know the original authors handle on GitHub? https://github.com/llvm/llvm-project/pull/74071 __

[clang] [clang][ExtractAPI] Ensure LocationFileChecker doesn't try to traverse VFS when determining file path (PR #74071)

2023-12-01 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg created https://github.com/llvm/llvm-project/pull/74071 As part of https://reviews.llvm.org/D154130 the logic of LocationFileChecker changed slightly to try and get the absolute external file path instead of the name as requested when the file was openened wh

[clang] [clang][ExtractAPI] Add support for blocks in declaration fragments (PR #73369)

2023-11-28 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/73369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Add support for blocks in declaration fragments (PR #73369)

2023-11-24 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg created https://github.com/llvm/llvm-project/pull/73369 Ensure that block types get represented correctly in declaration fragments, as block parameter names are important for documentation clients we need a separate system from getFragmentsForType in order to

[clang] ExtractAPI: use zero-based indices for line/column in symbol graph (PR #71753)

2023-11-14 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/71753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ExtractAPI: use zero-based indices for line/column in symbol graph (PR #71753)

2023-11-10 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/71753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Update availability serialization in SGF (PR #71418)

2023-11-07 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/71418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Update availability serialization in SGF (PR #71418)

2023-11-06 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg created https://github.com/llvm/llvm-project/pull/71418 The prevailiing symbol graph parsing library expects availability attributes to just be "introduced" instead of "introducedVersion" rdar://117823923 >From ad0c6afb7c728b2ea8ad83be22d670808d319783 Mon Se

[clang] [clang] Prioritze decl comments from macro expansion site (PR #65481)

2023-10-26 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/65481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Prioritze decl comments from macro expansion site (PR #65481)

2023-10-24 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg updated https://github.com/llvm/llvm-project/pull/65481 >From d5054bcc53dad87232a4969e1a1f978b8d5a593d Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Wed, 6 Sep 2023 12:20:30 +0100 Subject: [PATCH] [clang] Prioritze decl comments from macro expansion sit

[clang] [clang] Prioritze decl comments from macro expansion site (PR #65481)

2023-10-23 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg updated https://github.com/llvm/llvm-project/pull/65481 >From e9be513c357d7bb01a3acf69871e2e9889cb2079 Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Wed, 6 Sep 2023 12:20:30 +0100 Subject: [PATCH] [clang] Prioritze decl comments from macro expansion sit

[clang] [clang] Prioritze decl comments from macro expansion site (PR #65481)

2023-10-23 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg updated https://github.com/llvm/llvm-project/pull/65481 >From 32155e8b5ac01242c3e16968f9a7c821d16b7007 Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Wed, 6 Sep 2023 12:20:30 +0100 Subject: [PATCH 1/2] [clang] Prioritze decl comments from macro expansion

[clang] [clang] Prioritze decl comments from macro expansion site (PR #65481)

2023-09-20 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg edited https://github.com/llvm/llvm-project/pull/65481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Prioritze decl comments from macro expansion site (PR #65481)

2023-09-20 Thread Daniel Grumberg via cfe-commits
@@ -374,11 +374,10 @@ TEST(SourceCodeTest, getAssociatedRangeWithComments) { // Does not include comments when only the decl or the comment come from a // macro. daniel-grumberg wrote: Good spot, can't believe I removed the FIXME and not the comment expla

[clang] [clang] Prioritze decl comments from macro expansion site (PR #65481)

2023-09-08 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg review_requested https://github.com/llvm/llvm-project/pull/65481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   >