Title: [253641] trunk/Tools
- Revision
- 253641
- Author
- [email protected]
- Date
- 2019-12-17 13:07:29 -0800 (Tue, 17 Dec 2019)
Log Message
Update Check webkit style to allow for auto with pairs in c++
https://bugs.webkit.org/show_bug.cgi?id=205320
Reviewed by Jonathan Bedard.
Allow for spaces between auto and brakets when using auto with pairs.
* Scripts/webkitpy/style/checkers/cpp.py:
(check_spacing):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(CppStyleTest):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (253640 => 253641)
--- trunk/Tools/ChangeLog 2019-12-17 20:52:19 UTC (rev 253640)
+++ trunk/Tools/ChangeLog 2019-12-17 21:07:29 UTC (rev 253641)
@@ -1,3 +1,17 @@
+2019-12-17 Megan Gardner <[email protected]>
+
+ Update Check webkit style to allow for auto with pairs in c++
+ https://bugs.webkit.org/show_bug.cgi?id=205320
+
+ Reviewed by Jonathan Bedard.
+
+ Allow for spaces between auto and brakets when using auto with pairs.
+
+ * Scripts/webkitpy/style/checkers/cpp.py:
+ (check_spacing):
+ * Scripts/webkitpy/style/checkers/cpp_unittest.py:
+ (CppStyleTest):
+
2019-12-17 youenn fablet <[email protected]>
WebKitTestRunner should report GPU process crashes
Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py (253640 => 253641)
--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py 2019-12-17 20:52:19 UTC (rev 253640)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py 2019-12-17 21:07:29 UTC (rev 253641)
@@ -2070,7 +2070,7 @@
# 'delete []' or 'new char * []'. Objective-C can't follow this rule
# because of method calls.
if file_extension != 'mm' and file_extension != 'm':
- if search(r'\w\s+\[', line) and not search(r'(delete|return)\s+\[', line):
+ if search(r'\w\s+\[', line) and not search(r'(delete|return|auto)\s+\[', line):
error(line_number, 'whitespace/brackets', 5,
'Extra space before [.')
Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py (253640 => 253641)
--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py 2019-12-17 20:52:19 UTC (rev 253640)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py 2019-12-17 21:07:29 UTC (rev 253641)
@@ -2125,6 +2125,7 @@
def test_spacing_before_brackets(self):
self.assert_lint('delete [] base;', '')
+ self.assert_lint('auto [foo, bar] = getFooAndBar();', '')
# See SOFT_LINK_CLASS_FOR_HEADER() macro in SoftLinking.h.
self.assert_lint(' return [get_##framework##_##className##Class() alloc]; \\', '')
self.assert_lint(' m_taskFunction = [callee, method, arguments...] {', '')
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes