[PATCH] D158646: [clang-tools-extra][ExtractAPI] create clang-symbolgraph-merger

2023-09-06 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added a comment. As per https://discourse.llvm.org/t/pull-request-migration-schedule/71595 we should move this review to GitHub to make sure we don't lose track of it. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158646/new/ https://reviews.llvm.org/D158646

[PATCH] D157810: [clang][ExtractAPI] Create extractapi::RecordLocation

2023-09-06 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added a comment. As per https://discourse.llvm.org/t/pull-request-migration-schedule/71595 we should move this review to GitHub to make sure we don't lose track of it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157810/new/

[PATCH] D158671: [NFC][Clang] Fix static analyzer concerns

2023-08-24 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 Comment at: clang/include/clang/ExtractAPI/ExtractAPIVisitor.h:195 SymbolReference Context; -auto Record = dyn_cast(Decl->getDeclContext()); +auto Record =

[PATCH] D157810: [clang][ExtractAPI] Create extractapi::RecordLocation

2023-08-24 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added a comment. LGTM Comment at: clang/include/clang/ExtractAPI/API.h:137 -/// DocComment is a vector of RawComment::CommentLine. +/// Slightly cut down version of PresumedLoc to suite the needs of +/// ExtractAPI. s/suite/suit CHANGES SINCE LAST

[PATCH] D158474: [clang][ExtractAPI] Fix bool spelling coming from the macro definition.

2023-08-22 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. Nice! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158474/new/ https://reviews.llvm.org/D158474 ___

[PATCH] D158239: [clang][ExtractAPI] Add support for namespaces

2023-08-22 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/D158239/new/ https://reviews.llvm.org/D158239 ___

[PATCH] D158239: [clang][ExtractAPI] Add support for namespaces

