summaryrefslogtreecommitdiff
path: root/test/Analysis/taint-generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Analysis/taint-generic.c')
-rw-r--r--test/Analysis/taint-generic.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Analysis/taint-generic.c b/test/Analysis/taint-generic.c
index 696db67713ae..fe27070026bd 100644
--- a/test/Analysis/taint-generic.c
+++ b/test/Analysis/taint-generic.c
@@ -212,3 +212,14 @@ int SymSymExprWithDiffTypes(void* p) {
return 5/j; // expected-warning {{Division by a tainted value, possibly zero}}
}
+
+void constraintManagerShouldTreatAsOpaque(int rhs) {
+ int i;
+ scanf("%d", &i);
+ // This comparison used to hit an assertion in the constraint manager,
+ // which didn't handle NonLoc sym-sym comparisons.
+ if (i < rhs)
+ return;
+ if (i < rhs)
+ *(volatile int *) 0; // no-warning
+}