[prev in list] [next in list] [prev in thread] [next in thread] 

List:       llvm-bugs
Subject:    [llvm-bugs] [Bug 65133] Inconsistent documentation about -Wreturn-std-move
From:       LLVM Bugs via llvm-bugs <llvm-bugs () lists ! llvm ! org>
Date:       2023-08-31 7:57:14
Message-ID: 20230831075714.c2ef0ec023a4b275 () email ! llvm ! org
[Download RAW message or body]

[Attachment #2 (text/html)]

<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/65133>65133</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Inconsistent documentation about -Wreturn-std-move
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          JVApen
      </td>
    </tr>
</table>

<pre>
    Clang diagnostic flags and clang-tidy documentation claim something different \
about the -Wreturn-std-move flag. (I assume clang-tidy is wrong and not updated after \
the change of behavior) In LLVM 10.0.0 the -Wreturn-std-move flag was a real warning, \
in LLVM 13.0.0 this warning no longer is triggered on the same code. I assume that in \
one of the releases, the warning was removed.

On the diagnostics reference \
(https://clang.llvm.org/docs/DiagnosticsReference.html#wreturn-std-move), it states: \
&gt; This diagnostic flag exists for GCC compatibility, and has no effect in Clang.

Similar functionality exists also as a clang-tidy warning \
(performance-no-automatic-move). This has a dedicated section about this warning: \
https://clang.llvm.org/extra/clang-tidy/checks/performance/no-automatic-move.html#wreturn-std-move, \
which states: &gt; In that case the fix is more consensual: just return \
std::move(obj). This is handled by the -Wreturn-std-move warning.

For sure, some documentation is wrong. It also raises the question on the mentioned \
use-case as the documentation seems to suggest that this isn&apos;t covered by \
clang-tidy.

</pre>
<img width="1px" height="1px" alt="" \
src="http://email.email.llvm.org/o/eJyEVMFu6zYQ_Br6srAgU3biHHRInbpw8YoCbfF6XpErialEutx \
VHP99QcpO4ry-9mJDIHd2dma4yOw6T1SrzQ9q87TASfoQ65-_Ph7JL5pgz_VuQN-Bddj5wOIMtAN2DOgtmHS0F \
GfPYIOZRvKC4oJPB24EDiNJ73J121IkL4BNmASkJ1j-GUmm6JcsdjmGF8rABSi9PQAyTyN9bOAYTjH4Ljf2QWA \
6WhSygK1QzIimR98RhBYa6vHFhaj0gyqfVPl48PDly9dfYFUWZVH-R384IQNCJBzghNE73ym9A3etry71ic58D \
D7AEHxHMXGU6LqOIlkIPrdhTHMESwW8jSU9SoIMPrNN1yINhEycmqXvK3iiEynRs8U8yvz764z-bku6ljU2lCT \
sRY6sqkel90rvs47FMLyMRYid0nsbDCu9f3ov_-1aXfQyDkpXp0_yJC2TEgIsKJTBZ0LVj_BHEuRTRoBeHQtDG \
yL8tNuBCeMRxTVucHJOUMnJHjkJSG1LJmuS43Yz6u9udANGaCdvUrow1V_BceAA2bIPWbmKp_T2SLENcURvaOn \
DEicJI4oz15EunTL_PuNYss7kZDHlfm-ZffdcVY_wPwrTq0S8HmRa6aMn81cS_gMtpfffEPu-Bzs49c70_-bBw \
c_BMsiUw9G61xTJMcSUQM_kecIhcX-eWGDGBhabYKrHucE2NM9Jl9nSrIq3A1lozt95NhdNbjzbhwg8xUw4rYF \
P--H6mAs4yGxhRMfEucPfE3G-dXlBqcwFTxYmpmWeDuebt6BMNDJIAJ66jlhmNWQewyt9L2DCS36bzflDXC7EF \
7au7EP1gAuqV3cP1fpue1etF31NZrvabtZNafDOVmQrW1Ya6YGs3jTb--3C1brUVbmtVuX95n61LoymtiRT6gr \
Xjb7fqHVJI7rhLR8LxzxRfbdZVdViwIYGzhtYa08nyIdK67SQY51qls3UsVqXQ8r8O4o4Gag--GSuY0n79VaSObnfWLaY4lDf5rdz0k9NYcKo9D41uPwtjzE8kxGl95lWCm-m_U8AAAD__452Iek">



[Attachment #3 (text/plain)]

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic