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

2025-12-11 Thread Prajwal Nadig via llvm-branch-commits

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
___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


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

2025-12-11 Thread Prajwal Nadig via llvm-branch-commits

snprajwal wrote:

It's not a regression, it's a bug that surfaced recently.

https://github.com/llvm/llvm-project/pull/171522
___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


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

2025-12-11 Thread Prajwal Nadig via llvm-branch-commits

snprajwal wrote:

No, this specific code path has always produced incorrect output, even in past 
versions of LLVM. I took care to keep the scope of the change as small as 
possible to reduce the risk for this backport.

https://github.com/llvm/llvm-project/pull/171522
___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


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

2025-12-11 Thread Prajwal Nadig via llvm-branch-commits

snprajwal wrote:

Understandable, thank you!

https://github.com/llvm/llvm-project/pull/171522
___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits