|
1 | | -! Test that flang-new forwards -f{no-}color-diagnostics options to |
2 | | -! flang-new -fc1 as expected. |
| 1 | +! Test that flang-new forwards -f{no-}color-diagnostics and |
| 2 | +! -f{no-}diagnostics-color options to flang-new -fc1 as expected. |
3 | 3 |
|
4 | 4 | ! RUN: %flang -fsyntax-only -### %s -o %t 2>&1 -fcolor-diagnostics \ |
5 | 5 | ! RUN: | FileCheck %s --check-prefix=CHECK-CD |
| 6 | +! RUN: %flang -fsyntax-only -### %s -o %t 2>&1 -fdiagnostics-color \ |
| 7 | +! RUN: | FileCheck %s --check-prefix=CHECK-CD |
| 8 | +! RUN: %flang -fsyntax-only -### %s -o %t 2>&1 -fdiagnostics-color=always \ |
| 9 | +! RUN: | FileCheck %s --check-prefix=CHECK-CD |
6 | 10 | ! CHECK-CD: "-fc1"{{.*}} "-fcolor-diagnostics" |
7 | 11 |
|
8 | 12 | ! RUN: %flang -fsyntax-only -### %s -o %t 2>&1 -fno-color-diagnostics \ |
9 | 13 | ! RUN: | FileCheck %s --check-prefix=CHECK-NCD |
| 14 | +! RUN: %flang -fsyntax-only -### %s -o %t -fno-diagnostics-color 2>&1 \ |
| 15 | +! RUN: | FileCheck %s --check-prefix=CHECK-NCD |
| 16 | +! RUN: %flang -fsyntax-only -### %s -o %t 2>&1 -fdiagnostics-color=never \ |
| 17 | +! RUN: | FileCheck %s --check-prefix=CHECK-NCD |
10 | 18 | ! CHECK-NCD-NOT: "-fc1"{{.*}} "-fcolor-diagnostics" |
11 | 19 |
|
12 | 20 | ! Check that the last flag wins. |
13 | 21 | ! RUN: %flang -fsyntax-only -### %s -o %t 2>&1 \ |
14 | 22 | ! RUN: -fno-color-diagnostics -fcolor-diagnostics \ |
15 | 23 | ! RUN: | FileCheck %s --check-prefix=CHECK-NCD_CD_S |
| 24 | +! RUN: %flang -fsyntax-only -### %s -o %t 2>&1 \ |
| 25 | +! RUN: -fno-diagnostics-color -fdiagnostics-color \ |
| 26 | +! RUN: | FileCheck %s --check-prefix=CHECK-NCD_CD_S |
| 27 | +! RUN: %flang -fsyntax-only -### %s -o %t \ |
| 28 | +! RUN: -fno-color-diagnostics -fdiagnostics-color=always 2>&1 \ |
| 29 | +! RUN: | FileCheck %s --check-prefix=CHECK-NCD_CD_S |
| 30 | +! RUN: %flang -fsyntax-only -### %s -o %t \ |
| 31 | +! RUN: -fdiagnostics-color=never -fdiagnostics-color=always 2>&1 \ |
| 32 | +! RUN: | FileCheck %s --check-prefix=CHECK-NCD_CD_S |
| 33 | +! RUN: %flang -fsyntax-only -### %s -o %t \ |
| 34 | +! RUN: -fdiagnostics-color=never -fcolor-diagnostics 2>&1 \ |
| 35 | +! RUN: | FileCheck %s --check-prefix=CHECK-NCD_CD_S |
16 | 36 | ! CHECK-NCD_CD_S: "-fc1"{{.*}} "-fcolor-diagnostics" |
17 | 37 |
|
18 | 38 | ! RUN: %flang -fsyntax-only -### %s -o %t 2>&1 \ |
19 | 39 | ! RUN: -fcolor-diagnostics -fno-color-diagnostics \ |
20 | 40 | ! RUN: | FileCheck %s --check-prefix=CHECK-CD_NCD_S |
| 41 | +! RUN: %flang -fsyntax-only -### %s -o %t \ |
| 42 | +! RUN: -fdiagnostics-color -fno-diagnostics-color 2>&1 \ |
| 43 | +! RUN: | FileCheck %s --check-prefix=CHECK-CD_NCD_S |
| 44 | +! RUN: %flang -fsyntax-only -### %s -o %t \ |
| 45 | +! RUN: -fdiagnostics-color=always -fno-color-diagnostics 2>&1 \ |
| 46 | +! RUN: | FileCheck %s --check-prefix=CHECK-CD_NCD_S |
| 47 | +! RUN: %flang -fsyntax-only -### %s -o %t \ |
| 48 | +! RUN: -fdiagnostics-color=always -fdiagnostics-color=never 2>&1 \ |
| 49 | +! RUN: | FileCheck %s --check-prefix=CHECK-CD_NCD_S |
| 50 | +! RUN: %flang -fsyntax-only -### %s -o %t \ |
| 51 | +! RUN: -fcolor-diagnostics -fdiagnostics-color=never 2>&1 \ |
| 52 | +! RUN: | FileCheck %s --check-prefix=CHECK-CD_NCD_S |
21 | 53 | ! CHECK-CD_NCD_S-NOT: "-fc1"{{.*}} "-fcolor-diagnostics" |
0 commit comments