[clang] [Clang] Look through type sugar when accessing FunctionProtoType (PR #88428)

2024-04-11 Thread via cfe-commits
https://github.com/Sirraide closed https://github.com/llvm/llvm-project/pull/88428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Look through type sugar when accessing FunctionProtoType (PR #88428)

2024-04-11 Thread via cfe-commits
Sirraide wrote: > Ooof, yeah, good catch. I should have caught that in the review, I've fallen > for that one before :) I was just now made aware of the fact that this asserts and the only reason I found the problem fairly quickly is because I happen to have a pr open at the moment that

[clang] [Clang] Look through type sugar when accessing FunctionProtoType (PR #88428)

2024-04-11 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Ooof, yeah, good catch. I should have caught that in the review, I've fallen for that one before :) https://github.com/llvm/llvm-project/pull/88428 ___ cfe-commits mailing list

[clang] [Clang] Look through type sugar when accessing FunctionProtoType (PR #88428)

2024-04-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Sirraide) Changes This fixes a bug introduced by #84473: if a lambda’s type is type sugar (e.g. an `AttributedType`), we need to use `getAs()` instead of `cast()` to retrieve the `FunctionProtoType`. --- Full diff:

[clang] [Clang] Look through type sugar when accessing FunctionProtoType (PR #88428)

2024-04-11 Thread via cfe-commits
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/88428 This fixes a bug introduced by #84473: if a lambda’s type is type sugar (e.g. an `AttributedType`), we need to use `getAs()` instead of `cast()` to retrieve the `FunctionProtoType`. >From