Commit 09e0100
authored
[Clang] use parameter location for abbreviated function templates (#129139)
Fixes #46386
---
When an abbreviated function template appears in an `extern "C"` block
and all template parameters are invented,
`TemplateParams->getTemplateLoc()` becomes invalid, leading to an
incorrect error location. These changes ensure that the error points to
the parameter's location when the template location is invalid.1 parent b21663c commit 09e0100
File tree
3 files changed
+21
-2
lines changed- clang
- docs
- lib/Sema
- test/CXX/temp/temp.pre
3 files changed
+21
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
| 281 | + | |
281 | 282 | | |
282 | 283 | | |
283 | 284 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7991 | 7991 | | |
7992 | 7992 | | |
7993 | 7993 | | |
7994 | | - | |
7995 | | - | |
| 7994 | + | |
| 7995 | + | |
| 7996 | + | |
| 7997 | + | |
| 7998 | + | |
7996 | 7999 | | |
7997 | 8000 | | |
7998 | 8001 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
2 | 17 | | |
3 | 18 | | |
4 | 19 | | |
| |||
0 commit comments