[llvm-branch-commits] [clang] release/21.x: [ExtractAPI] Format typedef params correctly (#171516) (PR #171522)

Prajwal Nadig via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Dec 11 01:05:11 PST 2025


snprajwal wrote:

Hi @dyung, this is a small patch, but it fixes a serious correctness issue with the declaration fragments emitted by ExtractAPI. When typedefs are present in method parameters, e.g.:

```c
typedef int (^CustomType)(const unsigned int *, unsigned long);
void bar(CustomType block);
```
The output without this patch:

```
void bar(CustomTypeblock);
```
The output with this patch:
```
void bar(CustomType block);
```

As you can see, the original output is syntactically invalid, hence the request to backport to the 21.x release. 

https://github.com/llvm/llvm-project/pull/171522


More information about the llvm-branch-commits mailing list