HerrCai0907 wrote:

> This is weird issues because it always happen when two typedefs are one after 
> other.

```c++
typedef void (*ISSUE_65055_1)(int);
typedef bool (*ISSUE_65055_2)(int);
typedef void VOID;
```
The typedef matcher will match following position:

```
TypedefDecl 0x1610ba960 <ID/test.cpp:1:1, col:34> col:16 ISSUE_65055_1 'void 
(*)(int)'
TypedefDecl 0x1610bab30 <line:2:1, col:34> col:16 ISSUE_65055_2 'bool (*)(int)'
TypedefDecl 0x1610bab98 <line:3:1, col:14> col:14 VOID 'void'
```
That means typedef normal type is from `typedef` to the end of original type 
but for function pointer is from `typedef` to the end.



https://github.com/llvm/llvm-project/pull/65558
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to