1 /* { dg-additional-options "-fanalyzer-checker=pattern-test" } */
5 extern void foo(void *);
6 extern void bar(void *);
10 if (ptr
) { /* { dg-warning "pattern match on 'ptr != 0'" "ptr != 0" } */
11 /* { dg-warning "pattern match on 'ptr == 0'" "ptr == 0" { target *-*-* } .-1 } */
18 void test_2 (void *p
, void *q
)
20 if (p
== NULL
|| q
== NULL
) /* { dg-line cond_2 } */
24 /* { dg-warning "pattern match on 'p == 0'" "p == 0" { target *-*-* } cond_2 } */
25 /* { dg-warning "pattern match on 'q == 0'" "q == 0" { target *-*-* } cond_2 } */
26 /* { dg-warning "pattern match on 'p != 0'" "p != 0" { target *-*-* } cond_2 } */
27 /* { dg-warning "pattern match on 'q != 0'" "q != 0" { target *-*-* } cond_2 } */