2013-04-18 05:52:44 +08:00
|
|
|
// RUN: %clang -fcolor-diagnostics -### -c %s 2>&1 \
|
2013-08-12 20:51:05 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-CD %s
|
2013-04-18 05:52:44 +08:00
|
|
|
// CHECK-CD: clang{{.*}}" "-fcolor-diagnostics"
|
|
|
|
|
|
|
|
// RUN: %clang -fno-color-diagnostics -### -c %s 2>&1 \
|
2013-08-12 20:51:05 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-NCD %s
|
2013-04-18 05:52:44 +08:00
|
|
|
// CHECK-NCD-NOT: clang{{.*}}" "-fcolor-diagnostics"
|
|
|
|
|
|
|
|
// RUN: %clang -fdiagnostics-color -### -c %s 2>&1 \
|
2013-08-12 20:51:05 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DC %s
|
2013-04-18 05:52:44 +08:00
|
|
|
// CHECK-DC: clang{{.*}}" "-fcolor-diagnostics"
|
|
|
|
|
|
|
|
// RUN: %clang -fno-diagnostics-color -### -c %s 2>&1 \
|
2013-08-12 20:51:05 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-NDC %s
|
2013-04-18 05:52:44 +08:00
|
|
|
// CHECK-NDC-NOT: clang{{.*}}" "-fcolor-diagnostics"
|
|
|
|
|
|
|
|
// RUN: %clang -fdiagnostics-color=always -### -c %s 2>&1 \
|
2013-08-12 20:51:05 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DCE_A %s
|
2013-04-18 05:52:44 +08:00
|
|
|
// CHECK-DCE_A: clang{{.*}}" "-fcolor-diagnostics"
|
|
|
|
|
|
|
|
// RUN: %clang -fdiagnostics-color=never -### -c %s 2>&1 \
|
2013-08-12 20:51:05 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DCE_N %s
|
2013-04-18 05:52:44 +08:00
|
|
|
// CHECK-DCE_N-NOT: clang{{.*}}" "-fcolor-diagnostics"
|
|
|
|
|
|
|
|
// The test doesn't run in a PTY, so "auto" defaults to off.
|
|
|
|
// RUN: %clang -fdiagnostics-color=auto -### -c %s 2>&1 \
|
2013-08-12 20:51:05 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DCE_AUTO %s
|
2013-04-18 05:52:44 +08:00
|
|
|
// CHECK-DCE_AUTO-NOT: clang{{.*}}" "-fcolor-diagnostics"
|
|
|
|
|
|
|
|
// RUN: %clang -fdiagnostics-color=foo -### -c %s 2>&1 \
|
2013-08-12 20:51:05 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DCE_FOO %s
|
2013-04-18 05:52:44 +08:00
|
|
|
// CHECK-DCE_FOO: error: the clang compiler does not support '-fdiagnostics-color=foo'
|
|
|
|
|
|
|
|
// Check that the last flag wins.
|
|
|
|
// RUN: %clang -fno-color-diagnostics -fdiagnostics-color -### -c %s 2>&1 \
|
2013-08-12 20:51:05 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-NCD_DC_S %s
|
2013-04-18 05:52:44 +08:00
|
|
|
// CHECK-NCD_DC_S: clang{{.*}}" "-fcolor-diagnostics"
|
|
|
|
|
|
|
|
// RUN: %clang -fcolor-diagnostics -fno-diagnostics-color -### -c %s 2>&1 \
|
2013-08-12 20:51:05 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-CD_NDC_S %s
|
2013-04-18 05:52:44 +08:00
|
|
|
// CHECK-CD_NDC_S-NOT: clang{{.*}}" "-fcolor-diagnostics"
|
|
|
|
|
|
|
|
// RUN: %clang -fdiagnostics-color -fno-color-diagnostics -### -c %s 2>&1 \
|
2013-08-12 20:51:05 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DC_NCD_S %s
|
2013-04-18 05:52:44 +08:00
|
|
|
// CHECK-DC_NCD_S-NOT: clang{{.*}}" "-fcolor-diagnostics"
|
|
|
|
|
|
|
|
// RUN: %clang -fno-diagnostics-color -fcolor-diagnostics -### -c %s 2>&1 \
|
2013-08-12 20:51:05 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-NDC_CD_S %s
|
2013-04-18 05:52:44 +08:00
|
|
|
// CHECK-NDC_CD_S: clang{{.*}}" "-fcolor-diagnostics"
|
|
|
|
|
|
|
|
// RUN: %clang -fcolor-diagnostics -fdiagnostics-color=auto -### -c %s 2>&1 \
|
2013-08-12 20:51:05 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-CD_DCE_AUTO_S %s
|
2013-04-18 05:52:44 +08:00
|
|
|
// CHECK-CD_DCE_AUTO_S-NOT: clang{{.*}}" "-fcolor-diagnostics"
|
2013-09-11 08:38:02 +08:00
|
|
|
|
|
|
|
// RUN: %clang -fansi-escape-codes -### -c %s 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-AEC %s
|
|
|
|
// CHECK-AEC: clang{{.*}}" "-fansi-escape-codes"
|