Commit 919df9d
[clang][AST] Fix end location of DeclarationNameInfo on instantiated methods (#92654)
Fixes #71161
[D64087](https://reviews.llvm.org/D64087) updated some locations of the
instantiated method but forgot `DNLoc`.
`FunctionDecl::getNameInfo()` constructs a `DeclarationNameInfo` using
`Decl::Loc` as the beginning of the declaration name, and
`FunctionDecl::DNLoc` to compute the end of the declaration name. The
former was updated, but the latter was not, so
`DeclarationName::getSourceRange()` would return a range where the end
of the declaration name could come before its beginning.
Patch by Alejandro Alvarez Ayllon
Co-authored-by: steakhal
CPP-5166
Co-authored-by: Alejandro Alvarez Ayllon <[email protected]>1 parent c0de13b commit 919df9d
File tree
4 files changed
+35
-0
lines changed- clang
- docs
- include/clang/AST
- lib/Sema
- unittests/AST
4 files changed
+35
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
766 | 766 | | |
767 | 767 | | |
768 | 768 | | |
| 769 | + | |
769 | 770 | | |
770 | 771 | | |
771 | 772 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2188 | 2188 | | |
2189 | 2189 | | |
2190 | 2190 | | |
| 2191 | + | |
| 2192 | + | |
2191 | 2193 | | |
2192 | 2194 | | |
2193 | 2195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5055 | 5055 | | |
5056 | 5056 | | |
5057 | 5057 | | |
| 5058 | + | |
5058 | 5059 | | |
5059 | 5060 | | |
5060 | 5061 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
545 | 545 | | |
546 | 546 | | |
547 | 547 | | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
0 commit comments