commit | 5fe22ac8a2e1332cd5eacb6a6cfa030918e92bf3 | [log] [tgz] |
---|---|---|
author | Julian Schmidt <git.julian.schmidt@gmail.com> | Sun May 05 17:51:33 2024 +0200 |
committer | Copybara-Service <copybara-worker@google.com> | Sun May 05 08:57:33 2024 -0700 |
tree | 2dbb16465f0d129bbfb0365408e01de1110a102c | |
parent | 6e4af40ae2e9055d4dd63590c2bed1e61c1acb55 [diff] |
[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