Home | History | Annotate | Download | only in SemaCXX

Lines Matching full:arithmetic

1 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -fblocks -Wnull-arithmetic -verify %s
14 a = 0 ? NULL + a : a + NULL; // expected-warning 2{{use of NULL in arithmetic operation}}
15 a = 0 ? NULL - a : a - NULL; // expected-warning 2{{use of NULL in arithmetic operation}}
16 a = 0 ? NULL / a : a / NULL; // expected-warning 2{{use of NULL in arithmetic operation}} \
18 a = 0 ? NULL * a : a * NULL; // expected-warning 2{{use of NULL in arithmetic operation}}
19 a = 0 ? NULL >> a : a >> NULL; // expected-warning 2{{use of NULL in arithmetic operation}}
20 a = 0 ? NULL << a : a << NULL; // expected-warning 2{{use of NULL in arithmetic operation}}
21 a = 0 ? NULL % a : a % NULL; // expected-warning 2{{use of NULL in arithmetic operation}} \
23 a = 0 ? NULL & a : a & NULL; // expected-warning 2{{use of NULL in arithmetic operation}}
24 a = 0 ? NULL | a : a | NULL; // expected-warning 2{{use of NULL in arithmetic operation}}
25 a = 0 ? NULL ^ a : a ^ NULL; // expected-warning 2{{use of NULL in arithmetic operation}}
27 // Check for warnings or errors when doing arithmetic on pointers and other
29 v = 0 ? NULL + &a : &a + NULL; // expected-warning 2{{use of NULL in arithmetic operation}}
36 v = 0 ? NULL + e : e + NULL; // expected-error 2{{arithmetic on a pointer to the function type 'void ()'}}
37 v = 0 ? NULL + f : f + NULL; // expected-warning 2{{use of NULL in arithmetic operation}}
38 v = 0 ? NULL + "f" : "f" + NULL; // expected-warning 2{{use of NULL in arithmetic operation}}
41 a = NULL + NULL; // expected-warning{{use of NULL in arithmetic operation}}
42 a = NULL - NULL; // expected-warning{{use of NULL in arithmetic operation}}
43 a = NULL / NULL; // expected-warning{{use of NULL in arithmetic operation}} \
45 a = NULL * NULL; // expected-warning{{use of NULL in arithmetic operation}}
46 a = NULL >> NULL; // expected-warning{{use of NULL in arithmetic operation}}
47 a = NULL << NULL; // expected-warning{{use of NULL in arithmetic operation}}
48 a = NULL % NULL; // expected-warning{{use of NULL in arithmetic operation}} \
50 a = NULL & NULL; // expected-warning{{use of NULL in arithmetic operation}}
51 a = NULL | NULL; // expected-warning{{use of NULL in arithmetic operation}}
52 a = NULL ^ NULL; // expected-warning{{use of NULL in arithmetic operation}}
54 a += NULL; // expected-warning{{use of NULL in arithmetic operation}}
55 a -= NULL; // expected-warning{{use of NULL in arithmetic operation}}
56 a /= NULL; // expected-warning{{use of NULL in arithmetic operation}} \
58 a *= NULL; // expected-warning{{use of NULL in arithmetic operation}}
59 a >>= NULL; // expected-warning{{use of NULL in arithmetic operation}}
60 a <<= NULL; // expected-warning{{use of NULL in arithmetic operation}}
61 a %= NULL; // expected-warning{{use of NULL in arithmetic operation}} \
63 a &= NULL; // expected-warning{{use of NULL in arithmetic operation}}
64 a |= NULL; // expected-warning{{use of NULL in arithmetic operation}}
65 a ^= NULL; // expected-warning{{use of NULL in arithmetic operation}}