diff --git a/unittests/Tooling/CommentHandlerTest.cpp b/unittests/Tooling/CommentHandlerTest.cpp
index da5604524cdaaaedb060a1a38c723746f82f4261..b42b28b9c9486f44be54bd4430c49b6a1054cba8 100644
--- a/unittests/Tooling/CommentHandlerTest.cpp
+++ b/unittests/Tooling/CommentHandlerTest.cpp
@@ -97,6 +97,10 @@ public:
       : Current(Comments.begin()), End(Comments.end()), PP(PP)
     { }
 
+  CommentVerifier(CommentVerifier &&C) : Current(C.Current), End(C.End), PP(C.PP) {
+    C.Current = C.End;
+  }
+
   ~CommentVerifier() {
     if (Current != End) {
       EXPECT_TRUE(Current == End) << "Unexpected comment \""