[PATCH] D80748: [clang] Add '-Wundef-prefix' warning option

2020-05-28 Thread Zixu Wang via Phabricator via cfe-commits
zixuw created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. zixuw abandoned this revision. Add an `-Wundef-prefix=,...` option, which is similar to `-Wundef`, but only give warnings for undefined macros with the given prefixes. Make `-Wundef` an alias of `-W

[PATCH] D80751: [clang][diagnostics] Add '-Wundef-prefix' warning option

2020-05-28 Thread Zixu Wang via Phabricator via cfe-commits
zixuw created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. zixuw added reviewers: ributzka, steven_wu, cishida, bruno, arphaman. Herald added a subscriber: dexonsmith. zixuw edited the summary of this revision. - Add an `-Wundef-prefix=,...` option, which i

[PATCH] D80751: [clang][diagnostics] Add '-Wundef-prefix' warning option

2020-06-08 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added inline comments. Comment at: clang/include/clang/Basic/DiagnosticGroups.td:108 +def Undefined : DiagGroup<"undef">; +def UndefinedPrefix : DiagGroup<"undef-prefix", [Undefined]>; def UnsupportedNan : DiagGroup<"unsupported-nan">; arphaman wrote: > It

[PATCH] D80751: [clang][diagnostics] Add '-Wundef-prefix' warning option

2020-06-09 Thread Zixu Wang via Phabricator via cfe-commits
zixuw updated this revision to Diff 269628. zixuw added a comment. Update test case for `#pragma clang diagnostic` Update test case to verify that the state of `-Wundef` can still be modified using `#pragma clang diagnostic` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[PATCH] D80751: [clang][diagnostics] Add '-Wundef-prefix' warning option

2020-06-09 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added inline comments. Comment at: clang/lib/Lex/PPExpressions.cpp:262 + // string to UndefPrefixes as an explicit "-Wundef" does. + if (UndefPrefixes.empty() || + llvm::any_of(UndefPrefixes, ributzka wrote: > What happens whe

[PATCH] D80751: [clang][diagnostics] Add '-Wundef-prefix' warning option

2020-06-12 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added inline comments. Comment at: clang/lib/Lex/PPExpressions.cpp:262 + // string to UndefPrefixes as an explicit "-Wundef" does. + if (UndefPrefixes.empty() || + llvm::any_of(UndefPrefixes, arphaman wrote: > zixuw wrote: > >

[PATCH] D81966: [clang][module] Improve -Wincomplete-umbrella

2020-06-16 Thread Zixu Wang via Phabricator via cfe-commits
zixuw created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. zixuw added reviewers: arphaman, rsmith, bruno. Herald added a subscriber: dexonsmith. Change the warning message for `-Wincomplete-umbrella` to report the location of the umbrella header; Add a fix

[PATCH] D81966: [clang][module] Improve -Wincomplete-umbrella

2020-06-16 Thread Zixu Wang via Phabricator via cfe-commits
zixuw abandoned this revision. zixuw added a comment. Abandoning this revision because the upstream for this work is not correctly tracking the llvm.org branch. The method `setGenModuleActionWrapper` is available in `apple/master` but not in llvm. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D83250: [clang] Enable errors for undefined TARGET_OS_ macros in Darwin driver

2020-07-06 Thread Zixu Wang via Phabricator via cfe-commits
zixuw created this revision. zixuw added reviewers: arphaman, ributzka. Herald added subscribers: cfe-commits, dexonsmith. Herald added a project: clang. Add clang option `-Wundef-prefix=TARGET_OS_` and `-Werror=undef-prefix` to Darwin driver. Repository: rG LLVM Github Monorepo https://revie

[PATCH] D82118: [clang][module] Improve incomplete-umbrella warning

2020-07-06 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82118/new/ https://reviews.llvm.org/D82118 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[PATCH] D83250: [clang] Enable errors for undefined TARGET_OS_ macros in Darwin driver

2020-07-06 Thread Zixu Wang via Phabricator via cfe-commits
zixuw updated this revision to Diff 275821. zixuw added a comment. Add a test case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83250/new/ https://reviews.llvm.org/D83250 Files: clang/lib/Driver/ToolChains/Darwin.cpp clang/test/Driver/darwin

