Title: [216013] trunk/Tools
Revision
216013
Author
[email protected]
Date
2017-05-01 06:10:14 -0700 (Mon, 01 May 2017)

Log Message

REGRESSION (r216000): test-webkitpy fails after adding new soft-linked class checker

Unreviewed.

Follow-up fix for:
[Cocoa] Have check-webkit-style advise against use of [get…Class() alloc]
https://bugs.webkit.org/show_bug.cgi?id=171486

* Scripts/webkitpy/style/checkers/cpp.py:
(check_soft_link_class_alloc): Use (\w+) instead of ([^\s]+) to
match and capture the function name.  The latter also mistakenly
matches C-preprocessor directives.
(CppChecker.categories): Add 'runtime/soft-linked-alloc', which
is a requirement for the CppChecker class.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (216012 => 216013)


--- trunk/Tools/ChangeLog	2017-05-01 08:41:49 UTC (rev 216012)
+++ trunk/Tools/ChangeLog	2017-05-01 13:10:14 UTC (rev 216013)
@@ -1,3 +1,20 @@
+2017-05-01  David Kilzer  <[email protected]>
+
+        REGRESSION (r216000): test-webkitpy fails after adding new soft-linked class checker
+
+        Unreviewed.
+
+        Follow-up fix for:
+        [Cocoa] Have check-webkit-style advise against use of [get…Class() alloc]
+        https://bugs.webkit.org/show_bug.cgi?id=171486
+
+        * Scripts/webkitpy/style/checkers/cpp.py:
+        (check_soft_link_class_alloc): Use (\w+) instead of ([^\s]+) to
+        match and capture the function name.  The latter also mistakenly
+        matches C-preprocessor directives.
+        (CppChecker.categories): Add 'runtime/soft-linked-alloc', which
+        is a requirement for the CppChecker class.
+
 2017-05-01  Carlos Garcia Campos  <[email protected]>
 
         [GTK] Add automation session API

Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py (216012 => 216013)


--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py	2017-05-01 08:41:49 UTC (rev 216012)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py	2017-05-01 13:10:14 UTC (rev 216013)
@@ -2740,7 +2740,7 @@
 
     line = clean_lines.elided[line_number]
 
-    matched = search(r'\[get([^\s]+)Class\(\)\s+alloc\]', line)
+    matched = search(r'\[get(\w+)Class\(\)\s+alloc\]', line)
     if matched:
         error(line_number, 'runtime/soft-linked-alloc', 4,
               'Using +alloc with a soft-linked class. Use alloc%sInstance() instead.' % matched.group(1))
@@ -3920,6 +3920,7 @@
         'runtime/references',
         'runtime/rtti',
         'runtime/sizeof',
+        'runtime/soft-linked-alloc',
         'runtime/string',
         'runtime/threadsafe_fn',
         'runtime/unsigned',
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to