[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
Please register or sign in to comment