1 // RUN: %clang_cc1 -analyze -analyzer-checker=core,experimental.core -analyzer-store=region -verify %s
3 // Just exercise the analyzer on code that has at one point caused issues
4 // (i.e., no assertions or crashes).
7 static void f1(const char *x, char *y) {
13 // This following case checks that we properly handle typedefs when getting
14 // the RvalueType of an ElementRegion.
15 typedef struct F12_struct {} F12_typedef;
16 typedef void* void_typedef;
17 void_typedef f2_helper();
18 static void f2(void *buf) {
21 memcpy((&x[1]), (buf), 1); // expected-warning{{implicitly declaring C library function 'memcpy' with type 'void *(void *, const void *}} \
22 // expected-note{{please include the header <string.h> or explicitly provide a declaration for 'memcpy'}}