Title: [88179] trunk/Tools
- Revision
- 88179
- Author
- commit-qu...@webkit.org
- Date
- 2011-06-06 12:36:08 -0700 (Mon, 06 Jun 2011)
Log Message
2011-06-06 Yong Li <y...@rim.com>
Reviewed by Eric Seidel.
https://bugs.webkit.org/show_bug.cgi?id=62097
Fix the problem that integral bitfield check incorrectly barked at ?: expressions.
* Scripts/webkitpy/style/checkers/cpp.py:
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (88178 => 88179)
--- trunk/Tools/ChangeLog 2011-06-06 19:21:32 UTC (rev 88178)
+++ trunk/Tools/ChangeLog 2011-06-06 19:36:08 UTC (rev 88179)
@@ -1,3 +1,13 @@
+2011-06-06 Yong Li <y...@rim.com>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=62097
+ Fix the problem that integral bitfield check incorrectly barked at ?: expressions.
+
+ * Scripts/webkitpy/style/checkers/cpp.py:
+ * Scripts/webkitpy/style/checkers/cpp_unittest.py:
+
2011-06-06 Xan Lopez <xlo...@igalia.com>
Reviewed by Martin Robinson.
Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py (88178 => 88179)
--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py 2011-06-06 19:21:32 UTC (rev 88178)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py 2011-06-06 19:36:08 UTC (rev 88179)
@@ -2922,7 +2922,7 @@
# Check for plain bitfields declared without either "singed" or "unsigned".
# Most compilers treat such bitfields as signed, but there are still compilers like
# RVCT 4.0 that use unsigned by default.
- matched = re.match(r'\s*((const|mutable)\s+)?(char|(short(\s+int)?)|int|long(\s+(long|int))?)\s+.+\s*:\s*\d+\s*;', line)
+ matched = re.match(r'\s*((const|mutable)\s+)?(char|(short(\s+int)?)|int|long(\s+(long|int))?)\s+[a-zA-Z_][a-zA-Z0-9_]*\s*:\s*\d+\s*;', line)
if matched:
error(line_number, 'runtime/bitfields', 5,
'Please declare integral type bitfields with either signed or unsigned.')
Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py (88178 => 88179)
--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py 2011-06-06 19:21:32 UTC (rev 88178)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py 2011-06-06 19:36:08 UTC (rev 88179)
@@ -2381,6 +2381,7 @@
self.assert_lint('mutable short a : 14;', errmsg)
self.assert_lint('const char a : 6;', errmsg)
self.assert_lint('long int a : 30;', errmsg)
+ self.assert_lint('int a = 1 ? 0 : 30;', '')
class CleansedLinesTest(unittest.TestCase):
def test_init(self):
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes