Repository navigation
Commit 1d131a1
Fix #15269 FP shadowFunction: deduction guide is treated as a function
SymbolDatabase::isFunction() accepted a deduction guide like
'template <class T> S(T) -> S<T>;' as a function declaration with a
trailing return type (taking 'template' as its return type), and also
non-template guides in class scope. A local variable named like the
class template then shadowed this function.
A function with a trailing return type has 'auto' or a qualification
before its name, so a declaration without it whose trailing type names
the same template is a deduction guide.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 4ccfcc6 commit 1d131a1
3 files changed
Lines changed: 64 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2016 | 2016 | | |
2017 | 2017 | | |
2018 | 2018 | | |
| 2019 | + | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
| 2023 | + | |
| 2024 | + | |
| 2025 | + | |
| 2026 | + | |
| 2027 | + | |
| 2028 | + | |
2019 | 2029 | | |
2020 | 2030 | | |
2021 | 2031 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13682 | 13682 | | |
13683 | 13683 | | |
13684 | 13684 | | |
| 13685 | + | |
| 13686 | + | |
| 13687 | + | |
| 13688 | + | |
| 13689 | + | |
| 13690 | + | |
| 13691 | + | |
| 13692 | + | |
| 13693 | + | |
| 13694 | + | |
| 13695 | + | |
| 13696 | + | |
| 13697 | + | |
13685 | 13698 | | |
13686 | 13699 | | |
13687 | 13700 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
| 266 | + | |
266 | 267 | | |
267 | 268 | | |
268 | 269 | | |
| |||
2541 | 2542 | | |
2542 | 2543 | | |
2543 | 2544 | | |
| 2545 | + | |
| 2546 | + | |
| 2547 | + | |
| 2548 | + | |
| 2549 | + | |
| 2550 | + | |
| 2551 | + | |
| 2552 | + | |
| 2553 | + | |
| 2554 | + | |
| 2555 | + | |
| 2556 | + | |
| 2557 | + | |
| 2558 | + | |
| 2559 | + | |
| 2560 | + | |
| 2561 | + | |
| 2562 | + | |
| 2563 | + | |
| 2564 | + | |
| 2565 | + | |
| 2566 | + | |
| 2567 | + | |
| 2568 | + | |
| 2569 | + | |
| 2570 | + | |
| 2571 | + | |
| 2572 | + | |
| 2573 | + | |
| 2574 | + | |
| 2575 | + | |
| 2576 | + | |
| 2577 | + | |
| 2578 | + | |
| 2579 | + | |
| 2580 | + | |
| 2581 | + | |
| 2582 | + | |
| 2583 | + | |
| 2584 | + | |
2544 | 2585 | | |
2545 | 2586 | | |
2546 | 2587 | | |
| |||
0 commit comments