2017-08-02 15:20:27 +08:00
|
|
|
// Test for the --autocompletion flag, which is an API used for shell
|
|
|
|
// autocompletion. You may have to update tests in this file when you
|
|
|
|
// add/modify flags, change HelpTexts or the values of some flags.
|
|
|
|
|
2017-05-24 02:39:08 +08:00
|
|
|
// RUN: %clang --autocomplete=-fsyn | FileCheck %s -check-prefix=FSYN
|
|
|
|
// FSYN: -fsyntax-only
|
2017-07-26 21:36:58 +08:00
|
|
|
// RUN: %clang --autocomplete=-std= | FileCheck %s -check-prefix=STD
|
|
|
|
// STD: -std= Language standard to compile for
|
2017-06-22 00:50:38 +08:00
|
|
|
// RUN: %clang --autocomplete=foo | FileCheck %s -check-prefix=FOO
|
|
|
|
// FOO-NOT: foo
|
2017-06-21 00:31:31 +08:00
|
|
|
// RUN: %clang --autocomplete=-stdlib=,l | FileCheck %s -check-prefix=STDLIB
|
2017-07-26 21:36:58 +08:00
|
|
|
// STDLIB: libc++
|
|
|
|
// STDLIB-NEXT: libstdc++
|
2017-06-21 00:31:31 +08:00
|
|
|
// RUN: %clang --autocomplete=-stdlib=, | FileCheck %s -check-prefix=STDLIBALL
|
2017-07-26 21:36:58 +08:00
|
|
|
// STDLIBALL: libc++
|
|
|
|
// STDLIBALL-NEXT: libstdc++
|
|
|
|
// STDLIBALL-NEXT: platform
|
2017-06-21 00:31:31 +08:00
|
|
|
// RUN: %clang --autocomplete=-meabi,d | FileCheck %s -check-prefix=MEABI
|
|
|
|
// MEABI: default
|
|
|
|
// RUN: %clang --autocomplete=-meabi, | FileCheck %s -check-prefix=MEABIALL
|
2017-07-26 21:36:58 +08:00
|
|
|
// MEABIALL: 4
|
|
|
|
// MEABIALL-NEXT: 5
|
|
|
|
// MEABIALL-NEXT: default
|
|
|
|
// MEABIALL-NEXT: gnu
|
2017-06-21 00:31:31 +08:00
|
|
|
// RUN: %clang --autocomplete=-cl-std=,CL2 | FileCheck %s -check-prefix=CLSTD
|
|
|
|
// CLSTD: CL2.0
|
|
|
|
// RUN: %clang --autocomplete=-cl-std=, | FileCheck %s -check-prefix=CLSTDALL
|
2017-07-26 21:36:58 +08:00
|
|
|
// CLSTDALL: cl
|
|
|
|
// CLSTDALL-NEXT: CL
|
|
|
|
// CLSTDALL-NEXT: cl1.1
|
|
|
|
// CLSTDALL-NEXT: CL1.1
|
|
|
|
// CLSTDALL-NEXT: cl1.2
|
|
|
|
// CLSTDALL-NEXT: CL1.2
|
|
|
|
// CLSTDALL-NEXT: cl2.0
|
|
|
|
// CLSTDALL-NEXT: CL2.0
|
2017-06-21 00:31:31 +08:00
|
|
|
// RUN: %clang --autocomplete=-fno-sanitize-coverage=,f | FileCheck %s -check-prefix=FNOSANICOVER
|
|
|
|
// FNOSANICOVER: func
|
|
|
|
// RUN: %clang --autocomplete=-fno-sanitize-coverage=, | FileCheck %s -check-prefix=FNOSANICOVERALL
|
2017-07-26 21:36:58 +08:00
|
|
|
// FNOSANICOVERALL: 8bit-counters
|
|
|
|
// FNOSANICOVERALL-NEXT: bb
|
|
|
|
// FNOSANICOVERALL-NEXT: edge
|
|
|
|
// FNOSANICOVERALL-NEXT: func
|
|
|
|
// FNOSANICOVERALL-NEXT: indirect-calls
|
|
|
|
// FNOSANICOVERALL-NEXT: inline-8bit-counters
|
|
|
|
// FNOSANICOVERALL-NEXT: no-prune
|
|
|
|
// FNOSANICOVERALL-NEXT: trace-bb
|
|
|
|
// FNOSANICOVERALL-NEXT: trace-cmp
|
|
|
|
// FNOSANICOVERALL-NEXT: trace-div
|
|
|
|
// FNOSANICOVERALL-NEXT: trace-gep
|
|
|
|
// FNOSANICOVERALL-NEXT: trace-pc
|
|
|
|
// FNOSANICOVERALL-NEXT: trace-pc-guard
|
2017-06-21 00:31:31 +08:00
|
|
|
// RUN: %clang --autocomplete=-ffp-contract=, | FileCheck %s -check-prefix=FFPALL
|
2017-07-26 21:36:58 +08:00
|
|
|
// FFPALL: fast
|
|
|
|
// FFPALL-NEXT: off
|
|
|
|
// FFPALL-NEXT: on
|
2017-06-21 00:31:31 +08:00
|
|
|
// RUN: %clang --autocomplete=-flto=, | FileCheck %s -check-prefix=FLTOALL
|
2017-07-26 21:36:58 +08:00
|
|
|
// FLTOALL: full
|
|
|
|
// FLTOALL-NEXT: thin
|
2017-06-21 00:31:31 +08:00
|
|
|
// RUN: %clang --autocomplete=-fveclib=, | FileCheck %s -check-prefix=FVECLIBALL
|
2017-07-26 21:36:58 +08:00
|
|
|
// FVECLIBALL: Accelerate
|
|
|
|
// FVECLIBALL-NEXT: none
|
|
|
|
// FVECLIBALL-NEXT: SVML
|
2017-06-21 00:31:31 +08:00
|
|
|
// RUN: %clang --autocomplete=-fshow-overloads=, | FileCheck %s -check-prefix=FSOVERALL
|
2017-07-26 21:36:58 +08:00
|
|
|
// FSOVERALL: all
|
|
|
|
// FSOVERALL-NEXT: best
|
2017-06-21 00:31:31 +08:00
|
|
|
// RUN: %clang --autocomplete=-fvisibility=, | FileCheck %s -check-prefix=FVISIBILITYALL
|
2017-07-26 21:36:58 +08:00
|
|
|
// FVISIBILITYALL: default
|
|
|
|
// FVISIBILITYALL-NEXT: hidden
|
2017-06-21 00:31:31 +08:00
|
|
|
// RUN: %clang --autocomplete=-mfloat-abi=, | FileCheck %s -check-prefix=MFLOATABIALL
|
2017-07-26 21:36:58 +08:00
|
|
|
// MFLOATABIALL: hard
|
|
|
|
// MFLOATABIALL-NEXT: soft
|
|
|
|
// MFLOATABIALL-NEXT: softfp
|
2017-06-21 00:31:31 +08:00
|
|
|
// RUN: %clang --autocomplete=-mthread-model, | FileCheck %s -check-prefix=MTHREADMODELALL
|
2017-07-26 21:36:58 +08:00
|
|
|
// MTHREADMODELALL: posix
|
|
|
|
// MTHREADMODELALL-NEXT: single
|
2017-06-24 01:05:50 +08:00
|
|
|
// RUN: %clang --autocomplete=-mrelocation-model, | FileCheck %s -check-prefix=MRELOCMODELALL
|
2017-07-26 21:36:58 +08:00
|
|
|
// MRELOCMODELALL: dynamic-no-pic
|
|
|
|
// MRELOCMODELALL-NEXT: pic
|
|
|
|
// MRELOCMODELALL-NEXT: ropi
|
|
|
|
// MRELOCMODELALL-NEXT: ropi-rwpi
|
|
|
|
// MRELOCMODELALL-NEXT: rwpi
|
|
|
|
// MRELOCMODELALL-NEXT: static
|
2017-07-09 01:48:59 +08:00
|
|
|
// RUN: %clang --autocomplete=-mrelocation-mode | FileCheck %s -check-prefix=MRELOCMODEL_CLANG
|
|
|
|
// MRELOCMODEL_CLANG-NOT: -mrelocation-model
|
|
|
|
// RUN: %clang --autocomplete=#-mrelocation-mode | FileCheck %s -check-prefix=MRELOCMODEL_CC1
|
|
|
|
// MRELOCMODEL_CC1: -mrelocation-model
|
2017-07-16 23:07:20 +08:00
|
|
|
// RUN: %clang --autocomplete=-Wma | FileCheck %s -check-prefix=WARNING
|
2017-07-26 21:36:58 +08:00
|
|
|
// WARNING: -Wmacro-redefined
|
|
|
|
// WARNING-NEXT: -Wmain
|
|
|
|
// WARNING-NEXT: -Wmain-return-type
|
|
|
|
// WARNING-NEXT: -Wmalformed-warning-check
|
|
|
|
// WARNING-NEXT: -Wmany-braces-around-scalar-init
|
|
|
|
// WARNING-NEXT: -Wmax-unsigned-zero
|
2017-07-22 20:35:15 +08:00
|
|
|
// RUN: %clang --autocomplete=-Wno-invalid-pp- | FileCheck %s -check-prefix=NOWARNING
|
|
|
|
// NOWARNING: -Wno-invalid-pp-token
|