-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang-tidy] Fix check for trivially copyable types in modernize-pass…
…-by-value Summary: rL270567 excluded trivially copyable types from being moved by modernize-pass-by-value, but it didn't exclude references to them. Change types used in the tests to not be trivially copyable. Reviewers: madsravn, aaron.ballman, alexfh Subscribers: JDevlieghere, cfe-commits Differential Revision: https://reviews.llvm.org/D28614 llvm-svn: 291796
- Loading branch information
Showing
5 changed files
with
24 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
clang-tools-extra/test/clang-tidy/Inputs/modernize-pass-by-value/header.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
class ThreadId { | ||
public: | ||
ThreadId(const ThreadId &) {} | ||
ThreadId(ThreadId &&) {} | ||
}; | ||
|
||
struct A { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,8 @@ | |
#include HEADER | ||
|
||
struct A { | ||
A(const A &) {} | ||
A(A &&) {} | ||
}; | ||
|
||
struct B { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters