Skip to content

[stable/20220421] SymbolGraph ExtractAPI support for C and Objective-C in clang #4453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

daniel-grumberg
Copy link

This is to introduce here the same functionality as in #4442

dexonsmith and others added 6 commits May 6, 2022 10:19
Fix one test (enum.c) in ExtractAPI to use %clang_cc1 and -verify
instead of calling the full driver and FileCheck. This is an example for
my comment from https://reviews.llvm.org/D121873.

Differential Revision: https://reviews.llvm.org/D124634
This patch transforms the given input headers to relative include names
using header search entries and some heuritics.
For example: `/Path/To/Header.h` will be included as `<Header.h>` with a
search path of `-I /Path/To/`; and
`/Path/To/Framework.framework/Headers/Header.h` will be included as
`<Framework/Header.h>`, given a search path of `-F /Path/To`.
Headermaps will also be queried in reverse to find a spelled name to
include headers.

Differential Revision: https://reviews.llvm.org/D123831
4c262fe accidentally added local
unfinished test case clang/test/Index/annotate-comments-enum-constant.c
This patch removes it.
This reverts commit 4c262fe.
Revert to fix Msan and Asan errors.
Reapply the change after fixing sanitizer errors.
The original problem was that `StringRef`s in `Matches` are pointing to
temporary local `std::string`s created by `path::convert_to_slash` in
the regex match call. This patch does the conversion up front in
container `FilePath`.

This reverts commit 2966f0f.

Differential Revision: https://reviews.llvm.org/D124964
@daniel-grumberg
Copy link
Author

@swift-ci please test

@daniel-grumberg daniel-grumberg changed the title Clang extract api stable SymbolGraph ExtractAPI support for C and Objective-C in clang May 6, 2022
@bnbarham
Copy link

bnbarham commented May 6, 2022

Testing won't work on this branch, if it passes in stable/20211026 I'm happy to merge it.

@bnbarham bnbarham changed the title SymbolGraph ExtractAPI support for C and Objective-C in clang [stable/20220421] SymbolGraph ExtractAPI support for C and Objective-C in clang May 6, 2022
@daniel-grumberg daniel-grumberg merged commit 38271aa into swiftlang:stable/20220421 May 31, 2022
@daniel-grumberg daniel-grumberg deleted the clang-extract-api-stable branch May 31, 2022 16:18
@daniel-grumberg daniel-grumberg restored the clang-extract-api-stable branch May 31, 2022 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants