Changeset 194471 in webkit


Ignore:
Timestamp:
Dec 31, 2015 2:51:40 PM (8 years ago)
Author:
aestes@apple.com
Message:

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):

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r194470 r194471  
     12015-12-31  Andy Estes  <aestes@apple.com>
     2
     3        Update the style checker to advise using WTFMove() instead of WTF::move()
     4        https://bugs.webkit.org/show_bug.cgi?id=152601
     5
     6        Reviewed by Daniel Bates.
     7
     8        * Scripts/webkitpy/style/checkers/cpp.py:
     9        (check_wtf_move):
     10        * Scripts/webkitpy/style/checkers/cpp_unittest.py:
     11        (WebKitStyleTest.test_wtf_move):
     12
    1132015-12-31  Andy Estes  <aestes@apple.com>
    214
  • trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py

    r192274 r194471  
    22572257
    22582258def check_wtf_move(clean_lines, line_number, file_state, error):
    2259     """Looks for use of 'std::move()' which should be replaced with 'WTF::move()'.
     2259    """Looks for use of 'std::move()' which should be replaced with 'WTFMove()'.
    22602260
    22612261    Args:
     
    22772277        return
    22782278
    2279     error(line_number, 'runtime/wtf_move', 4, "Use 'WTF::move()' instead of 'std::move()'.")
     2279    error(line_number, 'runtime/wtf_move', 4, "Use 'WTFMove()' instead of 'std::move()'.")
    22802280
    22812281
  • trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py

    r192274 r194471  
    48024802    def test_wtf_move(self):
    48034803        self.assert_lint(
    4804              'A a = WTF::move(b);',
     4804             'A a = WTFMove(b);',
    48054805             '',
    48064806             'foo.cpp')
     
    48084808        self.assert_lint(
    48094809            'A a = std::move(b);',
    4810             "Use 'WTF::move()' instead of 'std::move()'."
     4810            "Use 'WTFMove()' instead of 'std::move()'."
    48114811            "  [runtime/wtf_move] [4]",
    48124812            'foo.cpp')
     
    48144814        self.assert_lint(
    48154815            'A a = std::move(b);',
    4816             "Use 'WTF::move()' instead of 'std::move()'."
     4816            "Use 'WTFMove()' instead of 'std::move()'."
    48174817            "  [runtime/wtf_move] [4]",
    48184818            'foo.mm')
Note: See TracChangeset for help on using the changeset viewer.