Title: [160318] trunk/Tools
- Revision
- 160318
- Author
- commit-qu...@webkit.org
- Date
- 2013-12-09 10:57:53 -0800 (Mon, 09 Dec 2013)
Log Message
check-webkit-style: ternary operator in macro call identified as initialization list
https://bugs.webkit.org/show_bug.cgi?id=125443
Patch by Laszlo Vidacs <l...@inf.u-szeged.hu> on 2013-12-09
Reviewed by Ryosuke Niwa.
Do not match initialization list when questionmark is placed before :
* Scripts/webkitpy/style/checkers/cpp.py:
(check_member_initialization_list):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (160317 => 160318)
--- trunk/Tools/ChangeLog 2013-12-09 18:51:02 UTC (rev 160317)
+++ trunk/Tools/ChangeLog 2013-12-09 18:57:53 UTC (rev 160318)
@@ -1,3 +1,15 @@
+2013-12-09 Laszlo Vidacs <l...@inf.u-szeged.hu>
+
+ check-webkit-style: ternary operator in macro call identified as initialization list
+ https://bugs.webkit.org/show_bug.cgi?id=125443
+
+ Reviewed by Ryosuke Niwa.
+
+ Do not match initialization list when questionmark is placed before :
+
+ * Scripts/webkitpy/style/checkers/cpp.py:
+ (check_member_initialization_list):
+
2013-12-09 Joanmarie Diggs <jdi...@igalia.com>
AX: [ATK] Convert the get_{string,text}_at_offset atktest.c unit tests to layout tests
Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py (160317 => 160318)
--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py 2013-12-09 18:51:02 UTC (rev 160317)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py 2013-12-09 18:57:53 UTC (rev 160318)
@@ -1987,7 +1987,7 @@
# with the colon or comma preceding the member on that line.
begin_line = line
# match the start of initialization list
- if search(r'^(?P<indentation>\s*)((explicit\s+)?[^\s]+\(.*\)\s?\:|^\s*\:).*[^;]*$', line):
+ if search(r'^(?P<indentation>\s*)((explicit\s+)?[^(\s|\?)]+\([^\?]*\)\s?\:|^(\s|\?)*\:).*[^;]*$', line):
if search(r'[^:]\:[^\:\s]+', line):
error(line_number, 'whitespace/init', 4,
'Missing spaces around :')
Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py (160317 => 160318)
--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py 2013-12-09 18:51:02 UTC (rev 160317)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py 2013-12-09 18:57:53 UTC (rev 160318)
@@ -4973,6 +4973,7 @@
};''',
'')
self.assert_lint('o = foo(b ? bar() : baz());', '')
+ self.assert_lint('MYMACRO(a ? b() : c);', '')
def test_other(self):
# FIXME: Implement this.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes