[Webkit-unassigned] [Bug 130570] Stylechecker: False positive on inline asm code.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 3 07:13:56 PDT 2014


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


Csaba Osztrogonác <ossy at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #227398|review?, commit-queue?      |review-, commit-queue-
               Flag|                            |




--- Comment #2 from Csaba Osztrogonác <ossy at webkit.org>  2014-04-03 07:14:11 PST ---
(From update of attachment 227398)
View in context: https://bugs.webkit.org/attachment.cgi?id=227398&action=review

The idea is good to disable style checking inside inline assembly blocks, but we can do it little bit better.

> Tools/ChangeLog:7
> +        Stylechecker: False positive on inline asm code.
> +        https://bugs.webkit.org/show_bug.cgi?id=130570
> +
> +        Reviewed by NOBODY (OOPS!).
> +

Please add a comment that you disable style checking at all for inline assembly blocks.

> Tools/Scripts/webkitpy/style/checkers/cpp.py:3616
>      if match(r'\s*\b__asm\b', raw_lines[line]):  # Ignore asm lines as they format differently.
>          return
> +    asm_state.process_line(raw_lines[line])

We should avoid all check below, with this early return if we are in asm block.

> Tools/Scripts/webkitpy/style/checkers/cpp.py:3621
> +    check_style(clean_lines, line, file_extension, class_state, file_state, enum_state, asm_state, error)

Passing asm_state here is unnecessary because of the early return.
Consequently we don't need any change in check_style and check_member_initialization_list.

> Tools/Scripts/webkitpy/style/checkers/cpp.py:3632
> +        super(_InlineASMState, self).__init__()

we don't need this

> Tools/Scripts/webkitpy/style/checkers/cpp.py:3636
> +        if match(r'\s*asm\s+volatile\(', line):

volatile should be optional

> Tools/Scripts/webkitpy/style/checkers/cpp.py:3640
> +        pass

we don't need this pass here

> Tools/Scripts/webkitpy/style/checkers/cpp.py:3642
> +    def isInside(self):

isInside -> is_in_asm

-- 
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