1*67e74705SXin Li // RUN: %clang_cc1 -fsyntax-only %s -verify 2*67e74705SXin Li // rdar://13081751 3*67e74705SXin Li 4*67e74705SXin Li typedef __SIZE_TYPE__ size_t; 5*67e74705SXin Li void *memset(void*, int, size_t); 6*67e74705SXin Li 7*67e74705SXin Li typedef struct __incomplete *incomplete; 8*67e74705SXin Li mt_query_for_domain(const char * domain)9*67e74705SXin Livoid mt_query_for_domain(const char *domain) 10*67e74705SXin Li { 11*67e74705SXin Li incomplete query = 0; 12*67e74705SXin Li 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*67e74705SXin Li // expected-note {{did you mean to dereference the argument to 'sizeof' (and multiply it by the number of elements)?}} 14*67e74705SXin Li } 15*67e74705SXin Li 16