summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Analysis/taint-generic.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/Analysis/taint-generic.c b/clang/test/Analysis/taint-generic.c
index 2e3def36709..54229937d14 100644
--- a/clang/test/Analysis/taint-generic.c
+++ b/clang/test/Analysis/taint-generic.c
@@ -26,3 +26,8 @@ void bufferScanfArithmetic2(int x) {
int m = (n + 3) * x;
Buffer[m] = 1; // expected-warning {{Out of bound memory access }}
}
+
+void scanfArg() {
+ int t;
+ scanf("%d", t); // expected-warning {{Pointer argument is expected}}
+}
OpenPOWER on IntegriCloud