summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/coverage.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Analysis/coverage.c')
-rw-r--r--clang/test/Analysis/coverage.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Analysis/coverage.c b/clang/test/Analysis/coverage.c
index 73d78da1864..811691391eb 100644
--- a/clang/test/Analysis/coverage.c
+++ b/clang/test/Analysis/coverage.c
@@ -92,3 +92,11 @@ void coverage9(int *x) {
function_which_gives_up_settonull(&x);
y = (*x); // no warning
}
+
+static void empty_function(){
+}
+int use_empty_function(int x) {
+ x = 0;
+ empty_function();
+ return 5/x; //expected-warning {{Division by zero}}
+}
OpenPOWER on IntegriCloud