]> granicus.if.org Git - clang/commitdiff
Change a test to follow the formatting of the rest of the tests in the file.
authorRichard Trieu <rtrieu@google.com>
Tue, 21 Jul 2015 23:38:30 +0000 (23:38 +0000)
committerRichard Trieu <rtrieu@google.com>
Tue, 21 Jul 2015 23:38:30 +0000 (23:38 +0000)
No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@242854 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaCXX/warn-redundant-move.cpp

index e7996618c09686fee9555d64cc2b7a5ea7a1ebaa..d5df3a6428c2556d94f1f8d708f1dee891275e99 100644 (file)
@@ -91,9 +91,14 @@ C test4(A& a1, B& b1) {
   return std::move(b2);
 }
 
-//PR23819
-struct X {};
-X g();
-void h(X&&);
-X f(X x) { return std::move(x); } //expected-warning{{redundant move in return statement}} \
-                                  //expected-note{{remove std::move call here}}
+// PR23819, case 2
+struct D {};
+D test5(D d) {
+  return d;
+
+  return std::move(d);
+  // expected-warning@-1{{redundant move in return statement}}
+  // expected-note@-2{{remove std::move call here}}
+  // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:10-[[@LINE-3]]:20}:""
+  // CHECK: fix-it:"{{.*}}":{[[@LINE-4]]:21-[[@LINE-4]]:22}:""
+}