[PATCH] D83250: [clang] Enable errors for undefined TARGET_OS_ macros in Darwin driver

2020-07-06 Thread Zixu Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf47b8851318d: [clang] Enable errors for undefined TARGET_OS_ macros in Darwin driver (authored by zixuw). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83250

[PATCH] D83813: [clang] Teach -fembed-bitcode option not to embed W_value Group

2020-07-14 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added a comment. Would `llvm::Option::matches` be more appropriate than `getID` and checking for equality here? `Option::matches` tracks subgroups correctly, without having to explicitly check for `W_value_Group`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:/

[PATCH] D83813: [clang] Teach -fembed-bitcode option not to embed W_value Group

2020-07-14 Thread Zixu Wang via Phabricator via cfe-commits
zixuw accepted this revision. zixuw 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/D83813/new/ https://reviews.llvm.org/D83813 ___ c

[PATCH] D82118: [clang][module] Improve incomplete-umbrella warning

2020-07-15 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added a comment. In D82118#2154280 , @vsapsai wrote: > Didn't get into details but overall GenModuleActionWrapper approach looks > pretty complicated. Haven't tried to accomplish the same myself, so cannot > say if such complexity is warranted or n

[PATCH] D82118: [clang][module] Improve incomplete-umbrella warning

2020-06-18 Thread Zixu Wang via Phabricator via cfe-commits
zixuw created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. - Upstream methods for action wrappers in generating modules; - Change the warning message for -Wincomplete-umbrella to report the location of the umbrella header; - Add a fix-it hint to include un

[PATCH] D80751: [clang][diagnostics] Add '-Wundef-prefix' warning option

2020-06-29 Thread Zixu Wang via Phabricator via cfe-commits
zixuw updated this revision to Diff 274212. zixuw added a comment. - Refine test cases to check combinations of 'Wundef' and 'Wundef-prefix', and with/without 'Werror'; - Fix issues with '-Werror=undef' by explicitly looking for the option. Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D80751: [clang][diagnostics] Add '-Wundef-prefix' warning option

2020-06-29 Thread Zixu Wang via Phabricator via cfe-commits
zixuw updated this revision to Diff 274219. zixuw added a comment. - Remove implementation details from the help text of 'Wundef'; - Hide help text for 'Wundef-prefix' and 'Wundef'. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80751/new/ https://r

[PATCH] D80751: [clang][diagnostics] Add '-Wundef-prefix' warning option

2020-06-29 Thread Zixu Wang via Phabricator via cfe-commits
zixuw updated this revision to Diff 274276. zixuw added a comment. Abort the design of making 'Wundef' an alias to 'Wundef-prefix' because it depends on the alias expansion to work, which adds an empty string to 'UndefPrefixes' to do the trick. However, any other way to enable 'Wundef', for examp

[PATCH] D82118: [clang][module] Improve incomplete-umbrella warning

2020-08-18 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added a comment. Hey Bruno! Thanks for the review. In D82118#2224423 , @bruno wrote: > Hi Zixu, thanks for working on improving this. > > I agree with @vsapsai on the the `GenModuleActionWrapper` approach. Also, it > seems to me that even though it

[PATCH] D121873: [clang][extract-api] Add enum support

2022-03-23 Thread Zixu Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG71b4c22612a0: [clang][extract-api] Add enum support (authored by zixuw). Changed prior to commit: https://reviews.llvm.org/D121873?vs=417424&id=417667#toc Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D122202: [clang][extract-api] Add struct support

2022-03-23 Thread Zixu Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5bb5704c1b35: [clang][extract-api] Add struct support (authored by zixuw). Changed prior to commit: https://reviews.llvm.org/D122202?vs=417438&id=417668#toc Repository: rG LLVM Github Monorepo CHANG

[PATCH] D122331: [clang][extract-api] Stop allocating APIRecords via BumpPtrAllocator

2022-03-23 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added a comment. This is much cleaner now. Thanks Daniel! Comment at: clang/include/clang/ExtractAPI/API.h:326 + /// Note: The main use for this is being able to deduplicate strings. llvm::BumpPtrAllocator Allocator; Should we just rename the alloca

[PATCH] D121873: [clang][extract-api] Add enum support

