1*f4a2713aSLionel Sambuc // Don't attempt slash switches on msys bash. 2*f4a2713aSLionel Sambuc // REQUIRES: shell-preserves-root 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc // Note: %s must be preceded by --, otherwise it may be interpreted as a 5*f4a2713aSLionel Sambuc // command-line option, e.g. on Mac where %s is commonly under /Users. 6*f4a2713aSLionel Sambuc 7*f4a2713aSLionel Sambuc // RUN: %clang_cl /TC -### -- %s 2>&1 | FileCheck -check-prefix=TC %s 8*f4a2713aSLionel Sambuc // TC: "-x" "c" 9*f4a2713aSLionel Sambuc // TC-NOT: warning 10*f4a2713aSLionel Sambuc // TC-NOT: note 11*f4a2713aSLionel Sambuc 12*f4a2713aSLionel Sambuc // RUN: %clang_cl /TP -### -- %s 2>&1 | FileCheck -check-prefix=TP %s 13*f4a2713aSLionel Sambuc // TP: "-x" "c++" 14*f4a2713aSLionel Sambuc // TP-NOT: warning 15*f4a2713aSLionel Sambuc // TP-NOT: note 16*f4a2713aSLionel Sambuc 17*f4a2713aSLionel Sambuc // RUN: %clang_cl -### /Tc%s /TP -- %s 2>&1 | FileCheck -check-prefix=Tc %s 18*f4a2713aSLionel Sambuc // RUN: %clang_cl -### /TP /Tc%s -- %s 2>&1 | FileCheck -check-prefix=Tc %s 19*f4a2713aSLionel Sambuc // Tc: "-x" "c" 20*f4a2713aSLionel Sambuc // Tc: "-x" "c++" 21*f4a2713aSLionel Sambuc // Tc-NOT: warning 22*f4a2713aSLionel Sambuc // Tc-NOT: note 23*f4a2713aSLionel Sambuc 24*f4a2713aSLionel Sambuc // RUN: %clang_cl -### /Tp%s /TC -- %s 2>&1 | FileCheck -check-prefix=Tp %s 25*f4a2713aSLionel Sambuc // RUN: %clang_cl -### /TC /Tp%s -- %s 2>&1 | FileCheck -check-prefix=Tp %s 26*f4a2713aSLionel Sambuc // Tp: "-x" "c++" 27*f4a2713aSLionel Sambuc // Tp: "-x" "c" 28*f4a2713aSLionel Sambuc // Tp-NOT: warning 29*f4a2713aSLionel Sambuc // Tp-NOT: note 30*f4a2713aSLionel Sambuc 31*f4a2713aSLionel Sambuc // RUN: %clang_cl /TP /TC /TP -### -- %s 2>&1 | FileCheck -check-prefix=WARN %s 32*f4a2713aSLionel Sambuc // WARN: warning: overriding '/TP' option with '/TC' 33*f4a2713aSLionel Sambuc // WARN: warning: overriding '/TC' option with '/TP' 34*f4a2713aSLionel Sambuc // WARN: note: The last /TC or /TP option takes precedence over earlier instances 35*f4a2713aSLionel Sambuc // WARN-NOT: note 36