[clang-tools-extra] [clang-tidy] fix false positive in bugprone-return-const-ref-from-parameter (PR #117734)
Qizhi Hu via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 29 06:40:54 PST 2024
================
@@ -179,7 +179,8 @@ Changes in existing checks
- Improved :doc:`bugprone-return-const-ref-from-parameter
<clang-tidy/checks/bugprone/return-const-ref-from-parameter>` check to
diagnose potential dangling references when returning a ``const &`` parameter
- by using the conditional operator ``cond ? var1 : var2``.
+ by using the conditional operator ``cond ? var1 : var2`` and no longer giving
----------------
jcsxky wrote:
The function in this [issue](https://github.com/llvm/llvm-project/issues/115743) contains lambda and thus gives a false positive(because it should not report diagnose since the return statement is not belongs to current function). I have modified the release note and make it easier to be understood.
https://github.com/llvm/llvm-project/pull/117734
More information about the cfe-commits
mailing list