Unverified Commit 919df9d7 authored by Balazs Benics's avatar Balazs Benics Committed by GitHub
Browse files

[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: default avatarAlejandro Alvarez Ayllon <alejandro.alvarez@sonarsource.com>
parent c0de13b0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment