1 | // RUN: %clang_cc1 -fsyntax-only %s -verify |
2 | // rdar://13081751 |
3 | |
4 | typedef __SIZE_TYPE__ size_t; |
5 | void *memset(void*, int, size_t); |
6 | |
7 | typedef struct __incomplete *incomplete; |
8 | |
9 | void mt_query_for_domain(const char *domain) |
10 | { |
11 | incomplete query = 0; |
12 | memset(query, 0, sizeof(query)); // expected-warning {{'memset' call operates on objects of type 'struct __incomplete' while the size is based on a different type 'incomplete'}} \ |
13 | // expected-note {{did you mean to dereference the argument to 'sizeof' (and multiply it by the number of elements)?}} |
14 | } |
15 | |
16 | |