[SERVER-49800] add use-after-move rule to clang-tidy evergreen builder Created: 22/Jul/20  Updated: 29/Oct/23  Resolved: 03/Aug/20

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 4.7.0

Type: Improvement Priority: Major - P3
Reporter: Bynn Lee Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-49997 Use after move in plan_cache_commands... Closed
related to SERVER-50165 parallelize clang-tidy task Closed
related to SERVER-51240 Add clang tidy rules to prevent const... Closed
is related to SERVER-49876 Fix always-false if statement in Cata... Closed
is related to SERVER-49229 use-after-move: 'options' argument in... Closed
is related to SERVER-27984 Add clang-tidy run in addition to lint Closed
is related to SERVER-49881 remove noop std::move from Collection... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2020-08-10
Participants:
Linked BF Score: 40

 Description   

In SERVER-49229, we resolved a violation of the use-after-move rule in C++. Currently, our clang-tidy checker, introduced in SERVER-27984, does not enable this check. It would be beneficial to use the clang-tidy checker to detect other instances of the defect described in SERVER-49229.



 Comments   
Comment by Githook User [ 02/Aug/20 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-49800 add use-after-move to clang-tidy rules
Branch: master
https://github.com/mongodb/mongo/commit/035d8b37af464407e4af13a827e7094565ba6e31

Comment by Githook User [ 02/Aug/20 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-49800 fix use-after-move violations in query
Branch: master
https://github.com/mongodb/mongo/commit/21a87d73742ef282a7bda1e56bf06619fd81233c

Comment by Githook User [ 02/Aug/20 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-49800 fix use-after-move violations in sharding
Branch: master
https://github.com/mongodb/mongo/commit/406e8c39a4a3a3e34eb9b174f18f545bfbab62c6

Comment by Githook User [ 01/Aug/20 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-49800 fix use-after-move violations in service arch
Branch: master
https://github.com/mongodb/mongo/commit/de36e2cbc7e7f38a4d2b1d017666277478ba1c7b

Comment by Githook User [ 01/Aug/20 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-49800 fix use-after-move violations in tests
Branch: master
https://github.com/mongodb/mongo/commit/7cdef9c3982206dfc2fdd3b660d4e4d6f5e5d9e9

Comment by Githook User [ 01/Aug/20 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-49800 remove unnecessary std::move() calls

Comment by Githook User [ 30/Jul/20 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-49800 fix use-after-move violation in ImplicitEncryptedDBClientBase::handleEncryptionRequest()
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/dd11caf07cd2feda86106e44ffd2a96994a1ab38

Generated at Thu Feb 08 05:20:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.