Changeset 155535 in webkit


Ignore:
Timestamp:
Sep 11, 2013 9:43:29 AM (11 years ago)
Author:
andersca@apple.com
Message:

The style checker shouldn't complain about returning or passing OwnPtr
https://bugs.webkit.org/show_bug.cgi?id=121163

Reviewed by Antti Koivisto.

  • Scripts/webkitpy/style/checkers/cpp.py:

(check_function_definition_and_pass_ptr):

  • Scripts/webkitpy/style/checkers/cpp_unittest.py:

(PassPtrTest.test_pass_ref_ptr_return_value):
(PassPtrTest.test_own_ptr_parameter_value):

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r155534 r155535  
     12013-09-11  Anders Carlsson  <andersca@apple.com>
     2
     3        The style checker shouldn't complain about returning or passing OwnPtr
     4        https://bugs.webkit.org/show_bug.cgi?id=121163
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * Scripts/webkitpy/style/checkers/cpp.py:
     9        (check_function_definition_and_pass_ptr):
     10        * Scripts/webkitpy/style/checkers/cpp_unittest.py:
     11        (PassPtrTest.test_pass_ref_ptr_return_value):
     12        (PassPtrTest.test_own_ptr_parameter_value):
     13
    1142013-09-11  Mario Sanchez Prada  <mario.prada@samsung.com>
    215
  • trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py

    r155454 r155535  
    16401640       error: The function to call with any errors found.
    16411641    """
    1642     match_ref_or_own_ptr = '(?=\W|^)(Ref|Own)Ptr(?=\W)'
    1643     bad_type_usage = search(match_ref_or_own_ptr, type_text)
     1642    match_ref_ptr = '(?=\W|^)RefPtr(?=\W)'
     1643    bad_type_usage = search(match_ref_ptr, type_text)
    16441644    if not bad_type_usage or type_text.endswith('&') or type_text.endswith('*'):
    16451645        return
  • trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py

    r155454 r155535  
    34463446            '{\n'
    34473447            '}',
    3448             'The return type should use PassOwnPtr instead of OwnPtr.  [readability/pass_ptr] [5]')
     3448            '')
    34493449
    34503450    def test_ref_ptr_parameter_value(self):
     
    34803480            '{\n'
    34813481            '}',
    3482             'The parameter type should use PassOwnPtr instead of OwnPtr.  [readability/pass_ptr] [5]')
     3482            '')
    34833483        self.assert_pass_ptr_check(
    34843484            'int myFunction(OwnPtr<Type1>& simple)\n'
Note: See TracChangeset for help on using the changeset viewer.