]> granicus.if.org Git - clang/commitdiff
Wdeprecated: CommentVerifiers are returned by value, make sure they're correctly...
authorDavid Blaikie <dblaikie@gmail.com>
Thu, 13 Aug 2015 21:24:08 +0000 (21:24 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Thu, 13 Aug 2015 21:24:08 +0000 (21:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244958 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/Tooling/CommentHandlerTest.cpp

index da5604524cdaaaedb060a1a38c723746f82f4261..b42b28b9c9486f44be54bd4430c49b6a1054cba8 100644 (file)
@@ -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 \""