r198820 - Add a test for Static Analyzer checker plugins

Alp Toker alp at nuanti.com
Wed Jan 8 16:47:40 PST 2014


Author: alp
Date: Wed Jan  8 18:47:40 2014
New Revision: 198820

URL: http://llvm.org/viewvc/llvm-project?rev=198820&view=rev
Log:
Add a test for Static Analyzer checker plugins

Added:
    cfe/trunk/test/Analysis/checker-plugins.c

Added: cfe/trunk/test/Analysis/checker-plugins.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/checker-plugins.c?rev=198820&view=auto
==============================================================================
--- cfe/trunk/test/Analysis/checker-plugins.c (added)
+++ cfe/trunk/test/Analysis/checker-plugins.c Wed Jan  8 18:47:40 2014
@@ -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}}
+}





More information about the cfe-commits mailing list