Bug 198605

Summary: check-webkit-style reports false positive whitespace in multiline macro comment
Product: WebKit Reporter: Paulo Matos <pmatos>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: pnormand
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

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.