aboutsummaryrefslogtreecommitdiff
path: root/test/Frontend
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-01-08 11:38:47 +0000
committerAlp Toker <alp@nuanti.com>2014-01-08 11:38:47 +0000
commit3a47e455037b741573f7c9c074c19c2594fb4cd3 (patch)
tree1684dab73567465d67e4748d1b921b9433caf0b7 /test/Frontend
parent3dc9e80234b0112a0463feaf65049bcd858d1d36 (diff)
downloadclang_35a-3a47e455037b741573f7c9c074c19c2594fb4cd3.tar.gz
Add tests for clang plugins
Somehow the entire plugin infrastructure went wholly untested until now. The only plugins available for use in testing are the examples, so plugin tests will only be run if CLANG_BUILD_EXAMPLES is enabled in the build. (The examples should really be enabled by default, not just to aid testing but also to prevent bitrot in some key user-facing code. I'll propose that shortly.) Requires supporting changes in LLVM r198746. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198747 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Frontend')
-rw-r--r--test/Frontend/plugins.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/Frontend/plugins.c b/test/Frontend/plugins.c
new file mode 100644
index 0000000000..8117f72fa7
--- /dev/null
+++ b/test/Frontend/plugins.c
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 -load %llvmshlibdir/PrintFunctionNames%pluginext -plugin print-fns %s 2>&1 | FileCheck %s
+// REQUIRES: plugins, examples
+
+// CHECK: top-level-decl: "x"
+void x();