1 // RUN: env QA_OVERRIDE_GCC3_OPTIONS="#+-Os +-Oz +-O +-O3 +-Oignore +a +b +c xb Xa Omagic ^-ccc-print-options " %clang x -O2 b -O3 2>&1 | FileCheck %s 2 // RUN: env QA_OVERRIDE_GCC3_OPTIONS="x-Werror +-mfoo" %clang -Werror %s -c 2>&1 | FileCheck %s -check-prefix=RM-WERROR 3 4 // FIXME: It seems doesn't work with gcc-driver. 5 // REQUIRES: clang-driver 6 7 // CHECK-NOT: ### 8 // CHECK: Option 0 - Name: "-ccc-print-options", Values: {} 9 // CHECK-NEXT: Option 1 - Name: "<input>", Values: {"x"} 10 // CHECK-NEXT: Option 2 - Name: "-O", Values: {"ignore"} 11 // CHECK-NEXT: Option 3 - Name: "-O", Values: {"magic"} 12 13 // RM-WERROR: ### QA_OVERRIDE_GCC3_OPTIONS: x-Werror +-mfoo 14 // RM-WERROR-NEXT: ### Deleting argument -Werror 15 // RM-WERROR-NEXT: ### Adding argument -mfoo at end 16 // RM-WERROR-NEXT: warning: argument unused during compilation: '-mfoo' 17