<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/85120>85120</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Clang] `AttributedType`s are stripped from lambda function types
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang:frontend,
lambda
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
Sirraide
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Sirraide
</td>
</tr>
</table>
<pre>
Consider
```c++
struct S {
void g() const [[clang::annotate_type("foo", "bar", 1)]] {}
};
void f() {
auto l = [] () [[clang::annotate_type("foo", "bar", 1)]] {};
}
```
AST dump prints `'void () const [[clang::annotate_type(...)]]':'void () const'` for the type of `S::g()`, but `void () const` for the type of `l`, which is problematic if someone actually wants to use this information for something (#84983). We should fix this unless there’s a good reason why we’re desugaring the function type here.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysk8uOozoQhp-m2JQaGRNuCxbpcPICaeksjww24CNjI186k7cfGUh3j6Y3I41kJcLl-v-v7CrmnJy0EC0Ur0DpTVrLJBdAKRRdwoKfjW2fu0lv-KO9GO0kFxZIB-QMJdnXAPQ1rm3XeRsGjzeE6thBfDeS4wS0BtrgYLTzGE2L10ExPUF-hvzMtDaeefGff6xiO0pHYyINvSBQ2jN7fGRAGyg6KLrNo-oOnKqD_LDcfzfb8bD9gsOCN6gQ8m7H6PB55m9CfbB8AD7v6yvj-faGPCwrrlZq7zCGabWR_9l9pWn6gQC0ioe-0YmRkuBoLPpZYMxFM0bX2y57vNKGccE--Bj7XeZ7DXWk3Wc5zCgdrtb0SizMywHliM4swmiBbPCBKfXAO4s1e4PBCfSzdCj1aGxMMHpziCl-lnra_fP61NQ50CbFfwW62QTFcZQ_9uSglXAuUlkB_1CoCTSNQ4aTMRytYM5ovM8PvH-GrUAuXJiYjSaxoDHoYfPfKotaacLbnDd5wxLRZlVG8qLMsiqZ2yEb6p4STirRnIq8IENfF5RkAxuKU1_niWwpoSeSZ3lWF0VWpXVO-3IcWVOXYzn2NZyIWJhUqVLvS2rslEjngmjrIqMkUawXyh0j-nz90RrtheZ76wGlii09Z8fk2jYqvfRhcnAiSjrvPrW99Gqb-MumFbu1JGfvreyDF_wt9lJJHDIr0Hkr11VwHK1ZcPf49XJcEqxqZ-9Xt_XbFeh1kn4OfTqYBeg1-h5_L6s1_4vBA71uBTqg163GnwEAAP__fyFXoA">