Title: [133685] trunk/Tools
- Revision
- 133685
- Author
- [email protected]
- Date
- 2012-11-06 15:52:34 -0800 (Tue, 06 Nov 2012)
Log Message
Don't warn about RefPtr* parameters
https://bugs.webkit.org/show_bug.cgi?id=101403
Reviewed by Gavin Barraclough.
RefPtr<>* is a valid parameter type.
* Scripts/webkitpy/style/checkers/cpp.py:
(check_function_definition_and_pass_ptr):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(PassPtrTest.test_ref_ptr_parameter_value):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (133684 => 133685)
--- trunk/Tools/ChangeLog 2012-11-06 23:51:53 UTC (rev 133684)
+++ trunk/Tools/ChangeLog 2012-11-06 23:52:34 UTC (rev 133685)
@@ -1,3 +1,17 @@
+2012-11-06 Oliver Hunt <[email protected]>
+
+ Don't warn about RefPtr* parameters
+ https://bugs.webkit.org/show_bug.cgi?id=101403
+
+ Reviewed by Gavin Barraclough.
+
+ RefPtr<>* is a valid parameter type.
+
+ * Scripts/webkitpy/style/checkers/cpp.py:
+ (check_function_definition_and_pass_ptr):
+ * Scripts/webkitpy/style/checkers/cpp_unittest.py:
+ (PassPtrTest.test_ref_ptr_parameter_value):
+
2012-11-06 Raphael Kubo da Costa <[email protected]>
[WTR] Reset EventSender before running each test.
Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py (133684 => 133685)
--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py 2012-11-06 23:51:53 UTC (rev 133684)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py 2012-11-06 23:52:34 UTC (rev 133685)
@@ -1594,7 +1594,7 @@
"""
match_ref_or_own_ptr = '(?=\W|^)(Ref|Own)Ptr(?=\W)'
bad_type_usage = search(match_ref_or_own_ptr, type_text)
- if not bad_type_usage or type_text.endswith('&'):
+ if not bad_type_usage or type_text.endswith('&') or type_text.endswith('*'):
return
type_name = bad_type_usage.group(0)
error(row, 'readability/pass_ptr', 5,
Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py (133684 => 133685)
--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py 2012-11-06 23:51:53 UTC (rev 133684)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py 2012-11-06 23:52:34 UTC (rev 133685)
@@ -3421,6 +3421,11 @@
'{\n'
'}',
'')
+ self.assert_pass_ptr_check(
+ 'int myFunction(RefPtr<Type1>*)\n'
+ '{\n'
+ '}',
+ '')
def test_own_ptr_parameter_value(self):
self.assert_pass_ptr_check(
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes