Bug 198605 - check-webkit-style reports false positive whitespace in multiline macro comment
Summary: check-webkit-style reports false positive whitespace in multiline macro comment
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-06 04:02 PDT by Paulo Matos
Modified: 2019-06-12 03:09 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paulo Matos 2019-06-06 04:02:41 PDT
With multiline macro comments such as:

```
#define FOR_EACH_FP_REGISTER(m)                 \
    /* Parameter/result registers. */           \
    macro(m, n(q0), 0, 0) 
```

check-webkit-style generates a 'Weird number of spaces at line-start' even though the whole macro /body/, including comment, is indented properly (4 spaces).
Comment 1 Philippe Normand 2019-06-10 04:29:20 PDT
Can you try again, with a single space before every backslash?
Comment 2 Paulo Matos 2019-06-12 02:56:00 PDT
(In reply to Philippe Normand from comment #1)
> Can you try again, with a single space before every backslash?

You mean like this:

#define FOR_EACH_GP_REGISTER(macro)                             \
    /* Parameter/result registers. */ \
    macro_forward(macro, n(x0), 0, 0)                           \
    macro_forward(macro, n(x1), 0, 0)

Doesn't work either. Getting:
ERROR: Source/JavaScriptCore/assembler/ARM64Registers.h:52:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Comment 3 Paulo Matos 2019-06-12 03:09:29 PDT
For _every_ backslash as in:
#define FOO \
    /* test */ \
    macro_forward(foo) \
    macro_forward(bar)

doesn't work either.