2011-02-18 05:39:33 +08:00
|
|
|
// RUN: %clang_cc1 -analyze -analyzer-checker=core.experimental.SizeofPtr -verify %s
|
2009-11-09 10:28:12 +08:00
|
|
|
|
|
|
|
struct s {
|
|
|
|
};
|
|
|
|
|
|
|
|
int f(struct s *p) {
|
|
|
|
return sizeof(p); // expected-warning{{The code calls sizeof() on a pointer type. This can produce an unexpected result.}}
|
|
|
|
}
|