1 // RUN: not %clang %s -cake-is-lie -%0 -%d -HHHH -munknown-to-clang-option -print-stats -funknown-to-clang-option -ifoo -imultilib dir -### 2>&1 | \ 2 // RUN: FileCheck %s 3 // RUN: %clang %s -imultilib dir -### 2>&1 | \ 4 // RUN: FileCheck %s --check-prefix=MULTILIB 5 // RUN: not %clang %s -stdlibs=foo -hell -version -### 2>&1 | \ 6 // RUN: FileCheck %s --check-prefix=DID-YOU-MEAN 7 // RUN: %clang_cl -cake-is-lie -%0 -%d -HHHH -munknown-to-clang-option -print-stats -funknown-to-clang-option -### -c -- %s 2>&1 | \ 8 // RUN: FileCheck %s --check-prefix=CL 9 // RUN: %clang_cl -Brepo -### -- %s 2>&1 | \ 10 // RUN: FileCheck %s --check-prefix=CL-DID-YOU-MEAN 11 // RUN: %clang_cl /Brepo -### -- %s 2>&1 | \ 12 // RUN: FileCheck %s --check-prefix=CL-DID-YOU-MEAN-SLASH 13 // RUN: not %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 | \ 14 // RUN: FileCheck %s --check-prefix=CL-ERROR 15 // RUN: not %clang_cl -helo -Werror=unknown-argument -### -- %s 2>&1 | \ 16 // RUN: FileCheck %s --check-prefix=CL-ERROR-DID-YOU-MEAN 17 // 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 | \ 18 // RUN: FileCheck %s --check-prefix=SILENT 19 // RUN: not %clang -cc1as -hell --version 2>&1 | \ 20 // RUN: FileCheck %s --check-prefix=CC1AS-DID-YOU-MEAN 21 // RUN: not %clang -cc1asphalt -help 2>&1 | \ 22 // RUN: FileCheck %s --check-prefix=UNKNOWN-INTEGRATED 23 24 // CHECK: error: unknown argument: '-cake-is-lie' 25 // CHECK: error: unknown argument: '-%0' 26 // CHECK: error: unknown argument: '-%d' 27 // CHECK: error: unknown argument: '-HHHH' 28 // CHECK: error: unknown argument: '-munknown-to-clang-option' 29 // CHECK: error: unknown argument: '-print-stats' 30 // CHECK: error: unknown argument: '-funknown-to-clang-option' 31 // CHECK: error: unknown argument: '-ifoo' 32 // MULTILIB: warning: argument unused during compilation: '-imultilib dir' 33 // DID-YOU-MEAN: error: unknown argument '-stdlibs=foo'; did you mean '-stdlib=foo'? 34 // DID-YOU-MEAN: error: unknown argument '-hell'; did you mean '-help'? 35 // DID-YOU-MEAN: error: unknown argument '-version'; did you mean '--version'? 36 // CL: warning: unknown argument ignored in clang-cl: '-cake-is-lie' 37 // CL: warning: unknown argument ignored in clang-cl: '-%0' 38 // CL: warning: unknown argument ignored in clang-cl: '-%d' 39 // CL: warning: unknown argument ignored in clang-cl: '-HHHH' 40 // CL: warning: unknown argument ignored in clang-cl: '-munknown-to-clang-option' 41 // CL: warning: unknown argument ignored in clang-cl: '-print-stats' 42 // CL: warning: unknown argument ignored in clang-cl: '-funknown-to-clang-option' 43 // CL-DID-YOU-MEAN: warning: unknown argument ignored in clang-cl '-Brepo'; did you mean '-Brepro'? 44 // CL-DID-YOU-MEAN-SLASH: error: no such file or directory: '/Brepo'; did you mean '/Brepro'? 45 // CL-ERROR: error: unknown argument ignored in clang-cl: '-cake-is-lie' 46 // CL-ERROR: error: unknown argument ignored in clang-cl: '-%0' 47 // CL-ERROR: error: unknown argument ignored in clang-cl: '-%d' 48 // CL-ERROR: error: unknown argument ignored in clang-cl: '-HHHH' 49 // CL-ERROR: error: unknown argument ignored in clang-cl: '-munknown-to-clang-option' 50 // CL-ERROR: error: unknown argument ignored in clang-cl: '-print-stats' 51 // CL-ERROR: error: unknown argument ignored in clang-cl: '-funknown-to-clang-option' 52 // CL-ERROR-DID-YOU-MEAN: error: unknown argument ignored in clang-cl '-helo'; did you mean '-help'? 53 // SILENT-NOT: error: 54 // SILENT-NOT: warning: 55 // CC1AS-DID-YOU-MEAN: error: unknown argument '-hell'; did you mean '-help'? 56 // CC1AS-DID-YOU-MEAN: error: unknown argument '--version'; did you mean '-version'? 57 // UNKNOWN-INTEGRATED: error: unknown integrated tool '-cc1asphalt'. Valid tools include '-cc1' and '-cc1as'. 58 59 // RUN: %clang -S %s -o %t.s -Wunknown-to-clang-option 2>&1 | FileCheck --check-prefix=IGNORED %s 60 61 // IGNORED: warning: unknown warning option '-Wunknown-to-clang-option' 62