[PATCH] D146385: [clang][ExtractAPI] Complete declaration fragments for TagDecl types defined in a typedef

2023-03-20 Thread Daniel Grumberg via Phabricator via cfe-commits
dang requested changes to this revision. dang added a comment. This revision now requires changes to proceed. I think there might be some code missing here. Also can you add a test? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146385/new/ https://

[PATCH] D146354: [clang][ExtractAPI] Add semicolons for enum, typedef, struct declaration fragments

2023-03-20 Thread Daniel Grumberg via Phabricator via cfe-commits
dang accepted this revision. dang added a comment. This revision is now accepted and ready to land. LGTM! I think it's fine to go ahead and land this (premerge check are not a requirement). Have you contributed to LLVM before? If not I will need to commit it on your behalf. Once that is done you

[PATCH] D146354: [clang][ExtractAPI] Add semicolons for enum, typedef, struct declaration fragments

2023-03-20 Thread Daniel Grumberg via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGafce10c5b60f: [clang][ExtractAPI] Add semicolons for enum, typedef, struct declaration… (authored by chaitanyav, committed by dang). Repository: r

[PATCH] D146656: [clang][ExtractAPI] Refactor ExtractAPIVisitor to make it more extensible

2023-03-22 Thread Daniel Grumberg via Phabricator via cfe-commits
dang created this revision. dang added reviewers: zixuw, ributzka, bnbarham. Herald added subscribers: ChuanqiXu, arphaman. Herald added a project: All. dang requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Use CRTP to enable creating static

[PATCH] D146656: [clang][ExtractAPI] Refactor ExtractAPIVisitor to make it more extensible

