Update the style checker to advise using WTFMove() instead of WTF::move()
authoraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 31 Dec 2015 22:51:40 +0000 (22:51 +0000)
committeraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 31 Dec 2015 22:51:40 +0000 (22:51 +0000)
https://bugs.webkit.org/show_bug.cgi?id=152601

Reviewed by Daniel Bates.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_wtf_move):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(WebKitStyleTest.test_wtf_move):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194471 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/style/checkers/cpp.py
Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py

index d8ec624..6e15b9d 100644 (file)
@@ -1,5 +1,17 @@
 2015-12-31  Andy Estes  <aestes@apple.com>
 
+        Update the style checker to advise using WTFMove() instead of WTF::move()
+        https://bugs.webkit.org/show_bug.cgi?id=152601
+
+        Reviewed by Daniel Bates.
+
+        * Scripts/webkitpy/style/checkers/cpp.py:
+        (check_wtf_move):
+        * Scripts/webkitpy/style/checkers/cpp_unittest.py:
+        (WebKitStyleTest.test_wtf_move):
+
+2015-12-31  Andy Estes  <aestes@apple.com>
+
         Fix warnings uncovered by migrating to WTF_MOVE
         https://bugs.webkit.org/show_bug.cgi?id=152601
 
index 22ddc44..47586dc 100644 (file)
@@ -2256,7 +2256,7 @@ def check_max_min_macros(clean_lines, line_number, file_state, error):
 
 
 def check_wtf_move(clean_lines, line_number, file_state, error):
-    """Looks for use of 'std::move()' which should be replaced with 'WTF::move()'.
+    """Looks for use of 'std::move()' which should be replaced with 'WTFMove()'.
 
     Args:
       clean_lines: A CleansedLines instance containing the file.
@@ -2276,7 +2276,7 @@ def check_wtf_move(clean_lines, line_number, file_state, error):
     if not using_std_move:
         return
 
-    error(line_number, 'runtime/wtf_move', 4, "Use 'WTF::move()' instead of 'std::move()'.")
+    error(line_number, 'runtime/wtf_move', 4, "Use 'WTFMove()' instead of 'std::move()'.")
 
 
 def check_ctype_functions(clean_lines, line_number, file_state, error):
index 8c59876..5b837ca 100644 (file)
@@ -4801,19 +4801,19 @@ class WebKitStyleTest(CppStyleTestBase):
 
     def test_wtf_move(self):
         self.assert_lint(
-             'A a = WTF::move(b);',
+             'A a = WTFMove(b);',
              '',
              'foo.cpp')
 
         self.assert_lint(
             'A a = std::move(b);',
-            "Use 'WTF::move()' instead of 'std::move()'."
+            "Use 'WTFMove()' instead of 'std::move()'."
             "  [runtime/wtf_move] [4]",
             'foo.cpp')
 
         self.assert_lint(
             'A a = std::move(b);',
-            "Use 'WTF::move()' instead of 'std::move()'."
+            "Use 'WTFMove()' instead of 'std::move()'."
             "  [runtime/wtf_move] [4]",
             'foo.mm')