| 1 |
int a ; |
| 2 |
int b ; |
| 3 |
// A single empty line |
| 4 |
int c ; |
| 5 |
/* |
| 6 |
|
| 7 |
more than 8 empty lines |
| 8 |
(forces a line marker instead of newline padding) |
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
*/ |
| 14 |
int d ; |
| 15 |
|
| 16 |
// RUN: %clang_cc1 -E %s 2>&1 | FileCheck %s --strict-whitespace --check-prefix=LINEMARKERS |
| 17 |
// RUN: %clang_cc1 -E -P %s 2>&1 | FileCheck %s --strict-whitespace --check-prefix=COLSONLY |
| 18 |
// RUN: %clang_cc1 -E -fminimize-whitespace %s 2>&1 | FileCheck %s --strict-whitespace --check-prefix=MINCOL |
| 19 |
// RUN: %clang_cc1 -E -P -fminimize-whitespace %s 2>&1 | FileCheck %s --strict-whitespace --check-prefix=MINWS |
| 20 |
|
| 21 |
// Check behavior after varying number of lines without emitted tokens. |
| 22 |
|
| 23 |
// LINEMARKERS: {{^}}# 1 "{{.*}}skip-empty-lines.c" 2 |
| 24 |
// LINEMARKERS-NEXT: {{^}} int a ; |
| 25 |
// LINEMARKERS-NEXT: {{^}} int b ; |
| 26 |
// LINEMARKERS-EMPTY: |
| 27 |
// LINEMARKERS-NEXT: {{^}} int c ; |
| 28 |
// LINEMARKERS-NEXT: {{^}}# 14 "{{.*}}skip-empty-lines.c" |
| 29 |
// LINEMARKERS-NEXT: {{^}} int d ; |
| 30 |
|
| 31 |
// COLSONLY: {{^}} int a ; |
| 32 |
// COLSONLY-NEXT: {{^}} int b ; |
| 33 |
// COLSONLY-NEXT: {{^}} int c ; |
| 34 |
// COLSONLY-NEXT: {{^}} int d ; |
| 35 |
|
| 36 |
// MINCOL: {{^}}# 1 "{{.*}}skip-empty-lines.c" 2 |
| 37 |
// MINCOL-NEXT: {{^}}int a; |
| 38 |
// MINCOL-NEXT: {{^}}int b; |
| 39 |
// MINCOL-EMPTY: |
| 40 |
// MINCOL-NEXT: {{^}}int c; |
| 41 |
// MINCOL-NEXT: {{^}}# 14 "{{.*}}skip-empty-lines.c" |
| 42 |
// MINCOL-NEXT: {{^}}int d; |
| 43 |
|
| 44 |
// MINWS: {{^}}int a;int b;int c;int d; |
| 45 |
|