2023-03-22 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added inline comments. Comment at: clang/include/clang/ExtractAPI/ExtractAPIVisitor.h:32 +template +class ExtractAPIVisitorBase : public RecursiveASTVisitor { public: zixuw wrote: > zixuw wrote: > > Would it be better to call this `ExtractAPIVisitorImpl` b

[PATCH] D146656: [clang][ExtractAPI] Refactor ExtractAPIVisitor to make it more extensible

2023-03-22 Thread Daniel Grumberg via Phabricator via cfe-commits
dang updated this revision to Diff 507543. dang added a comment. Addressing code review feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146656/new/ https://reviews.llvm.org/D146656 Files: clang/include/clang/ExtractAPI/ExtractAPIVisitor.h

[PATCH] D146656: [clang][ExtractAPI] Refactor ExtractAPIVisitor to make it more extensible

2023-03-22 Thread Daniel Grumberg via Phabricator via cfe-commits
dang updated this revision to Diff 507544. dang added a comment. Adding back missing diffs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146656/new/ https://reviews.llvm.org/D146656 Files: clang/include/clang/ExtractAPI/ExtractAPIVisitor.h cl

[PATCH] D146671: [clang][ExtractAPI]Fix Declaration fragments for instancetype in the type position degrade to id

2023-03-23 Thread Daniel Grumberg via Phabricator via cfe-commits
dang accepted this revision. dang added a comment. This revision is now accepted and ready to land. LGTM, but you should also check in the test that `id` still renders as expected. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146671/new/ https:/

[PATCH] D146671: [clang][ExtractAPI]Fix Declaration fragments for instancetype in the type position degrade to id

2023-03-23 Thread Daniel Grumberg via Phabricator via cfe-commits
dang accepted this revision. dang added a comment. Yup looks fine to me! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146671/new/ https://reviews.llvm.org/D146671 ___ cfe-commits mailing list cfe-commit

[PATCH] D146385: [clang][ExtractAPI] Complete declaration fragments for TagDecl types defined in a typedef

2023-03-24 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added inline comments. Comment at: clang/lib/ExtractAPI/ExtractAPIVisitor.cpp:342 + // Add the notion of typedef for tag type (struct or enum) of the same name. + if (const ElaboratedType *ET = + dyn_cast(Decl->getUnderlyingType())) { This doesn't

[PATCH] D146656: [clang][ExtractAPI] Refactor ExtractAPIVisitor to make it more extensible

2023-03-24 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added a comment. In D146656#4220022 , @zixuw wrote: > LGTM for the `ExtractAPIVisitor` part. > Remaining: > > - update test with `@LINE` > - the libclang side I have decided against doing that, because we can't specify `@LINE` in the `c-index-test`

[PATCH] D146656: [clang][ExtractAPI] Refactor ExtractAPIVisitor to make it more extensible

2023-03-27 Thread Daniel Grumberg via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG21750a1ae8c8: [clang][ExtractAPI] Refactor ExtractAPIVisitor to make it more extensible (authored by dang). Changed prior to commit: https://revie

[PATCH] D147138: [clang][ExtractAPI] Add queried symbol to parent contexts in libclang

2023-03-29 Thread Daniel Grumberg via Phabricator via cfe-commits
dang created this revision. dang added reviewers: zixuw, ributzka. Herald added a subscriber: arphaman. Herald added a project: All. dang requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Ensure that the current symbol is added to the parent

[PATCH] D146385: [clang][ExtractAPI] Complete declaration fragments for TagDecl types defined in a typedef

2023-03-29 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added a comment. You will need to rebase this as I made some changes recently to how `ExtractAPIVisitor` is structured. We can either set up a time to talk about it and do it together or I can handle doing this work once we are happy with this. Comment at: clang/lib/Extr

[PATCH] D146866: [clang][ExtractAPI] Remove extra pointer indirection from declaration fragments for Obj-C lightweight generics on id

2023-03-29 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added inline comments. Comment at: clang/lib/ExtractAPI/DeclarationFragments.cpp:176 + +// id is an qualified id type +if (!T->getAs()->isObjCQualifiedIdType()) { Comment at: clang/lib/ExtractAPI/DeclarationFragments.cpp:176 + +

[PATCH] D147138: [clang][ExtractAPI] Add queried symbol to parent contexts in libclang

2023-03-29 Thread Daniel Grumberg via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG1cfe1e732ad8: [clang][ExtractAPI] Add queried symbol to parent contexts in libclang (authored by dang). Repository: rG LLVM Github Monorepo CHANG

[PATCH] D144940: [clang][ExtractAPI] Handle platform specific unavailability correctly

2023-02-28 Thread Daniel Grumberg via Phabricator via cfe-commits
dang requested changes to this revision. dang added a comment. This revision now requires changes to proceed. Nice! glad to see this getting fixed. You should add a lit test to ensure we don't regress this behavior in the future. Comment at: clang/include/clang/ExtractAPI/Avai

[PATCH] D144940: [clang][ExtractAPI] Handle platform specific unavailability correctly

2023-02-28 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added a comment. In D144940#4158143 , @Arsenic wrote: > In D144940#4158020 , @dang wrote: > >> Nice! glad to see this getting fixed. You should add a lit test to ensure we >> don't regress this behavior in t

[PATCH] D144940: [clang][ExtractAPI] Handle platform specific unavailability correctly

2023-02-28 Thread Daniel Grumberg via Phabricator via cfe-commits
dang accepted this revision. dang added a comment. This revision is now accepted and ready to land. LGTM, It's worth noting that if the user specifies that an API is unavailable in a later redeclaration, this will be ignored. For example if I add a line to the test `void e(void) __attribute__((a

[PATCH] D144940: [clang][ExtractAPI] Handle platform specific unavailability correctly

2023-03-02 Thread Daniel Grumberg via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG65f7a84cf38b: [clang][ExtractAPI] Handle platform specific unavailability correctly (authored by Arsenic, committed by dang). Repository: rG LLVM

[PATCH] D145869: [clang][ExtractAPI] Add multiple file support to --extract-api-ignores

2023-03-13 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added inline comments. Comment at: clang/test/ExtractAPI/ignored-symbols-multifile.c:34 +//--- ignores-list1 +IGNORED_FILE1_1 +IGNORED_FILE1_2 This test doesn't check the symbol name sorting behavior across multiple files, which is crucial `APIIgnoresList::

[PATCH] D145869: [clang][ExtractAPI] Add multiple file support to --extract-api-ignores

2023-03-13 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added inline comments. Comment at: clang/test/ExtractAPI/ignored-symbols-multifile.c:27 + +// CHECK-NOT: IGNORED_1_FILE3 +// CHECK-NOT: IGNORED_7_FILE3 Should this not be a 6? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D145869: [clang][ExtractAPI] Add multiple file support to --extract-api-ignores

2023-03-13 Thread Daniel Grumberg via Phabricator via cfe-commits
dang accepted this revision. dang added a comment. This revision is now accepted and ready to land. LGTM once you fix the test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145869/new/ https://reviews.llvm.org/D145869 _

[PATCH] D153557: [clang][ExtractAPI] Add support for C++ classes

2023-06-28 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added a comment. Starting to come together nicely, but I think now would be a good time to write some tests. I am particularly interested in more complex situations like inheritance hierarchies. Comment at: clang/include/clang/ExtractAPI/API.h:25 #include "clang/Basic/S

[PATCH] D152356: [clang][ExtractAPI] Add --emit-symbol-graph option

2023-06-28 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added inline comments. Comment at: clang/include/clang/ExtractAPI/ExtractAPIActionBase.h:25 +/// +/// Deriving from this class equipts an action with all the necessary tools to +/// generate ExractAPI information in form of symbol-graphs

[PATCH] D154038: [clang][ExtractAPI] Add semicolons to vars and fields and to test reference JSON

2023-06-30 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added inline comments. Comment at: clang/lib/ExtractAPI/DeclarationFragments.cpp:437 .append(Var->getName(), DeclarationFragments::FragmentKind::Identifier) + .append(";", DeclarationFragments::FragmentKind::Text) .append(std::move(After)); ---

[PATCH] D147234: [clang][ExtractAPI] Reland ExtractAPI for libclang improvements

2023-03-30 Thread Daniel Grumberg via Phabricator via cfe-commits
dang created this revision. dang added reviewers: hctim, zixuw. Herald added subscribers: ChuanqiXu, arphaman. Herald added a reviewer: ributzka. Herald added a project: All. dang requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This relands

[PATCH] D147234: [clang][ExtractAPI] Reland ExtractAPI for libclang improvements

2023-03-30 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added inline comments. Comment at: clang/tools/c-index-test/c-index-test.c:4898 + + clang_disposeString(SGFData); +} The previous version didn't free the string here which was the source of the leak @hctim Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D147234: [clang][ExtractAPI] Reland ExtractAPI for libclang improvements

