brintos

brintos / llvm-project-archived public Read only

0
0
Text · 526 B · 025f7c0 Raw
15 lines · c
1// RUN: %clang_cc1 -fsyntax-only %s -verify2 3typedef __SIZE_TYPE__ size_t;4void *memset(void*, int, size_t);5 6typedef struct __incomplete *incomplete;7 8void mt_query_for_domain(const char *domain)9{10	incomplete	query = 0;11	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'}} \12	// expected-note {{did you mean to dereference the argument to 'sizeof' (and multiply it by the number of elements)?}}13}14 15