In JavaScript, duplicated commas have semantic meaning.
x = [a,,b];
The statement above creates an array with three entries, the middle being undefined. Because clang-format should not change semantics, disable this cleanup in JS.
Differential D33641
clang-format: [JS] do not clean up duplicated commas. mprobst on May 29 2017, 1:26 AM. Authored by
Details In JavaScript, duplicated commas have semantic meaning. x = [a,,b]; The statement above creates an array with three entries, the middle being undefined. Because clang-format should not change semantics, disable this cleanup in JS.
Diff Detail
Event Timeline
|