1*3e67cf21STimm Bäder /// Test passing args to plugins via the clang driver and -fplugin-arg 2*3e67cf21STimm Bäder // RUN: %clang -fplugin=%llvmshlibdir/CallSuperAttr%pluginext -fplugin-arg-call_super_plugin-help -fsyntax-only -### %s 2>&1 | FileCheck %s 3*3e67cf21STimm Bäder 4*3e67cf21STimm Bäder // CHECK: "-load" 5*3e67cf21STimm Bäder // CHECK-SAME: CallSuperAttr 6*3e67cf21STimm Bäder // CHECK-SAME: "-plugin-arg-call_super_plugin" 7*3e67cf21STimm Bäder // CHECK-SAME: "help" 8*3e67cf21STimm Bäder 9*3e67cf21STimm Bäder /// Check that dashed-args get forwarded like this to the plugin. 10*3e67cf21STimm Bäder /// Dashes cannot be part of the plugin name here 11*3e67cf21STimm Bäder // RUN: %clang -fplugin=%llvmshlibdir/CallSuperAttr%pluginext -fplugin-arg-call_super_plugin-help-long -fsyntax-only %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CMD 12*3e67cf21STimm Bäder // CHECK-CMD: "-plugin-arg-call_super_plugin" "help-long" 13*3e67cf21STimm Bäder 14*3e67cf21STimm Bäder /// Error handling for -fplugin-arg- 15*3e67cf21STimm Bäder // RUN: %clang -fplugin=%llvmshlibdir/CallSuperAttr%pluginext -fplugin-arg- -fsyntax-only %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-PLUGIN-NAME 16*3e67cf21STimm Bäder // CHECK-NO-PLUGIN-NAME: missing plugin name in -fplugin-arg- 17*3e67cf21STimm Bäder 18*3e67cf21STimm Bäder // RUN: %clang -fplugin=%llvmshlibdir/CallSuperAttr%pluginext -fplugin-arg-testname -fsyntax-only %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-PLUGIN-ARG1 19*3e67cf21STimm Bäder // CHECK-NO-PLUGIN-ARG1: missing plugin argument for plugin testname in -fplugin-arg-testname 20*3e67cf21STimm Bäder 21*3e67cf21STimm Bäder // RUN: %clang -fplugin=%llvmshlibdir/CallSuperAttr%pluginext -fplugin-arg-testname- -fsyntax-only %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-PLUGIN-ARG2 22*3e67cf21STimm Bäder // CHECK-NO-PLUGIN-ARG2: missing plugin argument for plugin testname in -fplugin-arg-testname- 23