// RUN: %clang_cc1 -fsyntax-only -verify -Wformat-nonliteral %s

typedef __typeof(sizeof(int)) size_t;
typedef struct _FILE FILE;

int fscanf(FILE * restrict, const char * restrict, ...) ;
int scanf(const char * restrict, ...) ;
int sscanf(const char * restrict, const char * restrict, ...) ;

void test(const char *s, int *i) {
  scanf(s, i); // expected-warning{{ormat string is not a string literal}}
  scanf("%0d", i); // expected-warning{{conversion specifies 0 input characters for field width}}
  scanf("%00d", i); // expected-warning{{conversion specifies 0 input characters for field width}}
}

Add initial test cases for scanf format string checking.
Add initial test cases for scanf format string checking.

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@108503 91177308-0d34-0410-b5e6-96231b3b80d8
