llvm/llvm-project

[clang][ExtractAPI] Declaration fragments should show types as shown in the source code.

Open

#61.157 aperta il 3 mar 2023

Vedi su GitHub
 (15 commenti) (0 reazioni) (0 assegnatari)C++ (10.782 fork)batch import
clang:toolinggood first issue

Metriche repository

Star
 (26.378 star)
Metriche merge PR
 (Merge medio 1g 2h) (1000 PR mergiate in 30 g)

Descrizione

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:

typedef struct MyStruct * MyTypeDef;

void foo(MyTypeDef x) {}

The declaration for foo is the following:

void foo(struct MyStruct * x)

Rather than:

void foo(MyTypeDef x)

Resolving this issue will align the declaration we generate to the one that’s in the original source code.

Guida contributor