[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e
commit-queue at webkit.org
commit-queue at webkit.org
Fri Jan 21 14:56:56 UTC 2011
The following commit has been merged in the debian/experimental branch:
commit 36ab6726ad26064aafab38380d51e54e0406e8d4
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Jan 5 07:33:00 2011 +0000
2011-01-04 Koan-Sin Tan <koansin.tan at gmail.com>
Reviewed by David Levin.
check-webkit-style treated some macros with parentheses after #elif as function calls
https://bugs.webkit.org/show_bug.cgi?id=51695
Ingore function call space checking in any preprocessor directives
(things starting with #). Change search() to match() because
preprocessor directives are supposed to be in the beginning of lines.
* Scripts/webkitpy/style/checkers/cpp.py:
* Scripts/webkitpy/style/checkers/cpp_unittest.py: make sure there is no false positives for #elif cases
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75050 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index e98cc3f..38c95c0 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,17 @@
+2011-01-04 Koan-Sin Tan <koansin.tan at gmail.com>
+
+ Reviewed by David Levin.
+
+ check-webkit-style treated some macros with parentheses after #elif as function calls
+ https://bugs.webkit.org/show_bug.cgi?id=51695
+
+ Ingore function call space checking in any preprocessor directives
+ (things starting with #). Change search() to match() because
+ preprocessor directives are supposed to be in the beginning of lines.
+
+ * Scripts/webkitpy/style/checkers/cpp.py:
+ * Scripts/webkitpy/style/checkers/cpp_unittest.py: make sure there is no false positives for #elif cases
+
2011-01-04 Søren Gjesse <sgjesse at chromium.org>
Reviewed by Tony Chang.
diff --git a/Tools/Scripts/webkitpy/style/checkers/cpp.py b/Tools/Scripts/webkitpy/style/checkers/cpp.py
index aa1a8f0..4ea7d69 100644
--- a/Tools/Scripts/webkitpy/style/checkers/cpp.py
+++ b/Tools/Scripts/webkitpy/style/checkers/cpp.py
@@ -1338,7 +1338,7 @@ def check_spacing_for_function_call(line, line_number, error):
error(line_number, 'whitespace/parens', 2,
'Extra space after (')
if (search(r'\w\s+\(', function_call)
- and not search(r'#\s*define|typedef', function_call)):
+ and not match(r'\s*(#|typedef)', function_call)):
error(line_number, 'whitespace/parens', 4,
'Extra space before ( in function call')
# If the ) is followed only by a newline or a { + newline, assume it's
diff --git a/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py b/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
index 22d07e3..d39d2ba 100644
--- a/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
+++ b/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
@@ -1435,6 +1435,8 @@ class CppStyleTest(CppStyleTestBase):
self.assert_lint('((a+b))', '')
self.assert_lint('foo (foo)', 'Extra space before ( in function call'
' [whitespace/parens] [4]')
+ self.assert_lint('#elif (foo(bar))', '')
+ self.assert_lint('#elif (foo(bar) && foo(baz))', '')
self.assert_lint('typedef foo (*foo)(foo)', '')
self.assert_lint('typedef foo (*foo12bar_)(foo)', '')
self.assert_lint('typedef foo (Foo::*bar)(foo)', '')
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list