sizeofpointer.c revision c24e9f3a5782096d0bdd9e8aa9f80955a3b60bbd
1// RUN: clang-cc -analyze -warn-sizeof-pointer -verify %s
2
3struct s {
4};
5
6int f(struct s *p) {
7  return sizeof(p); // expected-warning{{The code calls sizeof() on a pointer type. This can produce an unexpected result.}}
8}
9