[clang-tidy] fix false-positives for templates in `bugprone-return-const-ref-from-parameter` (#90273)

In the AST for function templates, the return will be a DeclRefExpr,
even if the return type differs from that of the returned variable.
Protect against false-positives by constraining the canonical return
type to be that of the parameter.
Also streams the source range of the returned expression into the
diagnostic.

GitOrigin-RevId: 9aad38b61586cab8b125c3f522789267f9b749a9
2 files changed