Repository navigation
Commit 7549fdd
Fix #15244 syntaxError and unsimplified function body when a specifier precedes a trailing return type
isTrailingReturnType accepted only `) . type`, so a function or lambda
with a cv or ref qualifier, noexcept, noexcept(...), throw(...),
mutable, constexpr, consteval or static before `->` had its body taken
for a braced initializer, and simplifyVarDecl did not simplify it.
Inside such a body, findLambdaEndScope then accepted a structured
binding like `[p, c]{f()}` as a lambda.
Step back over those specifiers and return the parameter list's `)`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 64cee51 commit 7549fdd
2 files changed
Lines changed: 64 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7511 | 7511 | | |
7512 | 7512 | | |
7513 | 7513 | | |
| 7514 | + | |
7514 | 7515 | | |
7515 | 7516 | | |
7516 | 7517 | | |
| |||
7519 | 7520 | | |
7520 | 7521 | | |
7521 | 7522 | | |
7522 | | - | |
7523 | | - | |
| 7523 | + | |
| 7524 | + | |
| 7525 | + | |
| 7526 | + | |
| 7527 | + | |
| 7528 | + | |
| 7529 | + | |
| 7530 | + | |
| 7531 | + | |
| 7532 | + | |
| 7533 | + | |
| 7534 | + | |
| 7535 | + | |
| 7536 | + | |
7524 | 7537 | | |
7525 | 7538 | | |
7526 | 7539 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| 244 | + | |
244 | 245 | | |
245 | 246 | | |
246 | 247 | | |
| |||
3069 | 3070 | | |
3070 | 3071 | | |
3071 | 3072 | | |
| 3073 | + | |
| 3074 | + | |
| 3075 | + | |
| 3076 | + | |
| 3077 | + | |
| 3078 | + | |
| 3079 | + | |
| 3080 | + | |
| 3081 | + | |
| 3082 | + | |
| 3083 | + | |
| 3084 | + | |
| 3085 | + | |
| 3086 | + | |
| 3087 | + | |
| 3088 | + | |
| 3089 | + | |
| 3090 | + | |
| 3091 | + | |
| 3092 | + | |
| 3093 | + | |
| 3094 | + | |
| 3095 | + | |
| 3096 | + | |
| 3097 | + | |
| 3098 | + | |
| 3099 | + | |
| 3100 | + | |
| 3101 | + | |
| 3102 | + | |
| 3103 | + | |
| 3104 | + | |
| 3105 | + | |
| 3106 | + | |
| 3107 | + | |
| 3108 | + | |
| 3109 | + | |
| 3110 | + | |
| 3111 | + | |
| 3112 | + | |
| 3113 | + | |
| 3114 | + | |
| 3115 | + | |
| 3116 | + | |
| 3117 | + | |
| 3118 | + | |
| 3119 | + | |
| 3120 | + | |
3072 | 3121 | | |
3073 | 3122 | | |
3074 | 3123 | | |
| |||
0 commit comments