diff options
Diffstat (limited to 'clang-tools-extra/test/clang-tidy')
| -rw-r--r-- | clang-tools-extra/test/clang-tidy/misc-move-constructor-init.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang-tools-extra/test/clang-tidy/misc-move-constructor-init.cpp b/clang-tools-extra/test/clang-tidy/misc-move-constructor-init.cpp index 0ea7fb4b86f..104c17abe70 100644 --- a/clang-tools-extra/test/clang-tidy/misc-move-constructor-init.cpp +++ b/clang-tools-extra/test/clang-tidy/misc-move-constructor-init.cpp @@ -84,6 +84,16 @@ struct N { N(N &&RHS) : Mem(move(RHS.Mem)) {} }; +struct O { + O(O&& other) : b(other.b) {} // ok + const B b; +}; + +struct P { + P(O&& other) : b(other.b) {} // ok + B b; +}; + struct Movable { Movable(Movable &&) = default; Movable(const Movable &) = default; |

