Bug 1583717 Comment 6 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

-Wempty-init-stmt is a new clang diagnostic that diagnoses empty C++17 init-statements of if, switch, and range-based for statements:

void test() {
  if(; // <- warning: init-statement of 'if' is a null statement
    true)
  ;

  switch (; // <- warning: init-statement of 'switch' is a null statement
    x) {
    ...
  }

  for (; // <- warning: init-statement of 'range-based for' is a null statement
    int y : S())
  ;
}
-Wempty-init-stmt is a new clang diagnostic that diagnoses empty C++17 init-statements of if, switch, and range-based for statements:

```
void test() {
  if(; // <- warning: init-statement of 'if' is a null statement
    true)
  ;

  switch (; // <- warning: init-statement of 'switch' is a null statement
    x) {
    ...
  }

  for (; // <- warning: init-statement of 'range-based for' is a null statement
    int y : S())
  ;
}
```

Back to Bug 1583717 Comment 6