2023-03-30 Thread Daniel Grumberg via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG142c3d9d1414: [clang][ExtractAPI] Reland ExtractAPI for libclang improvements (authored by dang). Changed prior to commit: https://reviews.llvm.org/D147234?vs=509660&id=509714#toc Repository: rG LLVM

[PATCH] D147901: [NFC][CLANG][API] Fix coverity remarks about large copies by values

2023-04-11 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added inline comments. Comment at: clang/include/clang/ExtractAPI/API.h:138 APIRecord(RecordKind Kind, StringRef USR, StringRef Name, -PresumedLoc Location, AvailabilitySet Availabilities, +PresumedLoc Location, const AvailabilitySet &Availabilitie

[PATCH] D146385: [clang][ExtractAPI] Complete declaration fragments for TagDecl types defined in a typedef

2023-04-13 Thread Daniel Grumberg via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG3ac550984e83: [clang][ExtractAPI] Complete declaration fragments for TagDecl types defined in… (authored by Ruturaj4, committed by dang). Changed p

[PATCH] D151048: [clang][ExtractAPI] Modify declaration fragment methods to add a new fragment at an arbitrary offset.

2023-05-23 Thread Daniel Grumberg via Phabricator via cfe-commits
dang requested changes to this revision. dang added inline comments. This revision now requires changes to proceed. Comment at: clang/include/clang/ExtractAPI/DeclarationFragments.h:102 - // Add a new Fragment to the beginning of the Fragments. - DeclarationFragments &appendF

[PATCH] D151293: [clang][ExtractAPI] Refactor serializer to the CRTP

2023-05-24 Thread Daniel Grumberg via Phabricator via cfe-commits
dang requested changes to this revision. dang added a comment. This revision now requires changes to proceed. Great start but there are still some rough edges to polish! Comment at: clang/include/clang/ExtractAPI/Serialization/SerializerBase.h:19 #include "clang/ExtractAPI/API

[PATCH] D151477: [clang][ExtractAPI] Refactor serializer to the CRTP

2023-05-26 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added a comment. LGTM with minor changes Comment at: clang/include/clang/ExtractAPI/Serialization/SerializerBase.h:58 - virtual ~APISerializer() = default; }; It would be nice to keep this as default, i.e. ``` ~APISetVisitor() = default; ``` ===

