1 // RUN: %clang_analyze_cc1 -analyzer-checker=alpha.security.taint,debug.TaintTest %s -verify
2 // expected-no-diagnostics
4 typedef struct _FILE
FILE;
5 typedef __typeof(sizeof(int)) size_t;
8 ssize_t
getline(char ** __restrict
, size_t * __restrict
, FILE * __restrict
);
9 int printf(const char * __restrict
, ...);
10 int snprintf(char *, size_t, const char *, ...);
13 struct GetLineTestStruct
{
14 ssize_t
getline(char ** __restrict
, size_t * __restrict
, FILE * __restrict
);
17 void getlineTest(void) {
22 struct GetLineTestStruct T
;
24 while ((read
= T
.getline(&line
, &len
, stdin
)) != -1) {
25 printf("%s", line
); // no warning
31 void testOpaqueClass(opaque
*obj
) {
33 snprintf(buf
, 20, "%p", obj
); // don't crash trying to load *obj