Update a clang-tidy test for r342194
authorVedant Kumar <vsk@apple.com>
Thu, 13 Sep 2018 23:50:20 +0000 (23:50 +0000)
committerVedant Kumar <vsk@apple.com>
Thu, 13 Sep 2018 23:50:20 +0000 (23:50 +0000)
The location of implicit captures has changed. Update a use-after-move
checker test to reflect that.

This fixes a bot failure:
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/36500

llvm-svn: 342195

clang-tools-extra/test/clang-tidy/bugprone-use-after-move.cpp

index 2d747b4..e4596c8 100644 (file)
@@ -339,7 +339,7 @@ void lambdas() {
     A a;
     std::move(a);
     auto lambda = [=]() { a.foo(); };
-    // CHECK-MESSAGES: [[@LINE-1]]:27: warning: 'a' used after it was moved
+    // CHECK-MESSAGES: [[@LINE-1]]:20: warning: 'a' used after it was moved
     // CHECK-MESSAGES: [[@LINE-3]]:5: note: move occurred here
   }
   // Same tests but for capture by reference.
@@ -354,7 +354,7 @@ void lambdas() {
     A a;
     std::move(a);
     auto lambda = [&]() { a.foo(); };
-    // CHECK-MESSAGES: [[@LINE-1]]:27: warning: 'a' used after it was moved
+    // CHECK-MESSAGES: [[@LINE-1]]:20: warning: 'a' used after it was moved
     // CHECK-MESSAGES: [[@LINE-3]]:5: note: move occurred here
   }
   // But don't warn if the move happened after the capture.