From 099d4ee12587cf9a6bb44ceabdd8f9605f86853a Mon Sep 17 00:00:00 2001 From: Alp Toker Date: Thu, 9 Jan 2014 00:47:40 +0000 Subject: [PATCH] Add a test for Static Analyzer checker plugins llvm-svn: 198820 --- clang/test/Analysis/checker-plugins.c | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 clang/test/Analysis/checker-plugins.c diff --git a/clang/test/Analysis/checker-plugins.c b/clang/test/Analysis/checker-plugins.c new file mode 100644 index 000000000000..3882ba6661b4 --- /dev/null +++ b/clang/test/Analysis/checker-plugins.c @@ -0,0 +1,10 @@ +// RUN: %clang_cc1 -load %llvmshlibdir/SampleAnalyzerPlugin%pluginext -analyze -analyzer-checker='example.MainCallChecker' -verify %s +// REQUIRES: plugins, examples + +// Test that the MainCallChecker example analyzer plugin loads and runs. + +int main(); + +void caller() { + main(); // expected-warning {{call to main}} +}