[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 11:43:48 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 4737a714cdd08d6c009677e2e17a807dbb728c71
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Aug 5 07:11:26 2010 +0000

    2010-08-04  Kenichi Ishibashi  <bashi at google.com>
    
            Reviewed by Shinichiro Hamaji.
    
            Fixes check-webkit-style false positive on "new uint32_t."
            https://bugs.webkit.org/show_bug.cgi?id=43077
    
            * Scripts/webkitpy/style/checkers/cpp.py:
            * Scripts/webkitpy/style/checkers/cpp_unittest.py:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64718 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 5e90958..4a499fd 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,13 @@
+2010-08-04  Kenichi Ishibashi  <bashi at google.com>
+
+        Reviewed by Shinichiro Hamaji.
+
+        Fixes check-webkit-style false positive on "new uint32_t."
+        https://bugs.webkit.org/show_bug.cgi?id=43077
+
+        * Scripts/webkitpy/style/checkers/cpp.py:
+        * Scripts/webkitpy/style/checkers/cpp_unittest.py:
+
 2010-08-04  Kent Tamura  <tkent at chromium.org>
 
         Reviewed by Dimitri Glazkov.
diff --git a/WebKitTools/Scripts/webkitpy/style/checkers/cpp.py b/WebKitTools/Scripts/webkitpy/style/checkers/cpp.py
index 9e4240c..62f40ea 100644
--- a/WebKitTools/Scripts/webkitpy/style/checkers/cpp.py
+++ b/WebKitTools/Scripts/webkitpy/style/checkers/cpp.py
@@ -2451,6 +2451,9 @@ def check_identifier_name_in_declaration(filename, line_number, line, error):
     line = sub(r'(unsigned|signed) (?=char|short|int|long)', '', line)
     line = sub(r'\b(inline|using|static|const|volatile|auto|register|extern|typedef|restrict|struct|class|virtual)(?=\W)', '', line)
 
+    # Remove "new" and "new (expr)" to simplify, too.
+    line = sub(r'new\s*(\([^)]*\))?', '', line)
+
     # Remove all template parameters by removing matching < and >.
     # Loop until no templates are removed to remove nested templates.
     while True:
diff --git a/WebKitTools/Scripts/webkitpy/style/checkers/cpp_unittest.py b/WebKitTools/Scripts/webkitpy/style/checkers/cpp_unittest.py
index c927db6..16b1a3c 100644
--- a/WebKitTools/Scripts/webkitpy/style/checkers/cpp_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/style/checkers/cpp_unittest.py
@@ -3715,6 +3715,12 @@ class WebKitStyleTest(CppStyleTestBase):
         self.assert_lint('unsigned _fillRule : 1;',
                          '_fillRule' + name_underscore_error_message)
 
+        # new operators in initialization.
+        self.assert_lint('OwnPtr<uint32_t> variable(new uint32_t);', '')
+        self.assert_lint('OwnPtr<uint32_t> variable(new (expr) uint32_t);', '')
+        self.assert_lint('OwnPtr<uint32_t> under_score(new uint32_t);',
+                         'under_score' + name_underscore_error_message)
+
 
     def test_comments(self):
         # A comment at the beginning of a line is ok.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list