[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Driver / plugin-driver-args.cpp
blobd6475b4b3d733a2b1f6d81291cc277aadea0566a
1 /// Test passing args to plugins via the clang driver and -fplugin-arg
2 // RUN: %clang -fplugin=%llvmshlibdir/CallSuperAttr%pluginext -fplugin-arg-call_super_plugin-help -fsyntax-only -### %s 2>&1 | FileCheck %s
4 // CHECK: "-load"
5 // CHECK-SAME: CallSuperAttr
6 // CHECK-SAME: "-plugin-arg-call_super_plugin"
7 // CHECK-SAME: "help"
9 /// Check that dashed-args get forwarded like this to the plugin.
10 /// Dashes cannot be part of the plugin name here
11 // 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 // CHECK-CMD: "-plugin-arg-call_super_plugin" "help-long"
14 /// Error handling for -fplugin-arg-
15 // RUN: %clang -fplugin=%llvmshlibdir/CallSuperAttr%pluginext -fplugin-arg- -fsyntax-only %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-PLUGIN-NAME
16 // CHECK-NO-PLUGIN-NAME: missing plugin name in -fplugin-arg-
18 // RUN: %clang -fplugin=%llvmshlibdir/CallSuperAttr%pluginext -fplugin-arg-testname -fsyntax-only %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-PLUGIN-ARG1
19 // CHECK-NO-PLUGIN-ARG1: missing plugin argument for plugin testname in -fplugin-arg-testname
21 // RUN: %clang -fplugin=%llvmshlibdir/CallSuperAttr%pluginext -fplugin-arg-testname- -fsyntax-only %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-PLUGIN-ARG2
22 // CHECK-NO-PLUGIN-ARG2: missing plugin argument for plugin testname in -fplugin-arg-testname-