2023-08-21 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added inline comments. Comment at: clang/include/clang/ExtractAPI/ExtractAPIVisitor.h:38 +namespace { +inline SmallString<128> DetermineParentDecl(const DeclContext *Context) { + SmallString<128> ParentUSR; I think this should compute both the parent decl

[PATCH] D158031: [clang][ExtractAPI] Refactor C++ method and field visitation

2023-08-21 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. Did this change not affect ordering of the symbols in the generated JSON? Looks pretty good to me otherwise! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D158029: [clang][ExtractAPI] Add support for C++ member templates

2023-08-21 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/D158029/new/ https://reviews.llvm.org/D158029 ___

[PATCH] D157810: [clang][ExtractAPI] Create extractapi::RecordLocation

2023-08-21 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added inline comments. Comment at: clang/include/clang/ExtractAPI/ExtractAPIVisitor.h:182-189 DocComment Comment; if (auto *RawComment = - getDerivedExtractAPIVisitor().fetchRawCommentForDecl(Decl)) -Comment =

[PATCH] D158027: [clang][ExtractAPI] Visit method templates with better scheme

2023-08-18 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/D158027/new/ https://reviews.llvm.org/D158027 ___

[PATCH] D157579: [clang][ExtractAPI] Add support for C++ global function templates

2023-08-18 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 Comment at: clang/include/clang/ExtractAPI/API.h:1077 : public std::true_type {}; +template <> +struct has_template : public std::true_type {}; Mega

[PATCH] D158239: [clang][ExtractAPI] Add support for namespaces

2023-08-18 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added inline comments. Comment at: clang/include/clang/ExtractAPI/API.h:1129 template <> -struct has_function_signature : public std::true_type {}; +struct has_function_signature : public std::true_type { +}; Can we get rid of these types of changes to

[PATCH] D157350: [clang][ExtractAPI] Add support for C++ variable templates

2023-08-18 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/D157350/new/ https://reviews.llvm.org/D157350 ___

[PATCH] D157076: [clang][ExtractAPI] Add support for C++ class templates and concepts

2023-08-18 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/D157076/new/ https://reviews.llvm.org/D157076 ___

[PATCH] D157076: [clang][ExtractAPI] Add support for C++ class templates and concepts

2023-08-16 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added a comment. Looks mostly good. Quick Question how do we handle inheritance to a template parameter? Comment at: clang/include/clang/ExtractAPI/API.h:665 + +struct ClassTemplateSpecRecord : CXXClassRecord { + ClassTemplateSpecRecord(StringRef USR, StringRef Name,

[PATCH] D152770: [clang][ExtractAPI] Add support for Objective-C categories

2023-08-15 Thread Daniel Grumberg via Phabricator via cfe-commits
dang accepted this revision. dang added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152770/new/ https://reviews.llvm.org/D152770 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D152770: [clang][ExtractAPI] Add support for Objective-C categories

2023-08-15 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added inline comments. Comment at: clang/test/ExtractAPI/objc_various_categories.m:8 +// RUN: %t/myclass_1.h \ +// RUN: %t/input.h -o %t/output.json | FileCheck -allow-empty %s + I don't think you need to have MyClass2 and the associated myclass2.h. It's

[PATCH] D152770: [clang][ExtractAPI] Add support for Objective-C categories

2023-08-09 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/D152770/new/ https://reviews.llvm.org/D152770 ___

[PATCH] D157007: [clang][ExtractAPI] Add support for C++ classes with fix

2023-08-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/D157007/new/ https://reviews.llvm.org/D157007 ___

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

2023-08-02 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/D153557/new/ https://reviews.llvm.org/D153557 ___

[PATCH] D152770: [clang][ExtractAPI] Add support for Objective-C categories

2023-08-02 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added inline comments. Comment at: clang/include/clang/ExtractAPI/ExtractAPIVisitor.h:488 + bool IsFromExternalModule = true; + for (const auto : API.getObjCInterfaces()) { +if (InterfaceDecl->getName() == Interface.second.get()->Name) { I think this

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

2023-07-31 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/D154038/new/ https://reviews.llvm.org/D154038 ___

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

2023-07-31 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added a comment. Looking pretty good, if you can address the last few bits of feedback I am happy to merge this. Comment at: clang/include/clang/ExtractAPI/API.h:770 +template <> +struct has_function_signature : public std::true_type {}; + Does

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

2023-07-03 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 thanks for working on this! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152356/new/ https://reviews.llvm.org/D152356

[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] 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] 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

[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

[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] 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

[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

[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 ___

[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

[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 ,

[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=509714#toc Repository: rG LLVM

[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
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

[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

[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] 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:

[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] 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:

[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

[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

[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

[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/

[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

[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:

[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`

[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

[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:

[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

[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/

[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] 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

[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

[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] 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)

[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

[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:

[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] Dont crash for category in libclang APIs (authored by dang). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D141961: [clang][lex] Pass hash location to more PPCallbacks methods

2023-01-24 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added a comment. LGTM for the ExtractAPI changes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141961/new/ https://reviews.llvm.org/D141961 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2023-01-19 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added inline comments. Comment at: clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp:537-544 + generatePathComponents(Record, API, + [Lang, ](const PathComponent ) { + ParentContexts.push_back( +

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

2023-01-19 Thread Daniel Grumberg via Phabricator via cfe-commits
dang updated this revision to Diff 490447. dang added a comment. Formatting fixes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142101/new/ https://reviews.llvm.org/D142101 Files: clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp

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

2023-01-19 Thread Daniel Grumberg via Phabricator via cfe-commits
dang created this revision. dang added a reviewer: zixuw. Herald added a subscriber: 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. Remove failure conditions

[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 typedefd anonymous enums (authored by dang). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140010/new/

[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-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

[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

[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

[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

[PATCH] D136455: [clang][ExtractAPI] Add targetFallback to relationships in symbol graph

2022-11-07 Thread Daniel Grumberg via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG671709f0e7d4: [clang][ExtractAPI] Add targetFallback to relationships in symbol graph (authored by dang). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D136450: [clang][ExtractAPI] Allow users to specify a list of symbols to ignore

2022-10-25 Thread Daniel Grumberg via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG791fe26d7581: [clang][ExtractAPI] Allow users to specify a list of symbols to ignore (authored by dang). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D136455: [clang][ExtractAPI] Add targetFallback to relationships in symbol graph

2022-10-25 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added a comment. However, I am not sure it's worthwhile and we might run into edge cases doing it this way with explicitly ignored symbols. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136455/new/ https://reviews.llvm.org/D136455

[PATCH] D136455: [clang][ExtractAPI] Add targetFallback to relationships in symbol graph

2022-10-24 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added a comment. In D136455#3879849 , @zixuw wrote: > Is it easy to/worth checking if the target is actually outside of the current > module to keep the output smaller and concise? I think it can be done, since we ignore symbols that don't come

[PATCH] D136455: [clang][ExtractAPI] Add targetFallback to relationships in symbol graph

2022-10-21 Thread Daniel Grumberg via Phabricator via cfe-commits
dang created this revision. dang added reviewers: zixuw, QuietMisdreavus, ributzka. Herald added a subscriber: yaxunl. Herald added a project: All. dang requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Adds a 'targetFallback' field to

[PATCH] D136450: [clang][ExtractAPI] Allow users to specify a list of symbols to ignore

2022-10-21 Thread Daniel Grumberg via Phabricator via cfe-commits
dang created this revision. dang added reviewers: zixuw, QuietMisdreavus. Herald added a reviewer: ributzka. Herald added a project: All. dang requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. Adds a `--extract-api-ignores=` command

[PATCH] D135804: [clang][ExtractAPI] Ignore fully anonymous RecordDecls

2022-10-13 Thread Daniel Grumberg via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb6da16ffb9d5: [clang][ExtractAPI] Ignore fully anonymous RecordDecls (authored by dang). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135804/new/

[PATCH] D135804: [clang][ExtractAPI] Ignore fully anonymous RecordDecls

2022-10-12 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. ExtractAPI was emitting a separate symbol for anonymous record

[PATCH] D134813: Properly print unnamed TagDecl objects in diagnostics

2022-10-06 Thread Daniel Grumberg via Phabricator via cfe-commits
dang accepted this revision. dang added a comment. In D134813#3838069 , @zixuw wrote: > With the PrintingPolicy fix in https://reviews.llvm.org/D135295 and landed > USR fix, the diff within ExtractAPI tests is only the wording with anonymous > enums,

[PATCH] D130918: [clang][ExtractAPI] Record availability information on all platforms

2022-08-19 Thread Daniel Grumberg via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG57c9780d60b1: [clang][ExtractAPI] Record availability information on all platforms (authored by dang). Changed prior to commit: https://reviews.llvm.org/D130918?vs=449228=454111#toc Repository: rG

[PATCH] D130918: [clang][ExtractAPI] Record availability information on all platforms

2022-08-02 Thread Daniel Grumberg via Phabricator via cfe-commits
dang updated this revision to Diff 449228. dang added a comment. Remove doc comments in test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130918/new/ https://reviews.llvm.org/D130918 Files: clang/include/clang/ExtractAPI/API.h

[PATCH] D130918: [clang][ExtractAPI] Record availability information on all platforms

2022-08-01 Thread Daniel Grumberg via Phabricator via cfe-commits
dang created this revision. dang added reviewers: zixuw, QuietMisdreavus, ributzka. Herald added a subscriber: mgorny. Herald added a project: All. dang requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Currently ExtractAPI only emits

[PATCH] D130581: [clang][ExtractAPI] Ensure that class properties have a kind of "Type Property"

2022-07-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 rGd3fc779e4295: [clang][ExtractAPI] Ensure that class properties have a kind of Type Property (authored by dang). Repository: rG LLVM Github

[PATCH] D130583: [clang][ExtractAPI] Add a space between type and name in property declaration fragments

2022-07-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 rG7f0387de4c60: [clang][ExtractAPI] Add a space between type and name in property declaration… (authored by dang). Repository: rG LLVM Github

[PATCH] D130583: [clang][ExtractAPI] Add a space between type and name in property declaration fragments

2022-07-26 Thread Daniel Grumberg via Phabricator via cfe-commits
dang created this revision. dang added reviewers: zixuw, QuietMisdreavus. 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. Repository: rG LLVM Github Monorepo

[PATCH] D130581: [clang][ExtractAPI] Ensure that class properties have a kind of "Type Property"

2022-07-26 Thread Daniel Grumberg via Phabricator via cfe-commits
dang created this revision. dang added reviewers: zixuw, QuietMisdreavus. 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. Generated symbol graphs should distinguish

[PATCH] D125678: [clang][extract-api] Don't emit symbols prefixed with an underscore

2022-05-25 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 rG504736cedff3: [clang][extract-api] Dont emit symbols prefixed with an underscore (authored by dang). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D125678: [clang][extract-api] Don't emit symbols prefixed with an underscore

2022-05-25 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added a comment. In D125678#3517174 , @zixuw wrote: > In D125678#3517168 , > @QuietMisdreavus wrote: > >> clang-format failed: >> >> --- clang-format >> >> changed files: >> >>

[PATCH] D125678: [clang][extract-api] Don't emit symbols prefixed with an underscore

2022-05-16 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. These symbols are understood to not be used for client API consumption by

[PATCH] D124964: Revert "Revert "[clang][extract-api] Use relative includes""

2022-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! If I understand the issue correctly we gave `llvm::Regex::match` a string temporary to match against before and now we store it for long enough to process the match results? Repository:

[PATCH] D123831: [clang][extract-api] Use relative includes

2022-05-04 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added a comment. Since this is a new test can we use the approach in https://reviews.llvm.org/D124634 to check for diagnostics output. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123831/new/ https://reviews.llvm.org/D123831

[PATCH] D123831: [clang][extract-api] Use relative includes

2022-05-04 Thread Daniel Grumberg via Phabricator via cfe-commits
dang accepted this revision. dang added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123831/new/ https://reviews.llvm.org/D123831 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D123831: [clang][extract-api] Use relative includes

2022-05-03 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. Minor comment LGTM otherwise Comment at: clang/lib/ExtractAPI/ExtractAPIConsumer.cpp:203 +// Try to reduce the include name the same way we tried to include it. +if

[PATCH] D124634: ExtractAPI: Use %clang_cc1 and -verify in enum.c

2022-04-29 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/D124634/new/ https://reviews.llvm.org/D124634 ___

[PATCH] D123831: [clang][extract-api] Use relative includes

2022-04-28 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added inline comments. Comment at: clang/lib/ExtractAPI/ExtractAPIConsumer.cpp:134 +if (!SpelledFilename.empty()) + return SpelledFilename.str(); + zixuw wrote: > zixuw wrote: > > zixuw wrote: > > > One problem I can see in this right now

[PATCH] D123831: [POC][WIP] Use relative include in extract-api

2022-04-21 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added a comment. In D123831#3459368 , @ributzka wrote: > In D123831#3458774 , @dang wrote: > >> In D123831#3455048 , @cishida >> wrote: >> we might not always

[PATCH] D123831: [POC][WIP] Use relative include in extract-api

2022-04-19 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added a comment. In D123831#3455048 , @cishida wrote: >> we might not always want to transform an absolute path because the resulting >> relative include name might get remapped in a headermap, for example in test >> known_files_only_hmap.c. But

[PATCH] D123831: [POC][WIP] Use relative include in extract-api

2022-04-15 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added inline comments. Comment at: clang/lib/ExtractAPI/ExtractAPIConsumer.cpp:65 + // Matches framework include patterns + const llvm::Regex Rule("/(.+)\\.framework/(.+)?Headers/(.+)"); + StringRef WorkingDir = CI.getFileSystemOpts().WorkingDir; This

  1   2   3   4   >