2022-03-23 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added a comment. In D121873#3403082 , @mstorsjo wrote: > This (or some closely related commit?) causes a huge amount of warnings when > building with GCC: > > warning: ‘clang::extractapi::EnumRecord’ has a field > ‘clang::extractapi::EnumRecord:

[PATCH] D122160: [clang][extract-api] Refactor ExtractAPI and improve docs

2022-03-24 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added inline comments. Comment at: clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp:159 + switch (Language) { + case Language::C: +return "c"; zixuan-wu wrote: > It's same name as `Language` variable above, and it cause compile error. > @

[PATCH] D122160: [clang][extract-api] Refactor ExtractAPI and improve docs

2022-03-24 Thread Zixu Wang via Phabricator via cfe-commits
zixuw marked an inline comment as done. zixuw added inline comments. Comment at: clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp:159 + switch (Language) { + case Language::C: +return "c"; zixuw wrote: > zixuan-wu wrote: > > It's same name as `L

[PATCH] D122446: [clang][extract-api] Add Objective-C interface support

2022-03-24 Thread Zixu Wang via Phabricator via cfe-commits
zixuw created this revision. Herald added a reviewer: dang. Herald added a project: All. zixuw requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. - Add support for Objective-C interface declarations in ExtractAPI. - Use `clang::Language` for l

[PATCH] D122495: [clang][extract-api] Use correct language info from inputs

2022-03-25 Thread Zixu Wang via Phabricator via cfe-commits
zixuw created this revision. Herald added a reviewer: dang. Herald added a project: All. zixuw requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The current way of getting the `clang::Language` from `LangOptions` does not handle Objective-C c

[PATCH] D122446: [clang][extract-api] Add Objective-C interface support

2022-03-25 Thread Zixu Wang via Phabricator via cfe-commits
zixuw updated this revision to Diff 418286. zixuw added a comment. Move the `Language` fix out into a separate patch: D122495 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122446/new/ https://reviews.llvm.org/D12

[PATCH] D122446: [clang][extract-api] Add Objective-C interface support

2022-03-25 Thread Zixu Wang via Phabricator via cfe-commits
zixuw updated this revision to Diff 418342. zixuw added a comment. No code change, amend commit message. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122446/new/ https://reviews.llvm.org/D122446 Files: clang/include/clang/ExtractAPI/API.h cla

[PATCH] D122511: [clang][extract-api] Add Objective-C protocol support

2022-03-25 Thread Zixu Wang via Phabricator via cfe-commits
zixuw created this revision. Herald added a reviewer: dang. Herald added a project: All. zixuw requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Add support for Objective-C protocol declarations in ExtractAPI. Depends on D122446

[PATCH] D122611: [clang][extract-api] Add support for macros

2022-03-28 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added a comment. Still going through the declaration fragments builder and `ExtractAPIVisitor/Consumer/Action` changes, but it seems that the patch needs a rebase onto the latest main right now as it's missing several already landed changes. Comment at: clang/include/c

[PATCH] D122495: [clang][extract-api] Use correct language info from inputs

2022-03-28 Thread Zixu Wang via Phabricator via cfe-commits
zixuw marked 2 inline comments as done. zixuw added inline comments. Comment at: clang/include/clang/ExtractAPI/API.h:312 - /// Get the language options used to parse the APIs. - const LangOptions &getLangOpts() const { return LangOpts; } + /// Get the language by the APIs.

[PATCH] D122495: [clang][extract-api] Use correct language info from inputs

2022-03-28 Thread Zixu Wang via Phabricator via cfe-commits
zixuw updated this revision to Diff 418724. zixuw marked an inline comment as done. zixuw added a comment. Address review issues. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122495/new/ https://reviews.llvm.org/D122495 Files: clang/include/cla

[PATCH] D122446: [clang][extract-api] Add Objective-C interface support

2022-03-28 Thread Zixu Wang via Phabricator via cfe-commits
zixuw updated this revision to Diff 418738. zixuw marked 4 inline comments as done. zixuw added a comment. - Address review comments: - Use template to reuse logic for building function signatures for FunctionDecl and ObjCMethodDecl. - Move the change of `objc_interface.m` test in this patch fr

[PATCH] D122446: [clang][extract-api] Add Objective-C interface support

2022-03-28 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added inline comments. Comment at: clang/lib/ExtractAPI/ExtractAPIConsumer.cpp:245 +if (const auto *SuperClassDecl = Decl->getSuperClass()) { + SuperClass.Name = SuperClassDecl->getObjCRuntimeNameAsString(); + SuperClass.USR = API.recordUSR(SuperClassDecl); --

[PATCH] D122511: [clang][extract-api] Add Objective-C protocol support

2022-03-28 Thread Zixu Wang via Phabricator via cfe-commits
zixuw updated this revision to Diff 418744. zixuw marked 2 inline comments as done. zixuw added a comment. Rebase upstream changes in D122446 : - Move the change of the `objc_interface.m` test to D122446 . Repository: rG LLV

[PATCH] D122511: [clang][extract-api] Add Objective-C protocol support

2022-03-28 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added inline comments. Comment at: clang/lib/ExtractAPI/ExtractAPIConsumer.cpp:269 +// Collect symbol information. +StringRef Name = Decl->getName(); +StringRef USR = API.recordUSR(Decl); dang wrote: > I think we should be recording this in Stri

[PATCH] D122611: [clang][extract-api] Add support for macros

2022-03-28 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added inline comments. Comment at: clang/include/clang/ExtractAPI/Serialization/SymbolGraphSerializer.h:22 #include "clang/ExtractAPI/Serialization/SerializerBase.h" +#include "clang/Lex/PreprocessingRecord.h" #include "llvm/Support/JSON.h" Why do we nee

[PATCH] D122495: [clang][extract-api] Use correct language info from inputs

2022-03-29 Thread Zixu Wang 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 rG15bf0e567375: [clang][extract-api] Use correct language info from inputs (authored by zixuw). Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D122446: [clang][extract-api] Add Objective-C interface support

2022-03-29 Thread Zixu Wang via Phabricator via cfe-commits
zixuw marked an inline comment as done. zixuw added inline comments. Comment at: clang/lib/ExtractAPI/DeclarationFragments.cpp:642-648 +// Instantiate template for FunctionDecl. +template FunctionSignature +DeclarationFragmentsBuilder::getFunctionSignature(const FunctionDecl *);

[PATCH] D122648: [clang][extractapi] Tie API and serialization to the FrontendAction

2022-03-29 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added a comment. Mostly LGTM after addressing the inline comments. Comment at: clang/include/clang/ExtractAPI/FrontendActions.h:42-58 /// Prepare to execute the action on the given CompilerInstance. /// /// This is called before executing the action on any inputs

[PATCH] D122446: [clang][extract-api] Add Objective-C interface support

2022-03-29 Thread Zixu Wang via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. zixuw marked an inline comment as done. Closed by commit rG9b36e126fdb1: [clang][extract-api] Add Objective-C interface support (authored by zixuw). Repository: rG L

[PATCH] D122511: [clang][extract-api] Add Objective-C protocol support

2022-03-29 Thread Zixu Wang 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 rGd1d34bafef56: [clang][extract-api] Add Objective-C protocol support (authored by zixuw). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D122611: [clang][extract-api] Add support for macros

2022-03-29 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added inline comments. Comment at: clang/include/clang/ExtractAPI/API.h:334 + using RecordMap = llvm::MapVector>; + /// /// Get the target triple for the ExtractAPI invocation. Extra/should-be-empty line here? Comment at: clang/lib/E

[PATCH] D122648: [clang][extractapi] Tie API and serialization to the FrontendAction

2022-03-30 Thread Zixu Wang via Phabricator via cfe-commits
zixuw accepted this revision. zixuw added a comment. This revision is now accepted and ready to land. LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122648/new/ https://reviews.llvm.org/D122648 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D122611: [clang][extract-api] Add support for macros

2022-03-30 Thread Zixu Wang via Phabricator via cfe-commits
zixuw accepted this revision. zixuw 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/D122611/new/ https://reviews.llvm.org/D122611 ___

[PATCH] D122774: [clang][extract-api] Add Objective-C Category support

2022-03-30 Thread Zixu Wang via Phabricator via cfe-commits
zixuw created this revision. Herald added a reviewer: dang. Herald added a project: All. zixuw requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Add (partial) support for Objective-C category records in ExtractAPI. The current ExtractAPI coll

[PATCH] D122774: [clang][extract-api] Add Objective-C Category support

2022-03-30 Thread Zixu Wang via Phabricator via cfe-commits
zixuw updated this revision to Diff 419298. zixuw added a comment. Remove probably unnecessary includes added automatically by clangd. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122774/new/ https://reviews.llvm.org/D122774 Files: clang/includ

[PATCH] D122774: [clang][extract-api] Add Objective-C Category support

2022-03-31 Thread Zixu Wang via Phabricator via cfe-commits
zixuw updated this revision to Diff 419474. zixuw added a comment. Add missing documentatin for ObjCCategoryRecord. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122774/new/ https://reviews.llvm.org/D122774 Files: clang/include/clang/ExtractAPI/

[PATCH] D122798: [clang][extract-api][NFC] Add documentation

2022-04-04 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added a comment. Has this landed yet? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122798/new/ https://reviews.llvm.org/D122798 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[PATCH] D123056: [clang][extract-api] Undefining macros should not result in a crash

2022-04-04 Thread Zixu Wang via Phabricator via cfe-commits
zixuw accepted this revision. zixuw added a comment. This revision is now accepted and ready to land. Ha! Nice catch! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123056/new/ https://reviews.llvm.org/D123056 __

[PATCH] D123045: [clang][extract-api] Fix small issues with SymbolGraphSerializer

2022-04-04 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added inline comments. Comment at: clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp:17 #include "clang/ExtractAPI/API.h" +#include "clang/ExtractAPI/DeclarationFragments.h" #include "llvm/Support/JSON.h" Not needed Comment a

[PATCH] D123019: [clang][extract-api] Add support for typedefs

2022-04-04 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added inline comments. Comment at: clang/lib/ExtractAPI/DeclarationFragments.cpp:15 +#include "TypedefUnderlyingTypeResolver.h" + #include "clang/ExtractAPI/DeclarationFragments.h" Empty line Comment at: clang/lib/ExtractAPI/Serializatio

[PATCH] D123045: [clang][extract-api] Fix small issues with SymbolGraphSerializer

2022-04-04 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added a comment. In D123045#3427699 , @QuietMisdreavus wrote: > After a quick scan comparing the current output of these symbol graphs with > the primary library used for reading them > , the last th

[PATCH] D123045: [clang][extract-api] Fix small issues with SymbolGraphSerializer

2022-04-04 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added inline comments. Comment at: clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp:510 Symbols.emplace_back(std::move(*Obj)); + PathComponentContext.pop_back(); } QuietMisdreavus wrote: > zixuw wrote: > > What's the cost/would it worth it

[PATCH] D122774: [clang][extract-api] Add Objective-C Category support

2022-04-04 Thread Zixu Wang via Phabricator via cfe-commits
zixuw marked an inline comment as done. zixuw added inline comments. Comment at: clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp:396 break; + case APIRecord::RK_ObjCCategory: +Kind["identifier"] = AddLangPrefix("category"); dang wrote: > Si

[PATCH] D122774: [clang][extract-api] Add Objective-C Category support

2022-04-04 Thread Zixu Wang via Phabricator via cfe-commits
zixuw updated this revision to Diff 420333. zixuw marked an inline comment as done. zixuw added a comment. Address review comment: - Use `llvm_unreachable` for the Objective-C category case in `serializeSymbolKind` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D123045: [clang][extract-api] Fix small issues with SymbolGraphSerializer

2022-04-04 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added inline comments. Comment at: clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp:510 Symbols.emplace_back(std::move(*Obj)); + PathComponentContext.pop_back(); } zixuw wrote: > QuietMisdreavus wrote: > > zixuw wrote: > > > What's the cost

[PATCH] D123019: [clang][extract-api] Add support for typedefs

2022-04-05 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added inline comments. Comment at: clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp:611 + + (*Typedef)["type"] = Record.UnderlyingType.USR; + Curious: where does this come from the format spec? Is this required/correctly populated? I see a `ty

[PATCH] D123148: [clang][extract-api] Process only APIs declared in inputs

2022-04-05 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added inline comments. Comment at: clang/test/ExtractAPI/known_files_only.c:20 +// Let's make sure we aren't pulling in symbols from complex.h +#include +double complex build_complex(double real, double imaginary); I would just include another header split

[PATCH] D123045: [clang][extract-api] Fix small issues with SymbolGraphSerializer

2022-04-06 Thread Zixu Wang via Phabricator via cfe-commits
zixuw accepted this revision. zixuw added a comment. Unused include of declaration fragments in SymbolGraphSerializer. Otherwise LGTM! Comment at: clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp:17 #include "clang/ExtractAPI/API.h" +#include "clang/ExtractAPI/Dec

[PATCH] D123019: [clang][extract-api] Add support for typedefs

2022-04-06 Thread Zixu Wang via Phabricator via cfe-commits
zixuw accepted this revision. zixuw 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/D123019/new/ https://reviews.llvm.org/D123019 __

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

2022-07-26 Thread Zixu Wang via Phabricator via cfe-commits
zixuw accepted this revision. zixuw added a comment. This revision is now accepted and ready to land. LGTM. Thanks Daniel! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130581/new/ https://reviews.llvm.org/D130581 _

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

2022-07-26 Thread Zixu Wang via Phabricator via cfe-commits
zixuw accepted this revision. zixuw added a comment. This revision is now accepted and ready to land. Awesome! Thanks Daniel! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130583/new/ https://reviews.llvm.org/D130583 __

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

2022-08-01 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added a comment. Thanks Daniel! Comment at: clang/test/ExtractAPI/availability.c:16 +//--- input.h +/// Documentation for a. +void a(void); Do we care about doc comments for this particular test? The testing convention for all the ExtractAPI tests is prob

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

2022-08-02 Thread Zixu Wang via Phabricator via cfe-commits
zixuw accepted this revision. zixuw 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/D130918/new/ https://reviews.llvm.org/D130918 ___

[PATCH] D119479: [clang][extract-api] Add global record support

2022-03-08 Thread Zixu Wang via Phabricator via cfe-commits
zixuw updated this revision to Diff 413947. zixuw added a comment. Herald added a project: All. Move ExtractAPIConsumer which references clangIndex USR generation methods out of clangFrontend to resolve a cycle between clangFrontend and clangIndex when building shared libs. Repository: rG LL

[PATCH] D119479: [clang][extract-api] Add global record support

2022-03-08 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added a comment. I've moved things around to resolve the cycle, but sadly it seems that shared lib builds are already broken and I could not test it: Linking CXX shared library lib/libLLVMTransformUtils.dylib FAILED: lib/libLLVMTransformUtils.dylib : Undefined symbols for arc

[PATCH] D119479: [clang][extract-api] Add global record support

2022-03-08 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added a comment. Wait that's just a current linking issue on `main`, I suppose not specific to shared lib builds. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119479/new/ https://reviews.llvm.org/D119479 ___

[PATCH] D119479: [clang][extract-api] Add global record support

2022-03-08 Thread Zixu Wang via Phabricator via cfe-commits
zixuw updated this revision to Diff 413967. zixuw added a comment. Fix reference to vtable of ExtractAPIAction from clang/FrontendTools/ExecuteCompilerInstance Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119479/new/ https://reviews.llvm.org/D119

[PATCH] D119479: [clang][extract-api] Add global record support

2022-03-08 Thread Zixu Wang via Phabricator via cfe-commits
zixuw updated this revision to Diff 413992. zixuw added a comment. Plug clangSymbolGraph into clangFrontendTools Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119479/new/ https://reviews.llvm.org/D119479 Files: clang/include/clang/AST/RawComment

[PATCH] D119479: [clang][extract-api] Add global record support

2022-03-15 Thread Zixu Wang via Phabricator via cfe-commits
zixuw updated this revision to Diff 415658. zixuw added a comment. - Address reviews - Add and handle unconditionally unavailable - Delete the default constructor of `APIRecord` - Make `APIRecord` abstract for LLVM RTTI - Improve `getFormattedText` and `getFormattedLines` - Fix wordings

[PATCH] D119479: [clang][extract-api] Add global record support

2022-03-16 Thread Zixu Wang via Phabricator via cfe-commits
zixuw updated this revision to Diff 415974. zixuw added a comment. Using `SmallString`/`SmallVectorImpl` to pass `USR` into the `add*` APIs still feel weird and unintuitive. And it's still not clear to the caller that `Name` won't be copied but `USR` will. Trying out another approach: still pass b

[PATCH] D119479: [clang][extract-api] Add global record support

2022-03-16 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added a comment. Landing this in a moment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119479/new/ https://reviews.llvm.org/D119479 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[PATCH] D119479: [clang][extract-api] Add global record support

2022-03-16 Thread Zixu Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5aab45f43066: [clang][extract-api] Add global record support (authored by zixuw). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119479/new/ https://reviews.

[PATCH] D119479: [clang][extract-api] Add global record support

2022-03-16 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added a comment. Fixing bot failure right now Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119479/new/ https://reviews.llvm.org/D119479 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[PATCH] D119479: [clang][extract-api] Add global record support

2022-03-16 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added a comment. In D119479#3387872 , @haowei wrote: > We are seeing test failures after this patch is landed: > > Clang :: SymbolGraph/global_record.c > Script: > -- > : 'RUN: at line 1'; rm -rf > /b/s/w/ir/x/w/staging/llvm_build/tools/c

[PATCH] D119479: [clang][extract-api] Add global record support

2022-03-16 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added a comment. @haowei I got a quick fix of completely purging the generator output in the test case. Could you take a look to have a sanity check before I land the fix on main? diff --git a/clang/test/SymbolGraph/global_record.c b/clang/test/SymbolGraph/global_record.c index ba4bf

[PATCH] D119479: [clang][extract-api] Add global record support

2022-03-16 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added a comment. @haowei Fix landed in 3840082ab509490f16766cd8c155a1cf4b606fec Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119479/new/ https://reviews.llvm.org/D119479

[PATCH] D121873: [clang][extract-api] Add enum support

2022-03-16 Thread Zixu Wang via Phabricator via cfe-commits
zixuw created this revision. Herald added a reviewer: dang. Herald added a project: All. zixuw requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Add support for enum records - Add `EnumConstantRecord` and `EnumRecord` to store API informatio

[PATCH] D119479: [clang][extract-api] Add global record support

2022-03-17 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added a comment. In D119479#3388498 , @uabelho wrote: > Hello, > > Did you see this sanitizer error when running global_record.c? > > https://lab.llvm.org/buildbot/#/builders/5/builds/20765/steps/13/logs/stdio Hi! Taking a look right now Reposito

[PATCH] D119479: [clang][extract-api] Add global record support

2022-03-17 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added a comment. In D119479#3388498 , @uabelho wrote: > Hello, > > Did you see this sanitizer error when running global_record.c? > > https://lab.llvm.org/buildbot/#/builders/5/builds/20765/steps/13/logs/stdio Hi @uabelho, I've disabled the test fo

[PATCH] D121873: [clang][extract-api] Add enum support

2022-03-17 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added inline comments. Comment at: clang/lib/SymbolGraph/Serialization.cpp:321 + case RelationshipKind::MemberOf: +Relationship["kind"] = "memberOf"; +break; dang wrote: > Since we are going to add more cases to this switch, would you mind doing >

[PATCH] D121936: Ensure -extract-api handles multiple headers correctly

2022-03-17 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added a comment. In D121936#3390920 , @dang wrote: > In D121936#3389991 , @ributzka > wrote: > >> Nice! Thank you for adding support for multiple headers. Is this a step >> towards the json input file list

[PATCH] D119479: [clang][extract-api] Add global record support

2022-03-21 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added a comment. In D119479#3388498 , @uabelho wrote: > Hello, > > Did you see this sanitizer error when running global_record.c? > > https://lab.llvm.org/buildbot/#/builders/5/builds/20765/steps/13/logs/stdio @dang fixed this in fc3537697db7724834

[PATCH] D121936: Ensure -extract-api handles multiple headers correctly

2022-03-21 Thread Zixu Wang via Phabricator via cfe-commits
zixuw accepted this revision. zixuw added a comment. This revision is now accepted and ready to land. LGTM. Thanks Daniel! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121936/new/ https://reviews.llvm.org/D121936 _

[PATCH] D122160: [clang][extract-api] Refactor ExtractAPI and improve docs

2022-03-21 Thread Zixu Wang via Phabricator via cfe-commits
zixuw created this revision. Herald added a subscriber: mgorny. Herald added a reviewer: dang. Herald added a project: All. zixuw requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. - The name SymbolGraph is inappropriate and confusing for the

[PATCH] D121873: [clang][extract-api] Add enum support

2022-03-21 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added a comment. Herald added a subscriber: StephenFan. Hi Sam! Thanks for your interest and taking a look! In D121873#3391059 , @sammccall wrote: > Hey, apologies for missing the initial patch in D119479 > . > >

[PATCH] D122160: [clang][extract-api] Refactor ExtractAPI and improve docs

2022-03-21 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added a comment. In D122160#3397366 , @tschuett wrote: > Would you mind putting a high level description of the intent at the top of > the main header. > > Maybe even a link at https://github.com/apple/swift-docc-symbolkit Sure thing! Repository

[PATCH] D122160: [clang][extract-api] Refactor ExtractAPI and improve docs

2022-03-21 Thread Zixu Wang via Phabricator via cfe-commits
zixuw updated this revision to Diff 417132. zixuw marked 11 inline comments as done. zixuw added a comment. Address review issues. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122160/new/ https://reviews.llvm.org/D122160 Files: clang/include/cl

[PATCH] D122160: [clang][extract-api] Refactor ExtractAPI and improve docs

2022-03-21 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added inline comments. Comment at: clang/include/clang/ExtractAPI/API.h:123 +private: + virtual void anchor(); }; dang wrote: > This is new so I don't think it belongs in this patch. > This is to follow the LLVM Coding Standards guideline of providing an

[PATCH] D122160: [clang][extract-api] Refactor ExtractAPI and improve docs

2022-03-21 Thread Zixu Wang via Phabricator via cfe-commits
zixuw updated this revision to Diff 417145. zixuw added a comment. - Minor Doxygen auto-link string adjustments - Forgot to rename the test directory Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122160/new/ https://reviews.llvm.org/D122160 Files:

[PATCH] D121873: [clang][extract-api] Add enum support

2022-03-21 Thread Zixu Wang via Phabricator via cfe-commits
zixuw updated this revision to Diff 417147. zixuw marked 2 inline comments as done. zixuw added a comment. Rebase onto D122160 refactoring Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121873/new/ https://reviews.

[PATCH] D121873: [clang][extract-api] Add enum support

2022-03-21 Thread Zixu Wang via Phabricator via cfe-commits
zixuw updated this revision to Diff 417154. zixuw marked 4 inline comments as done. zixuw added a comment. - Address review issues; - Fix memory managment for EnumConstantRecord and EnumRecord Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121873/new

[PATCH] D121873: [clang][extract-api] Add enum support

2022-03-21 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added inline comments. Comment at: clang/lib/SymbolGraph/ExtractAPIConsumer.cpp:197 + void recordEnumConstants(EnumRecord *EnumRecord, + const EnumDecl::enumerator_range Constants) { dang wrote: > Should this be static or in an

[PATCH] D122202: [clang][extract-api] Add struct support

2022-03-21 Thread Zixu Wang via Phabricator via cfe-commits
zixuw created this revision. Herald added a reviewer: dang. Herald added a project: All. zixuw requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. - Add `StructFieldRecord` and `StructRecord` to store API information for structs - Implement `V

[PATCH] D122160: [clang][extract-api] Refactor ExtractAPI and improve docs

2022-03-22 Thread Zixu Wang via Phabricator via cfe-commits
zixuw updated this revision to Diff 417361. zixuw marked 3 inline comments as done. zixuw added a comment. Address review issues: - Documenting the responsibility of keeping StringRefs alive for APISet - Remove unnecessary `static` for helper functions in an anonymous namespace Repository: rG

[PATCH] D122160: [clang][extract-api] Refactor ExtractAPI and improve docs

2022-03-22 Thread Zixu Wang via Phabricator via cfe-commits
zixuw updated this revision to Diff 417365. zixuw added a comment. Address review issue: remove unnecessary `copyString` overload Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122160/new/ https://reviews.llvm.org/D122160 Files: clang/include/cla

[PATCH] D122160: [clang][extract-api] Refactor ExtractAPI and improve docs

2022-03-22 Thread Zixu Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG89f6b26f1beb: [clang][extract-api] Refactor ExtractAPI and improve docs (authored by zixuw). Changed prior to commit: https://reviews.llvm.org/D122160?vs=417365&id=417383#toc Repository: rG LLVM Gith

  1   2   >