blob: b65b7a6b0e7b020ba8993cd3af4ae2c768690f6c [file] [log] [blame]
Jordan Roseb54cfa32013-02-01 19:50:01 +00001// Like the compiler, the static analyzer treats some functions differently if
2// they come from a system header -- for example, it is assumed that system
3// functions do not arbitrarily free() their parameters, and that some bugs
4// found in system headers cannot be fixed by the user and should be
5// suppressed.
Anna Zaks2ed51252012-11-06 04:20:57 +00006#pragma clang system_header
7
8typedef struct __sFILE {
9 unsigned char *_p;
10} FILE;
11FILE *fopen(const char * restrict, const char * restrict) __asm("_" "fopen" );
12int fputc(int, FILE *);
13int fputs(const char * restrict, FILE * restrict) __asm("_" "fputs" );
14int fclose(FILE *);
15void exit(int);
Anna Zaksacdc13c2013-02-07 23:05:43 +000016
17// The following is a fake system header function
18typedef struct __FileStruct {
19 FILE * p;
20} FileStruct;
21void fakeSystemHeaderCall(FileStruct *);