Issue |
145467
|
Summary |
while using clang-format with --lines option, it will not respect WhitespaceSensitiveMacros
|
Labels |
clang-format
|
Assignees |
|
Reporter |
fantouch
|
In `.clang-foramt` I have added `WhitespaceSensitiveMacros: ['EM_ASM']`
and diff is:
```
EM_ASM({
let thisPromiseIndex = Module.AllFramesCollectorPromiseIndex;
Module.AllFramesCollectorPromise = Module.AllFramesCollectorPromise
.then((val) => { // only this line#33 changed
return [ 0, val, thisPromiseIndex ];
})
});
```
with `--lines=33:33` option (by `git clang-format` behavior),
`.then((val) => {` becomes
`.then((val) = > {`
It seems that `--lines` break the WhitespaceSensitiveMacros rules, I think clang-foramt should check if lines are inside `EM_ASM` macro
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs