[PATCH] D141569: [clang-tidy] Implement CppCoreGuideline F.18
Chris Cotter via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 28 09:05:08 PST 2023
ccotter added a comment.
In https://github.com/isocpp/CppCoreGuidelines/issues/2026, it looks like the core guideline will not permit exceptions for code that accepts an rvalue ref parameter, and the function body `moves` members of the parameter. So, my `moves_member_of_parameter` test case would be flagged. In theory, we could add a tool option to allow someone to live more "dangerously" and have the tool accept code like `moves_member_of_parameter`, with the caveat that the tool (as I have written it so far) would not be smart enough to detect that all static paths move every data member of the object. In any case, I'll update my test and the tool to align exactly with the guideline.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141569/new/
https://reviews.llvm.org/D141569
More information about the cfe-commits
mailing list