blob: 6d0a2c4d2c26b47a86431d437977c8ece994718c [file] [log] [blame]
Argyrios Kyrtzidis7dd445e2011-02-17 21:39:33 +00001// RUN: %clang_cc1 -analyze -analyzer-checker=core.experimental.SizeofPtr -verify %s
Zhongxing Xuc24e9f32009-11-09 02:28:12 +00002
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}