Skip to content

Commit

Permalink
Fix signature of vsscanf in Builtins.def
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146392 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
zmodem committed Dec 12, 2011
1 parent d95a8ab commit c08e618
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/clang/Basic/Builtins.def
Expand Up @@ -661,7 +661,7 @@ LIBBUILTIN(fscanf, "iP*cC*.", "fs:1:", "stdio.h", ALL_LANGUAGES)
LIBBUILTIN(sscanf, "icC*cC*.", "fs:1:", "stdio.h", ALL_LANGUAGES)
LIBBUILTIN(vscanf, "icC*a", "fS:0:", "stdio.h", ALL_LANGUAGES)
LIBBUILTIN(vfscanf, "iP*cC*a", "fS:1:", "stdio.h", ALL_LANGUAGES)
LIBBUILTIN(vsscanf, "ic*cC*a", "fS:1:", "stdio.h", ALL_LANGUAGES)
LIBBUILTIN(vsscanf, "icC*cC*a", "fS:1:", "stdio.h", ALL_LANGUAGES)
// C99
LIBBUILTIN(longjmp, "vJi", "fr", "setjmp.h", ALL_LANGUAGES)

Expand Down
2 changes: 1 addition & 1 deletion test/Sema/format-strings-scanf.c
Expand Up @@ -12,7 +12,7 @@ int my_scanf(const char * restrict, ...) __attribute__((__format__(__scanf__, 1,

int vscanf(const char * restrict, va_list);
int vfscanf(FILE * restrict, const char * restrict, va_list);
int vsscanf(char * restrict, const char * restrict, va_list);
int vsscanf(const char * restrict, const char * restrict, va_list);

void test(const char *s, int *i) {
scanf(s, i); // expected-warning{{ormat string is not a string literal}}
Expand Down

0 comments on commit c08e618

Please sign in to comment.