1 // RUN: %clang %s -cake-is-lie -%0 -%d -HHHH -munknown-to-clang-option -print-stats -funknown-to-clang-option -### 2>&1 | \
2 // RUN: FileCheck %s
3 // RUN: %clang_cl -cake-is-lie -%0 -%d -HHHH -munknown-to-clang-option -print-stats -funknown-to-clang-option -### -c -- %s 2>&1 | \
4 // RUN: FileCheck %s --check-prefix=CL
5 // RUN: %clang_cl -cake-is-lie -%0 -%d -HHHH -munknown-to-clang-option -print-stats -funknown-to-clang-option -c -Werror=unknown-argument -### -- %s 2>&1 | \
6 // RUN: FileCheck %s --check-prefix=CL-ERROR
7 // RUN: %clang_cl -cake-is-lie -%0 -%d -HHHH -munknown-to-clang-option -print-stats -funknown-to-clang-option -c -Wno-unknown-argument -### -- %s 2>&1 | \
8 // RUN: FileCheck %s --check-prefix=SILENT
9 
10 // CHECK: error: unknown argument: '-cake-is-lie'
11 // CHECK: error: unknown argument: '-%0'
12 // CHECK: error: unknown argument: '-%d'
13 // CHECK: error: unknown argument: '-HHHH'
14 // CHECK: error: unknown argument: '-munknown-to-clang-option'
15 // CHECK: error: unknown argument: '-print-stats'
16 // CHECK: error: unknown argument: '-funknown-to-clang-option'
17 // CL: warning: unknown argument ignored in clang-cl: '-cake-is-lie'
18 // CL: warning: unknown argument ignored in clang-cl: '-%0'
19 // CL: warning: unknown argument ignored in clang-cl: '-%d'
20 // CL: warning: unknown argument ignored in clang-cl: '-HHHH'
21 // CL: warning: unknown argument ignored in clang-cl: '-munknown-to-clang-option'
22 // CL: warning: unknown argument ignored in clang-cl: '-print-stats'
23 // CL: warning: unknown argument ignored in clang-cl: '-funknown-to-clang-option'
24 // CL-ERROR: error: unknown argument ignored in clang-cl: '-cake-is-lie'
25 // CL-ERROR: error: unknown argument ignored in clang-cl: '-%0'
26 // CL-ERROR: error: unknown argument ignored in clang-cl: '-%d'
27 // CL-ERROR: error: unknown argument ignored in clang-cl: '-HHHH'
28 // CL-ERROR: error: unknown argument ignored in clang-cl: '-munknown-to-clang-option'
29 // CL-ERROR: error: unknown argument ignored in clang-cl: '-print-stats'
30 // CL-ERROR: error: unknown argument ignored in clang-cl: '-funknown-to-clang-option'
31 // SILENT-NOT: error:
32 // SILENT-NOT: warning:
33 
34 
35 // RUN: %clang -S %s -o %t.s  -Wunknown-to-clang-option 2>&1 | FileCheck --check-prefix=IGNORED %s
36 
37 // IGNORED: warning: unknown warning option '-Wunknown-to-clang-option'
38