Unverified Commit 9aad38b6 authored by Julian Schmidt's avatar Julian Schmidt Committed by GitHub
Browse files

[clang-tidy] fix false-positives for templates in...

[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.
parent 77d8c387
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