[PATCH] D151477: [clang][ExtractAPI] Refactor serializer to the CRTP

2023-05-30 Thread Daniel Grumberg via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG06ff9770477d: [clang][ExtractAPI] Refactor serializer to the CRTP (authored by evelez7, committed by dang). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151

[PATCH] D142101: [clang] [extract-api] Don't crash for category in libclang APIs

2023-02-10 Thread Daniel Grumberg via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG7da2d644e039: [clang] [extract-api] Don't crash for category in libclang APIs (authored by dang). Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D149737: [clang][ExtractAPI] Add semicolon to function declaration fragments

2023-05-04 Thread Daniel Grumberg via Phabricator via cfe-commits
dang accepted this revision. dang added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149737/new/ https://reviews.llvm.org/D149737 ___ cfe

[PATCH] D139115: [clang][ExtractAPI] Add support for single symbol SGF

2022-12-07 Thread Daniel Grumberg via Phabricator via cfe-commits
dang marked 6 inline comments as done. dang added inline comments. Comment at: clang/include/clang/ExtractAPI/API.h:234 ReadOnly = 1, -Class = 1 << 1, Dynamic = 1 << 2, zixuw wrote: > What's the reason for refactoring out instance vs. class property

[PATCH] D139115: [clang][ExtractAPI] Add support for single symbol SGF

2022-12-09 Thread Daniel Grumberg via Phabricator via cfe-commits
dang marked an inline comment as done. dang added inline comments. Comment at: clang/include/clang/ExtractAPI/DeclarationFragments.h:91 +/// The associated declaration, if applicable. +const Decl *Declaration; + zixuw wrote: > Is the decl guaranteed to be

[PATCH] D140010: [clang][ExtractAPI] Fix naming of typedef'd anonymous enums

2022-12-14 Thread Daniel Grumberg via Phabricator via cfe-commits
dang created this revision. dang added reviewers: zixuw, ributzka, QuietMisdreavus. Herald added a project: All. dang requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Anonymous enums that are typedef'd should take on the name of the typedef.

[PATCH] D140010: [clang][ExtractAPI] Fix naming of typedef'd anonymous enums

2022-12-14 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added inline comments. Comment at: clang/lib/ExtractAPI/ExtractAPIVisitor.cpp:174-175 + StringRef Name = Decl->getName(); if (Name.empty()) Name = getTypedefName(Decl); + if (Name.empty()) { zixuw wrote: > Aren't these two lines supposed to do this

[PATCH] D140010: [clang][ExtractAPI] Fix naming of typedef'd anonymous enums

2022-12-15 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added inline comments. Comment at: clang/lib/ExtractAPI/ExtractAPIVisitor.cpp:174-175 + StringRef Name = Decl->getName(); if (Name.empty()) Name = getTypedefName(Decl); + if (Name.empty()) { zixuw wrote: > dang wrote: > > zixuw wrote: > > > Aren't

[PATCH] D140010: [clang][ExtractAPI] Fix naming of typedef'd anonymous enums

2022-12-16 Thread Daniel Grumberg via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8dcb629aa4cc: [clang][ExtractAPI] Fix naming of typedef'd anonymous enums (authored by dang). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140010/new/ http

<    1   2   3   4