[Webkit-unassigned] [Bug 51695] check-webkit-style treated some macros with parentheses after #elif as function calls

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 29 05:03:00 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=51695





--- Comment #1 from Koan-Sin Tan <koansin.tan at gmail.com>  2010-12-29 05:03:00 PST ---

a stupid hack like this will avoid the issue, but this doesn't really look right


Index: Tools/Scripts/webkitpy/style/checkers/cpp.py
===================================================================
--- Tools/Scripts/webkitpy/style/checkers/cpp.py    (revision 74733)
+++ Tools/Scripts/webkitpy/style/checkers/cpp.py    (working copy)
@@ -1327,6 +1327,8 @@
     # they'll never need to wrap.
     if (  # Ignore control structures.
         not search(r'\b(if|for|foreach|while|switch|return|new|delete)\b', function_call)
+        # Ignore (()) right after '#elif '.
+        and not search(r'\A#elif', function_call)
         # Ignore pointers/references to functions.
         and not search(r' \([^)]+\)\([^)]*(\)|,$)', function_call)
         # Ignore pointers/references to arrays.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list