Open daniel-grumberg opened 1 year ago
@llvm/issue-subscribers-good-first-issue
I'd like to work on this.
Go for it!
Hey @karan0handa feel free to reach out to me if you need any help with this.
Hey @karan0handa are you still working on this? I would also like to work on this issue!
I'm not working on this anymore. Feel free to take it up! @ayushi-8102
I'd like to give this a shot if no one has found a fix yet
Anyone working, I will like to work on it, I have work on one issue which involve ExtractAPI before.
Hi , anyone still working on it ? if not I'd like to have a crack at it. I am a beginner so advice and help would be most welcome and appreciated
Hey, is anyone still working on this issue ? If not I would like to give it a try.
Hey @daniel-grumberg I think this is issue is already solved. Here is the output I get when reproducing your example:
The command I used was clang -x objective-c -extract-api test.h
test.h
typedef struct MyStruct
{
} MyTypDef;
void func(MyTypDef *typ);
output.json
# 1 "test.h"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 395 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "test.h" 2
typedef struct MyStruct
{
} MyTypDef;
void func(MyTypDef *typ);
The declaration of func emitted by ExtractAPI is already using the typdefs name.
Sorry I think the description is not quite detailed enough, this happens when a typedef to a type related to the struct is used exactly as per the example in the original description of the issue.
Thank you!
For Objective-C APIs that use typedefs, ExtractAPI emits declarations with the original’s type’s name rather than its typedef name.
For example, in:
The declaration for
foo
is the following:Rather than:
Resolving this issue will align the declaration we generate to the one that’s in the original source code.